code_text
stringlengths
604
999k
repo_name
stringlengths
4
100
file_path
stringlengths
4
873
language
stringclasses
23 values
license
stringclasses
15 values
size
int32
1.02k
999k
classdef kernel < handle properties isAllocated = 0 cKernel end methods function mode_ = mode(this) mode_ = calllib('libocca', 'occaKernelMode', this.cKernel); end function this = kernel(cKernel_) this.cKernel = cKernel_; this.isAllocated = 1; end function size_ = preferredDimSize(this) size_ = calllib('libocca', 'occaKernelPreferredDimSize', this.cKernel); end function setWorkingDims(this, dims, itemsPerGroup, groups) if isnumeric(itemsPerGroup) ipg = itemsPerGroup(:); ipg = [ipg(1:dims); ones(3 - dims, 1)]; else ipg = [itemsPerGroup; ones(2,1)]; end if isnumeric(groups) grp = groups(:); grp = [grp(1:dims); ones(3 - dims, 1)]; else grp = [groups; ones(2,1)]; end calllib('libocca', 'occaKernelSetAllWorkingDims', this.cKernel, ... dims, ... ipg(1), ... ipg(2), ... ipg(3), ... grp(1), ... grp(2), ... grp(3)); end function varargout = subsref(this, index) indexArgs = numel(index); if indexArgs == 1 switch index.type case '.' switch index.subs case 'isAllocated' varargout{1} = this.isAllocated; case 'cKernel' varargout{1} = this.cKernel; end case '()' argList = calllib('libocca', 'occaCreateArgumentList'); for pos = 1:length(index.subs) arg = index.subs{pos}; if isa(arg, 'occa.memory') calllib('libocca', 'occaArgumentListAddArg', argList, ... pos - 1, ... arg.cMemory); else calllib('libocca', 'occaArgumentListAddArg', argList, ... pos - 1, ... arg.cPtr); end end calllib('libocca', 'occaKernelRun_', this.cKernel, ... argList); % calllib('libocca', 'occaArgumentListFree', argList); end else numargout = nargout(index(1).subs); [varargout{1:numargout}] = builtin('subsref', this, index); end end function timeTaken_ = timeTaken(this) timeTaken_ = calllib('libocca', 'occaKernelTimeTaken', this.cKernel); end function free(this) if this.isAllocated timeTaken_ = calllib('libocca', 'occaKernelFree', this.cKernel); this.isAllocated = 0; end end function delete(this) this.free() end end end
lcw/OCCA2
lib/+occa/kernel.m
Matlab
mit
3,650
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Inverse Hyperbolic Functions Overview</title> <link rel="stylesheet" href="../../math.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.77.1"> <link rel="home" href="../../index.html" title="Math Toolkit 2.2.0"> <link rel="up" href="../inv_hyper.html" title="Inverse Hyperbolic Functions"> <link rel="prev" href="../inv_hyper.html" title="Inverse Hyperbolic Functions"> <link rel="next" href="acosh.html" title="acosh"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../inv_hyper.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../inv_hyper.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acosh.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="math_toolkit.inv_hyper.inv_hyper_over"></a><a class="link" href="inv_hyper_over.html" title="Inverse Hyperbolic Functions Overview">Inverse Hyperbolic Functions Overview</a> </h3></div></div></div> <p> The exponential funtion is defined, for all objects for which this makes sense, as the power series <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb1.svg"></span>, with <span class="emphasis"><em><code class="literal">n! = 1x2x3x4x5...xn</code></em></span> (and <span class="emphasis"><em><code class="literal">0! = 1</code></em></span> by definition) being the factorial of <span class="emphasis"><em><code class="literal">n</code></em></span>. In particular, the exponential function is well defined for real numbers, complex number, quaternions, octonions, and matrices of complex numbers, among others. </p> <div class="blockquote"><blockquote class="blockquote"><p> <span class="emphasis"><em><span class="bold"><strong>Graph of exp on R</strong></span></em></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="inlinemediaobject"><img src="../../../graphs/exp_on_r.png"></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="emphasis"><em><span class="bold"><strong>Real and Imaginary parts of exp on C</strong></span></em></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="inlinemediaobject"><img src="../../../graphs/im_exp_on_c.png"></span> </p></blockquote></div> <p> The hyperbolic functions are defined as power series which can be computed (for reals, complex, quaternions and octonions) as: </p> <p> Hyperbolic cosine: <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb5.svg"></span> </p> <p> Hyperbolic sine: <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb6.svg"></span> </p> <p> Hyperbolic tangent: <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb7.svg"></span> </p> <div class="blockquote"><blockquote class="blockquote"><p> <span class="emphasis"><em><span class="bold"><strong>Trigonometric functions on R (cos: purple; sin: red; tan: blue)</strong></span></em></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="inlinemediaobject"><img src="../../../graphs/trigonometric.png"></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="emphasis"><em><span class="bold"><strong>Hyperbolic functions on r (cosh: purple; sinh: red; tanh: blue)</strong></span></em></span> </p></blockquote></div> <div class="blockquote"><blockquote class="blockquote"><p> <span class="inlinemediaobject"><img src="../../../graphs/hyperbolic.png"></span> </p></blockquote></div> <p> The hyperbolic sine is one to one on the set of real numbers, with range the full set of reals, while the hyperbolic tangent is also one to one on the set of real numbers but with range <code class="literal">[0;+&#8734;[</code>, and therefore both have inverses. The hyperbolic cosine is one to one from <code class="literal">]-&#8734;;+1[</code> onto <code class="literal">]-&#8734;;-1[</code> (and from <code class="literal">]+1;+&#8734;[</code> onto <code class="literal">]-&#8734;;-1[</code>); the inverse function we use here is defined on <code class="literal">]-&#8734;;-1[</code> with range <code class="literal">]-&#8734;;+1[</code>. </p> <p> The inverse of the hyperbolic tangent is called the Argument hyperbolic tangent, and can be computed as <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb15.svg"></span>. </p> <p> The inverse of the hyperbolic sine is called the Argument hyperbolic sine, and can be computed (for <code class="literal">[-1;-1+&#949;[</code>) as <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb17.svg"></span>. </p> <p> The inverse of the hyperbolic cosine is called the Argument hyperbolic cosine, and can be computed as <span class="inlinemediaobject"><img src="../../../equations/special_functions_blurb18.svg"></span>. </p> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014 Nikhar Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno Lalande, John Maddock, Johan R&#229;de, Gautam Sewani, Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../inv_hyper.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../inv_hyper.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acosh.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
BenKeyFSI/poedit
deps/boost/libs/math/doc/html/math_toolkit/inv_hyper/inv_hyper_over.html
HTML
mit
7,586
/** * Module dependencies. */ var express = require('express'); var mailer = require('lib/mailer'); var path = require('path'); var forgotpassword = require('./lib/forgotpassword'); /** * Exports Application */ var app = module.exports = express(); /** * Define routes for Forgot Password module */ app.post('/', function(req, res, next) { var meta = { ip: req.ip, ips: req.ips, host: req.get('host'), origin: req.get('origin'), referer: req.get('referer'), ua: req.get('user-agent') }; forgotpassword.createToken(req.body.email, meta, function (err) { if (err) { return res.json(500, { error: err.message }); }; return res.json(200); }) }); app.post('/verify', function(req, res, next) { forgotpassword.verifyToken(req.body.token, function (err) { if (err) { return res.json(500, { error: err.message }); }; return res.json(200); }) }); app.post('/reset', function(req, res, next) { forgotpassword.resetPassword(req.body, function (err, citizen) { if (err) { return res.json(500, { error: err.message }); }; req.login(citizen, function(err) { if (err) return res.json(500, { error: err.message }); return res.json(200); }); }); });
10Pines/app
lib/forgot-api/index.js
JavaScript
mit
1,260
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Sales * @copyright Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ $installer = $this; /* @var $installer Mage_Sales_Model_Entity_Setup */ $installer->startSetup(); $installer->installEntities(); $installer->endSetup();
fabiensebban/magento
app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.2-0.8.3.php
PHP
mit
1,114
#region Copyright // // DotNetNuke® - http://www.dotnetnuke.com // Copyright (c) 2002-2014 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion using DotNetNuke.Services.FileSystem.EventArgs; namespace DotNetNuke.Services.FileSystem { public interface IFileEventHandlers { void FileDeleted(object sender, FileDeletedEventArgs args); void FileRenamed(object sender, FileRenamedEventArgs args); void FileMoved(object sender, FileMovedEventArgs args); void FileAdded(object sender, FileAddedEventArgs args); void FileOverwritten(object sender, FileChangedEventArgs args); void FileMetadataChanged(object sender, FileChangedEventArgs args); void FolderAdded(object sender, FolderChangedEventArgs args); void FolderMoved(object sender, FolderMovedEventArgs args); void FolderRenamed(object sender, FolderRenamedEventArgs args); void FolderDeleted(object sender, FolderDeletedEventArgs args); } }
JoshuaBradley/Dnn.Platform
DNN Platform/Library/Services/FileSystem/IFileEventHandlers.cs
C#
mit
2,060
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Runtime.InteropServices; namespace HFATest { public struct Config { public const string hfaType = "simple"; public const string dllType = "native_cpp"; public const string floatType = "f64"; public const string DllName = "hfa" + "_" + hfaType + "_" + floatType + "_" + dllType; } public class TestMan { //--------------------------------------------- // Init Methods // --------------------------------------------------- [DllImport(Config.DllName, EntryPoint = "init_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA01(out HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA02(out HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA03(out HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA05(out HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA08(out HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA11(out HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "init_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern void Init_HFA19(out HFA19 hfa); // --------------------------------------------------- // Identity Methods // --------------------------------------------------- [DllImport(Config.DllName, EntryPoint = "identity_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern HFA01 Identity_HFA01(HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern HFA02 Identity_HFA02(HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern HFA03 Identity_HFA03(HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern HFA05 Identity_HFA05(HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern HFA08 Identity_HFA08(HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern HFA11 Identity_HFA11(HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "identity_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern HFA19 Identity_HFA19(HFA19 hfa); // --------------------------------------------------- // Get Methods // --------------------------------------------------- [DllImport(Config.DllName, EntryPoint = "get_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern HFA01 Get_HFA01(); [DllImport(Config.DllName, EntryPoint = "get_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern HFA02 Get_HFA02(); [DllImport(Config.DllName, EntryPoint = "get_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern HFA03 Get_HFA03(); [DllImport(Config.DllName, EntryPoint = "get_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern HFA05 Get_HFA05(); [DllImport(Config.DllName, EntryPoint = "get_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern HFA08 Get_HFA08(); [DllImport(Config.DllName, EntryPoint = "get_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern HFA11 Get_HFA11(); [DllImport(Config.DllName, EntryPoint = "get_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern HFA19 Get_HFA19(); public static readonly double EXPECTED_SUM_HFA01 = Get_EXPECTED_SUM_HFA01(); public static readonly double EXPECTED_SUM_HFA02 = Get_EXPECTED_SUM_HFA02(); public static readonly double EXPECTED_SUM_HFA03 = Get_EXPECTED_SUM_HFA03(); public static readonly double EXPECTED_SUM_HFA05 = Get_EXPECTED_SUM_HFA05(); public static readonly double EXPECTED_SUM_HFA08 = Get_EXPECTED_SUM_HFA08(); public static readonly double EXPECTED_SUM_HFA11 = Get_EXPECTED_SUM_HFA11(); public static readonly double EXPECTED_SUM_HFA19 = Get_EXPECTED_SUM_HFA19(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA01(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA02(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA03(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA05(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA08(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA11(); [DllImport(Config.DllName, EntryPoint = "get_EXPECTED_SUM_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Get_EXPECTED_SUM_HFA19(); [DllImport(Config.DllName, EntryPoint = "sum_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA01(HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA02(HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA03(HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA05(HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA08(HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA11(HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum_HFA19(HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA01(float v1, long v2, HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA02(float v1, long v2, HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA03(float v1, long v2, HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA05(float v1, long v2, HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA08(float v1, long v2, HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA11(float v1, long v2, HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum3_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum3_HFA19(float v1, long v2, HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA01(long v1, double v2, int v3, sbyte v4, HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA02(long v1, double v2, int v3, sbyte v4, HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA03(long v1, double v2, int v3, sbyte v4, HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA05(long v1, double v2, int v3, sbyte v4, HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA08(long v1, double v2, int v3, sbyte v4, HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA11(long v1, double v2, int v3, sbyte v4, HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum5_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum5_HFA19(long v1, double v2, int v3, sbyte v4, HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA01(float v1, double v2, long v3, sbyte v4, double v5, HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA02(float v1, double v2, long v3, sbyte v4, double v5, HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA03(float v1, double v2, long v3, sbyte v4, double v5, HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA05(float v1, double v2, long v3, sbyte v4, double v5, HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA08(float v1, double v2, long v3, sbyte v4, double v5, HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA11(float v1, double v2, long v3, sbyte v4, double v5, HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum8_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum8_HFA19(float v1, double v2, long v3, sbyte v4, double v5, HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA01(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA02(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA03(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA05(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA08(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA11(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum11_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum11_HFA19(double v1, float v2, float v3, int v4, float v5, long v6, double v7, float v8, HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA01(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA02(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA03(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA05(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA08(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA11(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "sum19_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Sum19_HFA19(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA19 hfa); // --------------------------------------------------- // Average Methods // --------------------------------------------------- [DllImport(Config.DllName, EntryPoint = "average_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA01(HFA01 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA02(HFA02 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA03(HFA03 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA05(HFA05 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA08(HFA08 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA11(HFA11 hfa); [DllImport(Config.DllName, EntryPoint = "average_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average_HFA19(HFA19 hfa); [DllImport(Config.DllName, EntryPoint = "average3_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3); [DllImport(Config.DllName, EntryPoint = "average3_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average3_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3); [DllImport(Config.DllName, EntryPoint = "average5_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5); [DllImport(Config.DllName, EntryPoint = "average5_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average5_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5); [DllImport(Config.DllName, EntryPoint = "average8_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8); [DllImport(Config.DllName, EntryPoint = "average8_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average8_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8); [DllImport(Config.DllName, EntryPoint = "average11_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11); [DllImport(Config.DllName, EntryPoint = "average11_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average11_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11); [DllImport(Config.DllName, EntryPoint = "average19_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11, HFA01 hfa12, HFA01 hfa13, HFA01 hfa14, HFA01 hfa15, HFA01 hfa16, HFA01 hfa17, HFA01 hfa18, HFA01 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11, HFA02 hfa12, HFA02 hfa13, HFA02 hfa14, HFA02 hfa15, HFA02 hfa16, HFA02 hfa17, HFA02 hfa18, HFA02 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11, HFA03 hfa12, HFA03 hfa13, HFA03 hfa14, HFA03 hfa15, HFA03 hfa16, HFA03 hfa17, HFA03 hfa18, HFA03 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11, HFA05 hfa12, HFA05 hfa13, HFA05 hfa14, HFA05 hfa15, HFA05 hfa16, HFA05 hfa17, HFA05 hfa18, HFA05 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11, HFA08 hfa12, HFA08 hfa13, HFA08 hfa14, HFA08 hfa15, HFA08 hfa16, HFA08 hfa17, HFA08 hfa18, HFA08 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11, HFA11 hfa12, HFA11 hfa13, HFA11 hfa14, HFA11 hfa15, HFA11 hfa16, HFA11 hfa17, HFA11 hfa18, HFA11 hfa19); [DllImport(Config.DllName, EntryPoint = "average19_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Average19_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11, HFA19 hfa12, HFA19 hfa13, HFA19 hfa14, HFA19 hfa15, HFA19 hfa16, HFA19 hfa17, HFA19 hfa18, HFA19 hfa19); // --------------------------------------------------- // Add Methods // --------------------------------------------------- [DllImport(Config.DllName, EntryPoint = "add01_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA01(HFA01 hfa1, float v1, HFA01 hfa2, int v2, HFA01 hfa3, short v3, double v4, HFA01 hfa4, HFA01 hfa5, float v5, long v6, float v7, HFA01 hfa6, float v8, HFA01 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA02(HFA02 hfa1, float v1, HFA02 hfa2, int v2, HFA02 hfa3, short v3, double v4, HFA02 hfa4, HFA02 hfa5, float v5, long v6, float v7, HFA02 hfa6, float v8, HFA02 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA03(HFA03 hfa1, float v1, HFA03 hfa2, int v2, HFA03 hfa3, short v3, double v4, HFA03 hfa4, HFA03 hfa5, float v5, long v6, float v7, HFA03 hfa6, float v8, HFA03 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA05(HFA05 hfa1, float v1, HFA05 hfa2, int v2, HFA05 hfa3, short v3, double v4, HFA05 hfa4, HFA05 hfa5, float v5, long v6, float v7, HFA05 hfa6, float v8, HFA05 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA08(HFA08 hfa1, float v1, HFA08 hfa2, int v2, HFA08 hfa3, short v3, double v4, HFA08 hfa4, HFA08 hfa5, float v5, long v6, float v7, HFA08 hfa6, float v8, HFA08 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA11(HFA11 hfa1, float v1, HFA11 hfa2, int v2, HFA11 hfa3, short v3, double v4, HFA11 hfa4, HFA11 hfa5, float v5, long v6, float v7, HFA11 hfa6, float v8, HFA11 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA19(HFA19 hfa1, float v1, HFA19 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA19 hfa4, HFA19 hfa5, float v5, long v6, float v7, HFA19 hfa6, float v8, HFA19 hfa7); [DllImport(Config.DllName, EntryPoint = "add01_HFA00", CallingConvention = CallingConvention.Cdecl)] public static extern double Add01_HFA00(HFA03 hfa1, float v1, HFA02 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA05 hfa4, HFA08 hfa5, float v5, long v6, float v7, HFA11 hfa6, float v8, HFA01 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA01(HFA01 hfa1, HFA01 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA01 hfa3, double v7, float v8, HFA01 hfa4, short v9, HFA01 hfa5, float v10, HFA01 hfa6, HFA01 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA02(HFA02 hfa1, HFA02 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA02 hfa3, double v7, float v8, HFA02 hfa4, short v9, HFA02 hfa5, float v10, HFA02 hfa6, HFA02 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA03(HFA03 hfa1, HFA03 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA03 hfa4, short v9, HFA03 hfa5, float v10, HFA03 hfa6, HFA03 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA05(HFA05 hfa1, HFA05 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA05 hfa3, double v7, float v8, HFA05 hfa4, short v9, HFA05 hfa5, float v10, HFA05 hfa6, HFA05 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA08(HFA08 hfa1, HFA08 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA08 hfa3, double v7, float v8, HFA08 hfa4, short v9, HFA08 hfa5, float v10, HFA08 hfa6, HFA08 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA11(HFA11 hfa1, HFA11 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA11 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA11 hfa5, float v10, HFA11 hfa6, HFA11 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA19(HFA19 hfa1, HFA19 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA19 hfa3, double v7, float v8, HFA19 hfa4, short v9, HFA19 hfa5, float v10, HFA19 hfa6, HFA19 hfa7); [DllImport(Config.DllName, EntryPoint = "add02_HFA00", CallingConvention = CallingConvention.Cdecl)] public static extern double Add02_HFA00(HFA01 hfa1, HFA05 hfa2, long v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA19 hfa5, float v10, HFA08 hfa6, HFA02 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA01", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA01(float v1, sbyte v2, HFA01 hfa1, double v3, sbyte v4, HFA01 hfa2, long v5, short v6, int v7, HFA01 hfa3, HFA01 hfa4, float v8, HFA01 hfa5, float v9, HFA01 hfa6, float v10, HFA01 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA02", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA02(float v1, sbyte v2, HFA02 hfa1, double v3, sbyte v4, HFA02 hfa2, long v5, short v6, int v7, HFA02 hfa3, HFA02 hfa4, float v8, HFA02 hfa5, float v9, HFA02 hfa6, float v10, HFA02 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA03", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA03(float v1, sbyte v2, HFA03 hfa1, double v3, sbyte v4, HFA03 hfa2, long v5, short v6, int v7, HFA03 hfa3, HFA03 hfa4, float v8, HFA03 hfa5, float v9, HFA03 hfa6, float v10, HFA03 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA05", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA05(float v1, sbyte v2, HFA05 hfa1, double v3, sbyte v4, HFA05 hfa2, long v5, short v6, int v7, HFA05 hfa3, HFA05 hfa4, float v8, HFA05 hfa5, float v9, HFA05 hfa6, float v10, HFA05 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA08", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA08(float v1, sbyte v2, HFA08 hfa1, double v3, sbyte v4, HFA08 hfa2, long v5, short v6, int v7, HFA08 hfa3, HFA08 hfa4, float v8, HFA08 hfa5, float v9, HFA08 hfa6, float v10, HFA08 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA11", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA11(float v1, sbyte v2, HFA11 hfa1, double v3, sbyte v4, HFA11 hfa2, long v5, short v6, int v7, HFA11 hfa3, HFA11 hfa4, float v8, HFA11 hfa5, float v9, HFA11 hfa6, float v10, HFA11 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA19", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA19(float v1, sbyte v2, HFA19 hfa1, double v3, sbyte v4, HFA19 hfa2, long v5, short v6, int v7, HFA19 hfa3, HFA19 hfa4, float v8, HFA19 hfa5, float v9, HFA19 hfa6, float v10, HFA19 hfa7); [DllImport(Config.DllName, EntryPoint = "add03_HFA00", CallingConvention = CallingConvention.Cdecl)] public static extern double Add03_HFA00(float v1, sbyte v2, HFA08 hfa1, double v3, sbyte v4, HFA19 hfa2, long v5, short v6, int v7, HFA03 hfa3, HFA01 hfa4, float v8, HFA11 hfa5, float v9, HFA02 hfa6, float v10, HFA05 hfa7); } }
blackdwarf/coreclr
tests/src/JIT/jit64/hfa/main/dll/hfa_interop_sd.cs
C#
mit
35,071
/* * Bitstream decoder. */ #include "duk_internal.h" /* Decode 'bits' bits from the input stream (bits must be 1...24). * When reading past bitstream end, zeroes are shifted in. The result * is signed to match duk_bd_decode_flagged. */ DUK_INTERNAL duk_uint32_t duk_bd_decode(duk_bitdecoder_ctx *ctx, duk_small_int_t bits) { duk_small_int_t shift; duk_uint32_t mask; duk_uint32_t tmp; /* Note: cannot read more than 24 bits without possibly shifting top bits out. * Fixable, but adds complexity. */ DUK_ASSERT(bits >= 1 && bits <= 24); while (ctx->currbits < bits) { #if 0 DUK_DDD(DUK_DDDPRINT("decode_bits: shift more data (bits=%ld, currbits=%ld)", (long) bits, (long) ctx->currbits)); #endif ctx->currval <<= 8; if (ctx->offset < ctx->length) { /* If ctx->offset >= ctx->length, we "shift zeroes in" * instead of croaking. */ ctx->currval |= ctx->data[ctx->offset++]; } ctx->currbits += 8; } #if 0 DUK_DDD(DUK_DDDPRINT("decode_bits: bits=%ld, currbits=%ld, currval=0x%08lx", (long) bits, (long) ctx->currbits, (unsigned long) ctx->currval)); #endif /* Extract 'top' bits of currval; note that the extracted bits do not need * to be cleared, we just ignore them on next round. */ shift = ctx->currbits - bits; mask = (((duk_uint32_t) 1U) << bits) - 1U; tmp = (ctx->currval >> shift) & mask; ctx->currbits = shift; /* remaining */ #if 0 DUK_DDD(DUK_DDDPRINT("decode_bits: %ld bits -> 0x%08lx (%ld), currbits=%ld, currval=0x%08lx", (long) bits, (unsigned long) tmp, (long) tmp, (long) ctx->currbits, (unsigned long) ctx->currval)); #endif return tmp; } DUK_INTERNAL duk_small_uint_t duk_bd_decode_flag(duk_bitdecoder_ctx *ctx) { return (duk_small_uint_t) duk_bd_decode(ctx, 1); } /* Decode a one-bit flag, and if set, decode a value of 'bits', otherwise return * default value. */ DUK_INTERNAL duk_uint32_t duk_bd_decode_flagged(duk_bitdecoder_ctx *ctx, duk_small_int_t bits, duk_uint32_t def_value) { if (duk_bd_decode_flag(ctx)) { return duk_bd_decode(ctx, bits); } else { return def_value; } } /* Signed variant, allows negative marker value. */ DUK_INTERNAL duk_int32_t duk_bd_decode_flagged_signed(duk_bitdecoder_ctx *ctx, duk_small_int_t bits, duk_int32_t def_value) { return (duk_int32_t) duk_bd_decode_flagged(ctx, bits, (duk_uint32_t) def_value); } /* Shared varint encoding. Match dukutil.py BitEncode.varuint(). */ DUK_INTERNAL duk_uint32_t duk_bd_decode_varuint(duk_bitdecoder_ctx *ctx) { duk_small_uint_t t; /* The bit encoding choices here are based on manual testing against * the actual varuints generated by genbuiltins.py. */ switch (duk_bd_decode(ctx, 2)) { case 0: return 0; /* [0,0] */ case 1: return duk_bd_decode(ctx, 2) + 1; /* [1,4] */ case 2: return duk_bd_decode(ctx, 5) + 5; /* [5,36] */ default: t = duk_bd_decode(ctx, 7); if (t == 0) { return duk_bd_decode(ctx, 20); } return (t - 1) + 37; /* [37,163] */ } } /* Decode a bit packed string from a custom format used by genbuiltins.py. * This function is here because it's used for both heap and thread inits. * Caller must supply the output buffer whose size is NOT checked! */ #define DUK__BITPACK_LETTER_LIMIT 26 #define DUK__BITPACK_LOOKUP1 26 #define DUK__BITPACK_LOOKUP2 27 #define DUK__BITPACK_SWITCH1 28 #define DUK__BITPACK_SWITCH 29 #define DUK__BITPACK_UNUSED1 30 #define DUK__BITPACK_EIGHTBIT 31 DUK_LOCAL const duk_uint8_t duk__bitpacked_lookup[16] = { DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3, DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7, DUK_ASC_8, DUK_ASC_9, DUK_ASC_UNDERSCORE, DUK_ASC_SPACE, 0x82, 0x80, DUK_ASC_DOUBLEQUOTE, DUK_ASC_LCURLY }; DUK_INTERNAL duk_small_uint_t duk_bd_decode_bitpacked_string(duk_bitdecoder_ctx *bd, duk_uint8_t *out) { duk_small_uint_t len; duk_small_uint_t mode; duk_small_uint_t t; duk_small_uint_t i; len = duk_bd_decode(bd, 5); if (len == 31) { len = duk_bd_decode(bd, 8); /* Support up to 256 bytes; rare. */ } mode = 32; /* 0 = uppercase, 32 = lowercase (= 'a' - 'A') */ for (i = 0; i < len; i++) { t = duk_bd_decode(bd, 5); if (t < DUK__BITPACK_LETTER_LIMIT) { t = t + DUK_ASC_UC_A + mode; } else if (t == DUK__BITPACK_LOOKUP1) { t = duk__bitpacked_lookup[duk_bd_decode(bd, 3)]; } else if (t == DUK__BITPACK_LOOKUP2) { t = duk__bitpacked_lookup[8 + duk_bd_decode(bd, 3)]; } else if (t == DUK__BITPACK_SWITCH1) { t = duk_bd_decode(bd, 5); DUK_ASSERT_DISABLE(t >= 0); /* unsigned */ DUK_ASSERT(t <= 25); t = t + DUK_ASC_UC_A + (mode ^ 32); } else if (t == DUK__BITPACK_SWITCH) { mode = mode ^ 32; t = duk_bd_decode(bd, 5); DUK_ASSERT_DISABLE(t >= 0); DUK_ASSERT(t <= 25); t = t + DUK_ASC_UC_A + mode; } else if (t == DUK__BITPACK_EIGHTBIT) { t = duk_bd_decode(bd, 8); } out[i] = (duk_uint8_t) t; } return len; }
mamontov-cpp/dukpp-03
duktape/src-input/duk_util_bitdecoder.c
C
mit
4,946
/* * GeoServer-Manager - Simple Manager Library for GeoServer * * Copyright (C) 2007,2011 GeoSolutions S.A.S. * http://www.geo-solutions.it * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package it.geosolutions.geoserver.rest.decoder.utils; import java.util.Iterator; import java.util.List; import org.jdom.Element; /** * * @author ETj (etj at geo-solutions.it) */ public abstract class JDOMListIterator<ELEM> implements Iterator<ELEM> { private final Iterator<Element> iter; public JDOMListIterator(List<Element> orig) { iter = orig.iterator(); } public boolean hasNext() { return iter.hasNext(); } public ELEM next() { return transform(iter.next()); } public abstract ELEM transform(Element listItem); public void remove() { throw new UnsupportedOperationException("Not supported."); } }
geosolutions-it/geoserver-manager
src/main/java/it/geosolutions/geoserver/rest/decoder/utils/JDOMListIterator.java
Java
mit
1,918
class PickANamePattern: def __init__(self, nameStr, gender): self._nameStr = nameStr self._namePattern = self._compute(self._nameStr, gender) def hasNamePattern(self): return self._namePattern is not None def getNamePattern(self): return self._namePattern def getNameString(self, pattern, gender): nameParts = self._getNameParts(gender) invNameParts = [] for i in xrange(len(nameParts)): invNameParts.append(invertDict(nameParts[i])) name = '' for i in xrange(len(pattern)): if pattern[i] != -1: if len(name): name += ' ' name += invNameParts[i][pattern[i]] return name def getNamePartString(self, gender, patternIndex, partIndex): nameParts = self._getNameParts(gender) invNamePart = invertDict(nameParts[patternIndex]) return invNamePart[partIndex] def _genWordListSplitPermutations(self, words): if not len(words): return if len(words) == 1: yield words return for permutation in self._genWordListSplitPermutations(words[1:]): yield [words[0]]+permutation yield [(words[0] + ' ')+permutation[0]]+permutation[1:] def _genNameSplitPermutations(self, name): for splitName in self._genWordListSplitPermutations(name.split()): yield splitName def _compute(self, nameStr, gender): return self._computeWithNameParts(nameStr, self._getNameParts(gender)) def _computeWithNameParts(self, nameStr, nameParts): for splitPermutation in self._genNameSplitPermutations(nameStr): pattern = self._recursiveCompute(splitPermutation, nameParts) if pattern is not None: return pattern return def _getNameParts(self, gender): pass def _recursiveCompute(self, words, nameParts, wi = 0, nwli = 0, pattern = None): if wi >= len(words): return pattern if nwli >= len(nameParts): return if words[wi] in nameParts[nwli]: if pattern is None: pattern = [-1] * len(nameParts) word2index = nameParts[nwli] newPattern = pattern[:] newPattern[nwli] = word2index[words[wi]] result = self._recursiveCompute(words, nameParts, wi + 1, nwli + 1, newPattern) if result: return result return self._recursiveCompute(words, nameParts, wi, nwli + 1, pattern) class PickANamePatternTwoPartLastName(PickANamePattern): def getNameString(self, pattern, gender): name = PickANamePattern.getNameString(self, pattern, gender) if pattern[-2] != -1: words = name.split() name = '' for word in words[:-2]: if len(name): name += ' ' name += word if len(name): name += ' ' name += words[-2] if words[-2] in set(self._getLastNameCapPrefixes()): name += words[-1].capitalize() else: name += words[-1] return name def _getLastNameCapPrefixes(self): return [] def _compute(self, nameStr, gender): nameParts = self._getNameParts(gender) combinedNameParts = nameParts[:-2] combinedNameParts.append({}) combinedIndex2indices = {} lastNamePrefixesCapped = set(self._getLastNameCapPrefixes()) k = 0 for first, i in nameParts[-2].iteritems(): capitalize = first in lastNamePrefixesCapped for second, j in nameParts[-1].iteritems(): combinedLastName = first if capitalize: combinedLastName += second.capitalize() else: combinedLastName += second combinedNameParts[-1][combinedLastName] = k combinedIndex2indices[k] = (i, j) k += 1 pattern = self._computeWithNameParts(nameStr, combinedNameParts) if pattern: combinedIndex = pattern[-1] pattern = pattern[:-1] pattern.append(-1) pattern.append(-1) if combinedIndex != -1: pattern[-2] = combinedIndex2indices[combinedIndex][0] pattern[-1] = combinedIndex2indices[combinedIndex][1] return pattern
ToonTownInfiniteRepo/ToontownInfinite
otp/namepanel/PickANamePattern.py
Python
mit
4,527
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var common_1 = require("@angular/common"); var domhandler_1 = require("../dom/domhandler"); var forms_1 = require("@angular/forms"); exports.SLIDER_VALUE_ACCESSOR = { provide: forms_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(function () { return Slider; }), multi: true }; var Slider = (function () { function Slider(el, domHandler, renderer) { this.el = el; this.domHandler = domHandler; this.renderer = renderer; this.min = 0; this.max = 100; this.orientation = 'horizontal'; this.onChange = new core_1.EventEmitter(); this.onSlideEnd = new core_1.EventEmitter(); this.handleValues = []; this.onModelChange = function () { }; this.onModelTouched = function () { }; } Slider.prototype.onMouseDown = function (event, index) { if (this.disabled) { return; } this.dragging = true; this.updateDomData(); this.sliderHandleClick = true; this.handleIndex = index; event.preventDefault(); }; Slider.prototype.onTouchStart = function (event, index) { var touchobj = event.changedTouches[0]; this.startHandleValue = (this.range) ? this.handleValues[index] : this.handleValue; this.dragging = true; this.handleIndex = index; if (this.orientation === 'horizontal') { this.startx = parseInt(touchobj.clientX, 10); this.barWidth = this.el.nativeElement.children[0].offsetWidth; } else { this.starty = parseInt(touchobj.clientY, 10); this.barHeight = this.el.nativeElement.children[0].offsetHeight; } event.preventDefault(); }; Slider.prototype.onTouchMove = function (event, index) { var touchobj = event.changedTouches[0], handleValue = 0; if (this.orientation === 'horizontal') { handleValue = Math.floor(((parseInt(touchobj.clientX, 10) - this.startx) * 100) / (this.barWidth)) + this.startHandleValue; } else { handleValue = Math.floor(((this.starty - parseInt(touchobj.clientY, 10)) * 100) / (this.barHeight)) + this.startHandleValue; } this.setValueFromHandle(event, handleValue); event.preventDefault(); }; Slider.prototype.onBarClick = function (event) { if (this.disabled) { return; } if (!this.sliderHandleClick) { this.updateDomData(); this.handleChange(event); } this.sliderHandleClick = false; }; Slider.prototype.ngAfterViewInit = function () { var _this = this; if (this.disabled) { return; } this.dragListener = this.renderer.listen('document', 'mousemove', function (event) { if (_this.dragging) { _this.handleChange(event); } }); this.mouseupListener = this.renderer.listen('document', 'mouseup', function (event) { if (_this.dragging) { _this.dragging = false; if (_this.range) { _this.onSlideEnd.emit({ originalEvent: event, values: _this.values }); } else { _this.onSlideEnd.emit({ originalEvent: event, value: _this.value }); } } }); }; Slider.prototype.handleChange = function (event) { var handleValue = this.calculateHandleValue(event); this.setValueFromHandle(event, handleValue); }; Slider.prototype.setValueFromHandle = function (event, handleValue) { var newValue = this.getValueFromHandle(handleValue); if (this.range) { if (this.step) { this.handleStepChange(newValue, this.values[this.handleIndex]); } else { this.handleValues[this.handleIndex] = handleValue; this.updateValue(newValue, event); } } else { if (this.step) { this.handleStepChange(newValue, this.value); } else { this.handleValue = handleValue; this.updateValue(newValue, event); } } }; Slider.prototype.handleStepChange = function (newValue, oldValue) { var diff = (newValue - oldValue); if (diff < 0 && (-1 * diff) >= this.step / 2) { newValue = oldValue - this.step; this.updateValue(newValue); this.updateHandleValue(); } else if (diff > 0 && diff >= this.step / 2) { newValue = oldValue + this.step; this.updateValue(newValue); this.updateHandleValue(); } }; Slider.prototype.writeValue = function (value) { if (this.range) this.values = value || [0, 0]; else this.value = value || 0; this.updateHandleValue(); }; Slider.prototype.registerOnChange = function (fn) { this.onModelChange = fn; }; Slider.prototype.registerOnTouched = function (fn) { this.onModelTouched = fn; }; Slider.prototype.setDisabledState = function (val) { this.disabled = val; }; Object.defineProperty(Slider.prototype, "rangeStartLeft", { get: function () { return this.isVertical() ? 'auto' : this.handleValues[0] + '%'; }, enumerable: true, configurable: true }); Object.defineProperty(Slider.prototype, "rangeStartBottom", { get: function () { return this.isVertical() ? this.handleValues[0] + '%' : 'auto'; }, enumerable: true, configurable: true }); Object.defineProperty(Slider.prototype, "rangeEndLeft", { get: function () { return this.isVertical() ? 'auto' : this.handleValues[1] + '%'; }, enumerable: true, configurable: true }); Object.defineProperty(Slider.prototype, "rangeEndBottom", { get: function () { return this.isVertical() ? this.handleValues[1] + '%' : 'auto'; }, enumerable: true, configurable: true }); Slider.prototype.isVertical = function () { return this.orientation === 'vertical'; }; Slider.prototype.updateDomData = function () { var rect = this.el.nativeElement.children[0].getBoundingClientRect(); this.initX = rect.left + this.domHandler.getWindowScrollLeft(); this.initY = rect.top + this.domHandler.getWindowScrollTop(); this.barWidth = this.el.nativeElement.children[0].offsetWidth; this.barHeight = this.el.nativeElement.children[0].offsetHeight; }; Slider.prototype.calculateHandleValue = function (event) { if (this.orientation === 'horizontal') return Math.floor(((event.pageX - this.initX) * 100) / (this.barWidth)); else return Math.floor((((this.initY + this.barHeight) - event.pageY) * 100) / (this.barHeight)); }; Slider.prototype.updateHandleValue = function () { if (this.range) { this.handleValues[0] = (this.values[0] < this.min ? 0 : this.values[0] - this.min) * 100 / (this.max - this.min); this.handleValues[1] = (this.values[1] > this.max ? 100 : this.values[1] - this.min) * 100 / (this.max - this.min); } else { if (this.value < this.min) this.handleValue = 0; else if (this.value > this.max) this.handleValue = 100; else this.handleValue = (this.value - this.min) * 100 / (this.max - this.min); } }; Slider.prototype.updateValue = function (val, event) { if (this.range) { var value = val; if (this.handleIndex == 0) { if (value < this.min) { value = this.min; this.handleValues[0] = 0; } else if (value > this.values[1]) { value = this.values[1]; this.handleValues[0] = this.handleValues[1]; } } else { if (value > this.max) { value = this.max; this.handleValues[1] = 100; } else if (value < this.values[0]) { value = this.values[0]; this.handleValues[1] = this.handleValues[0]; } } this.values[this.handleIndex] = Math.floor(value); this.onModelChange(this.values); this.onChange.emit({ event: event, values: this.values }); } else { if (val < this.min) { val = this.min; this.handleValue = 0; } else if (val > this.max) { val = this.max; this.handleValue = 100; } this.value = Math.floor(val); this.onModelChange(this.value); this.onChange.emit({ event: event, value: this.value }); } }; Slider.prototype.getValueFromHandle = function (handleValue) { return (this.max - this.min) * (handleValue / 100) + this.min; }; Slider.prototype.ngOnDestroy = function () { if (this.dragListener) { this.dragListener(); } if (this.mouseupListener) { this.mouseupListener(); } }; return Slider; }()); __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], Slider.prototype, "animate", void 0); __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], Slider.prototype, "disabled", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], Slider.prototype, "min", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], Slider.prototype, "max", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], Slider.prototype, "orientation", void 0); __decorate([ core_1.Input(), __metadata("design:type", Number) ], Slider.prototype, "step", void 0); __decorate([ core_1.Input(), __metadata("design:type", Boolean) ], Slider.prototype, "range", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], Slider.prototype, "style", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], Slider.prototype, "styleClass", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], Slider.prototype, "onChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], Slider.prototype, "onSlideEnd", void 0); Slider = __decorate([ core_1.Component({ selector: 'p-slider', template: "\n <div [ngStyle]=\"style\" [class]=\"styleClass\" [ngClass]=\"{'ui-slider ui-widget ui-widget-content ui-corner-all':true,'ui-state-disabled':disabled,\n 'ui-slider-horizontal':orientation == 'horizontal','ui-slider-vertical':orientation == 'vertical','ui-slider-animate':animate}\"\n (click)=\"onBarClick($event)\">\n <span *ngIf=\"range && orientation == 'horizontal'\" class=\"ui-slider-range ui-widget-header ui-corner-all\" [ngStyle]=\"{'left':handleValues[0] + '%',width: (handleValues[1] - handleValues[0] + '%')}\"></span>\n <span *ngIf=\"range && orientation == 'vertical'\" class=\"ui-slider-range ui-widget-header ui-corner-all\" [ngStyle]=\"{'bottom':handleValues[0] + '%',height: (handleValues[1] - handleValues[0] + '%')}\"></span>\n <span *ngIf=\"!range && orientation=='vertical'\" class=\"ui-slider-range ui-slider-range-min ui-widget-header ui-corner-all\" [ngStyle]=\"{'height': handleValue + '%'}\"></span>\n <span *ngIf=\"!range\" class=\"ui-slider-handle ui-state-default ui-corner-all ui-clickable\" (mousedown)=\"onMouseDown($event)\" (touchstart)=\"onTouchStart($event)\" (touchmove)=\"onTouchMove($event)\" (touchend)=\"dragging=false\"\n [style.transition]=\"dragging ? 'none': null\" [ngStyle]=\"{'left': orientation == 'horizontal' ? handleValue + '%' : null,'bottom': orientation == 'vertical' ? handleValue + '%' : null}\"></span>\n <span *ngIf=\"range\" (mousedown)=\"onMouseDown($event,0)\" (touchstart)=\"onTouchStart($event,0)\" (touchmove)=\"onTouchMove($event,0)\" (touchend)=\"dragging=false\" [style.transition]=\"dragging ? 'none': null\" class=\"ui-slider-handle ui-state-default ui-corner-all ui-clickable\" \n [ngStyle]=\"{'left': rangeStartLeft, 'bottom': rangeStartBottom}\" [ngClass]=\"{'ui-slider-handle-active':handleIndex==0}\"></span>\n <span *ngIf=\"range\" (mousedown)=\"onMouseDown($event,1)\" (touchstart)=\"onTouchStart($event,1)\" (touchmove)=\"onTouchMove($event,1)\" (touchend)=\"dragging=false\" [style.transition]=\"dragging ? 'none': null\" class=\"ui-slider-handle ui-state-default ui-corner-all ui-clickable\" \n [ngStyle]=\"{'left': rangeEndLeft, 'bottom': rangeEndBottom}\" [ngClass]=\"{'ui-slider-handle-active':handleIndex==1}\"></span>\n </div>\n ", providers: [exports.SLIDER_VALUE_ACCESSOR, domhandler_1.DomHandler] }), __metadata("design:paramtypes", [core_1.ElementRef, domhandler_1.DomHandler, core_1.Renderer2]) ], Slider); exports.Slider = Slider; var SliderModule = (function () { function SliderModule() { } return SliderModule; }()); SliderModule = __decorate([ core_1.NgModule({ imports: [common_1.CommonModule], exports: [Slider], declarations: [Slider] }) ], SliderModule); exports.SliderModule = SliderModule; //# sourceMappingURL=slider.js.map
joseluisluri/nand.me-viewer
node_modules/primeng/components/slider/slider.js
JavaScript
mit
14,731
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Component\Core\OrderProcessing; use Sylius\Component\Addressing\Matcher\ZoneMatcherInterface; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\Scope; use Sylius\Component\Core\Provider\ZoneProviderInterface; use Sylius\Component\Core\Taxation\Exception\UnsupportedTaxCalculationStrategyException; use Sylius\Component\Core\Taxation\Strategy\TaxCalculationStrategyInterface; use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; use Sylius\Component\Registry\PrioritizedServiceRegistryInterface; use Webmozart\Assert\Assert; final class OrderTaxesProcessor implements OrderProcessorInterface { /** * @var ZoneProviderInterface */ private $defaultTaxZoneProvider; /** * @var ZoneMatcherInterface */ private $zoneMatcher; /** * @var PrioritizedServiceRegistryInterface */ private $strategyRegistry; /** * @param ZoneProviderInterface $defaultTaxZoneProvider * @param ZoneMatcherInterface $zoneMatcher * @param PrioritizedServiceRegistryInterface $strategyRegistry */ public function __construct( ZoneProviderInterface $defaultTaxZoneProvider, ZoneMatcherInterface $zoneMatcher, PrioritizedServiceRegistryInterface $strategyRegistry ) { $this->defaultTaxZoneProvider = $defaultTaxZoneProvider; $this->zoneMatcher = $zoneMatcher; $this->strategyRegistry = $strategyRegistry; } /** * {@inheritdoc} */ public function process(BaseOrderInterface $order): void { /** @var OrderInterface $order */ Assert::isInstanceOf($order, OrderInterface::class); $this->clearTaxes($order); if ($order->isEmpty()) { return; } $zone = $this->getTaxZone($order); if (null === $zone) { return; } /** @var TaxCalculationStrategyInterface $strategy */ foreach ($this->strategyRegistry->all() as $strategy) { if ($strategy->supports($order, $zone)) { $strategy->applyTaxes($order, $zone); return; } } throw new UnsupportedTaxCalculationStrategyException(); } /** * @param OrderInterface $order * * @return ZoneInterface|null */ private function getTaxZone(OrderInterface $order): ?ZoneInterface { $shippingAddress = $order->getShippingAddress(); $zone = null; if (null !== $shippingAddress) { $zone = $this->zoneMatcher->match($shippingAddress, Scope::TAX); } return $zone ?: $this->defaultTaxZoneProvider->getZone($order); } /** * @param BaseOrderInterface $order */ private function clearTaxes(BaseOrderInterface $order): void { $order->removeAdjustments(AdjustmentInterface::TAX_ADJUSTMENT); foreach ($order->getItems() as $item) { $item->removeAdjustmentsRecursively(AdjustmentInterface::TAX_ADJUSTMENT); } } }
Joypricecorp/Sylius
src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
PHP
mit
3,471
#!/bin/bash FN="indac.db_3.2.3.tar.gz" URLS=( "https://bioconductor.org/packages/3.8/data/annotation/src/contrib/indac.db_3.2.3.tar.gz" "https://bioarchive.galaxyproject.org/indac.db_3.2.3.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-indac.db/bioconductor-indac.db_3.2.3_src_all.tar.gz" ) MD5="cba72edcf7278033151e0eac077d8ff8" # Use a staging area in the conda dir rather than temp dirs, both to avoid # permission issues as well as to have things downloaded in a predictable # manner. STAGING=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM mkdir -p $STAGING TARBALL=$STAGING/$FN SUCCESS=0 for URL in ${URLS[@]}; do wget -O- -q $URL > $TARBALL [[ $? == 0 ]] || continue # Platform-specific md5sum checks. if [[ $(uname -s) == "Linux" ]]; then if md5sum -c <<<"$MD5 $TARBALL"; then SUCCESS=1 break fi else if [[ $(uname -s) == "Darwin" ]]; then if [[ $(md5 $TARBALL | cut -f4 -d " ") == "$MD5" ]]; then SUCCESS=1 break fi fi fi done if [[ $SUCCESS != 1 ]]; then echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" printf '%s\n' "${URLS[@]}" exit 1 fi # Install and clean up R CMD INSTALL --library=$PREFIX/lib/R/library $TARBALL rm $TARBALL rmdir $STAGING
ivirshup/bioconda-recipes
recipes/bioconductor-indac.db/post-link.sh
Shell
mit
1,294
using BlueYonder.Entities; using BlueYonder.Companion.Entities; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BlueYonder.Companion.Entities.Mappers { public static class TripExtensions { public static TripDTO ToTripDTO(this Trip trip) { TripDTO dto = new TripDTO() { TripId = trip.TripId, Status = trip.Status, Class = trip.Class, ThumbnailImage = trip.ThumbnailImage }; if (trip.FlightInfo != null) { dto.FlightInfo = trip.FlightInfo.ToFlightScheduleDTO(); } return dto; } public static Trip FromTripDTO(this TripDTO dto) { Trip trip = new Trip() { TripId = dto.TripId, Status = dto.Status, Class = dto.Class }; if (dto.FlightInfo != null) { trip.FlightScheduleID = dto.FlightInfo.FlightScheduleId; } return trip; } } }
MicrosoftLearning/20487-DevelopingWindowsAzureAndWebServices
Allfiles/20487C/Mod11/LabFiles/end/BlueYonder.Companion/BlueYonder.Companion.Entities.Mappers/TripExtensions.cs
C#
mit
1,230
<?php namespace Kunstmaan\MediaBundle\Helper; use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaBundle\Helper\Media\AbstractMediaHandler; use Symfony\Component\HttpFoundation\File\File; /** * MediaManager */ class MediaManager { /** * @var AbstractMediaHandler[] */ protected $handlers = []; /** * @var AbstractMediaHandler */ protected $defaultHandler; /** * @param AbstractMediaHandler $handler Media handler * * @return MediaManager */ public function addHandler(AbstractMediaHandler $handler) { $this->handlers[$handler->getName()] = $handler; return $this; } /** * @param AbstractMediaHandler $handler Media handler * * @return MediaManager */ public function setDefaultHandler(AbstractMediaHandler $handler) { $this->defaultHandler = $handler; return $this; } /** * Returns handler with the highest priority to handle the Media item which can handle the item. If no handler is found, it returns FileHandler * * @param Media|File $media * * @return AbstractMediaHandler */ public function getHandler($media) { $bestHandler = $this->defaultHandler; foreach ($this->handlers as $handler) { if ($handler->canHandle($media) && $handler->getPriority() > $bestHandler->getPriority()) { $bestHandler = $handler; } } return $bestHandler; } /** * Returns handler with the highest priority to handle the Media item based on the Type. If no handler is found, it returns FileHandler * * @param string $type * * @return AbstractMediaHandler */ public function getHandlerForType($type) { $bestHandler = $this->defaultHandler; foreach ($this->handlers as $handler) { if ($handler->getType() == $type && $handler->getPriority() > $bestHandler->getPriority()) { $bestHandler = $handler; } } return $bestHandler; } /** * @return AbstractMediaHandler[] */ public function getHandlers() { return $this->handlers; } /** * @return MediaManager */ public function prepareMedia(Media $media) { $handler = $this->getHandler($media); $handler->prepareMedia($media); return $this; } /** * @param Media $media The media * @param bool $new Is new */ public function saveMedia(Media $media, $new = false) { $handler = $this->getHandler($media); if ($new) { $handler->saveMedia($media); } else { $handler->updateMedia($media); } } public function removeMedia(Media $media) { $handler = $this->getHandler($media); $handler->removeMedia($media); } /** * @param mixed $data * * @return Media */ public function createNew($data) { foreach ($this->handlers as $handler) { $result = $handler->createNew($data); if ($result) { return $result; } } return null; } /** * @return array */ public function getFolderAddActions() { $result = []; foreach ($this->handlers as $handler) { $actions = $handler->getAddFolderActions(); if ($actions) { $result = array_merge($actions, $result); } } return $result; } }
Numkil/KunstmaanBundlesCMS
src/Kunstmaan/MediaBundle/Helper/MediaManager.php
PHP
mit
3,605
__author__ = 'a_medelyan' import test_data import rake import sys # reading a directory with test documents input_dir = sys.argv[1] # number of top ranked keywords to evaluate top = int(sys.argv[2]) test_set = test_data.read_data(input_dir) best_fmeasure = 0 best_vals = [] for min_char_length in range(3,8): for max_words_length in range(3,6): for min_keyword_frequency in range(1,7): rake_object = rake.Rake("SmartStoplist.txt", min_char_length, max_words_length, min_keyword_frequency) total_fmeasure = 0 for test_doc in test_set.values(): keywords = rake_object.run(test_doc.text) num_manual_keywords = len(test_doc.keywords) correct = 0 try: for i in range(0,min(top, len(keywords))): if keywords[i][0] in set(test_doc.keywords): correct += 1 except IndexError: print "Problem with evaluating ", keywords precision = correct/float(top) recall = correct/float(num_manual_keywords) if precision > 0 and recall > 0: total_fmeasure += 2*precision*recall/(precision + recall) avg_fmeasure = round(total_fmeasure*100/float(len(test_set)), 2) if avg_fmeasure > best_fmeasure: best_fmeasure = avg_fmeasure best_vals = [min_char_length, max_words_length, min_keyword_frequency] print min_char_length, max_words_length, min_keyword_frequency, "\t", avg_fmeasure print "" print "Best result at ", best_fmeasure print "with\tmin_char_length", best_vals[0] print "\tmax_words_length", best_vals[1] print "\tmin_keyword_frequency", best_vals[2]
Drithin/Recall
optimize_rake.py
Python
mit
1,804
/** * Copyright © 2013-2017 Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ TranslateInlineVdeTest = TestCase('TranslateInlineVdeTest'); TranslateInlineVdeTest.prototype.testInit = function() { /*:DOC += <div data-translate="true">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var translateInlineVde = jQuery('[data-translate]').translateInlineVde(); assertTrue(translateInlineVde.is(':mage-translateInlineVde')); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testCreate = function() { /*:DOC += <div data-translate="true">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ assertEquals(0, jQuery('[data-translate] > img').size()); var translateInlineVde = jQuery('[data-translate]').translateInlineVde(); assertEquals(1, jQuery('[data-translate] > img').size()); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testHideAndShow = function() { /*:DOC += <div data-translate="true">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var translateInlineVde = jQuery('[data-translate]').translateInlineVde(), iconImg = jQuery('[data-translate] > img'); assertFalse(iconImg.is('.hidden')); translateInlineVde.translateInlineVde('hide'); assertTrue(iconImg.is('.hidden') ); translateInlineVde.translateInlineVde('show'); assertFalse(iconImg.is('.hidden') ); assertFalse(jQuery('[data-translate]').is(':hidden') ); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testReplaceTextNormal = function() { /*:DOC += <div id="translateElem" data-translate="[{&quot;shown&quot; : &quot;Some value&quot;, &quot;translated&quot; : &quot;Translated value&quot;}]">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var translateInlineVde = jQuery('[data-translate]').translateInlineVde(); var newValue = 'New value'; jQuery('[data-translate]').translateInlineVde('replaceText', 0, newValue); var translateData = jQuery('#translateElem').data('translate'); assertEquals(newValue, translateData[0]['shown']); assertEquals(newValue, translateData[0]['translated']); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testReplaceTextNullOrBlank = function() { /*:DOC += <div id="translateElem" data-translate="[{&quot;shown&quot; : &quot;Some value&quot;, &quot;translated&quot; : &quot;Translated value&quot;}]">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var translateInlineVde = jQuery('[data-translate]').translateInlineVde(); var newValue = null; jQuery('[data-translate]').translateInlineVde('replaceText', 0, newValue); var translateData = jQuery('#translateElem').data('translate'); assertEquals('&nbsp;', translateData[0]['shown']); assertEquals('&nbsp;', translateData[0]['translated']); newValue = 'Some value'; jQuery('[data-translate]').translateInlineVde('replaceText', 0, newValue); translateData = jQuery('#translateElem').data('translate'); assertEquals(newValue, translateData[0]['shown']); assertEquals(newValue, translateData[0]['translated']); newValue = ''; jQuery('[data-translate]').translateInlineVde('replaceText', 0, newValue); translateData = jQuery('#translateElem').data('translate'); assertEquals('&nbsp;', translateData[0]['shown']); assertEquals('&nbsp;', translateData[0]['translated']); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testClick = function() { /*:DOC += <div id="translateElem" data-translate="[]">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var counter = 0; var callback = function() { counter++; }; var translateInlineVde = jQuery('[data-translate]').translateInlineVde({ onClick: callback }), iconImg = jQuery('[data-translate] > img'); iconImg.trigger('click'); assertEquals(1, counter); assertTrue(jQuery('#translateElem').hasClass('invisible')); translateInlineVde.translateInlineVde('destroy'); }; TranslateInlineVdeTest.prototype.testDblClick = function() { /*:DOC += <div id="translateElem" data-translate="[]">text</div> <script data-template="translate-inline-icon" type="text/x-magento-template"> <img src="<%= data.img %>" height="16" width="16"> </script> */ var counter = 0; var callback = function() { counter++; }; var translateInlineVde = jQuery('[data-translate]').translateInlineVde({ onClick: callback }), iconImg = jQuery('[data-translate] > img'); assertEquals(1, jQuery('#translateElem').find('img').size()); translateInlineVde.trigger('dblclick'); assertEquals(1, counter); assertEquals(0, jQuery('#translateElem').find('img').size()); assertTrue(jQuery('#translateElem').hasClass('invisible')); translateInlineVde.translateInlineVde('destroy'); };
j-froehlich/magento2_wk
vendor/magento/magento2-base/dev/tests/js/JsTestDriver/testsuite/mage/translate_inline_vde/translate-inline-vde-test.js
JavaScript
mit
5,739
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using System; using System.Collections.Immutable; using System.Linq; using System.Threading; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.CSharp.Test.Utilities; using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.CSharp.UnitTests { /// <summary> /// Test that when metadata methods with custom modifiers in their signatures are overridden /// or explicitly implemented, the custom modifiers are copied to the corresponding source /// method. Secondarily, test that generated bridge methods have appropriate custom modifiers /// in implicit implementation cases. /// </summary> public class CustomModifierCopyTests : CSharpTestBase { private const string ConstModOptType = "System.Runtime.CompilerServices.IsConst"; /// <summary> /// Test implementing a single interface with custom modifiers. /// </summary> [Fact] public void TestSingleInterfaceImplementation() { var text = @" class Class : CppCli.CppInterface1 { //copy modifiers (even though dev10 doesn't) void CppCli.CppInterface1.Method1(int x) { } //synthesize bridge method public void Method2(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Class"); // explicit implementation copies custom modifiers var classMethod1 = @class.GetMethod("CppCli.CppInterface1.Method1"); AssertAllParametersHaveConstModOpt(classMethod1); // implicit implementation does not copy custom modifiers var classMethod2 = @class.GetMethod("Method2"); AssertNoParameterHasModOpts(classMethod2); // bridge method for implicit implementation has custom modifiers var method2ExplicitImpl = @class.GetSynthesizedExplicitImplementations(CancellationToken.None).Single(); Assert.Same(classMethod2, method2ExplicitImpl.ImplementingMethod); AssertAllParametersHaveConstModOpt(method2ExplicitImpl); } /// <summary> /// Test implementing multiple (identical) interfaces with custom modifiers. /// </summary> [Fact] public void TestMultipleInterfaceImplementation() { var text = @" class Class : CppCli.CppInterface1, CppCli.CppInterface2 { //copy modifiers (even though dev10 doesn't) void CppCli.CppInterface1.Method1(int x) { } //copy modifiers (even though dev10 doesn't) void CppCli.CppInterface2.Method1(int x) { } //synthesize two bridge methods public void Method2(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Class"); // explicit implementation copies custom modifiers var classMethod1a = @class.GetMethod("CppCli.CppInterface1.Method1"); AssertAllParametersHaveConstModOpt(classMethod1a); // explicit implementation copies custom modifiers var classMethod1b = @class.GetMethod("CppCli.CppInterface2.Method1"); AssertAllParametersHaveConstModOpt(classMethod1b); // implicit implementation does not copy custom modifiers var classMethod2 = @class.GetMember<MethodSymbol>("Method2"); AssertNoParameterHasModOpts(classMethod2); // bridge methods for implicit implementation have custom modifiers var method2ExplicitImpls = @class.GetSynthesizedExplicitImplementations(CancellationToken.None); Assert.Equal(2, method2ExplicitImpls.Length); foreach (var explicitImpl in method2ExplicitImpls) { Assert.Same(classMethod2, explicitImpl.ImplementingMethod); AssertAllParametersHaveConstModOpt(explicitImpl); } } /// <summary> /// Test a direct override of a metadata method with custom modifiers. /// Also confirm that a source method without custom modifiers can hide /// a metadata method with custom modifiers (in the sense that "new" is /// required) but does not copy the custom modifiers. /// </summary> [Fact] public void TestSingleOverride() { var text = @" class Class : CppCli.CppBase1 { //copies custom modifiers public override void VirtualMethod(int x) { } //new required, does not copy custom modifiers public new void NonVirtualMethod(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Class"); // override copies custom modifiers var classVirtualMethod = @class.GetMember<MethodSymbol>("VirtualMethod"); AssertAllParametersHaveConstModOpt(classVirtualMethod); // new does not copy custom modifiers var classNonVirtualMethod = @class.GetMember<MethodSymbol>("NonVirtualMethod"); AssertNoParameterHasModOpts(classNonVirtualMethod); // no bridge methods Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).Length); } /// <summary> /// Test overriding a source method that overrides a metadata method with /// custom modifiers. The custom modifiers should propagate to the second /// override as well. /// </summary> [Fact] public void TestRepeatedOverride() { var text = @" class Base : CppCli.CppBase1 { //copies custom modifiers public override void VirtualMethod(int x) { } //new required, does not copy custom modifiers public new virtual void NonVirtualMethod(int x) { } } class Derived : Base { //copies custom modifiers public override void VirtualMethod(int x) { } //would copy custom modifiers, but there are none public override void NonVirtualMethod(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var baseClass = global.GetMember<SourceNamedTypeSymbol>("Base"); // override copies custom modifiers var baseClassVirtualMethod = baseClass.GetMember<MethodSymbol>("VirtualMethod"); AssertAllParametersHaveConstModOpt(baseClassVirtualMethod); // new does not copy custom modifiers var baseClassNonVirtualMethod = baseClass.GetMember<MethodSymbol>("NonVirtualMethod"); AssertNoParameterHasModOpts(baseClassNonVirtualMethod); // no bridge methods Assert.Equal(0, baseClass.GetSynthesizedExplicitImplementations(CancellationToken.None).Length); var derivedClass = global.GetMember<SourceNamedTypeSymbol>("Derived"); // override copies custom modifiers var derivedClassVirtualMethod = derivedClass.GetMember<MethodSymbol>("VirtualMethod"); AssertAllParametersHaveConstModOpt(derivedClassVirtualMethod); // new does not copy custom modifiers var derivedClassNonVirtualMethod = derivedClass.GetMember<MethodSymbol>("NonVirtualMethod"); AssertNoParameterHasModOpts(derivedClassNonVirtualMethod); // no bridge methods Assert.Equal(0, derivedClass.GetSynthesizedExplicitImplementations(CancellationToken.None).Length); } /// <summary> /// Test copying custom modifiers in/on parameters/return types. /// </summary> [Fact] public void TestMethodOverrideCombinations() { var text = @" class Derived : MethodCustomModifierCombinations { public override int[] Method1111(int[] a) { return a; } public override int[] Method1110(int[] a) { return a; } public override int[] Method1101(int[] a) { return a; } public override int[] Method1100(int[] a) { return a; } public override int[] Method1011(int[] a) { return a; } public override int[] Method1010(int[] a) { return a; } public override int[] Method1001(int[] a) { return a; } public override int[] Method1000(int[] a) { return a; } public override int[] Method0111(int[] a) { return a; } public override int[] Method0110(int[] a) { return a; } public override int[] Method0101(int[] a) { return a; } public override int[] Method0100(int[] a) { return a; } public override int[] Method0011(int[] a) { return a; } public override int[] Method0010(int[] a) { return a; } public override int[] Method0001(int[] a) { return a; } public override int[] Method0000(int[] a) { return a; } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.Modifiers.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<NamedTypeSymbol>("Derived"); for (int i = 0; i < 0xf; i++) { CheckMethodCustomModifiers( @class.GetMember<MethodSymbol>("Method" + Convert.ToString(i, 2).PadLeft(4, '0')), inReturnType: (i & 0x8) != 0, onReturnType: (i & 0x4) != 0, inParameterType: (i & 0x2) != 0, onParameterType: (i & 0x1) != 0); } } /// <summary> /// Test copying custom modifiers in/on property types. /// </summary> [Fact] public void TestPropertyOverrideCombinations() { var text = @" class Derived : PropertyCustomModifierCombinations { public override int[] Property11 { get; set; } public override int[] Property10 { get; set; } public override int[] Property01 { get; set; } public override int[] Property00 { get; set; } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.Modifiers.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<NamedTypeSymbol>("Derived"); for (int i = 0; i < 0x4; i++) { PropertySymbol property = @class.GetMember<PropertySymbol>("Property" + Convert.ToString(i, 2).PadLeft(2, '0')); bool inType = (i & 0x2) != 0; bool onType = (i & 0x1) != 0; CheckPropertyCustomModifiers(property, inType, onType); CheckMethodCustomModifiers( property.GetMethod, inReturnType: inType, onReturnType: onType, inParameterType: false, onParameterType: false); CheckMethodCustomModifiers( property.SetMethod, inReturnType: false, onReturnType: false, inParameterType: inType, onParameterType: onType); } } /// <summary> /// Helper method specifically for TestMethodOverrideCombinations and TestPropertyOverrideCombinations. /// </summary> /// <param name="method">Must have array return type (or void) and single array parameter (or none).</param> /// <param name="inReturnType">True if a custom modifier is expected on the return type array element type.</param> /// <param name="onReturnType">True if a custom modifier is expected on the return type.</param> /// <param name="inParameterType">True if a custom modifier is expected on the parameter type array element type.</param> /// <param name="onParameterType">True if a custom modifier is expected on the parameter type.</param> private static void CheckMethodCustomModifiers(MethodSymbol method, bool inReturnType, bool onReturnType, bool inParameterType, bool onParameterType) { if (!method.ReturnsVoid) { CheckCustomModifier(inReturnType, ((ArrayTypeSymbol)method.ReturnType).ElementTypeWithAnnotations.CustomModifiers); CheckCustomModifier(onReturnType, method.ReturnTypeWithAnnotations.CustomModifiers); } if (method.Parameters.Any()) { CheckCustomModifier(inParameterType, ((ArrayTypeSymbol)method.Parameters.Single().Type).ElementTypeWithAnnotations.CustomModifiers); CheckCustomModifier(onParameterType, method.Parameters.Single().TypeWithAnnotations.CustomModifiers); } } /// <summary> /// Helper method specifically for TestPropertyOverrideCombinations. /// </summary> /// <param name="property">Must have array type.</param> /// <param name="inType">True if a custom modifier is expected on the return type array element type.</param> /// <param name="onType">True if a custom modifier is expected on the return type.</param> private static void CheckPropertyCustomModifiers(PropertySymbol property, bool inType, bool onType) { CheckCustomModifier(inType, ((ArrayTypeSymbol)property.Type).ElementTypeWithAnnotations.CustomModifiers); CheckCustomModifier(onType, property.TypeWithAnnotations.CustomModifiers); } /// <summary> /// True - assert that the list contains a single const modifier. /// False - assert that the list is empty. /// </summary> private static void CheckCustomModifier(bool expectCustomModifier, ImmutableArray<CustomModifier> customModifiers) { if (expectCustomModifier) { Assert.Equal(ConstModOptType, customModifiers.Single().Modifier.ToTestDisplayString()); } else { Assert.False(customModifiers.Any()); } } /// <summary> /// Test the case of a source type extending a metadata type that could implicitly /// implement a metadata interface with custom modifiers. If the source type does /// not implement an interface method, the base method fills in and a bridge method /// is synthesized in the source type. If the source type does implement an interface /// method, no bridge method is synthesized. /// </summary> [Fact] public void TestImplicitImplementationInBase() { var text = @" class Class1 : CppCli.CppBase2, CppCli.CppInterface1 { } class Class2 : CppCli.CppBase2, CppCli.CppInterface1 { //copies custom modifiers public override void Method1(int x) { } } class Class3 : CppCli.CppBase2, CppCli.CppInterface1 { //needs a bridge, since custom modifiers are not copied public new void Method1(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var baseClass = global.GetMember<NamespaceSymbol>("CppCli").GetMember<NamedTypeSymbol>("CppBase2"); var class1 = global.GetMember<SourceNamedTypeSymbol>("Class1"); //both implementations are from the base class var class1SynthesizedExplicitImpls = class1.GetSynthesizedExplicitImplementations(CancellationToken.None); Assert.Equal(1, class1SynthesizedExplicitImpls.Length); //Don't need a bridge method for the virtual base method. foreach (var explicitImpl in class1SynthesizedExplicitImpls) { Assert.Same(baseClass, explicitImpl.ImplementingMethod.ContainingType); AssertAllParametersHaveConstModOpt(explicitImpl, ignoreLast: explicitImpl.MethodKind == MethodKind.PropertySet); } var class2 = global.GetMember<SourceNamedTypeSymbol>("Class2"); //Method1 is implemented in the Class2, and no bridge is needed because the custom modifiers are copied var class2Method1 = class2.GetMember<MethodSymbol>("Method1"); AssertAllParametersHaveConstModOpt(class2Method1); //Method2 is implemented in the base class var class2Method2SynthesizedExplicitImpl = class2.GetSynthesizedExplicitImplementations(CancellationToken.None).Single(); Assert.Equal("Method2", class2Method2SynthesizedExplicitImpl.ExplicitInterfaceImplementations.Single().Name); Assert.Same(baseClass, class2Method2SynthesizedExplicitImpl.ImplementingMethod.ContainingType); AssertAllParametersHaveConstModOpt(class2Method2SynthesizedExplicitImpl); var class3 = global.GetMember<SourceNamedTypeSymbol>("Class3"); //Method1 is implemented in Class3, but a bridge is needed because custom modifiers are not copied var class3Method1 = class3.GetMember<MethodSymbol>("Method1"); Assert.False(class3Method1.Parameters.Single().TypeWithAnnotations.CustomModifiers.Any()); // GetSynthesizedExplicitImplementations doesn't guarantee order, so sort to make the asserts easier to write. var class3SynthesizedExplicitImpls = (from m in class3.GetSynthesizedExplicitImplementations(CancellationToken.None) orderby m.Name select m).ToArray(); Assert.Equal(2, class3SynthesizedExplicitImpls.Length); var class3Method1SynthesizedExplicitImpl = class3SynthesizedExplicitImpls[0]; Assert.Equal("Method1", class3Method1SynthesizedExplicitImpl.ExplicitInterfaceImplementations.Single().Name); Assert.Same(class3Method1, class3Method1SynthesizedExplicitImpl.ImplementingMethod); AssertAllParametersHaveConstModOpt(class3Method1SynthesizedExplicitImpl); //Method2 is implemented in the base class var class3Method2SynthesizedExplicitImpl = class3SynthesizedExplicitImpls[1]; Assert.Equal("Method2", class3Method2SynthesizedExplicitImpl.ExplicitInterfaceImplementations.Single().Name); Assert.Same(baseClass, class3Method2SynthesizedExplicitImpl.ImplementingMethod.ContainingType); AssertAllParametersHaveConstModOpt(class3Method2SynthesizedExplicitImpl); } /// <summary> /// Test copying more than one custom modifier on the same element /// </summary> [Fact] public void TestCopyMultipleCustomModifiers() { var text = @" class Class : I2 { //copy (both) modifiers (even though dev10 doesn't) void I2.M1(int x) { } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.Modifiers.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Class"); // explicit implementation copies custom modifiers var classMethod1 = @class.GetMethod("I2.M1"); var classMethod1CustomModifiers = classMethod1.Parameters.Single().TypeWithAnnotations.CustomModifiers; Assert.Equal(2, classMethod1CustomModifiers.Length); foreach (var customModifier in classMethod1CustomModifiers) { Assert.Equal(ConstModOptType, customModifier.Modifier.ToTestDisplayString()); } //no bridge methods Assert.False(@class.GetSynthesizedExplicitImplementations(CancellationToken.None).Any()); } /// <summary> /// The params keyword is inherited from the overridden method in the same way as /// a custom modifier. /// </summary> [Fact] public void TestParamsKeyword() { var text = @" public class Base { public virtual void M(params int[] a) { } public virtual void N(int[] a) { } } public class Derived : Base { public override void M(int[] a) { } //lost 'params' public override void N(params int[] a) { } //gained 'params' } public class Derived2 : Derived { public override void M(params int[] a) { } //regained 'params' public override void N(int[] a) { } //(re)lost 'params' } "; var comp = CreateCompilation(text); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseClass = global.GetMember<NamedTypeSymbol>("Base"); var baseM = baseClass.GetMember<MethodSymbol>("M"); var baseN = baseClass.GetMember<MethodSymbol>("N"); var derivedClass = global.GetMember<NamedTypeSymbol>("Derived"); var derivedM = derivedClass.GetMember<MethodSymbol>("M"); var derivedN = derivedClass.GetMember<MethodSymbol>("N"); var derived2Class = global.GetMember<NamedTypeSymbol>("Derived2"); var derived2M = derived2Class.GetMember<MethodSymbol>("M"); var derived2N = derived2Class.GetMember<MethodSymbol>("N"); Assert.True(baseM.Parameters.Single().IsParams, "Base.M.IsParams should be true"); Assert.False(baseN.Parameters.Single().IsParams, "Base.N.IsParams should be false"); Assert.True(derivedM.Parameters.Single().IsParams, "Derived.M.IsParams should be true"); //NB: does not reflect source Assert.False(derivedN.Parameters.Single().IsParams, "Derived.N.IsParams should be false"); //NB: does not reflect source Assert.True(derived2M.Parameters.Single().IsParams, "Derived2.M.IsParams should be true"); Assert.False(derived2N.Parameters.Single().IsParams, "Derived2.N.IsParams should be false"); } /// <summary> /// Test implementing a single interface with custom modifiers. /// </summary> [Fact] public void TestIndexerExplicitInterfaceImplementation() { var text = @" class Explicit : CppCli.CppIndexerInterface { int CppCli.CppIndexerInterface.this[int x] { get { return 0; } set { } } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Explicit"); // explicit implementation copies custom modifiers var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); AssertAllParametersHaveConstModOpt(classIndexer); Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).Length); } /// <summary> /// Test implementing a single interface with custom modifiers. /// </summary> [Fact] public void TestIndexerImplicitInterfaceImplementation() { var text = @" class Implicit : CppCli.CppIndexerInterface { public int this[int x] { get { return 0; } set { } } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Implicit"); // implicit implementation does not copy custom modifiers var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); AssertNoParameterHasModOpts(classIndexer); // bridge methods for implicit implementations have custom modifiers var explicitImpls = @class.GetSynthesizedExplicitImplementations(CancellationToken.None); Assert.Equal(2, explicitImpls.Length); var explicitGetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertyGet).Single(); AssertAllParametersHaveConstModOpt(explicitGetterImpl); var explicitSetterImpl = explicitImpls.Where(impl => impl.ImplementingMethod.MethodKind == MethodKind.PropertySet).Single(); AssertAllParametersHaveConstModOpt(explicitSetterImpl, ignoreLast: true); } /// <summary> /// Test overriding a base type indexer with custom modifiers. /// </summary> [Fact] public void TestOverrideIndexer() { var text = @" class Override : CppCli.CppIndexerBase { public override int this[int x] { get { return 0; } set { } } } "; var ilAssemblyReference = TestReferences.SymbolsTests.CustomModifiers.CppCli.dll; var comp = CreateCompilation(text, new MetadataReference[] { ilAssemblyReference }); var global = comp.GlobalNamespace; comp.VerifyDiagnostics(); var @class = global.GetMember<SourceNamedTypeSymbol>("Override"); // implicit implementation does not copy custom modifiers var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); AssertAllParametersHaveConstModOpt(classIndexer); Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).Length); } /// <summary> /// The params keyword is inherited from the overridden indexer in the same way as /// a custom modifier. /// </summary> [Fact] public void TestParamsKeywordOnIndexer() { var text = @" public class Base { public virtual char this[params int[] a] { set { } } public virtual char this[long[] a] { set { } } } public class Derived : Base { public override char this[int[] a] { set { } } //lost 'params' public override char this[params long[] a] { set { } } //gained 'params' } public class Derived2 : Derived { public override char this[params int[] a] { set { } } //regained 'params' public override char this[long[] a] { set { } } //(re)lost 'params' } "; var comp = CreateCompilation(text); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseClass = global.GetMember<NamedTypeSymbol>("Base"); var baseIndexer1 = (PropertySymbol)baseClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); var baseIndexer2 = (PropertySymbol)baseClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); var derivedClass = global.GetMember<NamedTypeSymbol>("Derived"); var derivedIndexer1 = (PropertySymbol)derivedClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); var derivedIndexer2 = (PropertySymbol)derivedClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); var derived2Class = global.GetMember<NamedTypeSymbol>("Derived2"); var derived2Indexer1 = (PropertySymbol)derived2Class.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); var derived2Indexer2 = (PropertySymbol)derived2Class.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); Assert.True(baseIndexer1.Parameters.Single().IsParams, "Base.Indexer1.IsParams should be true"); Assert.False(baseIndexer2.Parameters.Single().IsParams, "Base.Indexer2.IsParams should be false"); Assert.True(derivedIndexer1.Parameters.Single().IsParams, "Derived.Indexer1.IsParams should be true"); //Indexer2B: does not reflect source Assert.False(derivedIndexer2.Parameters.Single().IsParams, "Derived.Indexer2.IsParams should be false"); //Indexer2B: does not reflect source Assert.True(derived2Indexer1.Parameters.Single().IsParams, "Derived2.Indexer1.IsParams should be true"); Assert.False(derived2Indexer2.Parameters.Single().IsParams, "Derived2.Indexer2.IsParams should be false"); } [ConditionalFact(typeof(ClrOnly), typeof(DesktopOnly))] [WorkItem(18411, "https://github.com/dotnet/roslyn/issues/18411")] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void Repro819774() { var il = @" .class interface public abstract auto ansi IBug813305 { .method public hidebysig newslot abstract virtual instance void M(object modopt([mscorlib]System.Runtime.CompilerServices.IsLong) x) cil managed { } // end of method IBug813305::M } // end of class IBug813305 "; var source = @" using System.Collections.Generic; class Bug813305 : IBug813305 { void IBug813305.M(dynamic x) { x.Goo(); System.Console.WriteLine(""Bug813305.M""); } public void Goo() {} } class Test { static void Main() { IBug813305 x = new Bug813305(); x.M(x); } } "; var comp = CreateCompilationWithILAndMscorlib40(source, il, options: TestOptions.ReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), targetFramework: TargetFramework.Standard, references: new[] { CSharpRef }); CompileAndVerify(comp, expectedOutput: "Bug813305.M", symbolValidator: m => { var Bug813305 = m.GlobalNamespace.GetTypeMember("Bug813305"); var method = Bug813305.GetMethod("IBug813305.M"); Assert.Equal("Bug813305.IBug813305.M(dynamic)", method.ToDisplayString()); }); } [Fact] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void ObjectToDynamic_ImplementationParameter() { var il = @" .class interface public abstract auto ansi I { .method public hidebysig newslot abstract virtual instance void M(object modopt([mscorlib]System.Runtime.CompilerServices.IsLong) x) cil managed { } } "; var source = @" class C : I { void I.M(dynamic x) { } } "; var comp = CreateCompilationWithILAndMscorlib40(source, il, targetFramework: TargetFramework.Standard); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<NamedTypeSymbol>("I").GetMember<MethodSymbol>("M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); Assert.Equal(SpecialType.System_Object, interfaceMethod.ParameterTypesWithAnnotations.Single().SpecialType); Assert.Equal(TypeKind.Dynamic, classMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); Assert.Equal("void C.I.M(dynamic modopt(System.Runtime.CompilerServices.IsLong) x)", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicToObject_ImplementationParameter() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .method public hidebysig newslot abstract virtual instance void M(object modopt([mscorlib]System.Runtime.CompilerServices.IsLong) x) cil managed { .param [1] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[2](false true)} } } "; var source = @" class C : I { void I.M(object x) { } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<MethodSymbol>("I.M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); Assert.Equal(TypeKind.Dynamic, interfaceMethod.ParameterTypesWithAnnotations.Single().Type.TypeKind); Assert.Equal(SpecialType.System_Object, classMethod.ParameterTypesWithAnnotations.Single().SpecialType); Assert.Equal("void C.I.M(System.Object modopt(System.Runtime.CompilerServices.IsLong) x)", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] public void TupleWithCustomModifiersInInterfaceMethod() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly extern System.ValueTuple { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 4:0:1:0 } .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .method public hidebysig newslot abstract virtual instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong), object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> M(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong), object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> x) cil managed { .param [0] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. .param [1] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 63 01 64 00 00 ) // .......c.d.. } // end of method I::M } // end of class I "; var source1 = @" class C : I { (object a, object b) I.M((object c, object d) x) { return x; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp1 = CreateEmptyCompilation(source1, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp1.VerifyDiagnostics(); var interfaceMethod1 = comp1.GlobalNamespace.GetMember<MethodSymbol>("I.M"); var classMethod1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> " + "I.M(System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> x)", interfaceMethod1.ToTestDisplayString()); AssertEx.Equal("(object a, object b) I.M((object c, object d) x)", interfaceMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)interfaceMethod1.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)interfaceMethod1.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> " + "C.I.M(System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> x)", classMethod1.ToTestDisplayString()); AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", classMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod1.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod1.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var source2 = @" class C : I { (object a, object b) I.M((object, object) x) { return x; } } "; var comp2 = CreateEmptyCompilation(source2, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp2.VerifyDiagnostics( // (4,28): error CS8141: The tuple element names in the signature of method 'C.I.M((object, object))' must match the tuple element names of interface method 'I.M((object c, object d))' (including on the return type). // (object a, object b) I.M((object, object) x) { return x; } Diagnostic(ErrorCode.ERR_ImplBadTupleNames, "M").WithArguments("C.I.M((object, object))", "I.M((object c, object d))").WithLocation(4, 28) ); var classMethod2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> " + "C.I.M(System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> x)", classMethod2.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod2.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod2.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var source3 = @" class C : I { (object, object) I.M((object c, object d) x) { return x; } } "; var comp3 = CreateEmptyCompilation(source3, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp3.VerifyDiagnostics( // (4,24): error CS8141: The tuple element names in the signature of method 'C.I.M((object c, object d))' must match the tuple element names of interface method 'I.M((object c, object d))' (including on the return type). // (object, object) I.M((object c, object d) x) { return x; } Diagnostic(ErrorCode.ERR_ImplBadTupleNames, "M").WithArguments("C.I.M((object c, object d))", "I.M((object c, object d))").WithLocation(4, 24) ); var classMethod3 = comp3.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); AssertEx.Equal("(object, object) C.M((object c, object d) x)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod3.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod3.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var source4 = @" class C : I { public (object a, object b) M((object c, object d) x) { return x; } } "; var comp4 = CreateEmptyCompilation(source4, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp4.VerifyDiagnostics(); var classMethod4 = comp4.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("M"); AssertEx.Equal("(object a, object b) C.M((object c, object d) x)", classMethod4.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classMethod4.ReturnType).TupleUnderlyingType.ToTestDisplayString()); // modopts not copied Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classMethod4.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); // modopts not copied } [ClrOnlyFact(ClrOnlyReason.Ilasm)] public void TupleWithCustomModifiersInInterfaceProperty() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly extern System.ValueTuple { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 4:0:1:0 } .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .method public hidebysig newslot specialname abstract virtual instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong), object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> get_P() cil managed { .param [0] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. } // end of method I::get_P .method public hidebysig newslot specialname abstract virtual instance void set_P(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong), object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> 'value') cil managed { .param [1] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. } // end of method I::set_P .property instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong), object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> P() { .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. .get instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> I::get_P() .set instance void I::set_P(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)>) } // end of property I::P } // end of class I "; var source1 = @" class C : I { (object a, object b) I.P { get; set; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp1 = CreateEmptyCompilation(source1, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp1.VerifyDiagnostics(); var interfaceProperty1 = comp1.GlobalNamespace.GetMember<PropertySymbol>("I.P"); var classProperty1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetProperty("I.P"); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> I.P { get; set; }", interfaceProperty1.ToTestDisplayString()); AssertEx.Equal("(object a, object b) I.P", interfaceProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)interfaceProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> C.I.P { get; set; }", classProperty1.ToTestDisplayString()); AssertEx.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); var source2 = @" class C : I { (object, object) I.P { get; set; } } "; var comp2 = CreateEmptyCompilation(source2, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp2.VerifyDiagnostics(); var classProperty2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetProperty("I.P"); Assert.Equal("(System.Object, System.Object) C.I.P { get; set; }", classProperty2.ToTestDisplayString()); Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString()); var source3 = @" class C : I { public (object a, object b) P { get; set; } } "; var comp3 = CreateEmptyCompilation(source3, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp3.VerifyDiagnostics(); var classProperty3 = comp3.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetProperty("P"); Assert.Equal("(System.Object a, System.Object b) C.P { get; set; }", classProperty3.ToTestDisplayString()); Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty3.Type).TupleUnderlyingType.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] public void TupleWithCustomModifiersInOverride() { // This IL is based on this code, but with modopts added //public class Base //{ // public virtual (object a, object b) P { get; set; } // public virtual (object a, object b) M((object c, object d) x) { return x; } //} var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly extern System.ValueTuple { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 4:0:1:0 } .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .field private class [System.ValueTuple]System.ValueTuple`2<object,object> '<P>k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .method public hidebysig newslot specialname virtual instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> get_P() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .param [0] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.ValueTuple]System.ValueTuple`2<object,object> Base::'<P>k__BackingField' IL_0006: ret } // end of method Base::get_P .method public hidebysig newslot specialname virtual instance void set_P(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> 'value') cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .param [1] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. // Code size 8 (0x8) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.ValueTuple]System.ValueTuple`2<object,object> Base::'<P>k__BackingField' IL_0007: ret } // end of method Base::set_P .method public hidebysig newslot virtual instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> M(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> x) cil managed { .param [0] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. .param [1] .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 63 01 64 00 00 ) // .......c.d.. // Code size 7 (0x7) .maxstack 1 .locals init (class [System.ValueTuple]System.ValueTuple`2<object,object> V_0) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.0 IL_0003: br.s IL_0005 IL_0005: ldloc.0 IL_0006: ret } // end of method Base::M .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 8 (0x8) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: nop IL_0007: ret } // end of method Base::.ctor .property instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> P() { .custom instance void [System.ValueTuple]System.Runtime.CompilerServices.TupleElementNamesAttribute::.ctor(string[]) = ( 01 00 02 00 00 00 01 61 01 62 00 00 ) // .......a.b.. .get instance class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)> Base::get_P() .set instance void Base::set_P(class [System.ValueTuple]System.ValueTuple`2<object modopt([mscorlib]System.Runtime.CompilerServices.IsLong),object modopt([mscorlib]System.Runtime.CompilerServices.IsLong)>) } // end of property Base::P } // end of class Base "; var source1 = @" class C : Base { public override (object a, object b) P { get; set; } public override (object a, object b) M((object c, object d) y) { return y; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp1 = CreateEmptyCompilation(source1, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp1.VerifyDiagnostics(); var baseMethod1 = comp1.GlobalNamespace.GetMember<MethodSymbol>("Base.M"); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> " + "Base.M(System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)> x)", baseMethod1.ToTestDisplayString()); AssertEx.Equal("(object a, object b) Base.M((object c, object d) x)", baseMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)baseMethod1.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)baseMethod1.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var baseProperty1 = comp1.GlobalNamespace.GetMember<PropertySymbol>("Base.P"); Assert.Equal("(object a, object b) Base.P", baseProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)baseProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); var classProperty1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetProperty("P"); var classMethod1 = comp1.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("M"); Assert.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); AssertEx.Equal("(object a, object b) C.M((object c, object d) y)", classMethod1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod1.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod1.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var source2 = @" class C : Base { public override (object, object) P { get; set; } public override (object, object) M((object c, object d) y) { return y; } } "; var comp2 = CreateEmptyCompilation(source2, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp2.VerifyDiagnostics( // (5,38): error CS8139: 'C.M((object c, object d))': cannot change tuple element names when overriding inherited member 'Base.M((object c, object d))' // public override (object, object) M((object c, object d) y) { return y; } Diagnostic(ErrorCode.ERR_CantChangeTupleNamesOnOverride, "M").WithArguments("C.M((object c, object d))", "Base.M((object c, object d))").WithLocation(5, 38) ); var classProperty2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetProperty("P"); var classMethod2 = comp2.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("M"); Assert.Equal("(System.Object, System.Object) C.P { get; set; }", classProperty2.ToTestDisplayString()); Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString()); AssertEx.Equal("(object, object) C.M((object c, object d) y)", classMethod2.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod2.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod2.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); var source3 = @" class C : Base { public override (object a, object b) P { get; set; } public override (object a, object b) M((object, object) y) { return y; } } "; var comp3 = CreateEmptyCompilation(source3, new[] { MscorlibRef, SystemCoreRef, ilRef, ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef }); comp3.VerifyDiagnostics( // (5,42): error CS8139: 'C.M((object, object))': cannot change tuple element names when overriding inherited member 'Base.M((object c, object d))' // public override (object a, object b) M((object, object) y) { return y; } Diagnostic(ErrorCode.ERR_CantChangeTupleNamesOnOverride, "M").WithArguments("C.M((object, object))", "Base.M((object c, object d))").WithLocation(5, 42) ); var classMethod3 = comp3.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMethod("M"); AssertEx.Equal("(object a, object b) C.M((object, object) y)", classMethod3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); AssertEx.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod3.ReturnType).TupleUnderlyingType.ToTestDisplayString()); Assert.Equal("System.ValueTuple<System.Object modopt(System.Runtime.CompilerServices.IsLong), System.Object modopt(System.Runtime.CompilerServices.IsLong)>", ((NamedTypeSymbol)classMethod3.GetParameterType(0)).TupleUnderlyingType.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicToObject_ImplementationReturn() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .method public hidebysig newslot abstract virtual instance object modopt(int32) M() cil managed { .param [0] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[2](false true)} } } "; var source = @" class C : I { object I.M() { throw null; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<MethodSymbol>("I.M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); Assert.Equal(TypeKind.Dynamic, interfaceMethod.ReturnType.TypeKind); Assert.Equal(SpecialType.System_Object, classMethod.ReturnType.SpecialType); Assert.Equal("System.Object modopt(System.Int32) C.I.M()", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void ObjectToDynamic_ImplementationReturn() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .method public hidebysig newslot abstract virtual instance object modopt(int32) M() cil managed { } } "; var source = @" class C : I { dynamic I.M() { throw null; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<NamedTypeSymbol>("I").GetMember<MethodSymbol>("M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMethod("I.M"); Assert.Equal(SpecialType.System_Object, interfaceMethod.ReturnType.SpecialType); Assert.Equal(TypeKind.Dynamic, classMethod.ReturnType.TypeKind); Assert.Equal("dynamic modopt(System.Int32) C.I.M()", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicVsObjectComplexParameter() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I`2<T,U> { .method public hidebysig newslot abstract virtual instance void M(class I`2<object modopt(int16) [],object modopt(int32) []>& modopt(int64) c) cil managed { .param [1] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[9](false false false false false false false false true)} // i.e. second occurrence of 'object' is really 'dynamic'. } } "; var source = @" public class C : I<byte, char> { void I<byte, char>.M(ref I<dynamic[], object[]> c) { } // object to dynamic and vice versa } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<NamedTypeSymbol>("I").GetMember<MethodSymbol>("M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Single( m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation); Assert.Equal("void I<T, U>.M(ref modopt(System.Int64) I<System.Object modopt(System.Int16) [], dynamic modopt(System.Int32) []> c)", interfaceMethod.ToTestDisplayString()); Assert.Equal("void C.I<System.Byte, System.Char>.M(ref modopt(System.Int64) I<dynamic modopt(System.Int16) [], System.Object modopt(System.Int32) []> c)", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicVsObjectComplexReturn() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I`2<T,U> { .method public hidebysig newslot abstract virtual instance class I`2<object modopt(int16) [],object modopt(int32) []> modopt(int64) M() cil managed { .param [0] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[8](false false false false false false false true)} // i.e. second occurrence of 'object' is really 'dynamic'. } } "; var source = @" public class C : I<byte, char> { I<dynamic[], object[]> I<byte, char>.M() { throw null; } // object to dynamic and vice versa } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceMethod = global.GetMember<NamedTypeSymbol>("I").GetMember<MethodSymbol>("M"); var classMethod = global.GetMember<NamedTypeSymbol>("C").GetMembers().OfType<MethodSymbol>().Single( m => m.MethodKind == MethodKind.ExplicitInterfaceImplementation); Assert.Equal("I<System.Object modopt(System.Int16) [], dynamic modopt(System.Int32) []> modopt(System.Int64) I<T, U>.M()", interfaceMethod.ToTestDisplayString()); Assert.Equal("I<dynamic modopt(System.Int16) [], System.Object modopt(System.Int32) []> modopt(System.Int64) C.I<System.Byte, System.Char>.M()", classMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicToObjectAndViceVersa_OverrideParameter() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .method public hidebysig newslot virtual instance void M(object modopt(int16) o, object modopt(int32) d) cil managed { .param [2] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[2](false true)} ret } .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ldarg.0 call instance void [mscorlib]System.Object::.ctor() ret } } // end of class Base "; var source = @" class Derived : Base { public override void M(dynamic o, object d) { } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseMethod = global.GetMember<NamedTypeSymbol>("Base").GetMember<MethodSymbol>("M"); var derivedMethod = global.GetMember<NamedTypeSymbol>("Derived").GetMember<MethodSymbol>("M"); Assert.Equal("void Base.M(System.Object modopt(System.Int16) o, dynamic modopt(System.Int32) d)", baseMethod.ToTestDisplayString()); Assert.Equal("void Derived.M(dynamic modopt(System.Int16) o, System.Object modopt(System.Int32) d)", derivedMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void DynamicToObject_OverrideReturn() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly extern System.Core {} .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .method public hidebysig newslot virtual instance object modopt(int32) M() cil managed { .param [0] .custom instance void [System.Core]System.Runtime.CompilerServices.DynamicAttribute::.ctor(bool[]) = {bool[2](false true)} ldnull throw } .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ldarg.0 call instance void [mscorlib]System.Object::.ctor() ret } } // end of class Base "; var source = @" class Derived : Base { public override object M() { throw null; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseMethod = global.GetMember<NamedTypeSymbol>("Base").GetMember<MethodSymbol>("M"); var derivedMethod = global.GetMember<NamedTypeSymbol>("Derived").GetMember<MethodSymbol>("M"); Assert.Equal("dynamic modopt(System.Int32) Base.M()", baseMethod.ToTestDisplayString()); Assert.Equal("System.Object modopt(System.Int32) Derived.M()", derivedMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(819774, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/819774")] public void ObjectToDynamic_OverrideReturn() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .method public hidebysig newslot virtual instance object modopt(int32) M() cil managed { ldnull throw } .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ldarg.0 call instance void [mscorlib]System.Object::.ctor() ret } } // end of class Base "; var source = @" class Derived : Base { public override dynamic M() { throw null; } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseMethod = global.GetMember<NamedTypeSymbol>("Base").GetMember<MethodSymbol>("M"); var derivedMethod = global.GetMember<NamedTypeSymbol>("Derived").GetMember<MethodSymbol>("M"); Assert.Equal("System.Object modopt(System.Int32) Base.M()", baseMethod.ToTestDisplayString()); Assert.Equal("dynamic modopt(System.Int32) Derived.M()", derivedMethod.ToTestDisplayString()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(830632, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/830632")] public void AccessorsAddCustomModifiers_Override() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = {string('Item')} .method public hidebysig newslot specialname virtual instance char modopt(int8) get_P() cil managed { ldnull ret } .method public hidebysig newslot specialname virtual instance void set_P(char modopt(int16) 'value') cil managed { ret } .method public hidebysig newslot specialname virtual instance int32 modopt(int8) get_Item(bool modopt(int16) x) cil managed { ldnull ret } .method public hidebysig newslot specialname virtual instance void set_Item(bool modopt(int32) x, int32 modopt(int64) 'value') cil managed { ret } .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ldarg.0 call instance void [mscorlib]System.Object::.ctor() ret } .property instance char P() { .get instance char modopt(int8) Base::get_P() .set instance void Base::set_P(char modopt(int16)) } .property instance int32 Item(bool) { .get instance int32 modopt(int8) Base::get_Item(bool modopt(int16)) .set instance void Base::set_Item(bool modopt(int32), int32 modopt(int64)) } } // end of class Base "; var source = @" class Derived : Base { public override char P { get { return 'a'; } set { } } public override int this[bool x] { get { return 0; } set { } } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseType = global.GetMember<NamedTypeSymbol>("Base"); var baseProperty = baseType.GetMember<PropertySymbol>("P"); var baseIndexer = baseType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var derivedType = global.GetMember<NamedTypeSymbol>("Derived"); var derivedProperty = derivedType.GetMember<PropertySymbol>("P"); var derivedIndexer = derivedType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var int8Type = comp.GetSpecialType(SpecialType.System_SByte); var int16Type = comp.GetSpecialType(SpecialType.System_Int16); var int32Type = comp.GetSpecialType(SpecialType.System_Int32); var int64Type = comp.GetSpecialType(SpecialType.System_Int64); // None of the properties have custom modifiers - only the accessors do. Assert.Equal(0, baseProperty.CustomModifierCount()); Assert.Equal(0, baseIndexer.CustomModifierCount()); Assert.Equal(0, derivedProperty.CustomModifierCount()); Assert.Equal(0, derivedIndexer.CustomModifierCount()); Assert.Equal(int8Type, baseProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, derivedProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, baseProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, derivedProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, baseIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, derivedIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, baseIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, derivedIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int32Type, baseIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int32Type, derivedIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int64Type, baseIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int64Type, derivedIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(830632, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/830632")] public void AccessorsRemoveCustomModifiers_Override() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class public auto ansi beforefieldinit Base extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = {string('Item')} .method public hidebysig newslot specialname virtual instance char get_P() cil managed { ldnull ret } .method public hidebysig newslot specialname virtual instance void set_P(char 'value') cil managed { ret } .method public hidebysig newslot specialname virtual instance int32 get_Item(bool x) cil managed { ldnull ret } .method public hidebysig newslot specialname virtual instance void set_Item(bool x, int32 'value') cil managed { ret } .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { ldarg.0 call instance void [mscorlib]System.Object::.ctor() ret } .property instance char modopt(int8) P() { .get instance char Base::get_P() .set instance void Base::set_P(char) } .property instance int32 modopt(int8) Item(bool modopt(int16)) { .get instance int32 Base::get_Item(bool) .set instance void Base::set_Item(bool, int32) } } // end of class Base "; var source = @" class Derived : Base { public override char P { get { return 'a'; } set { } } public override int this[bool x] { get { return 0; } set { } } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var baseType = global.GetMember<NamedTypeSymbol>("Base"); var baseProperty = baseType.GetMember<PropertySymbol>("P"); var baseIndexer = baseType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var derivedType = global.GetMember<NamedTypeSymbol>("Derived"); var derivedProperty = derivedType.GetMember<PropertySymbol>("P"); var derivedIndexer = derivedType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var int8Type = comp.GetSpecialType(SpecialType.System_SByte); var int16Type = comp.GetSpecialType(SpecialType.System_Int16); // None of the accessors have custom modifiers - only the properties do. Assert.Equal(0, baseProperty.GetMethod.CustomModifierCount()); Assert.Equal(0, baseProperty.SetMethod.CustomModifierCount()); Assert.Equal(0, baseIndexer.GetMethod.CustomModifierCount()); Assert.Equal(0, baseIndexer.SetMethod.CustomModifierCount()); Assert.Equal(0, derivedProperty.GetMethod.CustomModifierCount()); Assert.Equal(0, derivedProperty.SetMethod.CustomModifierCount()); Assert.Equal(0, derivedIndexer.GetMethod.CustomModifierCount()); Assert.Equal(0, derivedIndexer.SetMethod.CustomModifierCount()); Assert.Equal(int8Type, baseProperty.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, derivedProperty.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, baseIndexer.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, derivedIndexer.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, baseIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, derivedIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); CompileAndVerify(comp); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(830632, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/830632")] public void AccessorsAddCustomModifiers_ExplicitImplementation() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = {string('Item')} .method public hidebysig newslot specialname abstract virtual instance char modopt(int8) get_P() cil managed { } .method public hidebysig newslot specialname abstract virtual instance void set_P(char modopt(int16) 'value') cil managed { } .method public hidebysig newslot specialname abstract virtual instance int32 modopt(int8) get_Item(bool modopt(int16) x) cil managed { } .method public hidebysig newslot specialname abstract virtual instance void set_Item(bool modopt(int32) x, int32 modopt(int64) 'value') cil managed { } .property instance char P() { .get instance char modopt(int8) I::get_P() .set instance void I::set_P(char modopt(int16)) } .property instance int32 Item(bool) { .get instance int32 modopt(int8) I::get_Item(bool modopt(int16)) .set instance void I::set_Item(bool modopt(int32), int32 modopt(int64)) } } // end of class Base "; var source = @" class Implementation : I { char I.P { get { return 'a'; } set { } } int I.this[bool x] { get { return 0; } set { } } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceType = global.GetMember<NamedTypeSymbol>("I"); var interfaceProperty = interfaceType.GetMember<PropertySymbol>("P"); var interfaceIndexer = interfaceType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var implementationType = global.GetMember<NamedTypeSymbol>("Implementation"); var implementationProperty = (PropertySymbol)implementationType.FindImplementationForInterfaceMember(interfaceProperty); var implementationIndexer = (PropertySymbol)implementationType.FindImplementationForInterfaceMember(interfaceIndexer); var int8Type = comp.GetSpecialType(SpecialType.System_SByte); var int16Type = comp.GetSpecialType(SpecialType.System_Int16); var int32Type = comp.GetSpecialType(SpecialType.System_Int32); var int64Type = comp.GetSpecialType(SpecialType.System_Int64); // None of the properties have custom modifiers - only the accessors do. Assert.Equal(0, interfaceProperty.CustomModifierCount()); Assert.Equal(0, interfaceIndexer.CustomModifierCount()); Assert.Equal(0, implementationProperty.CustomModifierCount()); Assert.Equal(0, implementationIndexer.CustomModifierCount()); Assert.Equal(int8Type, interfaceProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, implementationProperty.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, interfaceProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, implementationProperty.SetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, interfaceIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, implementationIndexer.GetMethod.ReturnTypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, interfaceIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, implementationIndexer.GetMethod.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int32Type, interfaceIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int32Type, implementationIndexer.SetMethod.Parameters[0].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int64Type, interfaceIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int64Type, implementationIndexer.SetMethod.Parameters[1].TypeWithAnnotations.CustomModifiers.Single().Modifier()); } [ClrOnlyFact(ClrOnlyReason.Ilasm)] [WorkItem(830632, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/830632")] public void AccessorsRemoveCustomModifiers_ExplicitImplementation() { var il = @" .assembly extern mscorlib { .ver 4:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89) } .assembly '<<GeneratedFileName>>' { } .class interface public abstract auto ansi I { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = {string('Item')} .method public hidebysig newslot specialname abstract virtual instance char get_P() cil managed { } .method public hidebysig newslot specialname abstract virtual instance void set_P(char 'value') cil managed { } .method public hidebysig newslot specialname abstract virtual instance int32 get_Item(bool x) cil managed { } .method public hidebysig newslot specialname abstract virtual instance void set_Item(bool x, int32 'value') cil managed { } .property instance char modopt(int8) P() { .get instance char I::get_P() .set instance void I::set_P(char) } .property instance int32 modopt(int8) Item(bool modopt(int16)) { .get instance int32 I::get_Item(bool) .set instance void I::set_Item(bool, int32) } } // end of class Base "; var source = @" class Implementation : I { char I.P { get { return 'a'; } set { } } int I.this[bool x] { get { return 0; } set { } } } "; var ilRef = CompileIL(il, prependDefaultHeader: false); var comp = CreateEmptyCompilation(source, new[] { MscorlibRef, SystemCoreRef, ilRef }); comp.VerifyDiagnostics(); var global = comp.GlobalNamespace; var interfaceType = global.GetMember<NamedTypeSymbol>("I"); var interfaceProperty = interfaceType.GetMember<PropertySymbol>("P"); var interfaceIndexer = interfaceType.GetMember<PropertySymbol>(WellKnownMemberNames.Indexer); var implementationType = global.GetMember<NamedTypeSymbol>("Implementation"); var implementationProperty = (PropertySymbol)implementationType.FindImplementationForInterfaceMember(interfaceProperty); var implementationIndexer = (PropertySymbol)implementationType.FindImplementationForInterfaceMember(interfaceIndexer); var int8Type = comp.GetSpecialType(SpecialType.System_SByte); var int16Type = comp.GetSpecialType(SpecialType.System_Int16); // None of the accessors have custom modifiers - only the properties do. Assert.Equal(0, interfaceProperty.GetMethod.CustomModifierCount()); Assert.Equal(0, interfaceProperty.SetMethod.CustomModifierCount()); Assert.Equal(0, interfaceIndexer.GetMethod.CustomModifierCount()); Assert.Equal(0, interfaceIndexer.SetMethod.CustomModifierCount()); Assert.Equal(0, implementationProperty.GetMethod.CustomModifierCount()); Assert.Equal(0, implementationProperty.SetMethod.CustomModifierCount()); Assert.Equal(0, implementationIndexer.GetMethod.CustomModifierCount()); Assert.Equal(0, implementationIndexer.SetMethod.CustomModifierCount()); Assert.Equal(int8Type, interfaceProperty.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, implementationProperty.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, interfaceIndexer.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int8Type, implementationIndexer.TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, interfaceIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); Assert.Equal(int16Type, implementationIndexer.Parameters.Single().TypeWithAnnotations.CustomModifiers.Single().Modifier()); CompileAndVerify(comp); } private static Func<Symbol, bool> IsPropertyWithSingleParameter(SpecialType paramSpecialType, bool isArrayType = false) { return s => { if (s.Kind != SymbolKind.Property) { return false; } var paramType = s.GetParameters().Single().Type; var comparisonType = isArrayType ? ((ArrayTypeSymbol)paramType).ElementType : paramType; return comparisonType.SpecialType == paramSpecialType; }; } private static void AssertAllParametersHaveConstModOpt(Symbol member, bool ignoreLast = false) { int numParameters = member.GetParameterCount(); var parameters = member.GetParameters(); for (int i = 0; i < numParameters; i++) { if (!(ignoreLast && i == numParameters - 1)) { var param = parameters[i]; Assert.Equal(ConstModOptType, param.TypeWithAnnotations.CustomModifiers.Single().Modifier.ToTestDisplayString()); } } } private static void AssertNoParameterHasModOpts(Symbol member) { foreach (var param in member.GetParameters()) { Assert.Equal(0, param.TypeWithAnnotations.CustomModifiers.Length); } } } }
AlekseyTs/roslyn
src/Compilers/CSharp/Test/Symbol/Symbols/Source/CustomModifierCopyTests.cs
C#
mit
92,832
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; using System.IO; using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis { internal sealed class AdditionalSourcesCollection { private readonly ArrayBuilder<GeneratedSourceText> _sourcesAdded; private readonly string _fileExtension; private const StringComparison _hintNameComparison = StringComparison.OrdinalIgnoreCase; private static readonly StringComparer s_hintNameComparer = StringComparer.OrdinalIgnoreCase; internal AdditionalSourcesCollection(string fileExtension) { Debug.Assert(fileExtension.Length > 0 && fileExtension[0] == '.'); _sourcesAdded = ArrayBuilder<GeneratedSourceText>.GetInstance(); _fileExtension = fileExtension; } public void Add(string hintName, SourceText source) { if (string.IsNullOrWhiteSpace(hintName)) { throw new ArgumentNullException(nameof(hintName)); } // allow any identifier character or [.,-_ ()[]{}] for (int i = 0; i < hintName.Length; i++) { char c = hintName[i]; if (!UnicodeCharacterUtilities.IsIdentifierPartCharacter(c) && c != '.' && c != ',' && c != '-' && c != '_' && c != ' ' && c != '(' && c != ')' && c != '[' && c != ']' && c != '{' && c != '}') { throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidChar, c, i), nameof(hintName)); } } hintName = AppendExtensionIfRequired(hintName); if (this.Contains(hintName)) { throw new ArgumentException(CodeAnalysisResources.HintNameUniquePerGenerator, nameof(hintName)); } if (source.Encoding is null) { throw new ArgumentException(CodeAnalysisResources.SourceTextRequiresEncoding, nameof(source)); } _sourcesAdded.Add(new GeneratedSourceText(hintName, source)); } public void AddRange(ImmutableArray<GeneratedSourceText> texts) => _sourcesAdded.AddRange(texts); public void AddRange(ImmutableArray<GeneratedSyntaxTree> trees) => _sourcesAdded.AddRange(trees.SelectAsArray(t => new GeneratedSourceText(t.HintName, t.Text))); public void RemoveSource(string hintName) { hintName = AppendExtensionIfRequired(hintName); for (int i = 0; i < _sourcesAdded.Count; i++) { if (s_hintNameComparer.Equals(_sourcesAdded[i].HintName, hintName)) { _sourcesAdded.RemoveAt(i); return; } } } public bool Contains(string hintName) { hintName = AppendExtensionIfRequired(hintName); for (int i = 0; i < _sourcesAdded.Count; i++) { if (s_hintNameComparer.Equals(_sourcesAdded[i].HintName, hintName)) { return true; } } return false; } internal ImmutableArray<GeneratedSourceText> ToImmutableAndFree() => _sourcesAdded.ToImmutableAndFree(); private string AppendExtensionIfRequired(string hintName) { if (!hintName.EndsWith(_fileExtension, _hintNameComparison)) { hintName = string.Concat(hintName, _fileExtension); } return hintName; } } }
mgoertz-msft/roslyn
src/Compilers/Core/Portable/SourceGeneration/AdditionalSourcesCollection.cs
C#
mit
4,142
// Copyright 2014-2015 Ben Trask // MIT licensed (see LICENSE for details) #include "StrongLink.h" #include "SLNDB.h" #include "../deps/libressl-portable/include/compat/stdlib.h" #define CACHE_SIZE 1000 struct SLNRepo { str_t *dir; str_t *name; str_t *dataDir; str_t *tempDir; str_t *cacheDir; str_t *DBPath; SLNMode pub_mode; SLNMode reg_mode; SLNSessionCacheRef session_cache; DB_env *db; async_mutex_t sub_mutex[1]; async_cond_t sub_cond[1]; uint64_t sub_latest; SLNPullRef *pulls; size_t pull_count; size_t pull_size; }; static int createDBConnection(SLNRepoRef const repo); static void loadPulls(SLNRepoRef const repo); static void debug_data(DB_env *const db); SLNRepoRef SLNRepoCreate(strarg_t const dir, strarg_t const name) { assert(dir); assert(name); SLNRepoRef repo = calloc(1, sizeof(struct SLNRepo)); if(!repo) return NULL; repo->dir = strdup(dir); repo->name = strdup(name); if(!repo->dir || !repo->name) { SLNRepoFree(&repo); return NULL; } repo->dataDir = aasprintf("%s/data", dir); repo->tempDir = aasprintf("%s/tmp", dir); repo->cacheDir = aasprintf("%s/cache", dir); repo->DBPath = aasprintf("%s/sln.db", dir); if(!repo->dataDir || !repo->tempDir || !repo->cacheDir || !repo->DBPath) { SLNRepoFree(&repo); return NULL; } // TODO: Configuration // TODO: The ability to limit public registration repo->pub_mode = 0; repo->reg_mode = 0; repo->session_cache = SLNSessionCacheCreate(repo, CACHE_SIZE); if(!repo->session_cache) { SLNRepoFree(&repo); return NULL; } int rc = createDBConnection(repo); if(rc < 0) { SLNRepoFree(&repo); return NULL; } debug_data(repo->db); // TODO loadPulls(repo); async_mutex_init(repo->sub_mutex, 0); async_cond_init(repo->sub_cond, 0); return repo; } void SLNRepoFree(SLNRepoRef *const repoptr) { SLNRepoRef repo = *repoptr; if(!repo) return; SLNRepoPullsStop(repo); FREE(&repo->dir); FREE(&repo->name); FREE(&repo->dataDir); FREE(&repo->tempDir); FREE(&repo->cacheDir); FREE(&repo->DBPath); repo->pub_mode = 0; repo->reg_mode = 0; SLNSessionCacheFree(&repo->session_cache); db_env_close(repo->db); repo->db = NULL; async_mutex_destroy(repo->sub_mutex); async_cond_destroy(repo->sub_cond); repo->sub_latest = 0; for(size_t i = 0; i < repo->pull_count; ++i) { SLNPullFree(&repo->pulls[i]); } assert_zeroed(repo->pulls, repo->pull_count); FREE(&repo->pulls); repo->pull_count = 0; repo->pull_size = 0; assert_zeroed(repo, 1); FREE(repoptr); repo = NULL; } strarg_t SLNRepoGetDir(SLNRepoRef const repo) { if(!repo) return NULL; return repo->dir; } strarg_t SLNRepoGetName(SLNRepoRef const repo) { if(!repo) return NULL; return repo->name; } strarg_t SLNRepoGetDataDir(SLNRepoRef const repo) { if(!repo) return NULL; return repo->dataDir; } str_t *SLNRepoCopyInternalPath(SLNRepoRef const repo, strarg_t const internalHash) { if(!repo) return NULL; assert(repo->dataDir); assert(internalHash); return aasprintf("%s/%.2s/%s", repo->dataDir, internalHash, internalHash); } strarg_t SLNRepoGetTempDir(SLNRepoRef const repo) { if(!repo) return NULL; return repo->tempDir; } str_t *SLNRepoCopyTempPath(SLNRepoRef const repo) { if(!repo) return NULL; return async_fs_tempnam(repo->tempDir, "sln"); } strarg_t SLNRepoGetCacheDir(SLNRepoRef const repo) { if(!repo) return NULL; return repo->cacheDir; } SLNMode SLNRepoGetPublicMode(SLNRepoRef const repo) { if(!repo) return 0; return repo->pub_mode; } SLNMode SLNRepoGetRegistrationMode(SLNRepoRef const repo) { if(!repo) return 0; return repo->reg_mode; } SLNSessionCacheRef SLNRepoGetSessionCache(SLNRepoRef const repo) { if(!repo) return NULL; return repo->session_cache; } void SLNRepoDBOpen(SLNRepoRef const repo, DB_env **const dbptr) { assert(repo); assert(dbptr); async_pool_enter(NULL); *dbptr = repo->db; } void SLNRepoDBClose(SLNRepoRef const repo, DB_env **const dbptr) { assert(repo); assert(dbptr); if(!*dbptr) return; async_pool_leave(NULL); *dbptr = NULL; } void SLNRepoSubmissionEmit(SLNRepoRef const repo, uint64_t const sortID) { assert(repo); async_mutex_lock(repo->sub_mutex); if(sortID > repo->sub_latest) { repo->sub_latest = sortID; async_cond_broadcast(repo->sub_cond); } async_mutex_unlock(repo->sub_mutex); } int SLNRepoSubmissionWait(SLNRepoRef const repo, uint64_t *const sortID, uint64_t const future) { assert(repo); assert(sortID); int rc = 0; async_mutex_lock(repo->sub_mutex); while(repo->sub_latest <= *sortID) { rc = async_cond_timedwait(repo->sub_cond, repo->sub_mutex, future); if(rc < 0) break; } *sortID = repo->sub_latest; async_mutex_unlock(repo->sub_mutex); return rc; } void SLNRepoPullsStart(SLNRepoRef const repo) { if(!repo) return; for(size_t i = 0; i < repo->pull_count; ++i) { SLNPullStart(repo->pulls[i]); } } void SLNRepoPullsStop(SLNRepoRef const repo) { if(!repo) return; for(size_t i = 0; i < repo->pull_count; ++i) { SLNPullStop(repo->pulls[i]); } } #define PASS_LEN 16 static int create_admin(SLNRepoRef const repo, DB_txn *const txn) { SLNSessionCacheRef const cache = SLNRepoGetSessionCache(repo); SLNSessionRef root = SLNSessionCreateInternal(cache, 0, NULL, NULL, 0, SLN_ROOT, NULL); if(!root) return DB_ENOMEM; strarg_t username = getenv("USER"); // TODO: Portability? if(!username) username = "admin"; byte_t buf[PASS_LEN/2]; int rc = async_random(buf, sizeof(buf)); if(rc < 0) return DB_ENOMEM; // ??? char password[PASS_LEN+1]; tohex(password, buf, sizeof(buf)); password[PASS_LEN] = '\0'; rc = SLNSessionCreateUserInternal(root, txn, username, password, SLN_ROOT); if(rc < 0) return rc; fprintf(stdout, "ACCOUNT CREATED\n"); fprintf(stdout, " Username: %s\n", username); fprintf(stdout, " Password: %s\n", password); fprintf(stdout, " Please change your password after logging in\n"); return 0; } static int createDBConnection(SLNRepoRef const repo) { assert(repo); int rc = db_env_create(&repo->db); rc = rc < 0 ? rc : db_env_set_mapsize(repo->db, 1024 * 1024 * 1024 * 1); if(rc < 0) { fprintf(stderr, "Database setup error (%s)\n", sln_strerror(rc)); return rc; } rc = db_env_open(repo->db, repo->DBPath, 0, 0600); if(rc < 0) { fprintf(stderr, "Database open error (%s)\n", sln_strerror(rc)); return rc; } DB_env *db = NULL; SLNRepoDBOpen(repo, &db); DB_txn *txn = NULL; rc = db_txn_begin(db, NULL, DB_RDWR, &txn); if(rc < 0) { SLNRepoDBClose(repo, &db); fprintf(stderr, "Database transaction error (%s)\n", sln_strerror(rc)); return rc; } rc = db_schema_verify(txn); if(DB_VERSION_MISMATCH == rc) { db_txn_abort(txn); txn = NULL; SLNRepoDBClose(repo, &db); fprintf(stderr, "Database incompatible with this software version\n"); return rc; } if(rc < 0) { db_txn_abort(txn); txn = NULL; SLNRepoDBClose(repo, &db); fprintf(stderr, "Database schema layer error (%s)\n", sln_strerror(rc)); return rc; } // TODO: Application-level schema verification DB_cursor *cursor = NULL; rc = db_txn_cursor(txn, &cursor); if(rc < 0) { db_txn_abort(txn); txn = NULL; SLNRepoDBClose(repo, &db); fprintf(stderr, "Database cursor error (%s)\n", sln_strerror(rc)); return rc; } DB_range users[1]; SLNUserByIDKeyRange0(users, txn); rc = db_cursor_firstr(cursor, users, NULL, NULL, +1); if(DB_NOTFOUND == rc) { rc = create_admin(repo, txn); } if(rc < 0) { db_txn_abort(txn); txn = NULL; SLNRepoDBClose(repo, &db); fprintf(stderr, "Database user error (%s)\n", sln_strerror(rc)); return rc; } rc = db_txn_commit(txn); txn = NULL; SLNRepoDBClose(repo, &db); if(rc < 0) { fprintf(stderr, "Database commit error (%s)\n", sln_strerror(rc)); return rc; } return 0; } static void loadPulls(SLNRepoRef const repo) { assert(repo); DB_env *db = NULL; SLNRepoDBOpen(repo, &db); DB_txn *txn = NULL; int rc = db_txn_begin(db, NULL, DB_RDONLY, &txn); assert(rc >= 0); DB_cursor *cur = NULL; rc = db_cursor_open(txn, &cur); assertf(rc >= 0, "Database error %s\n", sln_strerror(rc)); DB_range pulls[1]; SLNPullByIDRange0(pulls, txn); DB_val pullID_key[1]; DB_val pull_val[1]; rc = db_cursor_firstr(cur, pulls, pullID_key, pull_val, +1); for(; rc >= 0; rc = db_cursor_nextr(cur, pulls, pullID_key, pull_val, +1)) { uint64_t pullID; SLNPullByIDKeyUnpack(pullID_key, txn, &pullID); uint64_t userID; strarg_t host; strarg_t sessionid; strarg_t query; SLNPullByIDValUnpack(pull_val, txn, &userID, &host, &sessionid, &query); SLNPullRef const pull = SLNRepoCreatePull(repo, pullID, userID, host, sessionid, query); if(repo->pull_count+1 > repo->pull_size) { repo->pull_size = (repo->pull_count+1) * 2; repo->pulls = reallocarray(repo->pulls, repo->pull_size, sizeof(SLNPullRef)); assert(repo->pulls); // TODO: Handle error } repo->pulls[repo->pull_count++] = pull; } db_cursor_close(cur); cur = NULL; db_txn_abort(txn); txn = NULL; SLNRepoDBClose(repo, &db); } static void debug_data(DB_env *const db) { int rc; DB_txn *txn = NULL; rc = db_txn_begin(db, NULL, DB_RDWR, &txn); assert(!rc); assert(txn); /* DB_val pullID_key[1]; SLNPullByIDKeyPack(pullID_key, txn, 1); uint64_t const userID = 1; char const *const host = "localhost:8009"; char const *const sessionid = NULL; char const *const query = ""; DB_val pull_val[1]; SLNPullByIDValPack(pull_val, txn, userID, host, sessionid, query); rc = db_put(txn, pullID_key, pull_val, 0); assert(!rc);*/ rc = db_txn_commit(txn); txn = NULL; assert(!rc); }
iOSCowboy/stronglink
src/SLNRepo.c
C
mit
9,484
#! /usr/env/python """ 2D numerical model of shallow-water flow over topography, using the Bates et al. (2010) algorithm for storage-cell inundation modeling. Last updated GT May 2014 """ from landlab import RasterModelGrid import pylab, time import numpy as np def main(): """ In this simple tutorial example, the main function does all the work: it sets the parameter values, creates and initializes a grid, sets up the state variables, runs the main loop, and cleans up. """ # INITIALIZE # User-defined parameter values numrows = 20 numcols = 100 dx = 50. n = 0.03 # roughness coefficient run_time = 1800 # duration of run, seconds h_init = 0.001 # initial thin layer of water (m) h_boundary = 2.5 # water depth at left side (m) g = 9.8 alpha = 0.2 # time-step factor (ND; from Bates et al., 2010) # Derived parameters ten_thirds = 10./3. # pre-calculate 10/3 for speed elapsed_time = 0.0 # total time in simulation report_interval = 2. # interval to report progress (seconds) next_report = time.time()+report_interval # next time to report progress # Create and initialize a raster model grid mg = RasterModelGrid(numrows, numcols, dx) # Set up boundaries. We'll have the right and left sides open, the top and # bottom closed. The water depth on the left will be 5 m, and on the right # just 1 mm. mg.set_closed_boundaries_at_grid_edges(True, False, True, False) # Set up scalar values z = mg.add_zeros('node', 'Land_surface__elevation') # land elevation h = mg.add_zeros('node', 'Water_depth') + h_init # water depth (m) q = mg.create_active_link_array_zeros() # unit discharge (m2/s) dhdt = mg.add_zeros('node', 'Water_depth_time_derivative') # rate of water-depth change # Left side has deep water leftside = mg.left_edge_node_ids() h[leftside] = h_boundary # Get a list of the core nodes core_nodes = mg.core_nodes # Display a message print( 'Running ...' ) start_time = time.time() # RUN # Main loop while elapsed_time < run_time: # Report progress if time.time()>=next_report: print('Time = '+str(elapsed_time)+' (' +str(100.*elapsed_time/run_time)+'%)') next_report += report_interval # Calculate time-step size for this iteration (Bates et al., eq 14) dtmax = alpha*mg.dx/np.sqrt(g*np.amax(h)) # Calculate the effective flow depth at active links. Bates et al. 2010 # recommend using the difference between the highest water-surface # and the highest bed elevation between each pair of nodes. zmax = mg.max_of_link_end_node_values(z) w = h+z # water-surface height wmax = mg.max_of_link_end_node_values(w) hflow = wmax - zmax # Calculate water-surface slopes water_surface_slope = mg.calculate_gradients_at_active_links(w) # Calculate the unit discharges (Bates et al., eq 11) q = (q-g*hflow*dtmax*water_surface_slope)/ \ (1.+g*hflow*dtmax*n*n*abs(q)/(hflow**ten_thirds)) # Calculate water-flux divergence and time rate of change of water depth # at nodes dhdt = -mg.calculate_flux_divergence_at_nodes(q) # Second time-step limiter (experimental): make sure you don't allow # water-depth to go negative if np.amin(dhdt) < 0.: shallowing_locations = np.where(dhdt<0.) time_to_drain = -h[shallowing_locations]/dhdt[shallowing_locations] dtmax2 = alpha*np.amin(time_to_drain) dt = np.min([dtmax, dtmax2]) else: dt = dtmax # Update the water-depth field h[core_nodes] = h[core_nodes] + dhdt[core_nodes]*dt # Update current time elapsed_time += dt # FINALIZE # Get a 2D array version of the elevations hr = mg.node_vector_to_raster(h) # Create a shaded image pylab.close() # clear any pre-existing plot image_extent = [0, 0.001*dx*numcols, 0, 0.001*dx*numrows] # in km im = pylab.imshow(hr, cmap=pylab.cm.RdBu, extent=image_extent) pylab.xlabel('Distance (km)', fontsize=12) pylab.ylabel('Distance (km)', fontsize=12) # add contour lines with labels cset = pylab.contour(hr, extent=image_extent) pylab.clabel(cset, inline=True, fmt='%1.1f', fontsize=10) # add a color bar on the side cb = pylab.colorbar(im) cb.set_label('Water depth (m)', fontsize=12) # add a title pylab.title('Simulated inundation') # Display the plot pylab.show() print('Done.') print('Total run time = '+str(time.time()-start_time)+' seconds.') if __name__ == "__main__": main()
laijingtao/landlab
docs/model_grid_guide/overland_flow_with_model_grid.py
Python
mit
4,835
const path = require('path'); const Handlebars = require('handlebars'); const marked = require('meta-marked'); const fs = require('fs-plus'); const _ = require('underscore'); marked.setOptions({ highlight(code) { return require('highlight.js').highlightAuto(code).value; } }); let standardClassURLRoot = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/'; let standardClasses = [ 'string', 'object', 'array', 'function', 'number', 'date', 'error', 'boolean', 'null', 'undefined', 'json', 'set', 'map', 'typeerror', 'syntaxerror', 'referenceerror', 'rangeerror' ]; let thirdPartyClasses = { 'react.component': 'https://facebook.github.io/react/docs/component-api.html', 'promise': 'https://github.com/petkaantonov/bluebird/blob/master/API.md', 'range': 'https://developer.mozilla.org/en-US/docs/Web/API/Range', 'selection': 'https://developer.mozilla.org/en-US/docs/Web/API/Selection', 'node': 'https://developer.mozilla.org/en-US/docs/Web/API/Node', }; module.exports = function(grunt) { let {cp, mkdir, rm} = grunt.config('taskHelpers'); let relativePathForClass = classname => classname+'.html'; let outputPathFor = function(relativePath) { let classDocsOutputDir = grunt.config.get('classDocsOutputDir'); return path.join(classDocsOutputDir, relativePath); }; var processFields = function(json, fields, tasks) { let val; if (fields == null) { fields = []; } if (tasks == null) { tasks = []; } if (json instanceof Array) { return (() => { let result = []; for (val of Array.from(json)) { result.push(processFields(val, fields, tasks)); } return result; })(); } else { return (() => { let result1 = []; for (let key in json) { val = json[key]; let item; if (Array.from(fields).includes(key)) { for (let task of Array.from(tasks)) { val = task(val); } json[key] = val; } if (_.isObject(val)) { item = processFields(val, fields, tasks); } result1.push(item); } return result1; })(); } }; return grunt.registerTask('docs-render', 'Builds html from the API docs', function() { let documentation, filename, html, match, meta, name, result, section, val; let classDocsOutputDir = grunt.config.get('classDocsOutputDir'); // Parse API reference Markdown let classes = []; let apiJsonPath = path.join(classDocsOutputDir, 'api.json'); let apiJSON = JSON.parse(grunt.file.read(apiJsonPath)); for (var classname in apiJSON.classes) { // Parse a "@Section" out of the description if one is present let contents = apiJSON.classes[classname]; let sectionRegex = /Section: ?([\w ]*)(?:$|\n)/; section = 'General'; match = sectionRegex.exec(contents.description); if (match) { contents.description = contents.description.replace(match[0], ''); section = match[1].trim(); } // Replace superClass "React" with "React.Component". The Coffeescript Lexer // is so bad. if (contents.superClass === "React") { contents.superClass = "React.Component"; } classes.push({ name: classname, documentation: contents, section }); } // Build Sidebar metadata we can hand off to each of the templates to // generate the sidebar let sidebar = {}; for (var i = 0; i < classes.length; i++) { var current_class = classes[i]; console.log(current_class.name + ' ' + current_class.section) if (!(current_class.section in sidebar)) { sidebar[current_class.section] = [] } sidebar[current_class.section].push(current_class.name) } // Prepare to render by loading handlebars partials let templatesPath = path.resolve(grunt.config('buildDir'), 'docs_templates'); grunt.file.recurse(templatesPath, function(abspath, root, subdir, filename) { if ((filename[0] === '_') && (path.extname(filename) === '.html')) { return Handlebars.registerPartial(filename, grunt.file.read(abspath)); } }); // Render Helpers let knownClassnames = {}; for (classname in apiJSON.classes) { val = apiJSON.classes[classname]; knownClassnames[classname.toLowerCase()] = val; } let expandTypeReferences = function(val) { let refRegex = /{([\w.]*)}/g; while ((match = refRegex.exec(val)) !== null) { let term = match[1].toLowerCase(); let label = match[1]; let url = false; if (Array.from(standardClasses).includes(term)) { url = standardClassURLRoot+term; } else if (thirdPartyClasses[term]) { url = thirdPartyClasses[term]; } else if (knownClassnames[term]) { url = relativePathForClass(knownClassnames[term].name); grunt.log.ok("Found: " + term) } else { console.warn(`Cannot find class named ${term}`); } if (url) { val = val.replace(match[0], `<a href='${url}'>${label}</a>`); } } return val; }; let expandFuncReferences = function(val) { let refRegex = /{([\w]*)?::([\w]*)}/g; while ((match = refRegex.exec(val)) !== null) { var label; let [text, a, b] = Array.from(match); let url = false; if (a && b) { url = `${relativePathForClass(a)}#${b}`; label = `${a}::${b}`; } else { url = `#${b}`; label = `${b}`; } if (url) { val = val.replace(text, `<a href='${url}'>${label}</a>`); } } return val; }; // DEBUG Render sidebar json // grunt.file.write(outputPathFor('sidebar.json'), JSON.stringify(sidebar, null, 2)); // Render Class Pages let classTemplatePath = path.join(templatesPath, 'class.md'); let classTemplate = Handlebars.compile(grunt.file.read(classTemplatePath)); for ({name, documentation, section} of Array.from(classes)) { // Recursively process `description` and `type` fields to process markdown, // expand references to types, functions and other files. processFields(documentation, ['description'], [expandFuncReferences]); processFields(documentation, ['type'], [expandTypeReferences]); result = classTemplate({name, documentation, section}); grunt.file.write(outputPathFor(name + '.md'), result); } let sidebarTemplatePath = path.join(templatesPath, 'sidebar.md'); let sidebarTemplate = Handlebars.compile(grunt.file.read(sidebarTemplatePath)); grunt.file.write(outputPathFor('Sidebar.md'), sidebarTemplate({sidebar})); // Remove temp cjsx output return fs.removeSync(outputPathFor("temp-cjsx")); }); }; function __guard__(value, transform) { return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined; }
nylas-mail-lives/nylas-mail
packages/client-app/build/tasks/docs-render-task.js
JavaScript
mit
7,104
/*! * Tippy.js v3.0.0-beta.0 * (c) 2017-2018 atomiks * MIT */ var version = "3.0.0-beta.0"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var Defaults = { a11y: true, content: '', placement: 'top', livePlacement: true, trigger: 'mouseenter focus', hideOnClick: true, animation: 'shift-away', animateFill: true, arrow: false, delay: [0, 20], duration: [325, 275], interactive: false, interactiveBorder: 2, interactiveDebounce: 0, theme: 'dark', size: 'regular', distance: 10, offset: 0, multiple: false, followCursor: false, inertia: false, updateDuration: 200, sticky: false, appendTo: function appendTo() { return document.body; }, zIndex: 9999, touchHold: false, performance: false, flip: true, flipBehavior: 'flip', arrowType: 'sharp', arrowTransform: '', target: '', allowHTML: true, showOnInit: false, popperOptions: {}, lazy: true, touch: true, wait: null, onShow: function onShow() {}, onShown: function onShown() {}, onHide: function onHide() {}, onHidden: function onHidden() {} }; var setDefaults = function setDefaults(partialDefaults) { Defaults = _extends({}, Defaults, partialDefaults); }; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.4 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; var timeoutDuration = 0; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { timeoutDuration = 1; break; } } function microtaskDebounce(fn) { var called = false; return function () { if (called) { return; } called = true; window.Promise.resolve().then(function () { called = false; fn(); }); }; } function taskDebounce(fn) { var scheduled = false; return function () { if (!scheduled) { scheduled = true; setTimeout(function () { scheduled = false; fn(); }, timeoutDuration); } }; } var supportsMicroTasks = isBrowser && window.Promise; /** * Create a debounced version of a method, that's asynchronously deferred * but called in the minimum time possible. * * @method * @memberof Popper.Utils * @argument {Function} fn * @returns {Function} */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** * Check if the given variable is a function * @method * @memberof Popper.Utils * @argument {Any} functionToCheck - variable to check * @returns {Boolean} answer to: is a function? */ function isFunction(functionToCheck) { var getType = {}; return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; } /** * Get CSS computed property of the given element * @method * @memberof Popper.Utils * @argument {Eement} element * @argument {String} property */ function getStyleComputedProperty(element, property) { if (element.nodeType !== 1) { return []; } // NOTE: 1 DOM access here var css = getComputedStyle(element, null); return property ? css[property] : css; } /** * Returns the parentNode or the host of the element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} parent */ function getParentNode(element) { if (element.nodeName === 'HTML') { return element; } return element.parentNode || element.host; } /** * Returns the scrolling parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} scroll parent */ function getScrollParent(element) { // Return body, `getScroll` will take care to get the correct `scrollTop` from it if (!element) { return document.body; } switch (element.nodeName) { case 'HTML': case 'BODY': return element.ownerDocument.body; case '#document': return element.body; } // Firefox want us to check `-x` and `-y` variations as well var _getStyleComputedProp = getStyleComputedProperty(element), overflow = _getStyleComputedProp.overflow, overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); /** * Determines if the browser is Internet Explorer * @method * @memberof Popper.Utils * @param {Number} version to check * @returns {Boolean} isIE */ function isIE(version) { if (version === 11) { return isIE11; } if (version === 10) { return isIE10; } return isIE11 || isIE10; } /** * Returns the offset parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} offset parent */ function getOffsetParent(element) { if (!element) { return document.documentElement; } var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here var offsetParent = element.offsetParent; // Skip hidden elements which don't have an offsetParent while (offsetParent === noOffsetParent && element.nextElementSibling) { offsetParent = (element = element.nextElementSibling).offsetParent; } var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TD or TABLE in case // no offsetParent is present, I hate this job... if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { return getOffsetParent(offsetParent); } return offsetParent; } function isOffsetContainer(element) { var nodeName = element.nodeName; if (nodeName === 'BODY') { return false; } return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; } /** * Finds the root node (document, shadowDOM root) of the given element * @method * @memberof Popper.Utils * @argument {Element} node * @returns {Element} root node */ function getRoot(node) { if (node.parentNode !== null) { return getRoot(node.parentNode); } return node; } /** * Finds the offset parent common to the two provided nodes * @method * @memberof Popper.Utils * @argument {Element} element1 * @argument {Element} element2 * @returns {Element} common offset parent */ function findCommonOffsetParent(element1, element2) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { return document.documentElement; } // Here we make sure to give as "start" the element that comes first in the DOM var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; var start = order ? element1 : element2; var end = order ? element2 : element1; // Get common ancestor container var range = document.createRange(); range.setStart(start, 0); range.setEnd(end, 0); var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { if (isOffsetContainer(commonAncestorContainer)) { return commonAncestorContainer; } return getOffsetParent(commonAncestorContainer); } // one of the nodes is inside shadowDOM, find which one var element1root = getRoot(element1); if (element1root.host) { return findCommonOffsetParent(element1root.host, element2); } else { return findCommonOffsetParent(element1, getRoot(element2).host); } } /** * Gets the scroll value of the given element in the given side (top and left) * @method * @memberof Popper.Utils * @argument {Element} element * @argument {String} side `top` or `left` * @returns {number} amount of scrolled pixels */ function getScroll(element) { var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { var html = element.ownerDocument.documentElement; var scrollingElement = element.ownerDocument.scrollingElement || html; return scrollingElement[upperSide]; } return element[upperSide]; } /* * Sum or subtract the element scroll values (left and top) from a given rect object * @method * @memberof Popper.Utils * @param {Object} rect - Rect object you want to change * @param {HTMLElement} element - The element from the function reads the scroll values * @param {Boolean} subtract - set to true if you want to subtract the scroll values * @return {Object} rect - The modifier rect object */ function includeScroll(rect, element) { var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); var modifier = subtract ? -1 : 1; rect.top += scrollTop * modifier; rect.bottom += scrollTop * modifier; rect.left += scrollLeft * modifier; rect.right += scrollLeft * modifier; return rect; } /* * Helper to detect borders of a given element * @method * @memberof Popper.Utils * @param {CSSStyleDeclaration} styles * Result of `getStyleComputedProperty` on the given element * @param {String} axis - `x` or `y` * @return {number} borders - The borders size of the given axis */ function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } function getSize(axis, body, html, computedStyle) { return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); } function getWindowSizes(document) { var body = document.body; var html = document.documentElement; var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), width: getSize('Width', body, html, computedStyle) }; } var classCallCheck$1 = function classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var defineProperty$1 = function defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; var _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /** * Given element offsets, generate an output similar to getBoundingClientRect * @method * @memberof Popper.Utils * @argument {Object} offsets * @returns {Object} ClientRect like output */ function getClientRect(offsets) { return _extends$1({}, offsets, { right: offsets.left + offsets.width, bottom: offsets.top + offsets.height }); } /** * Get bounding client rect of given element * @method * @memberof Popper.Utils * @param {HTMLElement} element * @return {Object} client rect */ function getBoundingClientRect(element) { var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 try { if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); rect.top += scrollTop; rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; } else { rect = element.getBoundingClientRect(); } } catch (e) {} var result = { left: rect.left, top: rect.top, width: rect.right - rect.left, height: rect.bottom - rect.top }; // subtract scrollbar size from sizes var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; var width = sizes.width || element.clientWidth || result.right - result.left; var height = sizes.height || element.clientHeight || result.bottom - result.top; var horizScrollbar = element.offsetWidth - width; var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border` // we make this check conditional for performance reasons if (horizScrollbar || vertScrollbar) { var styles = getStyleComputedProperty(element); horizScrollbar -= getBordersSize(styles, 'x'); vertScrollbar -= getBordersSize(styles, 'y'); result.width -= horizScrollbar; result.height -= vertScrollbar; } return getClientRect(result); } function getOffsetRectRelativeToArbitraryNode(children, parent) { var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); var scrollParent = getScrollParent(children); var styles = getStyleComputedProperty(parent); var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); // In cases where the parent is fixed, we must ignore negative scroll in offset calc if (fixedPosition && isHTML) { parentRect.top = Math.max(parentRect.top, 0); parentRect.left = Math.max(parentRect.left, 0); } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, height: childrenRect.height }); offsets.marginTop = 0; offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent // we do this only on HTML because it's the only element that behaves // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if (!isIE10 && isHTML) { var marginTop = parseFloat(styles.marginTop, 10); var marginLeft = parseFloat(styles.marginLeft, 10); offsets.top -= borderTopWidth - marginTop; offsets.bottom -= borderTopWidth - marginTop; offsets.left -= borderLeftWidth - marginLeft; offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them offsets.marginTop = marginTop; offsets.marginLeft = marginLeft; } if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } return offsets; } function getViewportOffsetRectRelativeToArtbitraryNode(element) { var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); var scrollTop = !excludeScroll ? getScroll(html) : 0; var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, height: height }; return getClientRect(offset); } /** * Check if the given element is fixed or is inside a fixed parent * @method * @memberof Popper.Utils * @argument {Element} element * @argument {Element} customContainer * @returns {Boolean} answer to "isFixed?" */ function isFixed(element) { var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { return false; } if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } return isFixed(getParentNode(element)); } /** * Finds the first parent of an element that has a transformed property defined * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} first transformed parent or documentElement */ function getFixedPositionOffsetParent(element) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element || !element.parentElement || isIE()) { return document.documentElement; } var el = element.parentElement; while (el && getStyleComputedProperty(el, 'transform') === 'none') { el = el.parentElement; } return el || document.documentElement; } /** * Computed the boundaries limits and return them * @method * @memberof Popper.Utils * @param {HTMLElement} popper * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here var boundaries = { top: 0, left: 0 }; var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; if (boundariesElement === 'scrollParent') { boundariesNode = getScrollParent(getParentNode(reference)); if (boundariesNode.nodeName === 'BODY') { boundariesNode = popper.ownerDocument.documentElement; } } else if (boundariesElement === 'window') { boundariesNode = popper.ownerDocument.documentElement; } else { boundariesNode = boundariesElement; } var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { var _getWindowSizes = getWindowSizes(popper.ownerDocument), height = _getWindowSizes.height, width = _getWindowSizes.width; boundaries.top += offsets.top - offsets.marginTop; boundaries.bottom = height + offsets.top; boundaries.left += offsets.left - offsets.marginLeft; boundaries.right = width + offsets.left; } else { // for all the other DOM elements, this one is good boundaries = offsets; } } // Add paddings padding = padding || 0; var isPaddingNumber = typeof padding === 'number'; boundaries.left += isPaddingNumber ? padding : padding.left || 0; boundaries.top += isPaddingNumber ? padding : padding.top || 0; boundaries.right -= isPaddingNumber ? padding : padding.right || 0; boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; return boundaries; } function getArea(_ref) { var width = _ref.width, height = _ref.height; return width * height; } /** * Utility used to transform the `auto` placement to the placement with more * available space. * @method * @memberof Popper.Utils * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; if (placement.indexOf('auto') === -1) { return placement; } var boundaries = getBoundaries(popper, reference, padding, boundariesElement); var rects = { top: { width: boundaries.width, height: refRect.top - boundaries.top }, right: { width: boundaries.right - refRect.right, height: boundaries.height }, bottom: { width: boundaries.width, height: boundaries.bottom - refRect.bottom }, left: { width: refRect.left - boundaries.left, height: boundaries.height } }; var sortedAreas = Object.keys(rects).map(function (key) { return _extends$1({ key: key }, rects[key], { area: getArea(rects[key]) }); }).sort(function (a, b) { return b.area - a.area; }); var filteredAreas = sortedAreas.filter(function (_ref2) { var width = _ref2.width, height = _ref2.height; return width >= popper.clientWidth && height >= popper.clientHeight; }); var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; var variation = placement.split('-')[1]; return computedPlacement + (variation ? '-' + variation : ''); } /** * Get offsets to the reference element * @method * @memberof Popper.Utils * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** * Get the outer sizes of the given element (offset size + margins) * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Object} object containing width and height properties */ function getOuterSizes(element) { var styles = getComputedStyle(element); var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); var result = { width: element.offsetWidth + y, height: element.offsetHeight + x }; return result; } /** * Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement */ function getOppositePlacement(placement) { var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); } /** * Get offsets to the popper * @method * @memberof Popper.Utils * @param {Object} position - CSS position the Popper will get applied * @param {HTMLElement} popper - the popper element * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) * @param {String} placement - one of the valid placement options * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper */ function getPopperOffsets(popper, referenceOffsets, placement) { placement = placement.split('-')[0]; // Get popper node sizes var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object var popperOffsets = { width: popperRect.width, height: popperRect.height }; // depending by the popper placement we have to compute its offsets slightly differently var isHoriz = ['right', 'left'].indexOf(placement) !== -1; var mainSide = isHoriz ? 'top' : 'left'; var secondarySide = isHoriz ? 'left' : 'top'; var measurement = isHoriz ? 'height' : 'width'; var secondaryMeasurement = !isHoriz ? 'height' : 'width'; popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; if (placement === secondarySide) { popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; } else { popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; } return popperOffsets; } /** * Mimics the `find` method of Array * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function find(arr, check) { // use native find if supported if (Array.prototype.find) { return arr.find(check); } // use `filter` to obtain the same behavior of `find` return arr.filter(check)[0]; } /** * Return the index of the matching object * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function findIndex(arr, prop, value) { // use native findIndex if supported if (Array.prototype.findIndex) { return arr.findIndex(function (cur) { return cur[prop] === value; }); } // use `find` + `indexOf` if `findIndex` isn't supported var match = find(arr, function (obj) { return obj[prop] === value; }); return arr.indexOf(match); } /** * Loop trough the list of modifiers and run them in order, * each of them will then edit the data object. * @method * @memberof Popper.Utils * @param {dataObject} data * @param {Array} modifiers * @param {String} ends - Optional modifier name used as stopper * @returns {dataObject} */ function runModifiers(modifiers, data, ends) { var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); modifiersToRun.forEach(function (modifier) { if (modifier['function']) { // eslint-disable-line dot-notation console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); } var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation if (modifier.enabled && isFunction(fn)) { // Add properties to offsets to make them a complete clientRect object // we do this before each modifier to make sure the previous one doesn't // mess with these values data.offsets.popper = getClientRect(data.offsets.popper); data.offsets.reference = getClientRect(data.offsets.reference); data = fn(data, modifier); } }); return data; } /** * Updates the position of the popper, computing the new offsets and applying * the new style.<br /> * Prefer `scheduleUpdate` over `update` because of performance reasons. * @method * @memberof Popper */ function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; data.positionFixed = this.options.positionFixed; // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback if (!this.state.isCreated) { this.state.isCreated = true; this.options.onCreate(data); } else { this.options.onUpdate(data); } } /** * Helper used to know if the given modifier is enabled. * @method * @memberof Popper.Utils * @returns {Boolean} */ function isModifierEnabled(modifiers, modifierName) { return modifiers.some(function (_ref) { var name = _ref.name, enabled = _ref.enabled; return enabled && name === modifierName; }); } /** * Get the prefixed supported property name * @method * @memberof Popper.Utils * @argument {String} property (camelCase) * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) */ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { return toCheck; } } return null; } /** * Destroys the popper. * @method * @memberof Popper */ function destroy() { this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled if (isModifierEnabled(this.modifiers, 'applyStyle')) { this.popper.removeAttribute('x-placement'); this.popper.style.position = ''; this.popper.style.top = ''; this.popper.style.left = ''; this.popper.style.right = ''; this.popper.style.bottom = ''; this.popper.style.willChange = ''; this.popper.style[getSupportedPropertyName('transform')] = ''; } this.disableEventListeners(); // remove the popper if user explicity asked for the deletion on destroy // do not use `remove` because IE11 doesn't support it if (this.options.removeOnDestroy) { this.popper.parentNode.removeChild(this.popper); } return this; } /** * Get the window associated with the element * @argument {Element} element * @returns {Window} */ function getWindow(element) { var ownerDocument = element.ownerDocument; return ownerDocument ? ownerDocument.defaultView : window; } function attachToScrollParents(scrollParent, event, callback, scrollParents) { var isBody = scrollParent.nodeName === 'BODY'; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; target.addEventListener(event, callback, { passive: true }); if (!isBody) { attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); } scrollParents.push(target); } /** * Setup needed event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement = scrollElement; state.eventsEnabled = true; return state; } /** * It will add resize/scroll events and start recalculating * position of the popper element when they are triggered. * @method * @memberof Popper */ function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } } /** * Remove event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }); // Reset state state.updateBound = null; state.scrollParents = []; state.scrollElement = null; state.eventsEnabled = false; return state; } /** * It will remove resize/scroll events and won't recalculate popper position * when they are triggered. It also won't trigger `onUpdate` callback anymore, * unless you call `update` method manually. * @method * @memberof Popper */ function disableEventListeners() { if (this.state.eventsEnabled) { cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } } /** * Tells if a given input is a number * @method * @memberof Popper.Utils * @param {*} input to check * @return {Boolean} */ function isNumeric(n) { return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); } /** * Set the style to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the style to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setStyles(element, styles) { Object.keys(styles).forEach(function (prop) { var unit = ''; // add unit if the value is numeric and is one of the following if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { unit = 'px'; } element.style[prop] = styles[prop] + unit; }); } /** * Set the attributes to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the attributes to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setAttributes(element, attributes) { Object.keys(attributes).forEach(function (prop) { var value = attributes[prop]; if (value !== false) { element.setAttribute(prop, attributes[prop]); } else { element.removeAttribute(prop); } }); } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} data.styles - List of style properties - values to apply to popper element * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element * @argument {Object} options - Modifiers configuration and options * @returns {Object} The same data object */ function applyStyle(data) { // any property present in `data.styles` will be applied to the popper, // in this way we can make the 3rd party modifiers add custom styles to it // Be aware, modifiers could override the properties defined in the previous // lines of this modifier! setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper, // they will be set as HTML attributes of the element setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties if (data.arrowElement && Object.keys(data.arrowStyles).length) { setStyles(data.arrowElement, data.arrowStyles); } return data; } /** * Set the x-placement attribute before everything else because it could be used * to add margins to the popper margins needs to be calculated to get the * correct popper offsets. * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as popper * @param {Object} options - Popper.js options */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); return options; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeStyle(data, options) { var x = options.x, y = options.y; var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { return modifier.name === 'applyStyle'; }).gpuAcceleration; if (legacyGpuAccelerationOption !== undefined) { console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); } var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; var offsetParent = getOffsetParent(data.instance.popper); var offsetParentRect = getBoundingClientRect(offsetParent); // Styles var styles = { position: popper.position }; // Avoid blurry text by using full pixel integers. // For pixel-perfect positioning, top/bottom prefers rounded // values, while left/right prefers floored values. var offsets = { left: Math.floor(popper.left), top: Math.round(popper.top), bottom: Math.round(popper.bottom), right: Math.floor(popper.right) }; var sideA = x === 'bottom' ? 'top' : 'bottom'; var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported, // we use `translate3d` to apply the position to the popper we // automatically use the supported prefixed version if needed var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?) // If the content of the popper grows once it's been positioned, it // may happen that the popper gets misplaced because of the new content // overflowing its reference element // To avoid this problem, we provide two options (x and y), which allow // the consumer to define the offset origin. // If we position a popper on top of a reference element, we can set // `x` to `top` to make the popper grow towards its top instead of // its bottom. var left = void 0, top = void 0; if (sideA === 'bottom') { // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar) // and not the bottom of the html element if (offsetParent.nodeName === 'HTML') { top = -offsetParent.clientHeight + offsets.bottom; } else { top = -offsetParentRect.height + offsets.bottom; } } else { top = offsets.top; } if (sideB === 'right') { if (offsetParent.nodeName === 'HTML') { left = -offsetParent.clientWidth + offsets.right; } else { left = -offsetParentRect.width + offsets.right; } } else { left = offsets.left; } if (gpuAcceleration && prefixedProperty) { styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; styles[sideA] = 0; styles[sideB] = 0; styles.willChange = 'transform'; } else { // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties var invertTop = sideA === 'bottom' ? -1 : 1; var invertLeft = sideB === 'right' ? -1 : 1; styles[sideA] = top * invertTop; styles[sideB] = left * invertLeft; styles.willChange = sideA + ', ' + sideB; } // Attributes var attributes = { 'x-placement': data.placement }; // Update `data` attributes, styles and arrowStyles data.attributes = _extends$1({}, attributes, data.attributes); data.styles = _extends$1({}, styles, data.styles); data.arrowStyles = _extends$1({}, data.offsets.arrow, data.arrowStyles); return data; } /** * Helper used to know if the given modifier depends from another one.<br /> * It checks if the needed modifier is listed and enabled. * @method * @memberof Popper.Utils * @param {Array} modifiers - list of modifiers * @param {String} requestingName - name of requesting modifier * @param {String} requestedName - name of requested modifier * @returns {Boolean} */ function isModifierRequired(modifiers, requestingName, requestedName) { var requesting = find(modifiers, function (_ref) { var name = _ref.name; return name === requestingName; }); var isRequired = !!requesting && modifiers.some(function (modifier) { return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; }); if (!isRequired) { var _requesting = '`' + requestingName + '`'; var requested = '`' + requestedName + '`'; console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); } return isRequired; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function arrow(data, options) { var _data$offsets$arrow; // arrow depends on keepTogether in order to work if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { return data; } var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector if (typeof arrowElement === 'string') { arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier if (!arrowElement) { return data; } } else { // if the arrowElement isn't a query selector we must check that the // provided DOM node is child of its popper node if (!data.instance.popper.contains(arrowElement)) { console.warn('WARNING: `arrow.element` must be child of its popper element!'); return data; } } var placement = data.placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isVertical = ['left', 'right'].indexOf(placement) !== -1; var len = isVertical ? 'height' : 'width'; var sideCapitalized = isVertical ? 'Top' : 'Left'; var side = sideCapitalized.toLowerCase(); var altSide = isVertical ? 'left' : 'top'; var opSide = isVertical ? 'bottom' : 'right'; var arrowElementSize = getOuterSizes(arrowElement)[len]; // // extends keepTogether behavior making sure the popper and its // reference have enough pixels in conjunction // // top/left side if (reference[opSide] - arrowElementSize < popper[side]) { data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); } // bottom/right side if (reference[side] + arrowElementSize > popper[opSide]) { data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; } data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available var css = getStyleComputedProperty(data.instance.popper); var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty$1(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty$1(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); return data; } /** * Get the opposite placement variation of the given one * @method * @memberof Popper.Utils * @argument {String} placement variation * @returns {String} flipped placement variation */ function getOppositeVariation(variation) { if (variation === 'end') { return 'start'; } else if (variation === 'start') { return 'end'; } return variation; } /** * List of accepted placements to use as values of the `placement` option.<br /> * Valid placements are: * - `auto` * - `top` * - `right` * - `bottom` * - `left` * * Each placement can have a variation from this list: * - `-start` * - `-end` * * Variations are interpreted easily if you think of them as the left to right * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` * is right.<br /> * Vertically (`left` and `right`), `start` is top and `end` is bottom. * * Some valid examples are: * - `top-end` (on top of reference, right aligned) * - `right-start` (on right of reference, top aligned) * - `bottom` (on bottom, centered) * - `auto-end` (on the side with more space available, alignment depends by placement) * * @static * @type {Array} * @enum {String} * @readonly * @method placements * @memberof Popper */ var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end` var validPlacements = placements.slice(3); /** * Given an initial placement, returns all the subsequent placements * clockwise (or counter-clockwise). * * @method * @memberof Popper.Utils * @argument {String} placement - A valid placement (it accepts variations) * @argument {Boolean} counter - Set to true to walk the placements counterclockwise * @returns {Array} placements including their variations */ function clockwise(placement) { var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var index = validPlacements.indexOf(placement); var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); return counter ? arr.reverse() : arr; } var BEHAVIORS = { FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }; /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function flip(data, options) { // if `inner` modifier is enabled, we can't use the `flip` modifier if (isModifierEnabled(data.instance.modifiers, 'inner')) { return data; } if (data.flipped && data.placement === data.originalPlacement) { // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides return data; } var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); var variation = data.placement.split('-')[1] || ''; var flipOrder = []; switch (options.behavior) { case BEHAVIORS.FLIP: flipOrder = [placement, placementOpposite]; break; case BEHAVIORS.CLOCKWISE: flipOrder = clockwise(placement); break; case BEHAVIORS.COUNTERCLOCKWISE: flipOrder = clockwise(placement, true); break; default: flipOrder = options.behavior; } flipOrder.forEach(function (step, index) { if (placement !== step || flipOrder.length === index + 1) { return data; } placement = data.placement.split('-')[0]; placementOpposite = getOppositePlacement(placement); var popperOffsets = data.offsets.popper; var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here var floor = Math.floor; var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); if (overlapsRef || overflowsBoundaries || flippedVariation) { // this boolean to detect any flip loop data.flipped = true; if (overlapsRef || overflowsBoundaries) { placement = flipOrder[index + 1]; } if (flippedVariation) { variation = getOppositeVariation(variation); } data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with // any additional property we may add in the future data.offsets.popper = _extends$1({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); data = runModifiers(data.instance.modifiers, data, 'flip'); } }); return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function keepTogether(data) { var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var placement = data.placement.split('-')[0]; var floor = Math.floor; var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var side = isVertical ? 'right' : 'bottom'; var opSide = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; if (popper[side] < floor(reference[opSide])) { data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; } if (popper[opSide] > floor(reference[side])) { data.offsets.popper[opSide] = floor(reference[side]); } return data; } /** * Converts a string containing value + unit into a px value number * @function * @memberof {modifiers~offset} * @private * @argument {String} str - Value + unit string * @argument {String} measurement - `height` or `width` * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @returns {Number|String} * Value in pixels, or original string if no values were extracted */ function toValue(str, measurement, popperOffsets, referenceOffsets) { // separate value from unit var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); var value = +split[1]; var unit = split[2]; // If it's not a number it's an operator, I guess if (!value) { return str; } if (unit.indexOf('%') === 0) { var element = void 0; switch (unit) { case '%p': element = popperOffsets; break; case '%': case '%r': default: element = referenceOffsets; } var rect = getClientRect(element); return rect[measurement] / 100 * value; } else if (unit === 'vh' || unit === 'vw') { // if is a vh or vw, we calculate the size based on the viewport var size = void 0; if (unit === 'vh') { size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); } else { size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } return size / 100 * value; } else { // if is an explicit pixel unit, we get rid of the unit and keep the value // if is an implicit unit, it's px, and we return just the value return value; } } /** * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. * @function * @memberof {modifiers~offset} * @private * @argument {String} offset * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @argument {String} basePlacement * @returns {Array} a two cells array with x and y offsets in numbers */ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width // in this way the first offset will use an axis and the second one // will use the other one var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands // The regex addresses values with the plus or minus sign in front (+10, -20, etc) var fragments = offset.split(/(\+|\-)/).map(function (frag) { return frag.trim(); }); // Detect if the offset string contains a pair of values or a single one // they could be separated by comma or space var divider = fragments.indexOf(find(fragments, function (frag) { return frag.search(/,|\s/) !== -1; })); if (fragments[divider] && fragments[divider].indexOf(',') === -1) { console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); } // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var splitRegex = /\s*,\s*|\s+/; var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations ops = ops.map(function (op, index) { // Most of the units rely on the orientation of the popper var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; var mergeWithPrevious = false; return op // This aggregates any `+` or `-` sign that aren't considered operators // e.g.: 10 + +5 => [10, +, +5] .reduce(function (a, b) { if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { a[a.length - 1] = b; mergeWithPrevious = true; return a; } else if (mergeWithPrevious) { a[a.length - 1] += b; mergeWithPrevious = false; return a; } else { return a.concat(b); } }, []) // Here we convert the string values into number values (in px) .map(function (str) { return toValue(str, measurement, popperOffsets, referenceOffsets); }); }); // Loop trough the offsets arrays and execute the operations ops.forEach(function (op, index) { op.forEach(function (frag, index2) { if (isNumeric(frag)) { offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); } }); }); return offsets; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @argument {Number|String} options.offset=0 * The offset value as described in the modifier description * @returns {Object} The data object, properly modified */ function offset(data, _ref) { var offset = _ref.offset; var placement = data.placement, _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var basePlacement = placement.split('-')[0]; var offsets = void 0; if (isNumeric(+offset)) { offsets = [+offset, 0]; } else { offsets = parseOffset(offset, popper, reference, basePlacement); } if (basePlacement === 'left') { popper.top += offsets[0]; popper.left -= offsets[1]; } else if (basePlacement === 'right') { popper.top += offsets[0]; popper.left += offsets[1]; } else if (basePlacement === 'top') { popper.left += offsets[0]; popper.top -= offsets[1]; } else if (basePlacement === 'bottom') { popper.left += offsets[0]; popper.top += offsets[1]; } data.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function preventOverflow(data, options) { var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to // go one step up and use the next offsetParent as reference to // avoid to make this modifier completely useless and look like broken if (data.instance.reference === boundariesElement) { boundariesElement = getOffsetParent(boundariesElement); } // NOTE: DOM access here // resets the popper's position so that the document size can be calculated excluding // the size of the popper element itself var transformProp = getSupportedPropertyName('transform'); var popperStyles = data.instance.popper.style; // assignment to help minification var top = popperStyles.top, left = popperStyles.left, transform = popperStyles[transformProp]; popperStyles.top = ''; popperStyles.left = ''; popperStyles[transformProp] = ''; var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here // restores the original style properties after the offsets have been computed popperStyles.top = top; popperStyles.left = left; popperStyles[transformProp] = transform; options.boundaries = boundaries; var order = options.priority; var popper = data.offsets.popper; var check = { primary: function primary(placement) { var value = popper[placement]; if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { value = Math.max(popper[placement], boundaries[placement]); } return defineProperty$1({}, placement, value); }, secondary: function secondary(placement) { var mainSide = placement === 'right' ? 'left' : 'top'; var value = popper[mainSide]; if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); } return defineProperty$1({}, mainSide, value); } }; order.forEach(function (placement) { var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; popper = _extends$1({}, popper, check[side](placement)); }); data.offsets.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function shift(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier if (shiftvariation) { var _data$offsets = data.offsets, reference = _data$offsets.reference, popper = _data$offsets.popper; var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; var side = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; var shiftOffsets = { start: defineProperty$1({}, side, reference[side]), end: defineProperty$1({}, side, reference[side] + reference[measurement] - popper[measurement]) }; data.offsets.popper = _extends$1({}, popper, shiftOffsets[shiftvariation]); } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function hide(data) { if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { return data; } var refRect = data.offsets.reference; var bound = find(data.instance.modifiers, function (modifier) { return modifier.name === 'preventOverflow'; }).boundaries; if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === true) { return data; } data.hide = true; data.attributes['x-out-of-boundaries'] = ''; } else { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === false) { return data; } data.hide = false; data.attributes['x-out-of-boundaries'] = false; } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function inner(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); data.placement = getOppositePlacement(placement); data.offsets.popper = getClientRect(popper); return data; } /** * Modifier function, each modifier can have a function of this type assigned * to its `fn` property.<br /> * These functions will be called on each update, this means that you must * make sure they are performant enough to avoid performance bottlenecks. * * @function ModifierFn * @argument {dataObject} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {dataObject} The data object, properly modified */ /** * Modifiers are plugins used to alter the behavior of your poppers.<br /> * Popper.js uses a set of 9 modifiers to provide all the basic functionalities * needed by the library. * * Usually you don't want to override the `order`, `fn` and `onLoad` props. * All the other properties are configurations that could be tweaked. * @namespace modifiers */ var modifiers = { /** * Modifier used to shift the popper on the start or end of its reference * element.<br /> * It will read the variation of the `placement` property.<br /> * It can be one either `-end` or `-start`. * @memberof modifiers * @inner */ shift: { /** @prop {number} order=100 - Index used to define the order of execution */ order: 100, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: shift }, /** * The `offset` modifier can shift your popper on both its axis. * * It accepts the following units: * - `px` or unit-less, interpreted as pixels * - `%` or `%r`, percentage relative to the length of the reference element * - `%p`, percentage relative to the length of the popper element * - `vw`, CSS viewport width unit * - `vh`, CSS viewport height unit * * For length is intended the main axis relative to the placement of the popper.<br /> * This means that if the placement is `top` or `bottom`, the length will be the * `width`. In case of `left` or `right`, it will be the `height`. * * You can provide a single value (as `Number` or `String`), or a pair of values * as `String` divided by a comma or one (or more) white spaces.<br /> * The latter is a deprecated method because it leads to confusion and will be * removed in v2.<br /> * Additionally, it accepts additions and subtractions between different units. * Note that multiplications and divisions aren't supported. * * Valid examples are: * ``` * 10 * '10%' * '10, 10' * '10%, 10' * '10 + 10%' * '10 - 5vh + 3%' * '-10px + 5vh, 5px - 6%' * ``` * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap * > with their reference element, unfortunately, you will have to disable the `flip` modifier. * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). * * @memberof modifiers * @inner */ offset: { /** @prop {number} order=200 - Index used to define the order of execution */ order: 200, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: offset, /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ offset: 0 }, /** * Modifier used to prevent the popper from being positioned outside the boundary. * * A scenario exists where the reference itself is not within the boundaries.<br /> * We can say it has "escaped the boundaries" — or just "escaped".<br /> * In this case we need to decide whether the popper should either: * * - detach from the reference and remain "trapped" in the boundaries, or * - if it should ignore the boundary and "escape with its reference" * * When `escapeWithReference` is set to`true` and reference is completely * outside its boundaries, the popper will overflow (or completely leave) * the boundaries in order to remain attached to the edge of the reference. * * @memberof modifiers * @inner */ preventOverflow: { /** @prop {number} order=300 - Index used to define the order of execution */ order: 300, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: preventOverflow, /** * @prop {Array} [priority=['left','right','top','bottom']] * Popper will try to prevent overflow following these priorities by default, * then, it could overflow on the left and on top of the `boundariesElement` */ priority: ['left', 'right', 'top', 'bottom'], /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries * and the popper. This makes sure the popper always has a little padding * between the edges of its container */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='scrollParent' * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ boundariesElement: 'scrollParent' }, /** * Modifier used to make sure the reference and its popper stay near each other * without leaving any gap between the two. Especially useful when the arrow is * enabled and you want to ensure that it points to its reference element. * It cares only about the first axis. You can still have poppers with margin * between the popper and its reference element. * @memberof modifiers * @inner */ keepTogether: { /** @prop {number} order=400 - Index used to define the order of execution */ order: 400, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: keepTogether }, /** * This modifier is used to move the `arrowElement` of the popper to make * sure it is positioned between the reference element and its popper element. * It will read the outer size of the `arrowElement` node to detect how many * pixels of conjunction are needed. * * It has no effect if no `arrowElement` is provided. * @memberof modifiers * @inner */ arrow: { /** @prop {number} order=500 - Index used to define the order of execution */ order: 500, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: arrow, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ element: '[x-arrow]' }, /** * Modifier used to flip the popper's placement when it starts to overlap its * reference element. * * Requires the `preventOverflow` modifier before it in order to work. * * **NOTE:** this modifier will interrupt the current update cycle and will * restart it if it detects the need to flip the placement. * @memberof modifiers * @inner */ flip: { /** @prop {number} order=600 - Index used to define the order of execution */ order: 600, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: flip, /** * @prop {String|Array} behavior='flip' * The behavior used to change the popper's placement. It can be one of * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid * placements (with optional variations) */ behavior: 'flip', /** * @prop {number} padding=5 * The popper will flip if it hits the edges of the `boundariesElement` */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='viewport' * The element which will define the boundaries of the popper position. * The popper will never be placed outside of the defined boundaries * (except if `keepTogether` is enabled) */ boundariesElement: 'viewport' }, /** * Modifier used to make the popper flow toward the inner of the reference element. * By default, when this modifier is disabled, the popper will be placed outside * the reference element. * @memberof modifiers * @inner */ inner: { /** @prop {number} order=700 - Index used to define the order of execution */ order: 700, /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled: false, /** @prop {ModifierFn} */ fn: inner }, /** * Modifier used to hide the popper when its reference element is outside of the * popper boundaries. It will set a `x-out-of-boundaries` attribute which can * be used to hide with a CSS selector the popper when its reference is * out of boundaries. * * Requires the `preventOverflow` modifier before it in order to work. * @memberof modifiers * @inner */ hide: { /** @prop {number} order=800 - Index used to define the order of execution */ order: 800, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: hide }, /** * Computes the style that will be applied to the popper element to gets * properly positioned. * * Note that this modifier will not touch the DOM, it just prepares the styles * so that `applyStyle` modifier can apply it. This separation is useful * in case you need to replace `applyStyle` with a custom implementation. * * This modifier has `850` as `order` value to maintain backward compatibility * with previous versions of Popper.js. Expect the modifiers ordering method * to change in future major versions of the library. * * @memberof modifiers * @inner */ computeStyle: { /** @prop {number} order=850 - Index used to define the order of execution */ order: 850, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: computeStyle, /** * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: true, /** * @prop {string} [x='bottom'] * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. * Change this if your popper should grow in a direction different from `bottom` */ x: 'bottom', /** * @prop {string} [x='left'] * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ y: 'right' }, /** * Applies the computed styles to the popper element. * * All the DOM manipulations are limited to this modifier. This is useful in case * you want to integrate Popper.js inside a framework or view library and you * want to delegate all the DOM manipulations to it. * * Note that if you disable this modifier, you must make sure the popper element * has its position set to `absolute` before Popper.js can do its work! * * Just disable this modifier and define your own to achieve the desired effect. * * @memberof modifiers * @inner */ applyStyle: { /** @prop {number} order=900 - Index used to define the order of execution */ order: 900, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: applyStyle, /** @prop {Function} */ onLoad: applyStyleOnLoad, /** * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: undefined } }; /** * The `dataObject` is an object containing all the information used by Popper.js. * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. * @name dataObject * @property {Object} data.instance The Popper.js instance * @property {String} data.placement Placement applied to popper * @property {String} data.originalPlacement Placement originally defined on init * @property {Boolean} data.flipped True if popper has been flipped by flip modifier * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.boundaries Offsets of the popper boundaries * @property {Object} data.offsets The measurements of popper, reference and arrow elements * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 */ /** * Default options provided to Popper.js constructor.<br /> * These can be overridden using the `options` argument of Popper.js.<br /> * To override an option, simply pass an object with the same * structure of the `options` object, as the 3rd argument. For example: * ``` * new Popper(ref, pop, { * modifiers: { * preventOverflow: { enabled: false } * } * }) * ``` * @type {Object} * @static * @memberof Popper */ var Defaults$1 = { /** * Popper's placement. * @prop {Popper.placements} placement='bottom' */ placement: 'bottom', /** * Set this to true if you want popper to position it self in 'fixed' mode * @prop {Boolean} positionFixed=false */ positionFixed: false, /** * Whether events (resize, scroll) are initially enabled. * @prop {Boolean} eventsEnabled=true */ eventsEnabled: true, /** * Set to true if you want to automatically remove the popper when * you call the `destroy` method. * @prop {Boolean} removeOnDestroy=false */ removeOnDestroy: false, /** * Callback called when the popper is created.<br /> * By default, it is set to no-op.<br /> * Access Popper.js instance with `data.instance`. * @prop {onCreate} */ onCreate: function onCreate() {}, /** * Callback called when the popper is updated. This callback is not called * on the initialization/creation of the popper, but only on subsequent * updates.<br /> * By default, it is set to no-op.<br /> * Access Popper.js instance with `data.instance`. * @prop {onUpdate} */ onUpdate: function onUpdate() {}, /** * List of modifiers used to modify the offsets before they are applied to the popper. * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ modifiers: modifiers }; /** * @callback onCreate * @param {dataObject} data */ /** * @callback onUpdate * @param {dataObject} data */ // Utils // Methods var Popper = function () { /** * Creates a new Popper.js instance. * @class Popper * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as the popper * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) * @return {Object} instance - The generated Popper.js instance */ function Popper(reference, popper) { var _this = this; var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; classCallCheck$1(this, Popper); this.scheduleUpdate = function () { return requestAnimationFrame(_this.update); }; // make update() debounced, so that it only runs at most once-per-tick this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it this.options = _extends$1({}, Popper.Defaults, options); // init state this.state = { isDestroyed: false, isCreated: false, scrollParents: [] }; // get reference and popper elements (allow jQuery wrappers) this.reference = reference && reference.jquery ? reference[0] : reference; this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options this.options.modifiers = {}; Object.keys(_extends$1({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { _this.options.modifiers[name] = _extends$1({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); }); // Refactoring modifiers' list (Object => Array) this.modifiers = Object.keys(this.options.modifiers).map(function (name) { return _extends$1({ name: name }, _this.options.modifiers[name]); }) // sort the modifiers by order .sort(function (a, b) { return a.order - b.order; }); // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier // they could add new properties to their options configuration // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! this.modifiers.forEach(function (modifierOptions) { if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); } }); // fire the first update to position the popper in the right place this.update(); var eventsEnabled = this.options.eventsEnabled; if (eventsEnabled) { // setup event listeners, they will take care of update the position in specific situations this.enableEventListeners(); } this.state.eventsEnabled = eventsEnabled; } // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs createClass$1(Popper, [{ key: 'update', value: function update$$1() { return update.call(this); } }, { key: 'destroy', value: function destroy$$1() { return destroy.call(this); } }, { key: 'enableEventListeners', value: function enableEventListeners$$1() { return enableEventListeners.call(this); } }, { key: 'disableEventListeners', value: function disableEventListeners$$1() { return disableEventListeners.call(this); } /** * Schedules an update. It will run on the next UI update available. * @method scheduleUpdate * @memberof Popper */ /** * Collection of utilities useful when writing custom modifiers. * Starting from version 1.7, this method is available only if you * include `popper-utils.js` before `popper.js`. * * **DEPRECATION**: This way to access PopperUtils is deprecated * and will be removed in v2! Use the PopperUtils module directly instead. * Due to the high instability of the methods contained in Utils, we can't * guarantee them to follow semver. Use them at your own risk! * @static * @private * @type {Object} * @deprecated since version 1.8 * @member Utils * @memberof Popper */ }]); return Popper; }(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js * and lets you use it as replacement of a real DOM node.<br /> * You can use this method to position a popper relatively to a set of coordinates * in case you don't have a DOM node to use as reference. * * ``` * new Popper(referenceObject, popperNode); * ``` * * NB: This feature isn't supported in Internet Explorer 10. * @name referenceObject * @property {Function} data.getBoundingClientRect * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. * @property {number} data.clientWidth * An ES6 getter that will return the width of the virtual reference element. * @property {number} data.clientHeight * An ES6 getter that will return the height of the virtual reference element. */ Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults$1; var Selectors = { POPPER: '.tippy-popper', TOOLTIP: '.tippy-tooltip', CONTENT: '.tippy-content', BACKDROP: '.tippy-backdrop', ARROW: '.tippy-arrow', ROUND_ARROW: '.tippy-roundarrow' }; /** * Firefox extensions doesn't allow 'innerHTML' to be set but we can trick it * + aid for minifiers not to remove the trick */ var FF_EXTENSION_TRICK = { x: true /** * Determines if the runtime is a browser */ };var isBrowser$1 = typeof window !== 'undefined'; /** * Determines if the browser is supported */ /** * Injects a string of CSS styles to the style node in the document head */ /** * Ponyfill for Array.from; converts iterable values to an array */ var toArray$1 = function toArray$$1(value) { return [].slice.call(value); }; /** * Sets the content of a tooltip */ var setContent = function setContent(contentEl, props) { if (props.content instanceof Element) { setInnerHTML(contentEl, ''); contentEl.appendChild(props.content); } else { contentEl[props.allowHTML ? 'innerHTML' : 'textContent'] = props.content; } }; /** * Determines if an element can receive focus */ var elementCanReceiveFocus = function elementCanReceiveFocus(el) { return el instanceof Element ? matches.call(el, 'a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]') && !el.hasAttribute('disabled') : true; }; /** * Applies a transition duration to a list of elements */ var applyTransitionDuration = function applyTransitionDuration(els, value) { els.filter(Boolean).forEach(function (el) { el.style.transitionDuration = value + 'ms'; }); }; /** * Returns the child elements of a popper element */ var getChildren = function getChildren(popper) { var select = function select(s) { return popper.querySelector(s); }; return { tooltip: select(Selectors.TOOLTIP), backdrop: select(Selectors.BACKDROP), content: select(Selectors.CONTENT), arrow: select(Selectors.ARROW) || select(Selectors.ROUND_ARROW) }; }; /** * Determines if a value is a plain object */ var isPlainObject = function isPlainObject(value) { return {}.toString.call(value) === '[object Object]'; }; /** * Creates and returns a div element */ var div = function div() { return document.createElement('div'); }; /** * Sets the innerHTML of an element while tricking linters & minifiers */ var setInnerHTML = function setInnerHTML(el, html) { el[FF_EXTENSION_TRICK.x && 'innerHTML'] = html instanceof Element ? html[FF_EXTENSION_TRICK.x && 'innerHTML'] : html; }; /** * Returns an array of elements based on the value */ var getArrayOfElements = function getArrayOfElements(value) { if (value instanceof Element || isPlainObject(value)) { return [value]; } if (value instanceof NodeList) { return toArray$1(value); } if (Array.isArray(value)) { return value; } try { return toArray$1(document.querySelectorAll(value)); } catch (e) { return []; } }; /** * Determines if a value is numeric */ var isNumeric$1 = function isNumeric(value) { return !isNaN(value) && !isNaN(parseFloat(value)); }; /** * Returns a value at a given index depending on if it's an array or number */ var getValue = function getValue(value, index, defaultValue) { if (Array.isArray(value)) { var v = value[index]; return v == null ? defaultValue : v; } return value; }; /** * Creates an arrow element and returns it */ var createArrowElement = function createArrowElement(arrowType) { var arrow = div(); if (arrowType === 'round') { arrow.className = 'tippy-roundarrow'; setInnerHTML(arrow, '<svg viewBox="0 0 24 8" xmlns="http://www.w3.org/2000/svg"><path d="M3 8s2.021-.015 5.253-4.218C9.584 2.051 10.797 1.007 12 1c1.203-.007 2.416 1.035 3.761 2.782C19.012 8.005 21 8 21 8H3z"/></svg>'); } else { arrow.className = 'tippy-arrow'; } return arrow; }; /** * Creates a backdrop element and returns it */ var createBackdropElement = function createBackdropElement() { var backdrop = div(); backdrop.className = 'tippy-backdrop'; backdrop.setAttribute('data-state', 'hidden'); return backdrop; }; /** * Adds interactive attributes */ var addInteractive = function addInteractive(popper, tooltip) { popper.setAttribute('tabindex', '-1'); tooltip.setAttribute('data-interactive', ''); }; /** * Removes interactive attributes */ var removeInteractive = function removeInteractive(popper, tooltip) { popper.removeAttribute('tabindex'); tooltip.removeAttribute('data-interactive'); }; /** * Adds inertia attribute */ var addInertia = function addInertia(tooltip) { tooltip.setAttribute('data-inertia', ''); }; /** * Removes inertia attribute */ var removeInertia = function removeInertia(tooltip) { tooltip.removeAttribute('data-inertia'); }; /** * Constructs the popper element and returns it */ var createPopperElement = function createPopperElement(id, props) { var popper = div(); popper.className = 'tippy-popper'; popper.role = 'tooltip'; popper.id = 'tippy-' + id; popper.style.zIndex = props.zIndex; var tooltip = div(); tooltip.className = 'tippy-tooltip'; tooltip.setAttribute('data-size', props.size); tooltip.setAttribute('data-animation', props.animation); tooltip.setAttribute('data-state', 'hidden'); props.theme.split(' ').forEach(function (t) { tooltip.classList.add(t + '-theme'); }); var content = div(); content.className = 'tippy-content'; if (props.interactive) { addInteractive(popper, tooltip); } if (props.arrow) { tooltip.appendChild(createArrowElement(props.arrowType)); } if (props.animateFill) { tooltip.appendChild(createBackdropElement()); tooltip.setAttribute('data-animatefill', ''); } if (props.inertia) { tooltip.setAttribute('data-inertia', ''); } setContent(content, props); tooltip.appendChild(content); popper.appendChild(tooltip); popper.addEventListener('focusout', function (e) { if (e.relatedTarget && popper._tippy && !closestCallback(e.relatedTarget, function (el) { return el === popper; })) { popper._tippy.hide(); } }); return popper; }; /** * Updates the popper element based on the new props */ var updatePopperElement = function updatePopperElement(popper, prevProps, nextProps) { var _getChildren = getChildren(popper), tooltip = _getChildren.tooltip, content = _getChildren.content, backdrop = _getChildren.backdrop, arrow = _getChildren.arrow; popper.style.zIndex = nextProps.zIndex; tooltip.setAttribute('data-size', nextProps.size); tooltip.setAttribute('data-animation', nextProps.animation); if (prevProps.content !== nextProps.content) { setContent(content, nextProps); } // animateFill if (!prevProps.animateFill && nextProps.animateFill) { tooltip.appendChild(createBackdropElement()); tooltip.setAttribute('data-animatefill', ''); } else if (prevProps.animateFill && !nextProps.animateFill) { tooltip.removeChild(backdrop); tooltip.removeAttribute('data-animatefill'); } // arrow if (!prevProps.arrow && nextProps.arrow) { tooltip.appendChild(createArrowElement(nextProps.arrowType)); } else if (prevProps.arrow && !nextProps.arrow) { tooltip.removeChild(arrow); } // arrowType if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) { tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow); } // interactive if (!prevProps.interactive && nextProps.interactive) { addInteractive(popper, tooltip); } else if (prevProps.interactive && !nextProps.interactive) { removeInteractive(popper, tooltip); } // inertia if (!prevProps.inertia && nextProps.inertia) { addInertia(tooltip); } else if (prevProps.inertia && !nextProps.inertia) { removeInertia(tooltip); } // theme if (prevProps.theme !== nextProps.theme) { prevProps.theme.split(' ').forEach(function (theme) { tooltip.classList.remove(theme + '-theme'); }); nextProps.theme.split(' ').forEach(function (theme) { tooltip.classList.add(theme + '-theme'); }); } }; /** * Hides all visible poppers on the document */ var hideAllPoppers = function hideAllPoppers(excludeTippy) { toArray$1(document.querySelectorAll(Selectors.POPPER)).forEach(function (popper) { var tip = popper._tippy; if (tip && tip.props.hideOnClick === true && (!excludeTippy || popper !== excludeTippy.popper)) { tip.hide(); } }); }; /** * Returns an object of optional props from data-tippy-* attributes */ var getDataAttributeOptions = function getDataAttributeOptions(reference) { return Object.keys(Defaults).reduce(function (acc, key) { var valueAsString = (reference.getAttribute('data-tippy-' + key) || '').trim(); if (!valueAsString) { return acc; } if (valueAsString === 'true') { acc[key] = true; } else if (valueAsString === 'false') { acc[key] = false; } else if (isNumeric$1(valueAsString)) { acc[key] = Number(valueAsString); } else if (key !== 'target' && valueAsString[0] === '[') { acc[key] = JSON.parse(valueAsString); } else { acc[key] = valueAsString; } return acc; }, {}); }; /** * Polyfills the virtual reference (plain object) with needed props * Mutating because DOM elements are mutated, adds _tippy property */ var polyfillVirtualReferenceProps = function polyfillVirtualReferenceProps(virtualReference) { var polyfills = { isVirtual: true, attributes: virtualReference.attributes || {}, setAttribute: function setAttribute(key, value) { virtualReference.attributes[key] = value; }, getAttribute: function getAttribute(key) { return virtualReference.attributes[key]; }, removeAttribute: function removeAttribute(key) { delete virtualReference.attributes[key]; }, hasAttribute: function hasAttribute(key) { return key in virtualReference.attributes; }, addEventListener: function addEventListener() {}, removeEventListener: function removeEventListener() {}, classList: { classNames: {}, add: function add(key) { virtualReference.classList.classNames[key] = true; }, remove: function remove(key) { delete virtualReference.classList.classNames[key]; }, contains: function contains(key) { return key in virtualReference.classList.classNames; } } }; for (var key in polyfills) { virtualReference[key] = polyfills[key]; } return virtualReference; }; /** * Ponyfill for Element.prototype.matches */ var matches = function () { if (isBrowser$1) { var e = Element.prototype; return e.matches || e.matchesSelector || e.webkitMatchesSelector || e.mozMatchesSelector || e.msMatchesSelector; } }(); /** * Ponyfill for Element.prototype.closest */ var closest = function closest(element, parentSelector) { return (Element.prototype.closest || function (selector) { var el = this; while (el) { if (matches.call(el, selector)) return el; el = el.parentElement; } }).call(element, parentSelector); }; /** * Works like Element.prototype.closest, but uses a callback instead */ var closestCallback = function closestCallback(element, callback) { while (element) { if (callback(element)) return element; element = element.parentElement; } }; /** * Focuses an element while preventing a scroll jump if it's not within the viewport */ var focus = function focus(el) { var x = window.scrollX || window.pageXOffset; var y = window.scrollY || window.pageYOffset; el.focus(); scroll(x, y); }; /** * Triggers reflow */ var reflow = function reflow(popper) { void popper.offsetHeight; }; /** * Transforms the x/y axis ased on the placement */ var transformAxisBasedOnPlacement = function transformAxisBasedOnPlacement(axis, isVertical) { return (isVertical ? axis : { X: 'Y', Y: 'X' }[axis]) || ''; }; /** * Transforms the scale/translate numbers based on the placement */ var transformNumbersBasedOnPlacement = function transformNumbersBasedOnPlacement(type, numbers, isVertical, isReverse) { /** * Avoid destructuring because a large boilerplate function is generated * by Babel */ var a = numbers[0]; var b = numbers[1]; if (!a && !b) { return ''; } var transforms = { scale: function () { if (!b) { return '' + a; } else { return isVertical ? a + ', ' + b : b + ', ' + a; } }(), translate: function () { if (!b) { return isReverse ? -a + 'px' : a + 'px'; } else { if (isVertical) { return isReverse ? a + 'px, ' + -b + 'px' : a + 'px, ' + b + 'px'; } else { return isReverse ? -b + 'px, ' + a + 'px' : b + 'px, ' + a + 'px'; } } }() }; return transforms[type]; }; /** * Returns the axis for a CSS function (translate or scale) */ var getTransformAxis = function getTransformAxis(str, cssFunction) { var match = str.match(new RegExp(cssFunction + '([XY])')); return match ? match[1] : ''; }; /** * Returns the numbers given to the CSS function */ var getTransformNumbers = function getTransformNumbers(str, regex) { var match = str.match(regex); return match ? match[1].split(',').map(parseFloat) : []; }; var TRANSFORM_NUMBER_RE = { translate: /translateX?Y?\(([^)]+)\)/, scale: /scaleX?Y?\(([^)]+)\)/ /** * Computes the arrow's transform so that it is correct for any placement */ };var computeArrowTransform = function computeArrowTransform(arrow, arrowTransform) { var placement = getPopperPlacement(closest(arrow, Selectors.POPPER)); var isVertical = placement === 'top' || placement === 'bottom'; var isReverse = placement === 'right' || placement === 'bottom'; var matches = { translate: { axis: getTransformAxis(arrowTransform, 'translate'), numbers: getTransformNumbers(arrowTransform, TRANSFORM_NUMBER_RE.translate) }, scale: { axis: getTransformAxis(arrowTransform, 'scale'), numbers: getTransformNumbers(arrowTransform, TRANSFORM_NUMBER_RE.scale) } }; var computedTransform = arrowTransform.replace(TRANSFORM_NUMBER_RE.translate, 'translate' + transformAxisBasedOnPlacement(matches.translate.axis, isVertical) + '(' + transformNumbersBasedOnPlacement('translate', matches.translate.numbers, isVertical, isReverse) + ')').replace(TRANSFORM_NUMBER_RE.scale, 'scale' + transformAxisBasedOnPlacement(matches.scale.axis, isVertical) + '(' + transformNumbersBasedOnPlacement('scale', matches.scale.numbers, isVertical, isReverse) + ')'); arrow.style[prefix('transform')] = computedTransform; }; /** * Sets the visibility state of a popper so it can begin to transition in or out */ var setVisibilityState = function setVisibilityState(els, type) { els.filter(Boolean).forEach(function (el) { el.setAttribute('data-state', type); }); }; /** * Prefixes a CSS property with the one supported by the browser */ var prefix = function prefix(property) { var prefixes = ['', 'webkit']; var upperProp = property[0].toUpperCase() + property.slice(1); for (var i = 0; i < prefixes.length; i++) { var _prefix = prefixes[i]; var prefixedProp = _prefix ? _prefix + upperProp : property; if (typeof document.body.style[prefixedProp] !== 'undefined') { return prefixedProp; } } return null; }; /** * Update's a popper's position and runs a callback onUpdate; wrapper for async updates */ var updatePopperPosition = function updatePopperPosition(popperInstance, callback, updateAlreadyCalled) { var popper = popperInstance.popper, options = popperInstance.options; var onCreate = options.onCreate; var onUpdate = options.onUpdate; options.onCreate = options.onUpdate = function () { reflow(popper); callback && callback(); onUpdate(); options.onCreate = onCreate; options.onUpdate = onUpdate; }; if (!updateAlreadyCalled) { popperInstance.scheduleUpdate(); } }; /** * Defers a function's execution until the call stack has cleared */ var defer = function defer(fn) { setTimeout(fn, 1); }; /** * Determines if the mouse cursor is outside of the popper's interactive border * region */ var isCursorOutsideInteractiveBorder = function isCursorOutsideInteractiveBorder(popperPlacement, popperRect, event, props) { if (!popperPlacement) { return true; } var x = event.clientX, y = event.clientY; var interactiveBorder = props.interactiveBorder, distance = props.distance; var exceedsTop = popperRect.top - y > (popperPlacement === 'top' ? interactiveBorder + distance : interactiveBorder); var exceedsBottom = y - popperRect.bottom > (popperPlacement === 'bottom' ? interactiveBorder + distance : interactiveBorder); var exceedsLeft = popperRect.left - x > (popperPlacement === 'left' ? interactiveBorder + distance : interactiveBorder); var exceedsRight = x - popperRect.right > (popperPlacement === 'right' ? interactiveBorder + distance : interactiveBorder); return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight; }; /** * Returns the distance offset, taking into account the default offset due to * the transform: translate() rule in CSS */ var getOffsetDistanceInPx = function getOffsetDistanceInPx(distance, defaultDistance) { return -(distance - defaultDistance) + 'px'; }; /** * Returns the popper's placement, ignoring shifting (top-start, etc) */ var getPopperPlacement = function getPopperPlacement(popper) { var fullPlacement = popper.getAttribute('x-placement'); return fullPlacement ? fullPlacement.split('-')[0] : ''; }; /** * Evaluates props */ var evaluateProps = function evaluateProps(reference, props) { var out = _extends({}, props, props.performance ? {} : getDataAttributeOptions(reference)); if (out.arrow) { out.animateFill = false; } if (typeof out.appendTo === 'function') { out.appendTo = props.appendTo(reference); } if (typeof out.content === 'function') { out.content = props.content(reference); } return out; }; var toggleTransitionEndListener = function toggleTransitionEndListener(tooltip, action, listener) { tooltip[action + 'EventListener']('transitionend', listener); }; var debounce$1 = function debounce(fn, ms) { var timeoutId = void 0; return function () { var _this = this, _arguments = arguments; clearTimeout(timeoutId); timeoutId = setTimeout(function () { return fn.apply(_this, _arguments); }, ms); }; }; var nav = isBrowser$1 ? navigator : {}; var win = isBrowser$1 ? window : {}; var isIE$1 = /MSIE |Trident\//.test(nav.userAgent); var isIOS = /iPhone|iPad|iPod/.test(nav.platform) && !win.MSStream; var supportsTouch = 'ontouchstart' in win; var isUsingTouch = false; var onDocumentTouch = function onDocumentTouch() { if (isUsingTouch) { return; } isUsingTouch = true; if (isIOS) { document.body.classList.add('tippy-iOS'); } if (window.performance) { document.addEventListener('mousemove', onDocumentMouseMove); } }; var lastMouseMoveTime = 0; var onDocumentMouseMove = function onDocumentMouseMove() { var now = performance.now(); // Chrome 60+ is 1 mousemove per animation frame, use 20ms time difference if (now - lastMouseMoveTime < 20) { isUsingTouch = false; document.removeEventListener('mousemove', onDocumentMouseMove); if (!isIOS) { document.body.classList.remove('tippy-iOS'); } } lastMouseMoveTime = now; }; var onDocumentClick = function onDocumentClick(_ref) { var target = _ref.target; // Simulated events dispatched on the document if (!(target instanceof Element)) { return hideAllPoppers(); } // Clicked on an interactive popper var popper = closest(target, Selectors.POPPER); if (popper && popper._tippy && popper._tippy.props.interactive) { return; } // Clicked on a reference var reference = closestCallback(target, function (el) { return el._tippy && el._tippy.reference === el; }); if (reference) { var tip = reference._tippy; var isClickTrigger = tip.props.trigger.indexOf('click') > -1; if (isUsingTouch || isClickTrigger) { return hideAllPoppers(tip); } if (tip.props.hideOnClick !== true || isClickTrigger) { return; } tip.clearDelayTimeouts(); } hideAllPoppers(); }; var onWindowBlur = function onWindowBlur() { var _document = document, activeElement = _document.activeElement; if (activeElement && activeElement.blur && activeElement._tippy) { activeElement.blur(); } }; var onWindowResize = function onWindowResize() { toArray$1(document.querySelectorAll(Selectors.POPPER)).forEach(function (popper) { var tippyInstance = popper._tippy; if (!tippyInstance.props.livePlacement) { tippyInstance.popperInstance.scheduleUpdate(); } }); }; /** * Adds the needed global event listeners */ function bindEventListeners() { document.addEventListener('click', onDocumentClick); document.addEventListener('touchstart', onDocumentTouch); window.addEventListener('blur', onWindowBlur); window.addEventListener('resize', onWindowResize); if (!supportsTouch && (navigator.maxTouchPoints || navigator.msMaxTouchPoints)) { document.addEventListener('pointerdown', onDocumentTouch); } } var idCounter = 1; function createTippy(reference, collectionProps) { var props = evaluateProps(reference, collectionProps); // If the reference shouldn't have multiple tippys, return null early if (!props.multiple && reference._tippy) { return null; } /* ======================= 🔒 Private members 🔒 ======================= */ var popperMutationObserver = null; var lastTriggerEvent = {}; var lastMouseMoveEvent = null; var showTimeoutId = 0; var hideTimeoutId = 0; var isPreparingToShow = false; var transitionEndListener = function transitionEndListener() {}; var listeners = []; var referenceJustProgrammaticallyFocused = false; var debouncedOnMouseMove = props.interactiveDebounce > 0 ? debounce$1(onMouseMove, props.interactiveDebounce) : onMouseMove; /* ======================= 🔑 Public members 🔑 ======================= */ var id = idCounter++; var popper = createPopperElement(id, props); var popperChildren = getChildren(popper); var state = { isEnabled: true, isVisible: false, isDestroyed: false }; var popperInstance = null; // 🌟 tippy instance var tip = { // properties id: id, reference: reference, popper: popper, popperChildren: popperChildren, popperInstance: popperInstance, props: props, state: state, // methods clearDelayTimeouts: clearDelayTimeouts, set: set$$1, setContent: setContent$$1, show: show, hide: hide, enable: enable, disable: disable, destroy: destroy }; addTriggersToReference(); reference.addEventListener('click', onReferenceClick); if (!props.lazy) { tip.popperInstance = createPopperInstance(); tip.popperInstance.disableEventListeners(); } if (props.showOnInit) { /** * Firefox has a bug where the tooltip will be placed incorrectly due to * strange layout on load, `setTimeout` gives the layout time to adjust * properly */ setTimeout(prepareShow, 20); } // Ensure the reference element can receive focus (and is not a delegate) if (props.a11y && !props.target && !elementCanReceiveFocus(reference)) { reference.setAttribute('tabindex', '0'); } // Install shortcuts reference._tippy = tip; popper._tippy = tip; return tip; /* ======================= 🔒 Private methods 🔒 ======================= */ /** * If the reference was clicked, it also receives focus */ function onReferenceClick() { defer(function () { referenceJustProgrammaticallyFocused = false; }); } /** * Listener for the `followCursor` prop */ function followCursorListener(event) { var _lastMouseMoveEvent = lastMouseMoveEvent = event, clientX = _lastMouseMoveEvent.clientX, clientY = _lastMouseMoveEvent.clientY; if (!tip.popperInstance) { return; } tip.popperInstance.reference = { getBoundingClientRect: function getBoundingClientRect() { return { width: 0, height: 0, top: clientY, left: clientX, right: clientX, bottom: clientY }; }, clientWidth: 0, clientHeight: 0 }; tip.popperInstance.scheduleUpdate(); } /** * Creates the tippy instance for a delegate when it's been triggered */ function createDelegateChildTippy(event) { var targetEl = closest(event.target, tip.props.target); if (targetEl && !targetEl._tippy) { var content = tip.props.content; if (content) { createTippy(targetEl, _extends({}, tip.props, { content: content, target: '', showOnInit: true })); prepareShow(event); } } } /** * Setup before show() is invoked (delays, etc.) */ function prepareShow(event) { clearDelayTimeouts(); if (tip.state.isVisible) { return; } // Is a delegate, create an instance for the child target if (tip.props.target) { return createDelegateChildTippy(event); } isPreparingToShow = true; if (tip.props.wait) { return tip.props.wait(tip, event); } /** * If the tooltip has a delay, we need to be listening to the mousemove as * soon as the trigger event is fired so that it's in the correct position * upon mount */ if (hasFollowCursorBehavior()) { if (popperChildren.arrow) { popperChildren.arrow.style.margin = '0'; } document.addEventListener('mousemove', followCursorListener); } var delay = getValue(tip.props.delay, 0, Defaults.delay); if (delay) { showTimeoutId = setTimeout(function () { show(); }, delay); } else { show(); } } /** * Setup before hide() is invoked (delays, etc.) */ function prepareHide() { clearDelayTimeouts(); if (!tip.state.isVisible) { return; } isPreparingToShow = false; var delay = getValue(tip.props.delay, 1, Defaults.delay); if (delay) { hideTimeoutId = setTimeout(function () { if (tip.state.isVisible) { hide(); } }, delay); } else { hide(); } } /** * Cleans up old listeners */ function cleanupOldMouseMoveListeners() { document.body.removeEventListener('mouseleave', prepareHide); document.removeEventListener('mousemove', debouncedOnMouseMove); } /** * Event listener invoked upon trigger */ function onTrigger(event) { if (!tip.state.isEnabled) { return; } var shouldStopEvent = supportsTouch && isUsingTouch && ['mouseenter', 'mouseover', 'focus'].indexOf(event.type) > -1; if (shouldStopEvent && tip.props.touchHold) { return; } lastTriggerEvent = event; // Toggle show/hide when clicking click-triggered tooltips if (event.type === 'click' && tip.props.hideOnClick !== false && tip.state.isVisible) { prepareHide(); } else { prepareShow(event); } } /** * Event listener used for interactive tooltips to detect when they should hide */ function onMouseMove(event) { var referenceTheCursorIsOver = closestCallback(event.target, function (el) { return el._tippy; }); var isCursorOverPopper = closest(event.target, Selectors.POPPER) === tip.popper; var isCursorOverReference = referenceTheCursorIsOver === tip.reference; if (isCursorOverPopper || isCursorOverReference) { return; } if (isCursorOutsideInteractiveBorder(getPopperPlacement(tip.popper), tip.popper.getBoundingClientRect(), event, tip.props)) { cleanupOldMouseMoveListeners(); prepareHide(); } } /** * Event listener invoked upon mouseleave */ function onMouseLeave(event) { if (['mouseleave', 'mouseout'].indexOf(event.type) > -1 && supportsTouch && isUsingTouch && tip.props.touchHold) { return; } if (tip.props.interactive) { document.body.addEventListener('mouseleave', prepareHide); document.addEventListener('mousemove', debouncedOnMouseMove); return; } prepareHide(); } /** * Event listener invoked upon blur */ function onBlur(event) { if (event.target !== tip.reference || isUsingTouch) { return; } if (tip.props.interactive) { if (!event.relatedTarget) { return; } if (closest(event.relatedTarget, Selectors.POPPER)) { return; } } prepareHide(); } /** * Event listener invoked when a child target is triggered */ function onDelegateShow(event) { if (closest(event.target, tip.props.target)) { prepareShow(event); } } /** * Event listener invoked when a child target should hide */ function onDelegateHide(event) { if (closest(event.target, tip.props.target)) { prepareHide(); } } /** * Creates the popper instance for the tip */ function createPopperInstance() { var tooltip = tip.popperChildren.tooltip; var popperOptions = tip.props.popperOptions; var arrowSelector = Selectors[tip.props.arrowType === 'round' ? 'ROUND_ARROW' : 'ARROW']; var arrow = tooltip.querySelector(arrowSelector); var config = _extends({ placement: tip.props.placement }, popperOptions || {}, { modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, { arrow: _extends({ element: arrowSelector }, popperOptions && popperOptions.modifiers ? popperOptions.modifiers.arrow : {}), flip: _extends({ enabled: tip.props.flip, padding: tip.props.distance + 5 /* 5px from viewport boundary */ , behavior: tip.props.flipBehavior }, popperOptions && popperOptions.modifiers ? popperOptions.modifiers.flip : {}), offset: _extends({ offset: tip.props.offset }, popperOptions && popperOptions.modifiers ? popperOptions.modifiers.offset : {}) }), onCreate: function onCreate() { tooltip.style[getPopperPlacement(tip.popper)] = getOffsetDistanceInPx(tip.props.distance, Defaults.distance); if (arrow && tip.props.arrowTransform) { computeArrowTransform(arrow, tip.props.arrowTransform); } }, onUpdate: function onUpdate() { var styles = tooltip.style; styles.top = ''; styles.bottom = ''; styles.left = ''; styles.right = ''; styles[getPopperPlacement(tip.popper)] = getOffsetDistanceInPx(tip.props.distance, Defaults.distance); if (arrow && tip.props.arrowTransform) { computeArrowTransform(arrow, tip.props.arrowTransform); } } }); /** * Ensure the popper's position stays correct if its dimensions change. * Use .update() over .scheduleUpdate() so there is no 1 frame flash * due to async update. */ var observer = new MutationObserver(function () { tip.popperInstance.update(); }); observer.observe(tip.popper, { childList: true, subtree: true }); if (popperMutationObserver) { popperMutationObserver.disconnect(); } popperMutationObserver = observer; // fixes https://github.com/atomiks/tippyjs/issues/193 tip.popper.addEventListener('mouseenter', function (event) { if (tip.state.isVisible && lastTriggerEvent.type === 'mouseenter') { prepareShow(event); } }); tip.popper.addEventListener('mouseleave', function (event) { if (lastTriggerEvent.type === 'mouseenter' && tip.props.interactiveDebounce === 0 && isCursorOutsideInteractiveBorder(getPopperPlacement(tip.popper), tip.popper.getBoundingClientRect(), event, tip.props)) { prepareHide(); } }); return new Popper(tip.reference, tip.popper, config); } /** * Mounts the tooltip to the DOM */ function mount(onceUpdated) { if (!tip.popperInstance) { tip.popperInstance = createPopperInstance(); if (!tip.props.livePlacement) { tip.popperInstance.disableEventListeners(); } } else { tip.popperInstance.scheduleUpdate(); if (tip.props.livePlacement && !hasFollowCursorBehavior()) { tip.popperInstance.enableEventListeners(); } } /** * If the instance previously had followCursor behavior, it will be * positioned incorrectly if triggered by `focus` afterwards. * Update the reference back to the real DOM element */ tip.popperInstance.reference = tip.reference; if (hasFollowCursorBehavior()) { if (tip.popperChildren.arrow) { tip.popperChildren.arrow.style.margin = ''; } } updatePopperPosition(tip.popperInstance, onceUpdated, true); if (!tip.props.appendTo.contains(tip.popper)) { tip.props.appendTo.appendChild(tip.popper); } } /** * Determines if the instance is in `followCursor` mode */ function hasFollowCursorBehavior() { return tip.props.followCursor && !isUsingTouch && lastTriggerEvent.type !== 'focus'; } /** * Updates the tooltip's position on each animation frame + timeout */ function makeSticky() { var updatePosition = function updatePosition() { applyTransitionDuration([tip.popper], tip.props.updateDuration); if (tip.popperInstance) { tip.popperInstance.scheduleUpdate(); } if (tip.state.isVisible) { requestAnimationFrame(function () { defer(updatePosition); }); } else { applyTransitionDuration([tip.popper], 0); } }; updatePosition(); } /** * Invokes a callback once the tooltip has fully transitioned out */ function onTransitionedOut(duration, callback) { onTransitionEnd(false, duration, function () { if (!tip.state.isVisible && tip.props.appendTo.contains(tip.popper)) { callback(); } }); } /** * Invokes a callback once the tooltip has fully transitioned in */ function onTransitionedIn(duration, callback) { onTransitionEnd(true, duration, callback); } /** * Invokes a callback once the tooltip's CSS transition ends */ function onTransitionEnd(isInDirection, duration, callback) { // Make callback synchronous if duration is 0 if (duration === 0) { return callback(); } var tooltip = tip.popperChildren.tooltip; var listener = function listener(e) { if (e.target === tooltip) { toggleTransitionEndListener(tooltip, 'remove', listener); callback(); } }; toggleTransitionEndListener(tooltip, 'remove', transitionEndListener); toggleTransitionEndListener(tooltip, 'add', listener); transitionEndListener = listener; } /** * Adds an event listener to the reference */ function on(eventType, handler, acc) { tip.reference.addEventListener(eventType, handler); acc.push({ eventType: eventType, handler: handler }); } /** * Adds event listeners to the reference based on the `trigger` prop */ function addTriggersToReference() { listeners = tip.props.trigger.trim().split(' ').reduce(function (acc, eventType) { if (eventType === 'manual') { return acc; } if (!props.target) { on(eventType, onTrigger, acc); switch (eventType) { case 'mouseenter': on('mouseleave', onMouseLeave, acc); break; case 'focus': on(isIE$1 ? 'focusout' : 'blur', onBlur, acc); break; } } else { switch (eventType) { case 'mouseenter': on('mouseover', onDelegateShow, acc); on('mouseout', onDelegateHide, acc); break; case 'focus': on('focusin', onDelegateShow, acc); on('focusout', onDelegateHide, acc); break; case 'click': on(eventType, onDelegateShow, acc); break; } } return acc; }, []); } /** * Removes event listeners from the reference */ function removeTriggersFromReference() { listeners.forEach(function (_ref) { var eventType = _ref.eventType, handler = _ref.handler; tip.reference.removeEventListener(eventType, handler); }); } /* ======================= 🔑 Public methods 🔑 ======================= */ /** * Enables the instance to allow it to show or hide */ function enable() { tip.state.isEnabled = true; } /** * Disables the instance to disallow it to show or hide */ function disable() { tip.state.isEnabled = false; } /** * Clears pending timeouts related to the `delay` prop if any */ function clearDelayTimeouts() { clearTimeout(showTimeoutId); clearTimeout(hideTimeoutId); } /** * Sets new props for the instance and redraws the tooltip */ function set$$1(options) { var prevProps = tip.props; var nextProps = evaluateProps(tip.reference, _extends({}, tip.props, options, { performance: true })); nextProps.performance = options.performance || prevProps.performance; tip.props = nextProps; if ('trigger' in options) { removeTriggersFromReference(); addTriggersToReference(); } if ('interactiveDebounce' in options) { cleanupOldMouseMoveListeners(); debouncedOnMouseMove = debounce$1(onMouseMove, options.interactiveDebounce); } updatePopperElement(tip.popper, prevProps, nextProps); tip.popperChildren = getChildren(tip.popper); } /** * Shortcut for .set({ content: newContent }) */ function setContent$$1(content) { set$$1({ content: content }); } /** * Shows the tooltip */ function show() { var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(tip.props.duration, 0, Defaults.duration[0]); if (tip.state.isDestroyed || !tip.state.isEnabled || isUsingTouch && !tip.props.touch) { return; } // Destroy tooltip if the reference element is no longer on the DOM if (!tip.reference.isVirtual && !document.documentElement.contains(tip.reference)) { return destroy(); } // Do not show tooltip if the reference element has a `disabled` attribute if (tip.reference.hasAttribute('disabled')) { return; } // If the reference was just programmatically focused for accessibility reasons if (referenceJustProgrammaticallyFocused) { referenceJustProgrammaticallyFocused = false; return; } tip.props.onShow(tip); tip.popper.style.visibility = 'visible'; tip.state.isVisible = true; // Prevent a transition if the popper is at the opposite placement applyTransitionDuration([tip.popper, tip.popperChildren.tooltip, tip.popperChildren.backdrop], 0); mount(function () { if (!tip.state.isVisible) { return; } if (!hasFollowCursorBehavior()) { // Arrow will sometimes not be positioned correctly. Force another update. tip.popperInstance.scheduleUpdate(); } // Set initial position near the cursor if (hasFollowCursorBehavior()) { tip.popperInstance.disableEventListeners(); var delay = getValue(tip.props.delay, 0, Defaults.delay); if (lastTriggerEvent.type) { followCursorListener(delay && lastMouseMoveEvent ? lastMouseMoveEvent : lastTriggerEvent); } } applyTransitionDuration([tip.popperChildren.tooltip, tip.popperChildren.backdrop, tip.popperChildren.backdrop ? tip.popperChildren.content : null], duration); if (tip.props.interactive) { tip.reference.classList.add('tippy-active'); } if (tip.props.sticky) { makeSticky(); } setVisibilityState([tip.popperChildren.tooltip, tip.popperChildren.backdrop], 'visible'); onTransitionedIn(duration, function () { if (tip.props.updateDuration === 0) { tip.popperChildren.tooltip.classList.add('tippy-notransition'); } if (tip.props.interactive && lastTriggerEvent.type === 'focus') { focus(tip.popper); } tip.reference.setAttribute('aria-describedby', tip.popper.id); tip.props.onShown(tip); }); }); } /** * Hides the tooltip */ function hide() { var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(tip.props.duration, 1, Defaults.duration[1]); if (tip.state.isDestroyed || !tip.state.isEnabled) { return; } tip.props.onHide(tip); if (tip.props.updateDuration === 0) { tip.popperChildren.tooltip.classList.remove('tippy-notransition'); } if (tip.props.interactive) { tip.reference.classList.remove('tippy-active'); } tip.popper.style.visibility = 'hidden'; tip.state.isVisible = false; applyTransitionDuration([tip.popperChildren.tooltip, tip.popperChildren.backdrop, tip.popperChildren.backdrop ? tip.popperChildren.content : null], duration); setVisibilityState([tip.popperChildren.tooltip, tip.popperChildren.backdrop], 'hidden'); if (tip.props.interactive && !referenceJustProgrammaticallyFocused && lastTriggerEvent.type === 'focus') { referenceJustProgrammaticallyFocused = true; focus(tip.reference); } onTransitionedOut(duration, function () { if (!isPreparingToShow) { document.removeEventListener('mousemove', followCursorListener); lastMouseMoveEvent = null; } tip.reference.removeAttribute('aria-describedby'); tip.popperInstance.disableEventListeners(); tip.props.appendTo.removeChild(tip.popper); tip.props.onHidden(tip); }); } /** * Destroys the tooltip */ function destroy(destroyTargetInstances) { if (tip.state.isDestroyed) { return; } // Ensure the popper is hidden if (tip.state.isVisible) { hide(0); } removeTriggersFromReference(); tip.reference.removeEventListener('click', onReferenceClick); delete tip.reference._tippy; if (tip.props.target && destroyTargetInstances) { toArray$1(tip.reference.querySelectorAll(tip.props.target)).forEach(function (child) { return child._tippy && child._tippy.destroy(); }); } if (tip.popperInstance) { tip.popperInstance.destroy(); } if (popperMutationObserver) { popperMutationObserver.disconnect(); } tip.state.isDestroyed = true; } } var eventListenersBound = false; function tippy$1(targets, options, one) { if (!eventListenersBound) { bindEventListeners(); eventListenersBound = true; } // Throw an error if the user supplied an invalid option for (var key in options || {}) { if (!(key in Defaults)) { throw Error('[tippy]: ' + key + ' is not a valid option'); } } var props = _extends({}, Defaults, options); /** * If they are specifying a virtual positioning reference, we need to polyfill * some native DOM props */ if (isPlainObject(targets)) { polyfillVirtualReferenceProps(targets); } var references = getArrayOfElements(targets); var firstReference = references[0]; var instances = (one && firstReference ? [firstReference] : references).reduce(function (acc, reference) { var tip = reference && createTippy(reference, props); return tip ? acc.concat(tip) : acc; }, []); return { targets: targets, props: props, instances: instances, destroyAll: function destroyAll() { this.instances.forEach(function (instance) { instance.destroy(); }); this.instances = []; } }; } /** * Static props */ tippy$1.version = version; tippy$1.defaults = Defaults; /** * Static methods */ tippy$1.one = function (targets, options) { return tippy$1(targets, options, true).instances[0]; }; tippy$1.setDefaults = function (partialDefaults) { setDefaults(partialDefaults); tippy$1.defaults = Defaults; }; tippy$1.disableAnimations = function () { tippy$1.setDefaults({ duration: 0, updateDuration: 0, animateFill: false }); }; tippy$1.hideAllPoppers = hideAllPoppers; /** * Auto-init tooltips for elements with a `data-tippy="..."` attribute */ var autoInit = function autoInit() { toArray$1(document.querySelectorAll('[data-tippy]')).forEach(function (el) { var content = el.getAttribute('data-tippy'); if (content) { tippy$1(el, { content: content }); } }); }; if (isBrowser$1) { setTimeout(autoInit); } export default tippy$1; //# sourceMappingURL=tippy.js.map
sufuf3/cdnjs
ajax/libs/tippy.js/3.0.0-beta.0/esm/tippy.js
JavaScript
mit
131,667
/* * jQuery.weekCalendar v2.0-dev * * for support join us at the google group: * - http://groups.google.com/group/jquery-week-calendar * have a look to the wiki for documentation: * - http://wiki.github.com/themouette/jquery-week-calendar/ * something went bad ? report an issue: * - http://github.com/themouette/jquery-week-calendar/issues * get the last version on github: * - http://github.com/themouette/jquery-week-calendar * * Copyright (c) 2009 Rob Monie * Copyright (c) 2010 Julien MUETTON * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * If you're after a monthly calendar plugin, check out this one : * http://arshaw.com/fullcalendar/ */ (function($) { // check the jquery version var _v = $.fn.jquery.split('.'), _jQuery14OrLower = (10 * _v[0] + _v[1]) < 15; $.widget('ui.weekCalendar', (function() { var _currentAjaxCall, _hourLineTimeout; return { options: { date: new Date(), timeFormat: null, dateFormat: 'M d, Y', alwaysDisplayTimeMinutes: true, use24Hour: false, daysToShow: 7, minBodyHeight: 100, firstDayOfWeek: function(calendar) { if ($(calendar).weekCalendar('option', 'daysToShow') != 5) { return 0; } else { //workweek return 1; } }, // 0 = Sunday, 1 = Monday, 2 = Tuesday, ... , 6 = Saturday useShortDayNames: false, timeSeparator: ' to ', startParam: 'start', endParam: 'end', businessHours: {start: 8, end: 18, limitDisplay: false}, newEventText: 'New Event', timeslotHeight: 20, defaultEventLength: 2, timeslotsPerHour: 4, minDate: null, maxDate: null, showHeader: true, buttons: true, buttonText: { today: 'today', lastWeek: 'previous', nextWeek: 'next' }, switchDisplay: {}, scrollToHourMillis: 500, allowEventDelete: false, allowCalEventOverlap: false, overlapEventsSeparate: false, totalEventsWidthPercentInOneColumn: 100, readonly: false, allowEventCreation: true, hourLine: false, deletable: function(calEvent, element) { return true; }, draggable: function(calEvent, element) { return true; }, resizable: function(calEvent, element) { return true; }, eventClick: function(calEvent, element, dayFreeBusyManager, calendar, clickEvent) { }, eventRender: function(calEvent, element) { return element; }, eventAfterRender: function(calEvent, element) { return element; }, eventRefresh: function(calEvent, element) { return element; }, eventDrag: function(calEvent, element) { }, eventDrop: function(calEvent, element) { }, eventResize: function(calEvent, element) { }, eventNew: function(calEvent, element, dayFreeBusyManager, calendar, mouseupEvent) { }, eventMouseover: function(calEvent, $event) { }, eventMouseout: function(calEvent, $event) { }, eventDelete: function(calEvent, element, dayFreeBusyManager, calendar, clickEvent) { calendar.weekCalendar('removeEvent',calEvent.id); }, calendarBeforeLoad: function(calendar) { }, calendarAfterLoad: function(calendar) { }, noEvents: function() { }, eventHeader: function(calEvent, calendar) { var options = calendar.weekCalendar('option'); var one_hour = 3600000; var displayTitleWithTime = calEvent.end.getTime() - calEvent.start.getTime() <= (one_hour / options.timeslotsPerHour); if (displayTitleWithTime) { return calendar.weekCalendar( 'formatTime', calEvent.start) + ': ' + calEvent.title; } else { return calendar.weekCalendar( 'formatTime', calEvent.start) + options.timeSeparator + calendar.weekCalendar( 'formatTime', calEvent.end); } }, eventBody: function(calEvent, calendar) { return calEvent.title; }, shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], longMonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], longDays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], /* multi-users options */ /** * the available users for calendar. * if you want to display users separately, enable the * showAsSeparateUsers option. * if you provide a list of user and do not enable showAsSeparateUsers * option, then only the events that belongs to one or several of * given users will be displayed * @type {array} */ users: [], /** * should the calendar be displayed with separate column for each * users. * note that this option does nothing if you do not provide at least * one user. * @type {boolean} */ showAsSeparateUsers: true, /** * callback used to read user id from a user object. * @param {Object} user the user to retrieve the id from. * @param {number} index the user index from user list. * @param {jQuery} calendar the calendar object. * @return {int|String} the user id. */ getUserId: function(user, index, calendar) { return index; }, /** * callback used to read user name from a user object. * @param {Object} user the user to retrieve the name from. * @param {number} index the user index from user list. * @param {jQuery} calendar the calendar object. * @return {String} the user name. */ getUserName: function(user, index, calendar) { return user; }, /** * reads the id(s) of user(s) for who the event should be displayed. * @param {Object} calEvent the calEvent to read informations from. * @param {jQuery} calendar the calendar object. * @return {number|String|Array} the user id(s) to appened events for. */ getEventUserId: function(calEvent, calendar) { return calEvent.userId; }, /** * sets user id(s) to the calEvent * @param {Object} calEvent the calEvent to set informations to. * @param {jQuery} calendar the calendar object. * @return {Object} the calEvent with modified user id. */ setEventUserId: function(userId, calEvent, calendar) { calEvent.userId = userId; return calEvent; }, /* freeBusy options */ /** * should the calendar display freebusys ? * @type {boolean} */ displayFreeBusys: false, /** * read the id(s) for who the freebusy is available * @param {Object} calEvent the calEvent to read informations from. * @param {jQuery} calendar the calendar object. * @return {number|String|Array} the user id(s) to appened events for. */ getFreeBusyUserId: function(calFreeBusy, calendar) { return calFreeBusy.userId; }, /** * the default freeBusy object, used to manage default state * @type {Object} */ defaultFreeBusy: {free: false}, /** * function used to display the freeBusy element * @type {Function} * @param {Object} freeBusy the freeBusy timeslot to render. * @param {jQuery} $freeBusy the freeBusy HTML element. * @param {jQuery} calendar the calendar element. */ freeBusyRender: function(freeBusy, $freeBusy, calendar) { if (!freeBusy.free) { $freeBusy.addClass('free-busy-busy'); } else { $freeBusy.addClass('free-busy-free'); } return $freeBusy; }, /* other options */ /** * true means start on first day of week, false means starts on * startDate. * @param {jQuery} calendar the calendar object. * @type {Function|bool} */ startOnFirstDayOfWeek: function(calendar) { return $(calendar).weekCalendar('option', 'daysToShow') >= 5; }, /** * should the columns be rendered alternatively using odd/even * class * @type {boolean} */ displayOddEven: false, textSize: 13, /** * the title attribute for the calendar. possible placeholders are: * <ul> * <li>%start%</li> * <li>%end%</li> * <li>%date%</li> * </ul> * @type {Function|string} * @param {number} option daysToShow. * @return {String} the title attribute for the calendar. */ title: '%start% - %end%', /** * default options to pass to callback * you can pass a function returning an object or a litteral object * @type {object|function(#calendar)} */ jsonOptions: {}, headerSeparator: '<br />', /** * returns formatted header for day display * @type {function(date,calendar)} */ getHeaderDate: null, preventDragOnEventCreation: false, /** * the event on which to bind calendar resize * @type {string} */ resizeEvent: 'resize.weekcalendar' }, /*********************** * Initialise calendar * ***********************/ _create: function() { var self = this; self._computeOptions(); self._setupEventDelegation(); self._renderCalendar(); self._loadCalEvents(); self._resizeCalendar(); self._scrollToHour(self.options.date.getHours(), true); if (this.options.resizeEvent) { $(window).unbind(this.options.resizeEvent); $(window).bind(this.options.resizeEvent, function() { self._resizeCalendar(); }); } }, /******************** * public functions * ********************/ /* * Refresh the events for the currently displayed week. */ refresh: function() { //reload with existing week this._loadCalEvents(this.element.data('startDate')); }, /* * Clear all events currently loaded into the calendar */ clear: function() { this._clearCalendar(); }, /* * Go to this week */ today: function() { this._clearCalendar(); this._loadCalEvents(new Date()); }, /* * Go to the previous week relative to the currently displayed week */ prevWeek: function() { //minus more than 1 day to be sure we're in previous week - account for daylight savings or other anomolies var newDate = new Date(this.element.data('startDate').getTime() - (MILLIS_IN_WEEK / 6)); this._clearCalendar(); this._loadCalEvents(newDate); }, /* * Go to the next week relative to the currently displayed week */ nextWeek: function() { //add 8 days to be sure of being in prev week - allows for daylight savings or other anomolies var newDate = new Date(this.element.data('startDate').getTime() + MILLIS_IN_WEEK + MILLIS_IN_DAY); this._clearCalendar(); this._loadCalEvents(newDate); }, /* * Reload the calendar to whatever week the date passed in falls on. */ gotoWeek: function(date) { this._clearCalendar(); this._loadCalEvents(date); }, /* * Reload the calendar to whatever week the date passed in falls on. */ gotoDate: function(date) { this._clearCalendar(); this._loadCalEvents(date); }, /** * change the number of days to show */ setDaysToShow: function(daysToShow) { var self = this; var hour = self._getCurrentScrollHour(); self.options.daysToShow = daysToShow; $(self.element).html(''); self._renderCalendar(); self._loadCalEvents(); self._resizeCalendar(); self._scrollToHour(hour, false); if (this.options.resizeEvent) { $(window).unbind(this.options.resizeEvent); $(window).bind(this.options.resizeEvent, function() { self._resizeCalendar(); }); } }, /* * Remove an event based on it's id */ removeEvent: function(eventId) { var self = this; self.element.find('.wc-cal-event').each(function() { if ($(this).data('calEvent').id === eventId) { $(this).remove(); return false; } }); //this could be more efficient rather than running on all days regardless... self.element.find('.wc-day-column-inner').each(function() { self._adjustOverlappingEvents($(this)); }); }, /* * Removes any events that have been added but not yet saved (have no id). * This is useful to call after adding a freshly saved new event. */ removeUnsavedEvents: function() { var self = this; self.element.find('.wc-new-cal-event').each(function() { $(this).remove(); }); //this could be more efficient rather than running on all days regardless... self.element.find('.wc-day-column-inner').each(function() { self._adjustOverlappingEvents($(this)); }); }, /* * update an event in the calendar. If the event exists it refreshes * it's rendering. If it's a new event that does not exist in the calendar * it will be added. */ updateEvent: function(calEvent) { this._updateEventInCalendar(calEvent); }, /* * Returns an array of timeslot start and end times based on * the configured grid of the calendar. Returns in both date and * formatted time based on the 'timeFormat' config option. */ getTimeslotTimes: function(date) { var options = this.options; var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0; var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), firstHourDisplayed); var times = [], startMillis = startDate.getTime(); for (var i = 0; i < options.timeslotsPerDay; i++) { var endMillis = startMillis + options.millisPerTimeslot; times[i] = { start: new Date(startMillis), startFormatted: this.formatTime(new Date(startMillis), options.timeFormat), end: new Date(endMillis), endFormatted: this.formatTime(new Date(endMillis), options.timeFormat) }; startMillis = endMillis; } return times; }, formatDate: function(date, format) { if (format) { return this._formatDate(date, format); } else { return this._formatDate(date, this.options.dateFormat); } }, formatTime: function(date, format) { if (format) { return this._formatDate(date, format); } else if (this.options.timeFormat) { return this._formatDate(date, this.options.timeFormat); } else if (this.options.use24Hour) { return this._formatDate(date, 'H:i'); } else { return this._formatDate(date, 'h:i a'); } }, serializeEvents: function() { var self = this; var calEvents = []; self.element.find('.wc-cal-event').each(function() { calEvents.push($(this).data('calEvent')); }); return calEvents; }, next: function() { if (this._startOnFirstDayOfWeek()) { return this.nextWeek(); } var newDate = new Date(this.element.data('startDate').getTime()); newDate.setDate(newDate.getDate() + this.options.daysToShow); this._clearCalendar(); this._loadCalEvents(newDate); }, prev: function() { if (this._startOnFirstDayOfWeek()) { return this.prevWeek(); } var newDate = new Date(this.element.data('startDate').getTime()); newDate.setDate(newDate.getDate() - this.options.daysToShow); this._clearCalendar(); this._loadCalEvents(newDate); }, getCurrentFirstDay: function() { return this._dateFirstDayOfWeek(this.options.date || new Date()); }, getCurrentLastDay: function() { return this._addDays(this.getCurrentFirstDay(), this.options.daysToShow - 1); }, /********************* * private functions * *********************/ _setOption: function(key, value) { var self = this; if (self.options[key] != value) { // event callback change, no need to re-render the events if (key == 'beforeEventNew') { self.options[key] = value; return; } // this could be made more efficient at some stage by caching the // events array locally in a store but this should be done in conjunction // with a proper binding model. var currentEvents = self.element.find('.wc-cal-event').map(function() { return $(this).data('calEvent'); }); var newOptions = {}; newOptions[key] = value; self._renderEvents({events: currentEvents, options: newOptions}, self.element.find('.wc-day-column-inner')); } }, // compute dynamic options based on other config values _computeOptions: function() { var options = this.options; if (options.businessHours.limitDisplay) { options.timeslotsPerDay = options.timeslotsPerHour * (options.businessHours.end - options.businessHours.start); options.millisToDisplay = (options.businessHours.end - options.businessHours.start) * 3600000; // 60 * 60 * 1000 options.millisPerTimeslot = options.millisToDisplay / options.timeslotsPerDay; } else { options.timeslotsPerDay = options.timeslotsPerHour * 24; options.millisToDisplay = MILLIS_IN_DAY; options.millisPerTimeslot = MILLIS_IN_DAY / options.timeslotsPerDay; } }, /* * Resize the calendar scrollable height based on the provided function in options. */ _resizeCalendar: function() { var options = this.options; if (options && $.isFunction(options.height)) { var calendarHeight = options.height(this.element); var headerHeight = this.element.find('.wc-header').outerHeight(); var navHeight = this.element.find('.wc-toolbar').outerHeight(); var scrollContainerHeight = Math.max(calendarHeight - navHeight - headerHeight, options.minBodyHeight); var timeslotHeight = this.element.find('.wc-time-slots').outerHeight(); this.element.find('.wc-scrollable-grid').height(scrollContainerHeight); if (timeslotHeight <= scrollContainerHeight) { this.element.find('.wc-scrollbar-shim').width(0); } else { this.element.find('.wc-scrollbar-shim').width(this._findScrollBarWidth()); } this._trigger('resize', this.element); } }, _findScrollBarWidth: function() { var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'); var child = parent.children(); var width = child.innerWidth() - child.height(99).innerWidth(); parent.remove(); return width || /* default to 16 that is the average */ 16; }, /* * configure calendar interaction events that are able to use event * delegation for greater efficiency */ _setupEventDelegation: function() { var self = this; var options = this.options; this.element.click(function(event) { var $target = $(event.target), freeBusyManager; // click is disabled if ($target.data('preventClick')) { return; } var $calEvent = $target.hasClass('wc-cal-event') ? $target : $target.parents('.wc-cal-event'); if (!$calEvent.length || !$calEvent.data('calEvent')) { return; } freeBusyManager = self.getFreeBusyManagerForEvent($calEvent.data('calEvent')); if (options.allowEventDelete && $target.hasClass('wc-cal-event-delete')) { options.eventDelete($calEvent.data('calEvent'), $calEvent, freeBusyManager, self.element, event); } else { options.eventClick($calEvent.data('calEvent'), $calEvent, freeBusyManager, self.element, event); } }).mouseover(function(event) { var $target = $(event.target); var $calEvent = $target.hasClass('wc-cal-event') ? $target : $target.parents('.wc-cal-event'); if (!$calEvent.length || !$calEvent.data('calEvent')) { return; } if (self._isDraggingOrResizing($calEvent)) { return; } options.eventMouseover($calEvent.data('calEvent'), $calEvent, event); }).mouseout(function(event) { var $target = $(event.target); var $calEvent = $target.hasClass('wc-cal-event') ? $target : $target.parents('.wc-cal-event'); if (!$calEvent.length || !$calEvent.data('calEvent')) { return; } if (self._isDraggingOrResizing($calEvent)) { return; } options.eventMouseout($calEvent.data('calEvent'), $calEvent, event); }); }, /** * check if a ui draggable or resizable is currently being dragged or * resized. */ _isDraggingOrResizing: function($target) { return $target.hasClass('ui-draggable-dragging') || $target.hasClass('ui-resizable-resizing'); }, /* * Render the main calendar layout */ _renderCalendar: function() { var $calendarContainer, $weekDayColumns; var self = this; var options = this.options; $calendarContainer = $('<div class=\"ui-widget wc-container\">').appendTo(self.element); //render the different parts // nav links self._renderCalendarButtons($calendarContainer); // header self._renderCalendarHeader($calendarContainer); // body self._renderCalendarBody($calendarContainer); $weekDayColumns = $calendarContainer.find('.wc-day-column-inner'); $weekDayColumns.each(function(i, val) { if (!options.readonly) { self._addDroppableToWeekDay($(this)); if (options.allowEventCreation) { self._setupEventCreationForWeekDay($(this)); } } }); }, /** * render the nav buttons on top of the calendar */ _renderCalendarButtons: function($calendarContainer) { var self = this, options = this.options; if ( !options.showHeader ) return; if (options.buttons) { var calendarNavHtml = ''; calendarNavHtml += '<div class=\"ui-widget-header wc-toolbar\">'; calendarNavHtml += '<div class=\"wc-display\"></div>'; calendarNavHtml += '<div class=\"wc-nav\">'; calendarNavHtml += '<button class=\"wc-prev\">' + options.buttonText.lastWeek + '</button>'; calendarNavHtml += '<button class=\"wc-today\">' + options.buttonText.today + '</button>'; calendarNavHtml += '<button class=\"wc-next\">' + options.buttonText.nextWeek + '</button>'; calendarNavHtml += '</div>'; calendarNavHtml += '<h1 class=\"wc-title\"></h1>'; calendarNavHtml += '</div>'; $(calendarNavHtml).appendTo($calendarContainer); $calendarContainer.find('.wc-nav .wc-today') .button({ icons: {primary: 'ui-icon-home'}}) .click(function() { self.today(); return false; }); $calendarContainer.find('.wc-nav .wc-prev') .button({ text: false, icons: {primary: 'ui-icon-seek-prev'}}) .click(function() { self.element.weekCalendar('prev'); return false; }); $calendarContainer.find('.wc-nav .wc-next') .button({ text: false, icons: {primary: 'ui-icon-seek-next'}}) .click(function() { self.element.weekCalendar('next'); return false; }); // now add buttons to switch display if (this.options.switchDisplay && $.isPlainObject(this.options.switchDisplay)) { var $container = $calendarContainer.find('.wc-display'); $.each(this.options.switchDisplay, function(label, option) { var _id = 'wc-switch-display-' + option; var _input = $('<input type="radio" id="' + _id + '" name="wc-switch-display" class="wc-switch-display"/>'); var _label = $('<label for="' + _id + '"></label>'); _label.html(label); _input.val(option); if (parseInt(self.options.daysToShow, 10) === parseInt(option, 10)) { _input.attr('checked', 'checked'); } $container .append(_input) .append(_label); }); $container.find('input').change(function() { self.setDaysToShow(parseInt($(this).val(), 10)); }); } $calendarContainer.find('.wc-nav, .wc-display').buttonset(); var _height = $calendarContainer.find('.wc-nav').outerHeight(); $calendarContainer.find('.wc-title') .height(_height) .css('line-height', _height + 'px'); }else{ var calendarNavHtml = ''; calendarNavHtml += '<div class=\"ui-widget-header wc-toolbar\">'; calendarNavHtml += '<h1 class=\"wc-title\"></h1>'; calendarNavHtml += '</div>'; $(calendarNavHtml).appendTo($calendarContainer); } }, /** * render the calendar header, including date and user header */ _renderCalendarHeader: function($calendarContainer) { var self = this, options = this.options, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, rowspan = '', colspan = '', calendarHeaderHtml; if (showAsSeparatedUser) { rowspan = ' rowspan=\"2\"'; colspan = ' colspan=\"' + options.users.length + '\" '; } //first row calendarHeaderHtml = '<div class=\"ui-widget-content wc-header\">'; calendarHeaderHtml += '<table><tbody><tr><td class=\"wc-time-column-header\"></td>'; for (var i = 1; i <= options.daysToShow; i++) { calendarHeaderHtml += '<td class=\"wc-day-column-header wc-day-' + i + '\"' + colspan + '></td>'; } calendarHeaderHtml += '<td class=\"wc-scrollbar-shim\"' + rowspan + '></td></tr>'; //users row if (showAsSeparatedUser) { calendarHeaderHtml += '<tr><td class=\"wc-time-column-header\"></td>'; var uLength = options.users.length, _headerClass = ''; for (var i = 1; i <= options.daysToShow; i++) { for (var j = 0; j < uLength; j++) { _headerClass = []; if (j == 0) { _headerClass.push('wc-day-column-first'); } if (j == uLength - 1) { _headerClass.push('wc-day-column-last'); } if (!_headerClass.length) { _headerClass = 'wc-day-column-middle'; } else { _headerClass = _headerClass.join(' '); } calendarHeaderHtml += '<td class=\"' + _headerClass + ' wc-user-header wc-day-' + i + ' wc-user-' + self._getUserIdFromIndex(j) + '\">'; // calendarHeaderHtml+= "<div class=\"wc-user-header wc-day-" + i + " wc-user-" + self._getUserIdFromIndex(j) +"\" >"; calendarHeaderHtml += self._getUserName(j); // calendarHeaderHtml+= "</div>"; calendarHeaderHtml += '</td>'; } } calendarHeaderHtml += '</tr>'; } //close the header calendarHeaderHtml += '</tbody></table></div>'; $(calendarHeaderHtml).appendTo($calendarContainer); }, /** * render the calendar body. * Calendar body is composed of several distinct parts. * Each part is displayed in a separated row to ease rendering. * for further explanations, see each part rendering function. */ _renderCalendarBody: function($calendarContainer) { var self = this, options = this.options, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, $calendarBody, $calendarTableTbody; // create the structure $calendarBody = '<div class=\"wc-scrollable-grid\">'; $calendarBody += '<table class=\"wc-time-slots\">'; $calendarBody += '<tbody>'; $calendarBody += '</tbody>'; $calendarBody += '</table>'; $calendarBody += '</div>'; $calendarBody = $($calendarBody); $calendarTableTbody = $calendarBody.find('tbody'); self._renderCalendarBodyTimeSlots($calendarTableTbody); self._renderCalendarBodyOddEven($calendarTableTbody); self._renderCalendarBodyFreeBusy($calendarTableTbody); self._renderCalendarBodyEvents($calendarTableTbody); $calendarBody.appendTo($calendarContainer); //set the column height $calendarContainer.find('.wc-full-height-column').height(options.timeslotHeight * options.timeslotsPerDay); //set the timeslot height $calendarContainer.find('.wc-time-slot').height(options.timeslotHeight - 1); //account for border //init the time row header height /** TODO if total height for an hour is less than 11px, there is a display problem. Find a way to handle it */ $calendarContainer.find('.wc-time-header-cell').css({ height: (options.timeslotHeight * options.timeslotsPerHour) - 11, padding: 5 }); //add the user data to every impacted column if (showAsSeparatedUser) { for (var i = 0, uLength = options.users.length; i < uLength; i++) { $calendarContainer.find('.wc-user-' + self._getUserIdFromIndex(i)) .data('wcUser', options.users[i]) .data('wcUserIndex', i) .data('wcUserId', self._getUserIdFromIndex(i)); } } }, /** * render the timeslots separation */ _renderCalendarBodyTimeSlots: function($calendarTableTbody) { var options = this.options, renderRow, i, j, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, start = (options.businessHours.limitDisplay ? options.businessHours.start : 0), end = (options.businessHours.limitDisplay ? options.businessHours.end : 24), rowspan = 1; //calculate the rowspan if (options.displayOddEven) { rowspan += 1; } if (options.displayFreeBusys) { rowspan += 1; } if (rowspan > 1) { rowspan = ' rowspan=\"' + rowspan + '\"'; } else { rowspan = ''; } renderRow = '<tr class=\"wc-grid-row-timeslot\">'; renderRow += '<td class=\"wc-grid-timeslot-header\"' + rowspan + '></td>'; renderRow += '<td colspan=\"' + options.daysToShow * (showAsSeparatedUser ? options.users.length : 1) + '\">'; renderRow += '<div class=\"wc-no-height-wrapper wc-time-slot-wrapper\">'; renderRow += '<div class=\"wc-time-slots\">'; for (i = start; i < end; i++) { for (j = 0; j < options.timeslotsPerHour - 1; j++) { renderRow += '<div class=\"wc-time-slot\"></div>'; } renderRow += '<div class=\"wc-time-slot wc-hour-end\"></div>'; } renderRow += '</div>'; renderRow += '</div>'; renderRow += '</td>'; renderRow += '</tr>'; $(renderRow).appendTo($calendarTableTbody); }, /** * render the odd even columns */ _renderCalendarBodyOddEven: function($calendarTableTbody) { if (this.options.displayOddEven) { var options = this.options, renderRow = '<tr class=\"wc-grid-row-oddeven\">', showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, oddEven, // let's take advantage of the jquery ui framework oddEvenClasses = {'odd': 'wc-column-odd', 'even': 'ui-state-hover wc-column-even'}; //now let's display oddEven placeholders for (var i = 1; i <= options.daysToShow; i++) { if (!showAsSeparatedUser) { oddEven = (oddEven == 'odd' ? 'even' : 'odd'); renderRow += '<td class=\"wc-day-column day-' + i + '\">'; renderRow += '<div class=\"wc-no-height-wrapper wc-oddeven-wrapper\">'; renderRow += '<div class=\"wc-full-height-column ' + oddEvenClasses[oddEven] + '\"></div>'; renderRow += '</div>'; renderRow += '</td>'; } else { var uLength = options.users.length; for (var j = 0; j < uLength; j++) { oddEven = (oddEven == 'odd' ? 'even' : 'odd'); renderRow += '<td class=\"wc-day-column day-' + i + '\">'; renderRow += '<div class=\"wc-no-height-wrapper wc-oddeven-wrapper\">'; renderRow += '<div class=\"wc-full-height-column ' + oddEvenClasses[oddEven] + '\" ></div>'; renderRow += '</div>'; renderRow += '</td>'; } } } renderRow += '</tr>'; $(renderRow).appendTo($calendarTableTbody); } }, /** * render the freebusy placeholders */ _renderCalendarBodyFreeBusy: function($calendarTableTbody) { if (this.options.displayFreeBusys) { var self = this, options = this.options, renderRow = '<tr class=\"wc-grid-row-freebusy\">', showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length; renderRow += '</td>'; //now let's display freebusy placeholders for (var i = 1; i <= options.daysToShow; i++) { if (options.displayFreeBusys) { if (!showAsSeparatedUser) { renderRow += '<td class=\"wc-day-column day-' + i + '\">'; renderRow += '<div class=\"wc-no-height-wrapper wc-freebusy-wrapper\">'; renderRow += '<div class=\"wc-full-height-column wc-column-freebusy wc-day-' + i + '\"></div>'; renderRow += '</div>'; renderRow += '</td>'; } else { var uLength = options.users.length; for (var j = 0; j < uLength; j++) { renderRow += '<td class=\"wc-day-column day-' + i + '\">'; renderRow += '<div class=\"wc-no-height-wrapper wc-freebusy-wrapper\">'; renderRow += '<div class=\"wc-full-height-column wc-column-freebusy wc-day-' + i; renderRow += ' wc-user-' + self._getUserIdFromIndex(j) + '\">'; renderRow += '</div>'; renderRow += '</div>'; renderRow += '</td>'; } } } } renderRow += '</tr>'; $(renderRow).appendTo($calendarTableTbody); } }, /** * render the calendar body for event placeholders */ _renderCalendarBodyEvents: function($calendarTableTbody) { var self = this, options = this.options, renderRow, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, start = (options.businessHours.limitDisplay ? options.businessHours.start : 0), end = (options.businessHours.limitDisplay ? options.businessHours.end : 24); renderRow = '<tr class=\"wc-grid-row-events\">'; renderRow += '<td class=\"wc-grid-timeslot-header\">'; for (var i = start; i < end; i++) { var bhClass = (options.businessHours.start <= i && options.businessHours.end > i) ? 'ui-state-active wc-business-hours' : 'ui-state-default'; renderRow += '<div class=\"wc-hour-header ' + bhClass + '\">'; if (options.use24Hour) { renderRow += '<div class=\"wc-time-header-cell\">' + self._24HourForIndex(i) + '</div>'; } else { renderRow += '<div class=\"wc-time-header-cell\">' + self._hourForIndex(i) + '<span class=\"wc-am-pm\">' + self._amOrPm(i) + '</span></div>'; } renderRow += '</div>'; } renderRow += '</td>'; //now let's display events placeholders var _columnBaseClass = 'ui-state-default wc-day-column'; for (var i = 1; i <= options.daysToShow; i++) { if (!showAsSeparatedUser) { renderRow += '<td class=\"' + _columnBaseClass + ' wc-day-column-first wc-day-column-last day-' + i + '\">'; renderRow += '<div class=\"wc-full-height-column wc-day-column-inner day-' + i + '\"></div>'; renderRow += '</td>'; } else { var uLength = options.users.length; var columnclass; for (var j = 0; j < uLength; j++) { columnclass = []; if (j == 0) { columnclass.push('wc-day-column-first'); } if (j == uLength - 1) { columnclass.push('wc-day-column-last'); } if (!columnclass.length) { columnclass = 'wc-day-column-middle'; } else { columnclass = columnclass.join(' '); } renderRow += '<td class=\"' + _columnBaseClass + ' ' + columnclass + ' day-' + i + '\">'; renderRow += '<div class=\"wc-full-height-column wc-day-column-inner day-' + i; renderRow += ' wc-user-' + self._getUserIdFromIndex(j) + '\">'; renderRow += '</div>'; renderRow += '</td>'; } } } renderRow += '</tr>'; $(renderRow).appendTo($calendarTableTbody); }, /* * setup mouse events for capturing new events */ _setupEventCreationForWeekDay: function($weekDay) { var self = this; var options = this.options; $weekDay.mousedown(function(event) { var $target = $(event.target); if ($target.hasClass('wc-day-column-inner')) { var $newEvent = $('<div class=\"wc-cal-event wc-new-cal-event wc-new-cal-event-creating\"></div>'); $newEvent.css({lineHeight: (options.timeslotHeight - 2) + 'px', fontSize: (options.timeslotHeight / 2) + 'px'}); $target.append($newEvent); var columnOffset = $target.offset().top; var clickY = event.pageY - columnOffset; var clickYRounded = (clickY - (clickY % options.timeslotHeight)) / options.timeslotHeight; var topPosition = clickYRounded * options.timeslotHeight; $newEvent.css({top: topPosition}); if (!options.preventDragOnEventCreation) { $target.bind('mousemove.newevent', function(event) { $newEvent.show(); $newEvent.addClass('ui-resizable-resizing'); var height = Math.round(event.pageY - columnOffset - topPosition); var remainder = height % options.timeslotHeight; //snap to closest timeslot if (remainder < 0) { var useHeight = height - remainder; $newEvent.css('height', useHeight < options.timeslotHeight ? options.timeslotHeight : useHeight); } else { $newEvent.css('height', height + (options.timeslotHeight - remainder)); } }).mouseup(function() { $target.unbind('mousemove.newevent'); $newEvent.addClass('ui-corner-all'); }); } } }).mouseup(function(event) { var $target = $(event.target); var $weekDay = $target.closest('.wc-day-column-inner'); var $newEvent = $weekDay.find('.wc-new-cal-event-creating'); if ($newEvent.length) { var createdFromSingleClick = !$newEvent.hasClass('ui-resizable-resizing'); //if even created from a single click only, default height if (createdFromSingleClick) { $newEvent.css({height: options.timeslotHeight * options.defaultEventLength}).show(); } var top = parseInt($newEvent.css('top')); var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $newEvent, top); $newEvent.remove(); var newCalEvent = {start: eventDuration.start, end: eventDuration.end, title: options.newEventText}; var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length; if (showAsSeparatedUser) { newCalEvent = self._setEventUserId(newCalEvent, $weekDay.data('wcUserId')); } else if (!options.showAsSeparateUsers && options.users && options.users.length == 1) { newCalEvent = self._setEventUserId(newCalEvent, self._getUserIdFromIndex(0)); } var freeBusyManager = self.getFreeBusyManagerForEvent(newCalEvent); var $renderedCalEvent = self._renderEvent(newCalEvent, $weekDay); if (!options.allowCalEventOverlap) { self._adjustForEventCollisions($weekDay, $renderedCalEvent, newCalEvent, newCalEvent); self._positionEvent($weekDay, $renderedCalEvent); } else { self._adjustOverlappingEvents($weekDay); } var proceed = self._trigger('beforeEventNew', event, { 'calEvent': newCalEvent, 'createdFromSingleClick': createdFromSingleClick, 'calendar': self.element }); if (proceed) { options.eventNew(newCalEvent, $renderedCalEvent, freeBusyManager, self.element, event); } else { $($renderedCalEvent).remove(); } } }); }, /* * load calendar events for the week based on the date provided */ _loadCalEvents: function(dateWithinWeek) { var date, weekStartDate, weekEndDate, $weekDayColumns; var self = this; var options = this.options; date = this._fixMinMaxDate(dateWithinWeek || options.date); // if date is not provided // or was not set // or is different than old one if ((!date || !date.getTime) || (!options.date || !options.date.getTime) || date.getTime() != options.date.getTime() ) { // trigger the changedate event this._trigger('changedate', this.element, date); } this.options.date = date; weekStartDate = self._dateFirstDayOfWeek(date); weekEndDate = self._dateLastMilliOfWeek(date); options.calendarBeforeLoad(self.element); self.element.data('startDate', weekStartDate); self.element.data('endDate', weekEndDate); $weekDayColumns = self.element.find('.wc-day-column-inner'); self._updateDayColumnHeader($weekDayColumns); //load events by chosen means if (typeof options.data == 'string') { if (options.loading) { options.loading(true); } if (_currentAjaxCall) { // first abort current request. if (!_jQuery14OrLower) { _currentAjaxCall.abort(); } else { // due to the fact that jquery 1.4 does not detect a request was // aborted, we need to replace the onreadystatechange and // execute the "complete" callback. _currentAjaxCall.onreadystatechange = null; _currentAjaxCall.abort(); _currentAjaxCall = null; if (options.loading) { options.loading(false); } } } var jsonOptions = self._getJsonOptions(); jsonOptions[options.startParam || 'start'] = Math.round(weekStartDate.getTime() / 1000); jsonOptions[options.endParam || 'end'] = Math.round(weekEndDate.getTime() / 1000); _currentAjaxCall = $.ajax({ url: options.data, data: jsonOptions, dataType: 'json', error: function(XMLHttpRequest, textStatus, errorThrown) { // only prevent error with jQuery 1.5 // see issue #34. thanks to dapplebeforedawn // (https://github.com/themouette/jquery-week-calendar/issues#issue/34) // for 1.5+, aborted request mean errorThrown == 'abort' // for prior version it means !errorThrown && !XMLHttpRequest.status // fixes #55 if (errorThrown != 'abort' && XMLHttpRequest.status != 0) { alert('unable to get data, error:' + textStatus); } }, success: function(data) { self._renderEvents(data, $weekDayColumns); }, complete: function() { _currentAjaxCall = null; if (options.loading) { options.loading(false); } } }); } else if ($.isFunction(options.data)) { options.data(weekStartDate, weekEndDate, function(data) { self._renderEvents(data, $weekDayColumns); }); } else if (options.data) { self._renderEvents(options.data, $weekDayColumns); } self._disableTextSelect($weekDayColumns); }, /** * Draws a thin line which indicates the current time. */ _drawCurrentHourLine: function() { var d = new Date(), options = this.options, businessHours = options.businessHours; // first, we remove the old hourline if it exists $('.wc-hourline', this.element).remove(); // the line does not need to be displayed if (businessHours.limitDisplay && d.getHours() > businessHours.end) { return; } // then we recreate it var paddingStart = businessHours.limitDisplay ? businessHours.start : 0; var nbHours = d.getHours() - paddingStart + d.getMinutes() / 60; var positionTop = nbHours * options.timeslotHeight * options.timeslotsPerHour; var lineWidth = $('.wc-scrollable-grid .wc-today', this.element).width() + 3; $('.wc-scrollable-grid .wc-today', this.element).append( $('<div>', { 'class': 'wc-hourline', style: 'top: ' + positionTop + 'px; width: ' + lineWidth + 'px' }) ); }, /* * update the display of each day column header based on the calendar week */ _updateDayColumnHeader: function($weekDayColumns) { var self = this; var options = this.options; var currentDay = self._cloneDate(self.element.data('startDate')); var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length; var todayClass = 'ui-state-active wc-today'; self.element.find('.wc-header td.wc-day-column-header').each(function(i, val) { $(this).html(self._getHeaderDate(currentDay)); if (self._isToday(currentDay)) { $(this).addClass(todayClass); } else { $(this).removeClass(todayClass); } currentDay = self._addDays(currentDay, 1); }); currentDay = self._cloneDate(self.element.data('startDate')); if (showAsSeparatedUser) { self.element.find('.wc-header td.wc-user-header').each(function(i, val) { if (self._isToday(currentDay)) { $(this).addClass(todayClass); } else { $(this).removeClass(todayClass); } currentDay = ((i + 1) % options.users.length) ? currentDay : self._addDays(currentDay, 1); }); } currentDay = self._cloneDate(self.element.data('startDate')); $weekDayColumns.each(function(i, val) { $(this).data('startDate', self._cloneDate(currentDay)); $(this).data('endDate', new Date(currentDay.getTime() + (MILLIS_IN_DAY))); if (self._isToday(currentDay)) { $(this).parent() .addClass(todayClass) .removeClass('ui-state-default'); } else { $(this).parent() .removeClass(todayClass) .addClass('ui-state-default'); } if (!showAsSeparatedUser || !((i + 1) % options.users.length)) { currentDay = self._addDays(currentDay, 1); } }); //now update the freeBusy placeholders if (options.displayFreeBusys) { currentDay = self._cloneDate(self.element.data('startDate')); self.element.find('.wc-grid-row-freebusy .wc-column-freebusy').each(function(i, val) { $(this).data('startDate', self._cloneDate(currentDay)); $(this).data('endDate', new Date(currentDay.getTime() + (MILLIS_IN_DAY))); if (!showAsSeparatedUser || !((i + 1) % options.users.length)) { currentDay = self._addDays(currentDay, 1); } }); } // now update the calendar title if (this.options.title) { var date = this.options.date, start = self._cloneDate(self.element.data('startDate')), end = self._dateLastDayOfWeek(new Date(this._cloneDate(self.element.data('endDate')).getTime() - (MILLIS_IN_DAY))), title = this._getCalendarTitle(), date_format = options.dateFormat; // replace the placeholders contained in the title title = title.replace('%start%', self._formatDate(start, date_format)); title = title.replace('%end%', self._formatDate(end, date_format)); title = title.replace('%date%', self._formatDate(date, date_format)); $('.wc-toolbar .wc-title', self.element).html(title); } //self._clearFreeBusys(); }, /** * Gets the calendar raw title. */ _getCalendarTitle: function() { if ($.isFunction(this.options.title)) { return this.options.title(this.options.daysToShow); } return this.options.title || ''; }, /** * Render the events into the calendar */ _renderEvents: function(data, $weekDayColumns) { var self = this; var options = this.options; var eventsToRender, nbRenderedEvents = 0; if (data.options) { var updateLayout = false; // update options $.each(data.options, function(key, value) { if (value !== options[key]) { options[key] = value; updateLayout = updateLayout || $.ui.weekCalendar.updateLayoutOptions[key]; } }); self._computeOptions(); if (updateLayout) { var hour = self._getCurrentScrollHour(); self.element.empty(); self._renderCalendar(); $weekDayColumns = self.element.find('.wc-time-slots .wc-day-column-inner'); self._updateDayColumnHeader($weekDayColumns); self._resizeCalendar(); self._scrollToHour(hour, false); } } this._clearCalendar(); if ($.isArray(data)) { eventsToRender = self._cleanEvents(data); } else if (data.events) { eventsToRender = self._cleanEvents(data.events); self._renderFreeBusys(data); } $.each(eventsToRender, function(i, calEvent) { // render a multi day event as various event : // thanks to http://github.com/fbeauchamp/jquery-week-calendar var initialStart = new Date(calEvent.start); var initialEnd = new Date(calEvent.end); var maxHour = self.options.businessHours.limitDisplay ? self.options.businessHours.end : 24; var minHour = self.options.businessHours.limitDisplay ? self.options.businessHours.start : 0; var start = new Date(initialStart); var startDate = self._formatDate(start, 'Ymd'); var endDate = self._formatDate(initialEnd, 'Ymd'); var $weekDay; var isMultiday = false; while (startDate < endDate) { calEvent.start = start; // end of this virual calEvent is set to the end of the day calEvent.end.setFullYear(start.getFullYear()); calEvent.end.setDate(start.getDate()); calEvent.end.setMonth(start.getMonth()); calEvent.end.setHours(maxHour, 0, 0); if (($weekDay = self._findWeekDayForEvent(calEvent, $weekDayColumns))) { self._renderEvent(calEvent, $weekDay); nbRenderedEvents += 1; } // start is set to the begin of the new day start.setDate(start.getDate() + 1); start.setHours(minHour, 0, 0); startDate = self._formatDate(start, 'Ymd'); isMultiday = true; } if (start <= initialEnd) { calEvent.start = start; calEvent.end = initialEnd; if (((isMultiday && calEvent.start.getTime() != calEvent.end.getTime()) || !isMultiday) && ($weekDay = self._findWeekDayForEvent(calEvent, $weekDayColumns))) { self._renderEvent(calEvent, $weekDay); nbRenderedEvents += 1; } } // put back the initial start date calEvent.start = initialStart; }); $weekDayColumns.each(function() { self._adjustOverlappingEvents($(this)); }); options.calendarAfterLoad(self.element); _hourLineTimeout && clearInterval(_hourLineTimeout); if (options.hourLine) { self._drawCurrentHourLine(); _hourLineTimeout = setInterval(function() { self._drawCurrentHourLine(); }, 60 * 1000); // redraw the line each minute } !nbRenderedEvents && options.noEvents(); }, /* * Render a specific event into the day provided. Assumes correct * day for calEvent date */ _renderEvent: function(calEvent, $weekDay) { var self = this; var options = this.options; if (calEvent.start.getTime() > calEvent.end.getTime()) { return; // can't render a negative height } var eventClass, eventHtml, $calEventList, $modifiedEvent; eventClass = calEvent.id ? 'wc-cal-event' : 'wc-cal-event wc-new-cal-event'; eventHtml = '<div class=\"' + eventClass + ' ui-corner-all\">'; eventHtml += '<div class=\"wc-time ui-corner-top\"></div>'; eventHtml += '<div class=\"wc-title\"></div></div>'; $weekDay.each(function() { var $calEvent = $(eventHtml); $modifiedEvent = options.eventRender(calEvent, $calEvent); $calEvent = $modifiedEvent ? $modifiedEvent.appendTo($(this)) : $calEvent.appendTo($(this)); $calEvent.css({lineHeight: (options.textSize + 2) + 'px', fontSize: options.textSize + 'px'}); self._refreshEventDetails(calEvent, $calEvent); self._positionEvent($(this), $calEvent); //add to event list if ($calEventList) { $calEventList = $calEventList.add($calEvent); } else { $calEventList = $calEvent; } }); $calEventList.show(); if (!options.readonly && options.resizable(calEvent, $calEventList)) { self._addResizableToCalEvent(calEvent, $calEventList, $weekDay); } if (!options.readonly && options.draggable(calEvent, $calEventList)) { self._addDraggableToCalEvent(calEvent, $calEventList); } options.eventAfterRender(calEvent, $calEventList); return $calEventList; }, addEvent: function() { return this._renderEvent.apply(this, arguments); }, _adjustOverlappingEvents: function($weekDay) { var self = this; if (self.options.allowCalEventOverlap) { var groupsList = self._groupOverlappingEventElements($weekDay); $.each(groupsList, function() { var curGroups = this; $.each(curGroups, function(groupIndex) { var curGroup = this; // do we want events to be displayed as overlapping if (self.options.overlapEventsSeparate) { var newWidth = self.options.totalEventsWidthPercentInOneColumn / curGroups.length; var newLeft = groupIndex * newWidth; } else { // TODO what happens when the group has more than 10 elements var newWidth = self.options.totalEventsWidthPercentInOneColumn - ((curGroups.length - 1) * 10); var newLeft = groupIndex * 10; } $.each(curGroup, function() { // bring mouseovered event to the front if (!self.options.overlapEventsSeparate) { $(this).bind('mouseover.z-index', function() { var $elem = $(this); $.each(curGroup, function() { $(this).css({'z-index': '1'}); }); $elem.css({'z-index': '3'}); }); } $(this).css({width: newWidth + '%', left: newLeft + '%', right: 0}); }); }); }); } }, /* * Find groups of overlapping events */ _groupOverlappingEventElements: function($weekDay) { var $events = $weekDay.find('.wc-cal-event:visible'); var sortedEvents = $events.sort(function(a, b) { return $(a).data('calEvent').start.getTime() - $(b).data('calEvent').start.getTime(); }); var lastEndTime = new Date(0, 0, 0); var groups = []; var curGroups = []; var $curEvent; $.each(sortedEvents, function() { $curEvent = $(this); //checks, if the current group list is not empty, if the overlapping is finished if (curGroups.length > 0) { if (lastEndTime.getTime() <= $curEvent.data('calEvent').start.getTime()) { //finishes the current group list by adding it to the resulting list of groups and cleans it groups.push(curGroups); curGroups = []; } } //finds the first group to fill with the event for (var groupIndex = 0; groupIndex < curGroups.length; groupIndex++) { if (curGroups[groupIndex].length > 0) { //checks if the event starts after the end of the last event of the group if (curGroups[groupIndex][curGroups[groupIndex].length - 1].data('calEvent').end.getTime() <= $curEvent.data('calEvent').start.getTime()) { curGroups[groupIndex].push($curEvent); if (lastEndTime.getTime() < $curEvent.data('calEvent').end.getTime()) { lastEndTime = $curEvent.data('calEvent').end; } return; } } } //if not found, creates a new group curGroups.push([$curEvent]); if (lastEndTime.getTime() < $curEvent.data('calEvent').end.getTime()) { lastEndTime = $curEvent.data('calEvent').end; } }); //adds the last groups in result if (curGroups.length > 0) { groups.push(curGroups); } return groups; }, /* * find the weekday in the current calendar that the calEvent falls within */ _findWeekDayForEvent: function(calEvent, $weekDayColumns) { var $weekDay, options = this.options, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, user_ids = this._getEventUserId(calEvent); if (!$.isArray(user_ids)) { user_ids = [user_ids]; } $weekDayColumns.each(function(index, curDay) { if ($(this).data('startDate').getTime() <= calEvent.start.getTime() && $(this).data('endDate').getTime() >= calEvent.end.getTime() && (!showAsSeparatedUser || $.inArray($(this).data('wcUserId'), user_ids) !== -1) ) { if ($weekDay) { $weekDay = $weekDay.add($(curDay)); } else { $weekDay = $(curDay); } } }); return $weekDay; }, /* * update the events rendering in the calendar. Add if does not yet exist. */ _updateEventInCalendar: function(calEvent) { var self = this; self._cleanEvent(calEvent); if (calEvent.id) { self.element.find('.wc-cal-event').each(function() { if ($(this).data('calEvent').id === calEvent.id || $(this).hasClass('wc-new-cal-event')) { $(this).remove(); // return false; } }); } var $weekDays = self._findWeekDayForEvent(calEvent, self.element.find('.wc-grid-row-events .wc-day-column-inner')); if ($weekDays) { $weekDays.each(function(index, weekDay) { var $weekDay = $(weekDay); var $calEvent = self._renderEvent(calEvent, $weekDay); self._adjustForEventCollisions($weekDay, $calEvent, calEvent, calEvent); self._refreshEventDetails(calEvent, $calEvent); self._positionEvent($weekDay, $calEvent); self._adjustOverlappingEvents($weekDay); }); } }, /* * Position the event element within the weekday based on it's start / end dates. */ _positionEvent: function($weekDay, $calEvent) { var options = this.options; var calEvent = $calEvent.data('calEvent'); var pxPerMillis = $weekDay.height() / options.millisToDisplay; var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0; var startMillis = this._getDSTdayShift(calEvent.start).getTime() - this._getDSTdayShift(new Date(calEvent.start.getFullYear(), calEvent.start.getMonth(), calEvent.start.getDate(), firstHourDisplayed)).getTime(); var eventMillis = this._getDSTdayShift(calEvent.end).getTime() - this._getDSTdayShift(calEvent.start).getTime(); var pxTop = pxPerMillis * startMillis; var pxHeight = pxPerMillis * eventMillis; //var pxHeightFallback = pxPerMillis * (60 / options.timeslotsPerHour) * 60 * 1000; $calEvent.css({top: pxTop, height: pxHeight || (pxPerMillis * 3600000 / options.timeslotsPerHour)}); }, /* * Determine the actual start and end times of a calevent based on it's * relative position within the weekday column and the starting hour of the * displayed calendar. */ _getEventDurationFromPositionedEventElement: function($weekDay, $calEvent, top) { var options = this.options; var startOffsetMillis = options.businessHours.limitDisplay ? options.businessHours.start * 3600000 : 0; var start = new Date($weekDay.data('startDate').getTime() + startOffsetMillis + Math.round(top / options.timeslotHeight) * options.millisPerTimeslot); var end = new Date(start.getTime() + ($calEvent.height() / options.timeslotHeight) * options.millisPerTimeslot); return {start: this._getDSTdayShift(start, -1), end: this._getDSTdayShift(end, -1)}; }, /* * If the calendar does not allow event overlap, adjust the start or end date if necessary to * avoid overlapping of events. Typically, shortens the resized / dropped event to it's max possible * duration based on the overlap. If no satisfactory adjustment can be made, the event is reverted to * it's original location. */ _adjustForEventCollisions: function($weekDay, $calEvent, newCalEvent, oldCalEvent, maintainEventDuration) { var options = this.options; if (options.allowCalEventOverlap) { return; } var adjustedStart, adjustedEnd; var self = this; $weekDay.find('.wc-cal-event').not($calEvent).each(function() { var currentCalEvent = $(this).data('calEvent'); //has been dropped onto existing event overlapping the end time if (newCalEvent.start.getTime() < currentCalEvent.end.getTime() && newCalEvent.end.getTime() >= currentCalEvent.end.getTime()) { adjustedStart = currentCalEvent.end; } //has been dropped onto existing event overlapping the start time if (newCalEvent.end.getTime() > currentCalEvent.start.getTime() && newCalEvent.start.getTime() <= currentCalEvent.start.getTime()) { adjustedEnd = currentCalEvent.start; } //has been dropped inside existing event with same or larger duration if (oldCalEvent.resizable == false || (newCalEvent.end.getTime() <= currentCalEvent.end.getTime() && newCalEvent.start.getTime() >= currentCalEvent.start.getTime())) { adjustedStart = oldCalEvent.start; adjustedEnd = oldCalEvent.end; return false; } }); newCalEvent.start = adjustedStart || newCalEvent.start; if (adjustedStart && maintainEventDuration) { newCalEvent.end = new Date(adjustedStart.getTime() + (oldCalEvent.end.getTime() - oldCalEvent.start.getTime())); self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, oldCalEvent); } else { newCalEvent.end = adjustedEnd || newCalEvent.end; } //reset if new cal event has been forced to zero size if (newCalEvent.start.getTime() >= newCalEvent.end.getTime()) { newCalEvent.start = oldCalEvent.start; newCalEvent.end = oldCalEvent.end; } $calEvent.data('calEvent', newCalEvent); }, /** * Add draggable capabilities to an event */ _addDraggableToCalEvent: function(calEvent, $calEvent) { var options = this.options; $calEvent.draggable({ handle: '.wc-time', containment: 'div.wc-time-slots', snap: '.wc-day-column-inner', snapMode: 'inner', snapTolerance: options.timeslotHeight - 1, revert: 'invalid', opacity: 0.5, grid: [$calEvent.outerWidth() + 1, options.timeslotHeight], start: function(event, ui) { var $calEvent = ui.draggable || ui.helper; options.eventDrag(calEvent, $calEvent); } }); }, /* * Add droppable capabilites to weekdays to allow dropping of calEvents only */ _addDroppableToWeekDay: function($weekDay) { var self = this; var options = this.options; $weekDay.droppable({ accept: '.wc-cal-event', drop: function(event, ui) { var $calEvent = ui.draggable; var top = Math.round(parseInt(ui.position.top)); var eventDuration = self._getEventDurationFromPositionedEventElement($weekDay, $calEvent, top); var calEvent = $calEvent.data('calEvent'); var newCalEvent = $.extend(true, {}, calEvent, {start: eventDuration.start, end: eventDuration.end}); var showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length; if (showAsSeparatedUser) { // we may have dragged the event on column with a new user. // nice way to handle that is: // - get the newly dragged on user // - check if user is part of the event // - if yes, nothing changes, if not, find the old owner to remove it and add new one var newUserId = $weekDay.data('wcUserId'); var userIdList = self._getEventUserId(calEvent); var oldUserId = $(ui.draggable.parents('.wc-day-column-inner').get(0)).data('wcUserId'); if (!$.isArray(userIdList)) { userIdList = [userIdList]; } if ($.inArray(newUserId, userIdList) == -1) { // remove old user var _index = $.inArray(oldUserId, userIdList); userIdList.splice(_index, 1); // add new user ? if ($.inArray(newUserId, userIdList) == -1) { userIdList.push(newUserId); } } newCalEvent = self._setEventUserId(newCalEvent, ((userIdList.length == 1) ? userIdList[0] : userIdList)); } self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, calEvent, true); var $weekDayColumns = self.element.find('.wc-day-column-inner'); //trigger drop callback options.eventDrop(newCalEvent, calEvent, $calEvent); var $newEvent = self._renderEvent(newCalEvent, self._findWeekDayForEvent(newCalEvent, $weekDayColumns)); $calEvent.hide(); $calEvent.data('preventClick', true); var $weekDayOld = self._findWeekDayForEvent($calEvent.data('calEvent'), self.element.find('.wc-time-slots .wc-day-column-inner')); if ($weekDayOld.data('startDate') != $weekDay.data('startDate')) { self._adjustOverlappingEvents($weekDayOld); } self._adjustOverlappingEvents($weekDay); setTimeout(function() { $calEvent.remove(); }, 1000); } }); }, /* * Add resizable capabilities to a calEvent */ _addResizableToCalEvent: function(calEvent, $calEvent, $weekDay) { var self = this; var options = this.options; $calEvent.resizable({ grid: options.timeslotHeight, containment: $weekDay, handles: 's', minHeight: options.timeslotHeight, stop: function(event, ui) { var $calEvent = ui.element; var newEnd = new Date($calEvent.data('calEvent').start.getTime() + Math.max(1, Math.round(ui.size.height / options.timeslotHeight)) * options.millisPerTimeslot); if (self._needDSTdayShift($calEvent.data('calEvent').start, newEnd)) newEnd = self._getDSTdayShift(newEnd, -1); var newCalEvent = $.extend(true, {}, calEvent, {start: calEvent.start, end: newEnd}); self._adjustForEventCollisions($weekDay, $calEvent, newCalEvent, calEvent); //trigger resize callback options.eventResize(newCalEvent, calEvent, $calEvent); self._refreshEventDetails(newCalEvent, $calEvent); self._positionEvent($weekDay, $calEvent); self._adjustOverlappingEvents($weekDay); $calEvent.data('preventClick', true); setTimeout(function() { $calEvent.removeData('preventClick'); }, 500); } }); $('.ui-resizable-handle', $calEvent).text('='); }, /* * Refresh the displayed details of a calEvent in the calendar */ _refreshEventDetails: function(calEvent, $calEvent) { var suffix = ''; if (!this.options.readonly && this.options.allowEventDelete && this.options.deletable(calEvent,$calEvent)) { suffix = '<div class="wc-cal-event-delete ui-icon ui-icon-close"></div>'; } $calEvent.find('.wc-time').html(this.options.eventHeader(calEvent, this.element) + suffix); $calEvent.find('.wc-title').html(this.options.eventBody(calEvent, this.element)); $calEvent.data('calEvent', calEvent); this.options.eventRefresh(calEvent, $calEvent); }, /* * Clear all cal events from the calendar */ _clearCalendar: function() { this.element.find('.wc-day-column-inner div').remove(); this._clearFreeBusys(); }, /* * Scroll the calendar to a specific hour */ _scrollToHour: function(hour, animate) { var self = this; var options = this.options; var $scrollable = this.element.find('.wc-scrollable-grid'); var slot = hour; if (self.options.businessHours.limitDisplay) { if (hour <= self.options.businessHours.start) { slot = 0; } else if (hour >= self.options.businessHours.end) { slot = self.options.businessHours.end - self.options.businessHours.start - 1; } else { slot = hour - self.options.businessHours.start; } } var $target = this.element.find('.wc-grid-timeslot-header .wc-hour-header:eq(' + slot + ')'); $scrollable.animate({scrollTop: 0}, 0, function() { var targetOffset = $target.offset().top; var scroll = targetOffset - $scrollable.offset().top - $target.outerHeight(); if (animate) { $scrollable.animate({scrollTop: scroll}, options.scrollToHourMillis); } else { $scrollable.animate({scrollTop: scroll}, 0); } }); }, /* * find the hour (12 hour day) for a given hour index */ _hourForIndex: function(index) { if (index === 0) { //midnight return 12; } else if (index < 13) { //am return index; } else { //pm return index - 12; } }, _24HourForIndex: function(index) { if (index === 0) { //midnight return '00:00'; } else if (index < 10) { return '0' + index + ':00'; } else { return index + ':00'; } }, _amOrPm: function(hourOfDay) { return hourOfDay < 12 ? 'AM' : 'PM'; }, _isToday: function(date) { var clonedDate = this._cloneDate(date); this._clearTime(clonedDate); var today = new Date(); this._clearTime(today); return today.getTime() === clonedDate.getTime(); }, /* * Clean events to ensure correct format */ _cleanEvents: function(events) { var self = this; $.each(events, function(i, event) { self._cleanEvent(event); }); return events; }, /* * Clean specific event */ _cleanEvent: function(event) { if (event.date) { event.start = event.date; } event.start = this._cleanDate(event.start); event.end = this._cleanDate(event.end); if (!event.end) { event.end = this._addDays(this._cloneDate(event.start), 1); } }, /* * Disable text selection of the elements in different browsers */ _disableTextSelect: function($elements) { $elements.each(function() { if ($.browser.mozilla) {//Firefox $(this).css('MozUserSelect', 'none'); } else if ($.browser.msie) {//IE $(this).bind('selectstart', function() { return false; }); } else {//Opera, etc. $(this).mousedown(function() { return false; }); } }); }, /* * returns the date on the first millisecond of the week */ _dateFirstDayOfWeek: function(date) { var self = this; var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var adjustedDate = new Date(midnightCurrentDate); adjustedDate.setDate(adjustedDate.getDate() - self._getAdjustedDayIndex(midnightCurrentDate)); return adjustedDate; }, /* * returns the date on the first millisecond of the last day of the week */ _dateLastDayOfWeek: function(date) { var self = this; var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var adjustedDate = new Date(midnightCurrentDate); var daysToAdd = (self.options.daysToShow - 1 - self._getAdjustedDayIndex(midnightCurrentDate)); adjustedDate.setDate(adjustedDate.getDate() + daysToAdd); return adjustedDate; }, /** * fix the date if it is not within given options * minDate and maxDate */ _fixMinMaxDate: function(date) { var minDate, maxDate; date = this._cleanDate(date); // not less than minDate if (this.options.minDate) { minDate = this._cleanDate(this.options.minDate); // midnight on minDate minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()); if (date.getTime() < minDate.getTime()) { this._trigger('reachedmindate', this.element, date); } date = this._cleanDate(Math.max(date.getTime(), minDate.getTime())); } // not more than maxDate if (this.options.maxDate) { maxDate = this._cleanDate(this.options.maxDate); // apply correction for max date if not startOnFirstDayOfWeek // to make sure no further date is displayed. // otherwise, the complement will still be shown if (!this._startOnFirstDayOfWeek()) { var day = maxDate.getDate() - this.options.daysToShow + 1; maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), day); } // microsecond before midnight on maxDate maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999); if (date.getTime() > maxDate.getTime()) { this._trigger('reachedmaxdate', this.element, date); } date = this._cleanDate(Math.min(date.getTime(), maxDate.getTime())); } return date; }, /* * gets the index of the current day adjusted based on options */ _getAdjustedDayIndex: function(date) { if (!this._startOnFirstDayOfWeek()) { return 0; } var midnightCurrentDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var currentDayOfStandardWeek = midnightCurrentDate.getDay(); var days = [0, 1, 2, 3, 4, 5, 6]; this._rotate(days, this._firstDayOfWeek()); return days[currentDayOfStandardWeek]; }, _firstDayOfWeek: function() { if ($.isFunction(this.options.firstDayOfWeek)) { return this.options.firstDayOfWeek(this.element); } return this.options.firstDayOfWeek; }, /* * returns the date on the last millisecond of the week */ _dateLastMilliOfWeek: function(date) { var lastDayOfWeek = this._dateLastDayOfWeek(date); lastDayOfWeek = this._cloneDate(lastDayOfWeek); lastDayOfWeek.setDate(lastDayOfWeek.getDate() + 1); return lastDayOfWeek; }, /* * Clear the time components of a date leaving the date * of the first milli of day */ _clearTime: function(d) { d.setHours(0); d.setMinutes(0); d.setSeconds(0); d.setMilliseconds(0); return d; }, /* * add specific number of days to date */ _addDays: function(d, n, keepTime) { d.setDate(d.getDate() + n); if (keepTime) { return d; } return this._clearTime(d); }, /* * Rotate an array by specified number of places. */ _rotate: function(a /*array*/, p /* integer, positive integer rotate to the right, negative to the left... */) { for (var l = a.length, p = (Math.abs(p) >= l && (p %= l), p < 0 && (p += l), p), i, x; p; p = (Math.ceil(l / p) - 1) * p - l + (l = p)) { for (i = l; i > p; x = a[--i], a[i] = a[i - p], a[i - p] = x) {} } return a; }, _cloneDate: function(d) { return new Date(d.getTime()); }, /** * Return a Date instance for different representations. * Valid representations are: * * timestamps * * Date objects * * textual representations (only these accepted by the Date * constructor) * * @return {Date} The clean date object. */ _cleanDate: function(d) { if (typeof d === 'string') { // if is numeric if (!isNaN(Number(d))) { return this._cleanDate(parseInt(d, 10)); } // this is a human readable date return Date.parse(d) || new Date(d); } if (typeof d == 'number') { return new Date(d); } return d; }, /* * date formatting is adapted from * http://jacwright.com/projects/javascript/date_format */ _formatDate: function(date, format) { var returnStr = ''; for (var i = 0; i < format.length; i++) { var curChar = format.charAt(i); if (i != 0 && format.charAt(i - 1) == '\\') { returnStr += curChar; } else if (this._replaceChars[curChar]) { returnStr += this._replaceChars[curChar](date, this); } else if (curChar != '\\') { returnStr += curChar; } } return returnStr; }, _replaceChars: { // Day d: function(date) { return (date.getDate() < 10 ? '0' : '') + date.getDate(); }, D: function(date, calendar) { return calendar.options.shortDays[date.getDay()]; }, j: function(date) { return date.getDate(); }, l: function(date, calendar) { return calendar.options.longDays[date.getDay()]; }, N: function(date) { var _d = date.getDay(); return _d ? _d : 7; }, S: function(date) { return (date.getDate() % 10 == 1 && date.getDate() != 11 ? 'st' : (date.getDate() % 10 == 2 && date.getDate() != 12 ? 'nd' : (date.getDate() % 10 == 3 && date.getDate() != 13 ? 'rd' : 'th'))); }, w: function(date) { return date.getDay(); }, z: function(date) { var d = new Date(date.getFullYear(), 0, 1); return Math.ceil((date - d) / 86400000); }, // Fixed now // Week W: function(date) { var d = new Date(date.getFullYear(), 0, 1); return Math.ceil((((date - d) / 86400000) + d.getDay() + 1) / 7); }, // Fixed now // Month F: function(date, calendar) { return calendar.options.longMonths[date.getMonth()]; }, m: function(date) { return (date.getMonth() < 9 ? '0' : '') + (date.getMonth() + 1); }, M: function(date, calendar) { return calendar.options.shortMonths[date.getMonth()]; }, n: function(date) { return date.getMonth() + 1; }, t: function(date) { var d = date; return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate() }, // Fixed now, gets #days of date // Year L: function(date) { var year = date.getFullYear(); return (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)); }, // Fixed now o: function(date) { var d = new Date(date.valueOf()); d.setDate(d.getDate() - ((date.getDay() + 6) % 7) + 3); return d.getFullYear();}, //Fixed now Y: function(date) { return date.getFullYear(); }, y: function(date) { return ('' + date.getFullYear()).substr(2); }, // Time a: function(date) { return date.getHours() < 12 ? 'am' : 'pm'; }, A: function(date) { return date.getHours() < 12 ? 'AM' : 'PM'; }, B: function(date) { return Math.floor((((date.getUTCHours() + 1) % 24) + date.getUTCMinutes() / 60 + date.getUTCSeconds() / 3600) * 1000 / 24); }, // Fixed now g: function(date) { return date.getHours() % 12 || 12; }, G: function(date) { return date.getHours(); }, h: function(date) { return ((date.getHours() % 12 || 12) < 10 ? '0' : '') + (date.getHours() % 12 || 12); }, H: function(date) { return (date.getHours() < 10 ? '0' : '') + date.getHours(); }, i: function(date) { return (date.getMinutes() < 10 ? '0' : '') + date.getMinutes(); }, s: function(date) { return (date.getSeconds() < 10 ? '0' : '') + date.getSeconds(); }, u: function(date) { var m = date.getMilliseconds(); return (m < 10 ? '00' : (m < 100 ? '0' : '')) + m; }, // Timezone e: function(date) { return 'Not Yet Supported'; }, I: function(date) { return 'Not Yet Supported'; }, O: function(date) { return (-date.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(date.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(date.getTimezoneOffset() / 60)) + '00'; }, P: function(date) { return (-date.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(date.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(date.getTimezoneOffset() / 60)) + ':00'; }, // Fixed now T: function(date) { var m = date.getMonth(); date.setMonth(0); var result = date.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1'); date.setMonth(m); return result;}, Z: function(date) { return -date.getTimezoneOffset() * 60; }, // Full Date/Time c: function(date, calendar) { return calendar._formatDate(date, 'Y-m-d\\TH:i:sP'); }, // Fixed now r: function(date, calendar) { return calendar._formatDate(date, 'D, d M Y H:i:s O'); }, U: function(date) { return date.getTime() / 1000; } }, /* USER MANAGEMENT FUNCTIONS */ getUserForId: function(id) { return $.extend({}, this.options.users[this._getUserIndexFromId(id)]); }, /** * return the user name for header */ _getUserName: function(index) { var self = this; var options = this.options; var user = options.users[index]; if ($.isFunction(options.getUserName)) { return options.getUserName(user, index, self.element); } else { return user; } }, /** * return the user id for given index */ _getUserIdFromIndex: function(index) { var self = this; var options = this.options; if ($.isFunction(options.getUserId)) { return options.getUserId(options.users[index], index, self.element); } return index; }, /** * returns the associated user index for given ID */ _getUserIndexFromId: function(id) { var self = this; var options = this.options; for (var i = 0; i < options.users.length; i++) { if (self._getUserIdFromIndex(i) == id) { return i; } } return 0; }, /** * return the user ids for given calEvent. * default is calEvent.userId field. */ _getEventUserId: function(calEvent) { var self = this; var options = this.options; if (options.showAsSeparateUsers && options.users && options.users.length) { if ($.isFunction(options.getEventUserId)) { return options.getEventUserId(calEvent, self.element); } return calEvent.userId; } return []; }, /** * sets the event user id on given calEvent * default is calEvent.userId field. */ _setEventUserId: function(calEvent, userId) { var self = this; var options = this.options; if ($.isFunction(options.setEventUserId)) { return options.setEventUserId(userId, calEvent, self.element); } calEvent.userId = userId; return calEvent; }, /** * return the user ids for given freeBusy. * default is freeBusy.userId field. */ _getFreeBusyUserId: function(freeBusy) { var self = this; var options = this.options; if ($.isFunction(options.getFreeBusyUserId)) { return options.getFreeBusyUserId(freeBusy.getOption(), self.element); } return freeBusy.getOption('userId'); }, /* FREEBUSY MANAGEMENT */ /** * ckean the free busy managers and remove all the freeBusy */ _clearFreeBusys: function() { if (this.options.displayFreeBusys) { var self = this, options = this.options, $freeBusyPlaceholders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'); $freeBusyPlaceholders.each(function() { $(this).data('wcFreeBusyManager', new FreeBusyManager({ start: self._cloneDate($(this).data('startDate')), end: self._cloneDate($(this).data('endDate')), defaultFreeBusy: options.defaultFreeBusy || {} })); }); self.element.find('.wc-grid-row-freebusy .wc-freebusy').remove(); } }, /** * retrieve placeholders for given freebusy */ _findWeekDaysForFreeBusy: function(freeBusy, $weekDays) { var $returnWeekDays, options = this.options, showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, self = this, userList = self._getFreeBusyUserId(freeBusy); if (!$.isArray(userList)) { userList = userList != 'undefined' ? [userList] : []; } if (!$weekDays) { $weekDays = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'); } $weekDays.each(function() { var manager = $(this).data('wcFreeBusyManager'), has_overlap = manager.isWithin(freeBusy.getStart()) || manager.isWithin(freeBusy.getEnd()) || freeBusy.isWithin(manager.getStart()) || freeBusy.isWithin(manager.getEnd()), userId = $(this).data('wcUserId'); if (has_overlap && (!showAsSeparatedUser || ($.inArray(userId, userList) != -1))) { $returnWeekDays = $returnWeekDays ? $returnWeekDays.add($(this)) : $(this); } }); return $returnWeekDays; }, /** * used to render all freeBusys */ _renderFreeBusys: function(freeBusys) { if (this.options.displayFreeBusys) { var self = this, $freeBusyPlaceholders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'), freebusysToRender; //insert freebusys to dedicated placeholders freebusy managers if ($.isArray(freeBusys)) { freebusysToRender = self._cleanFreeBusys(freeBusys); } else if (freeBusys.freebusys) { freebusysToRender = self._cleanFreeBusys(freeBusys.freebusys); } else { freebusysToRender = []; } $.each(freebusysToRender, function(index, freebusy) { var $placeholders = self._findWeekDaysForFreeBusy(freebusy, $freeBusyPlaceholders); if ($placeholders) { $placeholders.each(function() { var manager = $(this).data('wcFreeBusyManager'); manager.insertFreeBusy(new FreeBusy(freebusy.getOption())); $(this).data('wcFreeBusyManager', manager); }); } }); //now display freebusys on place holders self._refreshFreeBusys($freeBusyPlaceholders); } }, /** * refresh freebusys for given placeholders */ _refreshFreeBusys: function($freeBusyPlaceholders) { if (this.options.displayFreeBusys && $freeBusyPlaceholders) { var self = this, options = this.options, start = (options.businessHours.limitDisplay ? options.businessHours.start : 0), end = (options.businessHours.limitDisplay ? options.businessHours.end : 24); $freeBusyPlaceholders.each(function() { var $placehoder = $(this); var s = self._cloneDate($placehoder.data('startDate')), e = self._cloneDate(s); s.setHours(start); e.setHours(end); $placehoder.find('.wc-freebusy').remove(); $.each($placehoder.data('wcFreeBusyManager').getFreeBusys(s, e), function() { self._renderFreeBusy(this, $placehoder); }); }); } }, /** * render a freebusy item on dedicated placeholders */ _renderFreeBusy: function(freeBusy, $freeBusyPlaceholder) { if (this.options.displayFreeBusys) { var self = this, options = this.options, freeBusyHtml = '<div class="wc-freebusy"></div>'; var $fb = $(freeBusyHtml); $fb.data('wcFreeBusy', new FreeBusy(freeBusy.getOption())); this._positionFreeBusy($freeBusyPlaceholder, $fb); $fb = options.freeBusyRender(freeBusy.getOption(), $fb, self.element); if ($fb) { $fb.appendTo($freeBusyPlaceholder); } } }, /* * Position the freebusy element within the weekday based on it's start / end dates. */ _positionFreeBusy: function($placeholder, $freeBusy) { var options = this.options; var freeBusy = $freeBusy.data('wcFreeBusy'); var pxPerMillis = $placeholder.height() / options.millisToDisplay; var firstHourDisplayed = options.businessHours.limitDisplay ? options.businessHours.start : 0; var startMillis = freeBusy.getStart().getTime() - new Date(freeBusy.getStart().getFullYear(), freeBusy.getStart().getMonth(), freeBusy.getStart().getDate(), firstHourDisplayed).getTime(); var eventMillis = freeBusy.getEnd().getTime() - freeBusy.getStart().getTime(); var pxTop = pxPerMillis * startMillis; var pxHeight = pxPerMillis * eventMillis; $freeBusy.css({top: pxTop, height: pxHeight}); }, /* * Clean freebusys to ensure correct format */ _cleanFreeBusys: function(freebusys) { var self = this, freeBusyToReturn = []; if (!$.isArray(freebusys)) { var freebusys = [freebusys]; } $.each(freebusys, function(i, freebusy) { freeBusyToReturn.push(new FreeBusy(self._cleanFreeBusy(freebusy))); }); return freeBusyToReturn; }, /* * Clean specific freebusy */ _cleanFreeBusy: function(freebusy) { if (freebusy.date) { freebusy.start = freebusy.date; } freebusy.start = this._cleanDate(freebusy.start); freebusy.end = this._cleanDate(freebusy.end); return freebusy; }, /** * retrives the first freebusy manager matching demand. */ getFreeBusyManagersFor: function(date, users) { var calEvent = { start: date, end: date }; this._setEventUserId(calEvent, users); return this.getFreeBusyManagerForEvent(calEvent); }, /** * retrives the first freebusy manager for given event. */ getFreeBusyManagerForEvent: function(newCalEvent) { var self = this, options = this.options, freeBusyManager; if (options.displayFreeBusys) { var $freeBusyPlaceHoders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'), freeBusy = new FreeBusy({start: newCalEvent.start, end: newCalEvent.end}), showAsSeparatedUser = options.showAsSeparateUsers && options.users && options.users.length, userId = showAsSeparatedUser ? self._getEventUserId(newCalEvent) : null; if (!$.isArray(userId)) { userId = [userId]; } $freeBusyPlaceHoders.each(function() { var manager = $(this).data('wcFreeBusyManager'), has_overlap = manager.isWithin(freeBusy.getEnd()) || manager.isWithin(freeBusy.getEnd()) || freeBusy.isWithin(manager.getStart()) || freeBusy.isWithin(manager.getEnd()); if (has_overlap && (!showAsSeparatedUser || $.inArray($(this).data('wcUserId'), userId) != -1)) { freeBusyManager = $(this).data('wcFreeBusyManager'); return false; } }); } return freeBusyManager; }, /** * appends the freebusys to replace the old ones. * @param {array|object} freeBusys freebusy(s) to apply. */ updateFreeBusy: function(freeBusys) { var self = this, options = this.options; if (options.displayFreeBusys) { var $toRender, $freeBusyPlaceHoders = self.element.find('.wc-grid-row-freebusy .wc-column-freebusy'), _freeBusys = self._cleanFreeBusys(freeBusys); $.each(_freeBusys, function(index, _freeBusy) { var $weekdays = self._findWeekDaysForFreeBusy(_freeBusy, $freeBusyPlaceHoders); //if freebusy has a placeholder if ($weekdays && $weekdays.length) { $weekdays.each(function(index, day) { var manager = $(day).data('wcFreeBusyManager'); manager.insertFreeBusy(_freeBusy); $(day).data('wcFreeBusyManager', manager); }); $toRender = $toRender ? $toRender.add($weekdays) : $weekdays; } }); self._refreshFreeBusys($toRender); } }, /* NEW OPTIONS MANAGEMENT */ /** * checks wether or not the calendar should be displayed starting on first day of week */ _startOnFirstDayOfWeek: function() { return jQuery.isFunction(this.options.startOnFirstDayOfWeek) ? this.options.startOnFirstDayOfWeek(this.element) : this.options.startOnFirstDayOfWeek; }, /** * finds out the current scroll to apply it when changing the view */ _getCurrentScrollHour: function() { var self = this; var options = this.options; var $scrollable = this.element.find('.wc-scrollable-grid'); var scroll = $scrollable.scrollTop(); if (self.options.businessHours.limitDisplay) { scroll = scroll + options.businessHours.start * options.timeslotHeight * options.timeslotsPerHour; } return Math.round(scroll / (options.timeslotHeight * options.timeslotsPerHour)) + 1; }, _getJsonOptions: function() { if ($.isFunction(this.options.jsonOptions)) { return $.extend({}, this.options.jsonOptions(this.element)); } if ($.isPlainObject(this.options.jsonOptions)) { return $.extend({}, this.options.jsonOptions); } return {}; }, _getHeaderDate: function(date) { var options = this.options; if (options.getHeaderDate && $.isFunction(options.getHeaderDate)) { return options.getHeaderDate(date, this.element); } var dayName = options.useShortDayNames ? options.shortDays[date.getDay()] : options.longDays[date.getDay()]; return dayName + (options.headerSeparator) + this._formatDate(date, options.dateFormat); }, /** * returns corrected date related to DST problem */ _getDSTdayShift: function(date, shift) { var start = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0); var offset1 = start.getTimezoneOffset(); var offset2 = date.getTimezoneOffset(); if (offset1 == offset2) return date; shift = shift ? shift : 1; return new Date(date.getTime() - shift * (offset1 > offset2 ? -1 : 1) * (Math.max(offset1, offset2) - Math.min(offset1, offset2)) * 60000); }, _needDSTdayShift: function(date1, date2) { return date1.getTimezoneOffset() != date2.getTimezoneOffset(); } }; // end of widget function return })() //end of widget function closure execution ); // end of $.widget("ui.weekCalendar"... $.extend($.ui.weekCalendar, { version: '2.0-dev', updateLayoutOptions: { startOnFirstDayOfWeek: true, firstDayOfWeek: true, daysToShow: true, displayOddEven: true, timeFormat: true, dateFormat: true, use24Hour: true, useShortDayNames: true, businessHours: true, timeslotHeight: true, timeslotsPerHour: true, buttonText: true, height: true, shortMonths: true, longMonths: true, shortDays: true, longDays: true, textSize: true, users: true, showAsSeparateUsers: true, displayFreeBusys: true } }); var MILLIS_IN_DAY = 86400000; var MILLIS_IN_WEEK = MILLIS_IN_DAY * 7; /* FREE BUSY MANAGERS */ var FreeBusyProto = { getStart: function() {return this.getOption('start')}, getEnd: function() {return this.getOption('end')}, getOption: function() { if (!arguments.length) { return this.options } if (typeof(this.options[arguments[0]]) !== 'undefined') { return this.options[arguments[0]]; } else if (typeof(arguments[1]) !== 'undefined') { return arguments[1]; } return null; }, setOption: function(key, value) { if (arguments.length == 1) { $.extend(this.options, arguments[0]); return this; } this.options[key] = value; return this; }, isWithin: function(dateTime) {return Math.floor(dateTime.getTime() / 1000) >= Math.floor(this.getStart().getTime() / 1000) && Math.floor(dateTime.getTime() / 1000) <= Math.floor(this.getEnd().getTime() / 1000)}, isValid: function() {return this.getStart().getTime() < this.getEnd().getTime()} }; /** * @constructor * single user freebusy manager. */ var FreeBusy = function(options) { this.options = $.extend({}, options || {}); }; $.extend(FreeBusy.prototype, FreeBusyProto); var FreeBusyManager = function(options) { this.options = $.extend({ defaultFreeBusy: {} }, options || {}); this.freeBusys = []; this.freeBusys.push(new FreeBusy($.extend({ start: this.getStart(), end: this.getEnd() }, this.options.defaultFreeBusy))); }; $.extend(FreeBusyManager.prototype, FreeBusyProto, { /** * return matching freeBusys. * if you do not pass any argument, returns all freebusys. * if you only pass a start date, only matchinf freebusy will be returned. * if you pass 2 arguments, then all freebusys available within the time period will be returned * @param {Date} start [optionnal] if you do not pass end date, will return the freeBusy within which this date falls. * @param {Date} end [optionnal] the date where to stop the search. * @return {Array} an array of FreeBusy matching arguments. */ getFreeBusys: function() { switch (arguments.length) { case 0: return this.freeBusys; case 1: var freeBusy = []; var start = arguments[0]; if (!this.isWithin(start)) { return freeBusy; } $.each(this.freeBusys, function() { if (this.isWithin(start)) { freeBusy.push(this); } if (Math.floor(this.getEnd().getTime() / 1000) > Math.floor(start.getTime() / 1000)) { return false; } }); return freeBusy; default: //we assume only 2 first args are revealants var freeBusy = []; var start = arguments[0], end = arguments[1]; var tmpFreeBusy = new FreeBusy({start: start, end: end}); if (end.getTime() < start.getTime() || this.getStart().getTime() > end.getTime() || this.getEnd().getTime() < start.getTime()) { return freeBusy; } $.each(this.freeBusys, function() { if (this.getStart().getTime() >= end.getTime()) { return false; } if (tmpFreeBusy.isWithin(this.getStart()) && tmpFreeBusy.isWithin(this.getEnd())) { freeBusy.push(this); } else if (this.isWithin(tmpFreeBusy.getStart()) && this.isWithin(tmpFreeBusy.getEnd())) { var _f = new FreeBusy(this.getOption()); _f.setOption('end', tmpFreeBusy.getEnd()); _f.setOption('start', tmpFreeBusy.getStart()); freeBusy.push(_f); } else if (this.isWithin(tmpFreeBusy.getStart()) && this.getStart().getTime() < start.getTime()) { var _f = new FreeBusy(this.getOption()); _f.setOption('start', tmpFreeBusy.getStart()); freeBusy.push(_f); } else if (this.isWithin(tmpFreeBusy.getEnd()) && this.getEnd().getTime() > end.getTime()) { var _f = new FreeBusy(this.getOption()); _f.setOption('end', tmpFreeBusy.getEnd()); freeBusy.push(_f); } }); return freeBusy; } }, insertFreeBusy: function(freeBusy) { var freeBusy = new FreeBusy(freeBusy.getOption()); //first, if inserted freebusy is bigger than manager if (freeBusy.getStart().getTime() < this.getStart().getTime()) { freeBusy.setOption('start', this.getStart()); } if (freeBusy.getEnd().getTime() > this.getEnd().getTime()) { freeBusy.setOption('end', this.getEnd()); } var start = freeBusy.getStart(), end = freeBusy.getEnd(), startIndex = 0, endIndex = this.freeBusys.length - 1, newFreeBusys = []; var pushNewFreeBusy = function(_f) {if (_f.isValid()) newFreeBusys.push(_f);}; $.each(this.freeBusys, function(index) { //within the loop, we have following vars: // curFreeBusyItem: the current iteration freeBusy, part of manager freeBusys list // start: the insterted freeBusy start // end: the inserted freebusy end var curFreeBusyItem = this; if (curFreeBusyItem.isWithin(start) && curFreeBusyItem.isWithin(end)) { /* we are in case where inserted freebusy fits in curFreeBusyItem: curFreeBusyItem: *-----------------------------* freeBusy: *-------------* obviously, start and end indexes are this item. */ startIndex = index; endIndex = index; if (start.getTime() == curFreeBusyItem.getStart().getTime() && end.getTime() == curFreeBusyItem.getEnd().getTime()) { /* in this case, inserted freebusy is exactly curFreeBusyItem: curFreeBusyItem: *-----------------------------* freeBusy: *-----------------------------* just replace curFreeBusyItem with freeBusy. */ var _f1 = new FreeBusy(freeBusy.getOption()); pushNewFreeBusy(_f1); } else if (start.getTime() == curFreeBusyItem.getStart().getTime()) { /* in this case inserted freebusy starts with curFreeBusyItem: curFreeBusyItem: *-----------------------------* freeBusy: *--------------* just replace curFreeBusyItem with freeBusy AND the rest. */ var _f1 = new FreeBusy(freeBusy.getOption()); var _f2 = new FreeBusy(curFreeBusyItem.getOption()); _f2.setOption('start', end); pushNewFreeBusy(_f1); pushNewFreeBusy(_f2); } else if (end.getTime() == curFreeBusyItem.getEnd().getTime()) { /* in this case inserted freebusy ends with curFreeBusyItem: curFreeBusyItem: *-----------------------------* freeBusy: *--------------* just replace curFreeBusyItem with before part AND freeBusy. */ var _f1 = new FreeBusy(curFreeBusyItem.getOption()); _f1.setOption('end', start); var _f2 = new FreeBusy(freeBusy.getOption()); pushNewFreeBusy(_f1); pushNewFreeBusy(_f2); } else { /* in this case inserted freebusy is within curFreeBusyItem: curFreeBusyItem: *-----------------------------* freeBusy: *--------------* just replace curFreeBusyItem with before part AND freeBusy AND the rest. */ var _f1 = new FreeBusy(curFreeBusyItem.getOption()); var _f2 = new FreeBusy(freeBusy.getOption()); var _f3 = new FreeBusy(curFreeBusyItem.getOption()); _f1.setOption('end', start); _f3.setOption('start', end); pushNewFreeBusy(_f1); pushNewFreeBusy(_f2); pushNewFreeBusy(_f3); } /* as work is done, no need to go further. return false */ return false; } else if (curFreeBusyItem.isWithin(start) && curFreeBusyItem.getEnd().getTime() != start.getTime()) { /* in this case, inserted freebusy starts within curFreeBusyItem: curFreeBusyItem: *----------* freeBusy: *-------------------* set start index AND insert before part, we'll insert freebusy later */ if (curFreeBusyItem.getStart().getTime() != start.getTime()) { var _f1 = new FreeBusy(curFreeBusyItem.getOption()); _f1.setOption('end', start); pushNewFreeBusy(_f1); } startIndex = index; } else if (curFreeBusyItem.isWithin(end) && curFreeBusyItem.getStart().getTime() != end.getTime()) { /* in this case, inserted freebusy starts within curFreeBusyItem: curFreeBusyItem: *----------* freeBusy: *-------------------* set end index AND insert freebusy AND insert after part if needed */ pushNewFreeBusy(new FreeBusy(freeBusy.getOption())); if (end.getTime() < curFreeBusyItem.getEnd().getTime()) { var _f1 = new FreeBusy(curFreeBusyItem.getOption()); _f1.setOption('start', end); pushNewFreeBusy(_f1); } endIndex = index; return false; } }); //now compute arguments var tmpFB = this.freeBusys; this.freeBusys = []; if (startIndex) { this.freeBusys = this.freeBusys.concat(tmpFB.slice(0, startIndex)); } this.freeBusys = this.freeBusys.concat(newFreeBusys); if (endIndex < tmpFB.length) { this.freeBusys = this.freeBusys.concat(tmpFB.slice(endIndex + 1)); } /* if(start.getDate() == 1){ console.info('insert from '+freeBusy.getStart() +' to '+freeBusy.getEnd()); console.log('index from '+ startIndex + ' to ' + endIndex); var str = []; $.each(tmpFB, function(i){str.push(i + ": " + this.getStart().getHours() + ' > ' + this.getEnd().getHours() + ' ' + (this.getOption('free') ? 'free' : 'busy'))}); console.log(str.join('\n')); console.log('insert'); var str = []; $.each(newFreeBusys, function(i){str.push(this.getStart().getHours() + ' > ' + this.getEnd().getHours())}); console.log(str.join(', ')); console.log('results'); var str = []; $.each(this.freeBusys, function(i){str.push(i + ": " + this.getStart().getHours() + ' > ' + this.getEnd().getHours() + ' ' + (this.getOption('free') ? 'free' :'busy'))}); console.log(str.join('\n')); }*/ return this; } }); })(jQuery);
fortytools/jquery-week-calendar-rails
vendor/assets/javascripts/jquery.weekcalendar.js
JavaScript
mit
117,961
/* version: 0.3.156, born: 13-3-2014 1:29 */ var Organic = (function(w){ var o = { helpers: {}, lib: { atoms: {}, molecules: {} } } var require = function(v) { if(v == "./helpers/extend") { return o.helpers.extend; } else if(v == "/helpers/snippets" || v == "../../helpers/snippets") { return o.helpers.snippets; } else if(v == "/lib/atoms/atoms" || v == "../../lib/atoms/atoms" || v == "../atoms/atoms.js") { return o.lib.atoms.atoms; } else if(v == "../../helpers/units") { return o.helpers.units; } else if(v == "../../helpers/args") { return o.helpers.args; } else if(v == "path") { return { basename: function(f) { return f.split("/").pop(); } } } else { var moduleParts = v.split("/"); return (function getModule(currentModule) { var part = moduleParts.shift().replace(".js", ""); if(currentModule[part]) { if(moduleParts.length == 0) { return currentModule[part]; } else { return getModule(currentModule[part]) } } })(o); } } var __dirname = ''; var walkClientSide = function(res, obj, path) { if(typeof res == 'undefined') res = []; if(typeof obj == 'undefined') obj = o.lib; if(typeof path == 'undefined') path = "lib/"; for(var part in obj) { if(typeof obj[part] == 'function') { res.push(path + part + ".js"); } else { walkClientSide(res, obj[part], path + part + "/"); } } return res; };o.helpers.args = function(value) { value = value.toString().replace(/\/ /g, '/').split('/'); return value; } o.helpers.extend = function() { var process = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var result = arguments[0]; for(var i=1; i<arguments.length; i++) { result = process(result, arguments[i]); } return result; } o.helpers.snippets = function() { // http://peters-playground.com/Emmet-Css-Snippets-for-Sublime-Text-2/ return { // Visual Formatting "pos": "position", "pos:s": "position:static", "pos:a": "position:absolute", "pos:r": "position:relative", "pos:f": "position:fixed", // "top": "top", "t:a": "top:auto", "rig": "right", "r:a": "right:auto", "bot": "bottom", // "b:a": "bottom:auto", // breaks the multiple comma selectors "lef": "left", "l:a": "left:auto", "zin": "z-index", "z:a": "z-index:auto", "fl": "float", "fl:n": "float:none", "fl:l": "float:left", "fl:r": "float:right", "cl": "clear", "cl:n": "clear:none", "cl:l": "clear:left", "cl:r": "clear:right", "cl:b": "clear:both", "dis": "display", "d:n": "display:none", "d:b": "display:block", "d:i": "display:inline", "d:ib": "display:inline-block", "d:li": "display:list-item", "d:ri": "display:run-in", "d:cp": "display:compact", "d:tb": "display:table", "d:itb": "display:inline-table", "d:tbcp": "display:table-caption", "d:tbcl": "display:table-column", "d:tbclg": "display:table-column-group", "d:tbhg": "display:table-header-group", "d:tbfg": "display:table-footer-group", "d:tbr": "display:table-row", "d:tbrg": "display:table-row-group", "d:tbc": "display:table-cell", "d:rb": "display:ruby", "d:rbb": "display:ruby-base", "d:rbbg": "display:ruby-base-group", "d:rbt": "display:ruby-text", "d:rbtg": "display:ruby-text-group", "vis": "visibility", "v:v": "visibility:visible", "v:h": "visibility:hidden", "v:c": "visibility:collapse", "ov": "overflow", "ov:v": "overflow:visible", "ov:h": "overflow:hidden", "ov:s": "overflow:scroll", "ov:a": "overflow:auto", "ovx": "overflow-x", "ovx:v": "overflow-x:visible", "ovx:h": "overflow-x:hidden", "ovx:s": "overflow-x:scroll", "ovx:a": "overflow-x:auto", "ovy": "overflow-y", "ovy:v": "overflow-y:visible", "ovy:h": "overflow-y:hidden", "ovy:s": "overflow-y:scroll", "ovy:a": "overflow-y:auto", "ovs": "overflow-style", "ovs:a": "overflow-style:auto", "ovs:s": "overflow-style:scrollbar", "ovs:p": "overflow-style:panner", "ovs:m": "overflow-style:move", "ovs:mq": "overflow-style:marquee", "zoo": "zoom:1", "cp": "clip", "cp:a": "clip:auto", "cp:r": "clip:rect()", "rz": "resize", "rz:n": "resize:none", "rz:b": "resize:both", "rz:h": "resize:horizontal", "rz:v": "resize:vertical", "cur": "cursor", "cur:a": "cursor:auto", "cur:d": "cursor:default", "cur:c": "cursor:crosshair", "cur:ha": "cursor:hand", "cur:he": "cursor:help", "cur:m": "cursor:move", "cur:p": "cursor:pointer", "cur:t": "cursor:text", // Margin & Padding "mar": "margin", "m:au": "margin:0 auto", "mt": "margin-top", "mt:a": "margin-top:auto", "mr": "margin-right", "mr:a": "margin-right:auto", "mb": "margin-bottom", "mb:a": "margin-bottom:auto", "ml": "margin-left", "ml:a": "margin-left:auto", "pad": "padding", "pt": "padding-top", "pr": "padding-right", "pb": "padding-bottom", "pl": "padding-left", // Box Sizing "bxz": "box-sizing", "bxz:cb": "box-sizing:content-box", "bxz:bb": "box-sizing:border-box", "bxsh": "box-shadow", "bxsh:n": "box-shadow:none", "bxsh+": "box-shadow:0 0 0 #000", "wid": "width", "w:a": "width:auto", "hei": "height", "h:a": "height:auto", "maw": "max-width", "maw:n": "max-width:none", "mah": "max-height", "mah:n": "max-height:none", "miw": "min-width", "mih": "min-height", // Font "fon": "font", "fon+": "font:1em Arial, sans-serif", "fw": "font-weight", "fw:n": "font-weight:normal", "fw:b": "font-weight:bold", "fw:br": "font-weight:bolder", "fw:lr": "font-weight:lighter", "fs": "font-style", "fs:n": "font-style:normal", "fs:i": "font-style:italic", "fs:o": "font-style:oblique", "fv": "font-variant", "fv:n": "font-variant:normal", "fv:sc": "font-variant:small-caps", "fz": "font-size", "fza": "font-size-adjust", "fza:n": "font-size-adjust:none", "ff": "font-family", "ff:s": "font-family:serif", "ff:ss": "font-family:sans-serif", "ff:c": "font-family:cursive", "ff:f": "font-family:fantasy", "ff:m": "font-family:monospace", "fef": "font-effect", "fef:n": "font-effect:none", "fef:eg": "font-effect:engrave", "fef:eb": "font-effect:emboss", "fef:o": "font-effect:outline", "fem": "font-emphasize", "femp": "font-emphasize-position", "femp:b": "font-emphasize-position:before", "femp:a": "font-emphasize-position:after", "fems": "font-emphasize-style", "fems:n": "font-emphasize-style:none", "fems:ac": "font-emphasize-style:accent", "fems:dt": "font-emphasize-style:dot", "fems:c": "font-emphasize-style:circle", "fems:ds": "font-emphasize-style:disc", "fsm": "font-smooth", "fsm:au": "font-smooth:auto", "fsm:n": "font-smooth:never", "fsm:al": "font-smooth:always", "fst": "font-stretch", "fst:n": "font-stretch:normal", "fst:uc": "font-stretch:ultra-condensed", "fst:ec": "font-stretch:extra-condensed", "fst:c": "font-stretch:condensed", "fst:sc": "font-stretch:semi-condensed", "fst:se": "font-stretch:semi-expanded", "fst:e": "font-stretch:expanded", "fst:ee": "font-stretch:extra-expanded", "fst:ue": "font-stretch:ultra-expanded", // Text "va": "vertical-align", "va:sup": "vertical-align:super", "va:t": "vertical-align:top", "va:tt": "vertical-align:text-top", "va:m": "vertical-align:middle", "va:bl": "vertical-align:baseline", "va:b": "vertical-align:bottom", "va:tb": "vertical-align:text-bottom", "va:sub": "vertical-align:sub", "ta": "text-align", "ta:le": "text-align:left", "ta:c": "text-align:center", "ta:r": "text-align:right", "ta:j": "text-align:justify", "tal": "text-align-last", "tal:a": "text-align-last:auto", "tal:l": "text-align-last:left", "tal:c": "text-align-last:center", "tal:r": "text-align-last:right", "ted": "text-decoration", "ted:n": "text-decoration:none", "ted:u": "text-decoration:underline", "ted:o": "text-decoration:overline", "ted:l": "text-decoration:line-through", "te": "text-emphasis", "te:n": "text-emphasis:none", "te:ac": "text-emphasis:accent", "te:dt": "text-emphasis:dot", "te:c": "text-emphasis:circle", "te:ds": "text-emphasis:disc", "te:b": "text-emphasis:before", "te:a": "text-emphasis:after", "teh": "text-height", "teh:a": "text-height:auto", "teh:f": "text-height:font-size", "teh:t": "text-height:text-size", "teh:m": "text-height:max-size", "ti": "text-indent", "ti:-": "text-indent:-9999px", "tj": "text-justify", "tj:a": "text-justify:auto", "tj:iw": "text-justify:inter-word", "tj:ii": "text-justify:inter-ideograph", "tj:ic": "text-justify:inter-cluster", "tj:d": "text-justify:distribute", "tj:k": "text-justify:kashida", "tj:t": "text-justify:tibetan", "tol": "text-outline", "tol+": "text-outline:0 0 #000", "tol:n": "text-outline:none", "tr": "text-replace", "tr:n": "text-replace:none", "tt": "text-transform", "tt:n": "text-transform:none", "tt:c": "text-transform:capitalize", "tt:u": "text-transform:uppercase", "tt:l": "text-transform:lowercase", "tw": "text-wrap", "tw:n": "text-wrap:normal", "tw:no": "text-wrap:none", "tw:u": "text-wrap:unrestricted", "tw:s": "text-wrap:suppress", "tsh": "text-shadow", "tsh+": "text-shadow:0 0 0 #000", "tsh:n": "text-shadow:none", "lh": "line-height", "lts": "letter-spacing", "whs": "white-space", "whs:n": "white-space:normal", "whs:p": "white-space:pre", "whs:nw": "white-space:nowrap", "whs:pw": "white-space:pre-wrap", "whs:pl": "white-space:pre-line", "whsc": "white-space-collapse", "whsc:n": "white-space-collapse:normal", "whsc:k": "white-space-collapse:keep-all", "whsc:l": "white-space-collapse:loose", "whsc:bs": "white-space-collapse:break-strict", "whsc:ba": "white-space-collapse:break-all", "wob": "word-break", "wob:n": "word-break:normal", "wob:k": "word-break:keep-all", "wob:l": "word-break:loose", "wob:bs": "word-break:break-strict", "wob:ba": "word-break:break-all", "wos": "word-spacing", "wow": "word-wrap", "wow:nm": "word-wrap:normal", "wow:n": "word-wrap:none", "wow:u": "word-wrap:unrestricted", "wow:s": "word-wrap:suppress", // Background "bg": "background", "bg+": "background:#fff url() 0 0 no-repeat", "bg:n": "background:none", "bgc": "background-color:#fff", "bgc:t": "background-color:transparent", "bgi": "background-image:url()", "bgi:n": "background-image:none", "bgr": "background-repeat", "bgr:r": "background-repeat:repeat", "bgr:n": "background-repeat:no-repeat", "bgr:x": "background-repeat:repeat-x", "bgr:y": "background-repeat:repeat-y", "bga": "background-attachment", "bga:f": "background-attachment:fixed", "bga:s": "background-attachment:scroll", "bgp": "background-position:0 0", "bgpx": "background-position-x", "bgpy": "background-position-y", "bgbk": "background-break", "bgbk:bb": "background-break:bounding-box", "bgbk:eb": "background-break:each-box", "bgbk:c": "background-break:continuous", "bgcp": "background-clip", "bgcp:bb": "background-clip:border-box", "bgcp:pb": "background-clip:padding-box", "bgcp:cb": "background-clip:content-box", "bgcp:nc": "background-clip:no-clip", "bgo": "background-origin", "bgo:pb": "background-origin:padding-box", "bgo:bb": "background-origin:border-box", "bgo:cb": "background-origin:content-box", "bgz": "background-size", "bgz:a": "background-size:auto", "bgz:ct": "background-size:contain", "bgz:cv": "background-size:cover", // Color "col": "color:#000", "op": "opacity", "hsl": "hsl(359,100%,100%)", "hsla": "hsla(359,100%,100%,0.5)", "rgb": "rgb(255,255,255)", "rgba": "rgba(255,255,255,0.5)", // Generated Content "ct": "content", "ct:n": "content:normal", "ct:oq": "content:open-quote", "ct:noq": "content:no-open-quote", "ct:cq": "content:close-quote", "ct:ncq": "content:no-close-quote", "ct:a": "content:attr()", "ct:c": "content:counter()", "ct:cs": "content:counters()", "quo": "quotes", "q:n": "quotes:none", "q:ru": "quotes:'\00AB' '\00BB' '\201E' '\201C'", "q:en": "quotes:'\201C' '\201D' '\2018' '\2019'", "coi": "counter-increment", "cor": "counter-reset", // Outline "out": "outline", "o:n": "outline:none", "oo": "outline-offset", "ow": "outline-width", "os": "outline-style", "oc": "outline-color:#000", "oc:i": "outline-color:invert", // Table "tbl": "table-layout", "tbl:a": "table-layout:auto", "tbl:f": "table-layout:fixed", "cps": "caption-side", "cps:t": "caption-side:top", "cps:b": "caption-side:bottom", "ec": "empty-cells", "ec:s": "empty-cells:show", "ec:h": "empty-cells:hide", // Border "bd": "border", "bd+": "border:1px solid #000", "bd:n": "border:none", "bdbk": "border-break", "bdbk:c": "border-break:close", "bdcl": "border-collapse", "bdcl:c": "border-collapse:collapse", "bdcl:s": "border-collapse:separate", "bdc": "border-color:#000", "bdi": "border-image:url()", "bdi:n": "border-image:none", "bdti": "border-top-image:url()", "bdti:n": "border-top-image:none", "bdri": "border-right-image:url()", "bdri:n": "border-right-image:none", "bdbi": "border-bottom-image:url()", "bdbi:n": "border-bottom-image:none", "bdli": "border-left-image:url()", "bdli:n": "border-left-image:none", "bdci": "border-corner-image:url()", "bdci:n": "border-corner-image:none", "bdci:c": "border-corner-image:continue", "bdtli": "border-top-left-image:url()", "bdtli:n": "border-top-left-image:none", "bdtli:c": "border-top-left-image:continue", "bdtri": "border-top-right-image:url()", "bdtri:n": "border-top-right-image:none", "bdtri:c": "border-top-right-image:continue", "bdbri": "border-bottom-right-image:url()", "bdbri:n": "border-bottom-right-image:none", "bdbri:c": "border-bottom-right-image:continue", "bdbli": "border-bottom-left-image:url()", "bdbli:n": "border-bottom-left-image:none", "bdbli:c": "border-bottom-left-image:continue", "bdf": "border-fit", "bdf:c": "border-fit:clip", "bdf:r": "border-fit:repeat", "bdf:sc": "border-fit:scale", "bdf:st": "border-fit:stretch", "bdf:ow": "border-fit:overwrite", "bdf:of": "border-fit:overflow", "bdf:sp": "border-fit:space", "bdlt": "border-length", "bdlt:a": "border-length:auto", "bdsp": "border-spacing", "bds": "border-style", "bds:n": "border-style:none", "bds:h": "border-style:hidden", "bds:dt": "border-style:dotted", "bds:ds": "border-style:dashed", "bds:s": "border-style:solid", "bds:db": "border-style:double", "bds:dd": "border-style:dot-dash", "bds:ddd": "border-style:dot-dot-dash", "bds:w": "border-style:wave", "bds:g": "border-style:groove", "bds:r": "border-style:ridge", "bds:i": "border-style:inset", "bds:o": "border-style:outset", "bdw": "border-width", "bdt": "border-top", "bdt+": "border-top:1px solid #000", "bdt:n": "border-top:none", "bdtw": "border-top-width", "bdts": "border-top-style", "bdts:n": "border-top-style:none", "bdtc": "border-top-color:#000", "bdr": "border-right", "bdr+": "border-right:1px solid #000", "bdr:n": "border-right:none", "bdrw": "border-right-width", "bdrs": "border-right-style", "bdrs:n": "border-right-style:none", "bdrc": "border-right-color:#000", "bdb": "border-bottom", "bdb+": "border-bottom:1px solid #000", "bdb:n": "border-bottom:none", "bdbw": "border-bottom-width", "bdbs": "border-bottom-style", "bdbs:n": "border-bottom-style:none", "bdbc": "border-bottom-color:#000", "bdl": "border-left", "bdl+": "border-left:1px solid #000", "bdl:n": "border-left:none", "bdlw": "border-left-width", "bdls": "border-left-style", "bdls:n": "border-left-style:none", "bdlc": "border-left-color:#000", "bdrsa": "border-radius", "bdtrrs": "border-top-right-radius", "bdtlrs": "border-top-left-radius", "bdbrrs": "border-bottom-right-radius", "bdblrs": "border-bottom-left-radius", // Lists "lis": "list-style", "lis:n": "list-style:none", "lisp": "list-style-position", "lisp:i": "list-style-position:inside", "lisp:o": "list-style-position:outside", "list": "list-style-type", "list:n": "list-style-type:none", "list:d": "list-style-type:disc", "list:c": "list-style-type:circle", "list:s": "list-style-type:square", "list:dc": "list-style-type:decimal", "list:dclz": "list-style-type:decimal-leading-zero", "list:lr": "list-style-type:lower-roman", "list:ur": "list-style-type:upper-roman", "lisi": "list-style-image", "lisi:n": "list-style-image:none", // Print "pgbb": "page-break-before", "pgbb:au": "page-break-before:auto", "pgbb:al": "page-break-before:always", "pgbb:l": "page-break-before:left", "pgbb:r": "page-break-before:right", "pgbi": "page-break-inside", "pgbi:au": "page-break-inside:auto", "pgbi:av": "page-break-inside:avoid", "pgba": "page-break-after", "pgba:au": "page-break-after:auto", "pgba:al": "page-break-after:always", "pgba:l": "page-break-after:left", "pgba:r": "page-break-after:right", "orp": "orphans", "widows": "widows", // Others "ipt": "!important", "ffa": "@font-family {<br>&nbsp;&nbsp;font-family:;<br>&nbsp;&nbsp;src:url();<br>}", "ffa+": "@font-family {<br>&nbsp;&nbsp;font-family: 'FontName';<br>&nbsp;&nbsp;src: url('FileName.eot');<br>&nbsp;&nbsp;src: url('FileName.eot?#iefix') format('embedded-opentype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.woff') format('woff'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.ttf') format('truetype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.svg#FontName') format('svg');<br>&nbsp;&nbsp;font-style: normal;<br>&nbsp;&nbsp;font-weight: normal;<br>}", "imp": "@import url()", "mp": "@media print {}", "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop')", "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'", "trf": "transform", "trf:r": "transform:rotate(90deg)", "trf:sc": "transform:scale(x,y)", "trf:scx": "transform:scaleX(x)", "trf:scy": "transform:scaleY(y)", "trf:skx": "transform:skewX(90deg)", "trf:sky": "transform:skewY(90deg)", "trf:t": "transform:translate(x,y)", "trf:tx": "transform:translateX(x)", "trf:ty": "transform:translateY(y)", "trs": "transition", "trsde": "transition-delay", "trsdu": "transition-duration", "trsp": "transition-property", "trstf": "transition-timing-function", "ani": "animation", "ann": "animation-name", "adu": "animation-duration", "atf": "animation-timing-function", "ade": "animation-delay", "aic": "animation-iteration-count", "adi": "animation-direction", "aps": "animation-play-state", "key": "@keyframes {}", "ms": "@media screen and () {}", "in": "inherit", "tra": "transparent", "beh": "behavior:url()", "cha": "@charset''", // Pseudo Class "ac": " :active{}", "ac:a": "&:active{}", "af": " :after{}", "af:a": "&:after{}", "be": " :before{}", "be:a": "&:before{}", "ch": " :checked{}", "ch:a": "&:checked{}", "dsa": " :disabled{}<i>[da]</i>", "dsa:a": "&:disabled{}<i>[da:a]</i>", "en": " :enabled{}", "en:a": "&:enabled{}", "fc": " :first-child{}", "fc:a": "&:first-child{}", "fle": " :first-letter{}", "fle:a": "&:first-letter{}", "fli": " :first-line{}", "fli:a": "&:first-line{}", "foc": " :focus{}", "foc:a": "&:focus{}", "ho": " :hover{}", "ho:a": "&:hover{}", "ln": " :lang(){}", "ln:a": "&:lang(){}", "lc": " :last-child{}", "lc:a": "&:last-child{}", // "li": " :link{}", // "li:a": "&:link{}", "nc": " :nth-child(){}", "nc:a": "&:nth-child(){}", "vit": " :visited{}", "vit:a": "&:visited{}", "tgt": " :target{}", "tgt:a": "&:target{}", "fot": " :first-of-type{}", "fot:a": "&:first-of-type{}", "lot": " :last-of-type{}", "lot:a": "&:last-of-type{}", "not": " :nth-of-type(){}", "not:a": "&:nth-of-type(){}", // Scss & Sass "ext": "@extend", "inc": "@include", "mix": "@mixin", "ieh": "ie-hex-str()" }; } o.helpers.units = function(v, def) { if(!v.toString().match(/[%|in|cm|mm|em|ex|pt|pc|px|deg|ms|s]/)) return v + (def || '%'); else return v; } var extend = require("./helpers/extend"), fs = require('fs'), path = require('path') var walk = function(dir) { return walkClientSide(); var results = []; var list = fs.readdirSync(dir); for(var i=0; i<list.length; i++) { var file = dir + '/' + list[i]; var stat = fs.statSync(file); if (stat && stat.isDirectory()) { results = results.concat(walk(file)); } else { results.push(file); } } return results; }; o.index = { absurd: null, init: function(decoration) { if(typeof decoration != 'undefined') { this.absurd = decoration; } // getting atoms and molecules var files = walk(__dirname + "/lib/"), self = this; for(var i=0; i<files.length; i++) { var file = path.basename(files[i]); (function(m) { var module = require(m); self.absurd.plugin(file.replace(".js", ""), function(absurd, value) { return module(value); }); })(files[i]); } // converting snippets to plugins var snippets = require(__dirname + "/helpers/snippets")(); for(var atom in snippets) { atom = atom.split(":"); (function(pluginName) { self.absurd.plugin(pluginName, function(absurd, value, prefixes) { if(prefixes === false) { prefixes = ''; } var s, r = {}; if(s = snippets[pluginName + ':' + value]) { s = s.split(':'); r[prefixes + s[0]] = s[1] || ''; } else if(s = snippets[pluginName]){ r[prefixes + s] = value; } return r; }); })(atom.shift()); } return this; } } o.lib.atoms.atoms = function(value) { var toObj = function(value, r) { value = value.replace(/( )?:( )?/, ':').split(':'); r = r || {}; r[value[0]] = value[1] || ''; return r; } var processArr = function(value) { var r = {}; for(var i=0; i<value.length; i++) { toObj(value[i], r); } return r; } if(typeof value == 'string') { return processArr(value.replace(/( )?\/( )?/g, '/').split('/')); } else if(typeof value == 'object') { if(!(value instanceof Array)) { return value; } else { return processArr(value); } } } /*! Animate.css - http://daneden.me/animate Licensed under the MIT license Copyright (c) 2013 Daniel Eden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ o.lib.molecules.animate = function(value) { var r = {}; r['-wmso-animation-name'] = ''; r['-wmso-animation-duration'] = '1s', name = ''; if(typeof value === 'string') { r['-wmso-animation-name'] = value; } else if(typeof value === 'object') { if(value instanceof Array) { if(value.length === 1) { r['-wmso-animation-name'] = value[0]; } else if(value.length === 2) { r = { keyframes: { name: value[0], frames: value[1] } }; } else { value = r = {}; } } else { r['-wmso-animation-name'] = value.name; value.duration ? r['-wmso-animation-duration'] = value.duration : ''; value.fillMode ? r['-wmso-animation-fill-mode'] = value.fillMode : ''; value.timingFunction ? r['-wmso-animation-timing-function'] = value.timingFunction : ''; value.iterationCount ? r['-wmso-animation-iteration-count'] = value.iterationCount : ''; value.delay ? r['-wmso-animation-delay'] = value.delay : ''; value.direction ? r['-wmso-animation-direction'] = value.direction : ''; value.playState ? r['-wmso-animation-play-state'] = value.playState : ''; if(value.frames) { r.keyframes = { name: value.name, frames: value.frames } } } } switch(r['-wmso-animation-name']) { case "blink": r.keyframes = { name: "blink", frames: { "0%, 100%": { transparent: 0 }, "50%": { transparent: 1 } } } break; case "bounce": r.keyframes = { name: "bounce", frames: { "0%, 20%, 50%, 80%, 100%": { "-wmso-transform": "translateY(0)" }, "40%": { "-wmso-transform": "translateY(-30px)" }, "60%": { "-wmso-transform": "translateY(-15px)" } } } break; case "flash": r.keyframes = { name: "flash", frames: { "0%, 50%, 100%": { "opacity": "1" }, "25%, 75%": { "opacity": "0" } } } break; case "pulse": r.keyframes = { name: "pulse", frames: { "0%": { "-wmso-transform": "scale(1)" }, "50%": { "-wmso-transform": "scale(1.1)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "shake": r.keyframes = { name: "shake", frames: { "0%, 100%": { "-wmso-transform": "translateX(0)" }, "10%, 30%, 50%, 70%, 90%": { "-wmso-transform": "translateX(-10px)" }, "20%, 40%, 60%, 80%": { "-wmso-transform": "translateX(10px)" } } } break; case "swing": r.keyframes = { name: "swing", frames: { "20%": { "-wmso-transform": "rotate(15deg)" }, "40%": { "-wmso-transform": "rotate(-10deg)" }, "60%": { "-wmso-transform": "rotate(5deg)" }, "80%": { "-wmso-transform": "rotate(-5deg)" }, "100%": { "-wmso-transform": "rotate(0deg)" } } } break; case "tada": r.keyframes = { name: "tada", frames: { "0%": { "-wmso-transform": "scale(1)" }, "10%, 20%": { "-wmso-transform": "scale(0.9) rotate(-3deg)" }, "30%, 50%, 70%, 90%": { "-wmso-transform": "scale(1.1) rotate(3deg)" }, "40%, 60%, 80%": { "-wmso-transform": "scale(1.1) rotate(-3deg)" }, "100%": { "-wmso-transform": "scale(1) rotate(0)" } } } break; case "wobble": r.keyframes = { name: "wobble", frames: { "0%": { "-wmso-transform": "translateX(0%)" }, "15%": { "-wmso-transform": "translateX(-25%) rotate(-5deg)" }, "30%": { "-wmso-transform": "translateX(20%) rotate(3deg)" }, "45%": { "-wmso-transform": "translateX(-15%) rotate(-3deg)" }, "60%": { "-wmso-transform": "translateX(10%) rotate(2deg)" }, "75%": { "-wmso-transform": "translateX(-5%) rotate(-1deg)" }, "100%": { "-wmso-transform": "translateX(0%)" } } } break; case "bounceIn": r.keyframes = { name: "bounceIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "scale(.3)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.05)" }, "70%": { "-wmso-transform": "scale(.9)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "bounceInDown": r.keyframes = { name: "bounceInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(30px)" }, "80%": { "-wmso-transform": "translateY(-10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceInLeft": r.keyframes = { name: "bounceInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(30px)" }, "80%": { "-wmso-transform": "translateX(-10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInRight": r.keyframes = { name: "bounceInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(-30px)" }, "80%": { "-wmso-transform": "translateX(10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInUp": r.keyframes = { name: "bounceInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(-30px)" }, "80%": { "-wmso-transform": "translateY(10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceOut": r.keyframes = { name: "bounceOut", frames: { "0%": { "-wmso-transform": "scale(1)" }, "25%": { "-wmso-transform": "scale(.95)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.1)" }, "100%": { "opacity": "0", "-wmso-transform": "scale(.3)" } } } break; case "bounceOutDown": r.keyframes = { name: "bounceOutDown", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "bounceOutLeft": r.keyframes = { name: "bounceOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "bounceOutRight": r.keyframes = { name: "bounceOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "bounceOutUp": r.keyframes = { name: "bounceOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "fadeIn": r.keyframes = { name: "fadeIn", frames: { "0%": { "opacity": "0" }, "100%": { "opacity": "1" } } } break; case "fadeInDown": r.keyframes = { name: "fadeInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInDownBig": r.keyframes = { name: "fadeInDownBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInLeft": r.keyframes = { name: "fadeInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInLeftBig": r.keyframes = { name: "fadeInLeftBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRight": r.keyframes = { name: "fadeInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRightBig": r.keyframes = { name: "fadeInRightBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInUp": r.keyframes = { name: "fadeInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInUpBig": r.keyframes = { name: "fadeInUpBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeOut": r.keyframes = { name: "fadeOut", frames: { "0%": { "opacity": "1" }, "100%": { "opacity": "0" } } } break; case "fadeOutDown": r.keyframes = { name: "fadeOutDown", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(20px)" } } } break; case "fadeOutDownBig": r.keyframes = { name: "fadeOutDownBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "fadeOutLeft": r.keyframes = { name: "fadeOutLeft", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" } } } break; case "fadeOutLeftBig": r.keyframes = { name: "fadeOutLeftBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "fadeOutRight": r.keyframes = { name: "fadeOutRight", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(20px)" } } } break; case "fadeOutRightBig": r.keyframes = { name: "fadeOutRightBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "fadeOutUp": r.keyframes = { name: "fadeOutUp", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" } } } break; case "fadeOutUpBig": r.keyframes = { name: "fadeOutUpBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "flip": r.keyframes = { name: "flip", frames: { "0%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(0) scale(1)", "animation-timing-function": "ease-out" }, "40%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(170deg) scale(1)", "animation-timing-function": "ease-out" }, "50%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(190deg) scale(1)", "animation-timing-function": "ease-in" }, "80%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(.95)", "animation-timing-function": "ease-in" }, "100%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(1)", "animation-timing-function": "ease-in" } } } break; case "flipInX": r.keyframes = { name: "flipInX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateX(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateX(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" } } } break; case "flipInY": r.keyframes = { name: "flipInY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateY(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateY(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" } } } break; case "flipOutX": r.keyframes = { name: "flipOutX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" } } } break; case "flipOutY": r.keyframes = { name: "flipOutY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" } } } break; case "lightSpeedIn": r.keyframes = { name: "lightSpeedIn", frames: { "0%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" }, "60%": { "-wmso-transform": "translateX(-20%) skewX(30deg)", "opacity": "1" }, "80%": { "-wmso-transform": "translateX(0%) skewX(-15deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" } } } break; case "lightSpeedOut": r.keyframes = { name: "lightSpeedOut", frames: { "0%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" } } } break; case "rotateIn": r.keyframes = { name: "rotateIn", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(-200deg)", "opacity": "0" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownLeft": r.keyframes = { name: "rotateInDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownRight": r.keyframes = { name: "rotateInDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpLeft": r.keyframes = { name: "rotateInUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpRight": r.keyframes = { name: "rotateInUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateOut": r.keyframes = { name: "rotateOut", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(200deg)", "opacity": "0" } } } break; case "rotateOutDownLeft": r.keyframes = { name: "rotateOutDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "rotateOutDownRight": r.keyframes = { name: "rotateOutDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpLeft": r.keyframes = { name: "rotateOutUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpRight": r.keyframes = { name: "rotateOutUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "slideInDown": r.keyframes = { name: "slideInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "slideInLeft": r.keyframes = { name: "slideInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideInRight": r.keyframes = { name: "slideInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideOutLeft": r.keyframes = { name: "slideOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "slideOutRight": r.keyframes = { name: "slideOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "slideOutUp": r.keyframes = { name: "slideOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "hinge": r.keyframes = { name: "hinge", frames: { "0%": { "-wmso-transform": "rotate(0)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "20%, 60%": { "-wmso-transform": "rotate(80deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "40%": { "-wmso-transform": "rotate(60deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "80%": { "-wmso-transform": "rotate(60deg) translateY(0)", "opacity": "1", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "100%": { "-wmso-transform": "translateY(700px)", "opacity": "0" } } } break; case "rollIn": r.keyframes = { name: "rollIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-100%) rotate(-120deg)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" } } } break; case "rollOut": r.keyframes = { name: "rollOut", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(100%) rotate(120deg)" } } } break; } return r; } o.lib.molecules.blur = function(value) { return { '-wms-filter': 'blur(' + value + 'px)' } } o.lib.molecules.brightness = function(value) { return { '-wms-filter': 'brightness(' + value + ')' } } o.lib.molecules.calc = function(value) { var args = require('../../helpers/args')(value), r = {}; r['LhProperty'] = '0'; r['~~1~~' + args[0]] = '-webkit-calc(' + args[1] + ')'; r['~~2~~' + args[0]] = '-moz-calc(' + args[1] + ')'; r['~~3~~' + args[0]] = 'calc(' + args[1] + ')'; return r; } o.lib.molecules.cf = function(value) { var r = {}, clearing = { content: '" "', display: 'table', clear: 'both' }; switch(value) { case 'before': r['&:before'] = clearing; break; case 'after': r['&:after'] = clearing; break; default: r['&:before'] = clearing; r['&:after'] = clearing; break; } return r; } o.lib.molecules.contrast = function(value) { return { '-wms-filter': 'contrast(' + value + '%)' } } o.lib.molecules.dropshadow = function(value) { return { '-wms-filter': 'drop-shadow(' + value + ')' } } var getMSColor = function(color) { color = color.toString().replace('#', ''); if(color.length == 3) { var tmp = ''; for(var i=0; i<color.length; i++) { tmp += color[i] + color[i]; } color = tmp; } return '#FF' + color.toUpperCase(); } o.lib.molecules.gradient = function(value) { var r = {}, args = require('../../helpers/args')(value); switch(typeof value) { case 'string': var deg = args[args.length-1]; if(deg.indexOf('deg') > 0) { deg = parseInt(args.pop().replace('deg', '')); } else { deg = 0; } var numOfStops = args.length, stepsPercents = Math.floor(100 / (numOfStops-1)).toFixed(2), gradientValue = [], msGradientType = (deg >= 45 && deg <= 135) || (deg >= 225 && deg <= 315) ? 1 : 0, msStartColor = msGradientType === 0 ? getMSColor(args[args.length-1]) : getMSColor(args[0]), msEndColor = msGradientType === 0 ? getMSColor(args[0]) : getMSColor(args[args.length-1]); for(var i=0; i<numOfStops; i++) { if(args[i].indexOf('%') > 0) { gradientValue.push(args[i]); } else { gradientValue.push(args[i] + ' ' + (i*stepsPercents) + '%'); } } gradientValue = deg + 'deg, ' + gradientValue.join(', '); return [ { 'background': '-webkit-linear-gradient(' + gradientValue + ')' }, { '~~1~~background': '-moz-linear-gradient(' + gradientValue + ')' }, { '~~2~~background': '-ms-linear-gradient(' + gradientValue + ')' }, { '~~3~~background': '-o-linear-gradient(' + gradientValue + ')' }, { '~~4~~background': 'linear-gradient(' + gradientValue + ')' }, { 'filter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\', endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' }, { 'MsFilter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\',endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' } ] break; } return {}; } o.lib.molecules.grid = function(value) { var args = require('../../helpers/args')(value); if(args.length == 2) { var res = { cf: 'both' } res[args[1]] = { fl: 'l', '-mw-bxz': 'bb', wid: (100 / parseInt(args[0])).toFixed(2) + '%' } return res; } else { return {}; } } o.lib.molecules.invert = function(value) { return { '-wms-filter': 'invert(' + value + '%)' } } o.lib.molecules.moveto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), x = units(!args[0] || args[0] == '' ? 0 : args[0], 'px'), y = units(!args[1] || args[1] == '' ? 0 : args[1], 'px'), z = units(!args[2] || args[2] == '' ? 0 : args[2], 'px'); if(args.length == 2) { return {"-ws-trf": ">translate(" + x + "," + y + ")"}; } else if(args.length == 3) { return {"-ws-trf": ">translate3d(" + x + "," + y + "," + z + ")"}; } } o.lib.molecules.rotateto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value); if(args.length == 1) { return {"-ws-trf": ">rotate(" + units(args[0], 'deg') + ")"}; } } o.lib.molecules.saturate = function(value) { return { '-wms-filter': 'saturate(' + value + 'deg)' } } o.lib.molecules.scaleto = function(value) { var args = require('../../helpers/args')(value), x = !args[0] || args[0] == '' ? 0 : args[0], y = !args[1] || args[1] == '' ? 0 : args[1]; if(args.length == 2) { return {"-ws-trf": ">scale(" + x + "," + y + ")"}; } } o.lib.molecules.sepia = function(value) { return { '-wms-filter': 'sepia(' + value + '%)' } } o.lib.molecules.size = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), r = {}; if(args.length == 2) { if(args[0] != '') { r.width = units(args[0]); } if(args[1] != '') { r.height = units(args[1]); } return r; } else { return { width: units(args[0]), height: units(args[0]) } } } o.lib.molecules.transparent = function(value) { var args = require('../../helpers/args')(value), r = {}; value = parseFloat(value); r['-s-filter'] = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=' + (value * 100) + ')'; r['filter'] = 'alpha(opacity=' + (value * 100) + ')'; r['-m-opacity'] = value; r['opacity'] = value; r['KhtmlOpacity'] = value; return r; } o.lib.molecules.trsform = function(value) { return { '-wmso-transform': value } }; return o.index; })(window);
viskin/cdnjs
ajax/libs/absurd/0.3.156/absurd.organic.js
JavaScript
mit
50,969
/* version: 0.0.49 */ var Absurd = (function(w) { var lib = { api: {}, helpers: {}, plugins: {}, processors: { css: { plugins: {}}, html: { plugins: {}} } }; var require = function(v) { switch(v) { case "/../processors/html/HTML.js": return lib.processors.html.HTML; break; } return function() {} }; var __dirname = ""; var client = function() { return function(arg) { /******************************************* Copied directly from /lib/API.js */ var extend = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var _api = { defaultProcessor: lib.processors.css.CSS() }, _rules = {}, _storage = {}, _plugins = {}, _hooks = {}; _api.getRules = function(stylesheet) { if(typeof stylesheet === 'undefined') { return _rules; } else { if(typeof _rules[stylesheet] === 'undefined') { _rules[stylesheet] = []; } return _rules[stylesheet]; } } _api.getPlugins = function() { return _plugins; } _api.getStorage = function() { return _storage; } _api.flush = function() { _rules = {}; _storage = []; } _api.import = function() { if(_api.callHooks("import", arguments)) return _api; return _api; } // hooks _api.addHook = function(method, callback) { if(!_hooks[method]) _hooks[method] = []; var isAlreadyAdded = false; for(var i=0; c=_hooks[method][i]; i++) { if(c === callback) { isAlreadyAdded = true; } } isAlreadyAdded === false ? _hooks[method].push(callback) : null; } _api.callHooks = function(method, args) { if(_hooks[method]) { for(var i=0; c=_hooks[method][i]; i++) { if(c.apply(_api, args) === true) return true; } } return false; } // internal variables _api.numOfAddedRules = 0; /******************************************* Copied directly from /lib/API.js */ // client side specific methods _api.compile = function(callback, options) { if(_api.callHooks("compile", arguments)) return _api; var defaultOptions = { combineSelectors: true, minify: false, processor: _api.defaultProcessor }; options = extend(defaultOptions, options || {}); options.processor( _api.getRules(), callback || function() {}, {combineSelectors: true} ); _api.flush(); } // registering api methods for(var method in lib.api) { if(method !== "compile") { _api[method] = lib.api[method](_api); _api[method] = (function(method) { return function() { var f = lib.api[method](_api); if(_api.callHooks(method, arguments)) return _api; return f.apply(_api, arguments); } })(method); } } // registering plugins for(var pluginName in lib.plugins) { _api.plugin(pluginName, lib.plugins[pluginName]()); } // accept function if(typeof arg === "function") { arg(_api); } return _api; } } lib.api.add = function(API) { var checkAndExecutePlugin = function(selector, prop, value, stylesheet) { var plugin = API.getPlugins()[prop]; if(typeof plugin !== 'undefined') { var pluginResponse = plugin(API, value); if(pluginResponse) { addRule(selector, pluginResponse, stylesheet); } return true; } else { return false; } } var clearing = function(props) { // plugins var plugins = API.getPlugins(); for(var prop in props) { if(typeof plugins[prop] !== 'undefined') { props[prop] = false; } } // pseudo classes for(var prop in props) { if(prop.charAt(0) === ":") { props[prop] = false; } } } var checkForNesting = function(selector, props, stylesheet) { for(var prop in props) { if(typeof props[prop] === 'object') { // check for pseudo classes if(prop.charAt(0) === ":") { addRule(selector + prop, props[prop], stylesheet); // check for media query } else if(prop.indexOf("@media") === 0 || prop.indexOf("@supports") === 0) { addRule(selector, props[prop], prop); // check for plugins } else if(checkAndExecutePlugin(selector, prop, props[prop], stylesheet) === false) { addRule(selector + " " + prop, props[prop], stylesheet); } props[prop] = false; } else if(typeof props[prop] === 'function') { props[prop] = props[prop](); checkForNesting(selector, props, stylesheet); } else { if(checkAndExecutePlugin(selector, prop, props[prop], stylesheet)) { props[prop] = false; } } } } var addRule = function(selector, props, stylesheet) { // if array is passed as props if(typeof props.length !== 'undefined' && typeof props === "object") { for(var i=0; prop=props[i]; i++) { addRule(selector, prop, stylesheet); } return; } // check for plugin if(checkAndExecutePlugin(null, selector, props, stylesheet)) { return; } // if the selector is already there if(typeof API.getRules(stylesheet || "mainstream")[selector] == 'object') { var current = API.getRules(stylesheet || "mainstream")[selector]; for(var propNew in props) { // overwrite already added value current[propNew] = props[propNew]; } // no, the selector is still not added } else { API.getRules(stylesheet || "mainstream")[selector] = props; } checkForNesting(selector, props, stylesheet || "mainstream"); clearing(props); } var add = function(rules, stylesheet) { API.numOfAddedRules += 1; for(var selector in rules) { if(typeof rules[selector].length !== 'undefined' && typeof rules[selector] === "object") { for(var i=0; r=rules[selector][i]; i++) { addRule(selector, r, stylesheet || "mainstream"); } } else { addRule(selector, rules[selector], stylesheet || "mainstream"); } } return API; } return add; } var extend = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; lib.api.compile = function(api) { return function() { var path = null, callback = null, options = null; for(var i=0; i<arguments.length; i++) { switch(typeof arguments[i]) { case "function": callback = arguments[i]; break; case "string": path = arguments[i]; break; case "object": options = arguments[i]; break; } } var _defaultOptions = { combineSelectors: true, minify: false, processor: api.defaultProcessor }; options = extend(_defaultOptions, options || {}); options.processor( api.getRules(), function(err, result) { if(path != null) { try { fs.writeFile(path, result, function (err) { callback(err, result); }); } catch(err) { callback(err); } } else { callback(err, result); } api.flush(); }, options ); } } lib.api.compileFile = function(api) { return api.compile; } var ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; }; lib.api.darken = function(api) { return function(color, percents) { return ColorLuminance(color, -(percents/100)); } } lib.api.hook = function(api) { return function(method, callback) { api.addHook(method, callback); return api; } } var ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; }; lib.api.lighten = function(api) { return function(color, percents) { return ColorLuminance(color, percents/100); } } var metamorphosis = { html: function(api) { api.defaultProcessor = require(__dirname + "/../processors/html/HTML.js")(); api.hook("add", function(tags, template) { api.getRules(template || "mainstream").push(tags); return true; }); } } lib.api.morph = function(api) { return function(type) { if(metamorphosis[type]) { api.flush(); metamorphosis[type](api); } return api; } } lib.api.plugin = function(api) { var plugin = function(name, func) { api.getPlugins()[name] = func; return api; } return plugin; } lib.api.raw = function(api) { return function(raw) { var o = {}, v = {}; var id = "____raw_" + api.numOfAddedRules; v[id] = raw; o[id] = v; api.add(o); return api; } } lib.api.register = function(api) { return function(method, func) { api[method] = func; return api; } } lib.api.storage = function(API) { var _s = API.getStorage(); var storage = function(name, value) { if(typeof value != "undefined") { _s[name] = value; } else { if(_s[name]) { return _s[name]; } else { throw new Error("There is no data in the storage associated with '" + name + "'"); } } return API; } return storage; } // credits: http://www.sitepoint.com/javascript-generate-lighter-darker-color/ lib.helpers.ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; } lib.helpers.RequireUncached = function(module) { delete require.cache[require.resolve(module)] return require(module); } var cleanCSS = require('clean-css'), newline = '\n', defaultOptions = { combineSelectors: true, minify: false }; var toCSS = function(rules) { var css = ''; for(var selector in rules) { // handling raw content if(selector.indexOf("____raw") === 0) { css += rules[selector][selector] + newline; // handling normal styles } else { var entity = selector + ' {' + newline; for(var prop in rules[selector]) { var value = rules[selector][prop]; if(value === "") { value = '""'; } entity += ' ' + transformUppercase(prop) + ': ' + value + ';' + newline; } entity += '}' + newline; css += entity; } } return css; } // dealing with false values var filterRules = function(rules) { var arr = {}; for(var selector in rules) { var areThereAnyProps = false; var props = {}; for(var prop in rules[selector]) { var value = rules[selector][prop]; if(value !== false) { areThereAnyProps = true; props[prop] = value; } } if(areThereAnyProps) { arr[selector] = props; } } return arr; } // combining selectors var combineSelectors = function(rules) { var map = {}, arr = {}; // creating the map for(var selector in rules) { var props = rules[selector]; for(var prop in props) { var value = props[prop]; if(!map[prop]) map[prop] = {}; if(!map[prop][value]) map[prop][value] = []; map[prop][value].push(selector); } } // converting the map to usual rules object for(var prop in map) { var values = map[prop]; for(var value in values) { var selectors = values[value]; if(!arr[selectors.join(", ")]) arr[selectors.join(", ")] = {} var selector = arr[selectors.join(", ")]; selector[prop] = value; } } return arr; } // transform uppercase to [-lowercase] var transformUppercase = function(prop) { var transformed = ""; for(var i=0; c=prop.charAt(i); i++) { if(c === c.toUpperCase() && c.toLowerCase() !== c.toUpperCase()) { transformed += "-" + c.toLowerCase(); } else { transformed += c; } } return transformed; } lib.processors.css.CSS = function() { return function(rules, callback, options) { options = options || defaultOptions; var css = ''; for(var stylesheet in rules) { var r = filterRules(rules[stylesheet]); r = options.combineSelectors ? combineSelectors(r) : r; if(stylesheet === "mainstream") { css += toCSS(r); } else { css += stylesheet + " {" + newline + toCSS(r) + "}" + newline; } } // Minification if(options.minify) { css = cleanCSS.process(css); if(callback) callback(null, css); } else { if(callback) callback(null, css); } return css; } } lib.processors.css.plugins.charset = function() { return function(api, charsetValue) { if(typeof charsetValue === "string") { api.raw("@charset: \"" + charsetValue + "\";"); } else if(typeof charsetValue === "object") { charsetValue = charsetValue.charset.replace(/:/g, '').replace(/'/g, '').replace(/"/g, '').replace(/ /g, ''); api.raw("@charset: \"" + charsetValue + "\";"); } } } lib.processors.css.plugins.document = function() { return function(api, value) { if(typeof value === "object") { var stylesheet = ''; stylesheet += '@' + value.vendor + 'document'; stylesheet += ' ' + value.document; if(value.rules && value.rules.length) { for(var i=0; rule=value.rules[i]; i++) { api.handlecssrule(rule, stylesheet); } } else if(typeof value.styles != "undefined") { api.add(value.styles, stylesheet); } } } } lib.processors.css.plugins.keyframes = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { // js or json if(typeof value.frames != "undefined") { var content = '@keyframes ' + value.name + " {\n"; content += processor({mainstream: value.frames}); content += "}"; api.raw(content + "\n" + content.replace("@keyframes", "@-webkit-keyframes")); // css } else if(typeof value.keyframes != "undefined") { var content = '@keyframes ' + value.name + " {\n"; var frames = {}; for(var i=0; rule=value.keyframes[i]; i++) { if(rule.type === "keyframe") { var f = frames[rule.values] = {}; for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { f[declaration.property] = declaration.value; } } } } content += processor({mainstream: frames}); content += "}"; api.raw(content + "\n" + content.replace("@keyframes", "@-webkit-keyframes")); } } } } lib.processors.css.plugins.media = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { var content = '@media ' + value.media + " {\n"; var rules = {}; for(var i=0; rule=value.rules[i]; i++) { var r = rules[rule.selectors.toString()] = {}; if(rule.type === "rule") { for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { r[declaration.property] = declaration.value; } } } } content += processor({mainstream: rules}); content += "}"; api.raw(content); } } } lib.processors.css.plugins.namespace = function() { return function(api, value) { if(typeof value === "string") { api.raw("@namespace: \"" + value + "\";"); } else if(typeof value === "object") { value = value.namespace.replace(/: /g, '').replace(/'/g, '').replace(/"/g, '').replace(/ /g, '').replace(/:h/g, 'h'); api.raw("@namespace: \"" + value + "\";"); } } } lib.processors.css.plugins.page = function() { return function(api, value) { if(typeof value === "object") { var content = ""; if(value.selectors.length > 0) { content += "@page " + value.selectors.join(", ") + " {\n"; } else { content += "@page {\n"; } for(var i=0; declaration=value.declarations[i]; i++) { if(declaration.type == "declaration") { content += " " + declaration.property + ": " + declaration.value + ";\n"; } } content += "}"; api.raw(content); } } } lib.processors.css.plugins.supports = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { var content = '@supports ' + value.supports + " {\n"; var rules = {}; for(var i=0; rule=value.rules[i]; i++) { var r = rules[rule.selectors.toString()] = {}; if(rule.type === "rule") { for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { r[declaration.property] = declaration.value; } } } } content += processor({mainstream: rules}); content += "}"; api.raw(content); } } } var data = null, newline = '\n', defaultOptions = {}, tags = []; var transformUppercase = function(prop) { var transformed = ""; for(var i=0; c=prop.charAt(i); i++) { if(c === c.toUpperCase() && c.toLowerCase() !== c.toUpperCase()) { transformed += "-" + c.toLowerCase(); } else { transformed += c; } } return transformed; } var processTemplate = function(templateName) { var html = ''; for(var template in data) { if(template == templateName) { var numOfRules = data[template].length; for(var i=0; i<numOfRules; i++) { html += process('', data[template][i]); } } } return html; } var process = function(tagName, obj) { // console.log("------------------------\n", tagName, ">", obj); var html = '', attrs = '', childs = ''; if(typeof obj === "string") { return packTag(tagName, attrs, obj); } var addToChilds = function(value) { if(childs != '') { childs += newline; } childs += value; } // process directives for(var directiveName in obj) { var value = obj[directiveName]; switch(directiveName) { case "_attrs": for(var attrName in value) { if(typeof value[attrName] === "function") { attrs += " " + transformUppercase(attrName) + "=\"" + value[attrName]() + "\""; } else { attrs += " " + transformUppercase(attrName) + "=\"" + value[attrName] + "\""; } } obj[directiveName] = false; break; case "_": addToChilds(value); obj[directiveName] = false; break; case "_tpl": if(typeof value == "string") { addToChilds(processTemplate(value)); } else if(typeof value == "object" && value.length && value.length > 0) { var tmp = ''; for(var i=0; tpl=value[i]; i++) { tmp += processTemplate(tpl) if(i < value.length-1) tmp += newline; } addToChilds(tmp); } obj[directiveName] = false; break; } } for(var name in obj) { var value = obj[name]; if(value !== false) { switch(typeof value) { case "string": addToChilds(process(name, value)); break; case "object": if(value.length && value.length > 0) { var tmp = ''; for(var i=0; v=value[i]; i++) { tmp += process('', typeof v == "function" ? v() : v); if(i < value.length-1) tmp += newline; } addToChilds(process(name, tmp)); } else { addToChilds(process(name, value)); } break; case "function": addToChilds(process(name, value())); break; } } } if(tagName != '') { html += packTag(tagName, attrs, childs); } else { html += childs; } return html; } var packTag = function(tagName, attrs, childs) { var html = ''; if(childs !== '') { html += '<' + transformUppercase(tagName) + attrs + '>' + newline + childs + newline + '</' + transformUppercase(tagName) + '>'; } else { html += '<' + transformUppercase(tagName) + attrs + '/>'; } return html; } lib.processors.html.HTML = function() { return function(rules, callback, options) { data = rules; callback = callback || function() {}; options = options || defaultOptions; var html = processTemplate("mainstream"); callback(null, html); return html; } }; return client(); })(window);
Amomo/cdnjs
ajax/libs/absurd/0.0.50/absurd.js
JavaScript
mit
20,876
/* version: 0.3.145, born: 10-2-2014 16:20 */ var Organic = (function(w){ var o = { helpers: {}, lib: { atoms: {}, molecules: {} } } var require = function(v) { if(v == "./helpers/extend") { return o.helpers.extend; } else if(v == "/helpers/snippets" || v == "../../helpers/snippets") { return o.helpers.snippets; } else if(v == "/lib/atoms/atoms" || v == "../../lib/atoms/atoms" || v == "../atoms/atoms.js") { return o.lib.atoms.atoms; } else if(v == "../../helpers/units") { return o.helpers.units; } else if(v == "../../helpers/args") { return o.helpers.args; } else if(v == "path") { return { basename: function(f) { return f.split("/").pop(); } } } else { var moduleParts = v.split("/"); return (function getModule(currentModule) { var part = moduleParts.shift().replace(".js", ""); if(currentModule[part]) { if(moduleParts.length == 0) { return currentModule[part]; } else { return getModule(currentModule[part]) } } })(o); } } var __dirname = ''; var walkClientSide = function(res, obj, path) { if(typeof res == 'undefined') res = []; if(typeof obj == 'undefined') obj = o.lib; if(typeof path == 'undefined') path = "lib/"; for(var part in obj) { if(typeof obj[part] == 'function') { res.push(path + part + ".js"); } else { walkClientSide(res, obj[part], path + part + "/"); } } return res; };o.helpers.args = function(value) { value = value.toString().replace(/\/ /g, '/').split('/'); return value; } o.helpers.extend = function() { var process = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var result = arguments[0]; for(var i=1; i<arguments.length; i++) { result = process(result, arguments[i]); } return result; } o.helpers.snippets = function() { // http://peters-playground.com/Emmet-Css-Snippets-for-Sublime-Text-2/ return { // Visual Formatting "pos": "position", "pos:s": "position:static", "pos:a": "position:absolute", "pos:r": "position:relative", "pos:f": "position:fixed", // "top": "top", "t:a": "top:auto", "rig": "right", "r:a": "right:auto", "bot": "bottom", // "b:a": "bottom:auto", // breaks the multiple comma selectors "lef": "left", "l:a": "left:auto", "zin": "z-index", "z:a": "z-index:auto", "fl": "float", "fl:n": "float:none", "fl:l": "float:left", "fl:r": "float:right", "cl": "clear", "cl:n": "clear:none", "cl:l": "clear:left", "cl:r": "clear:right", "cl:b": "clear:both", "dis": "display", "d:n": "display:none", "d:b": "display:block", "d:i": "display:inline", "d:ib": "display:inline-block", "d:li": "display:list-item", "d:ri": "display:run-in", "d:cp": "display:compact", "d:tb": "display:table", "d:itb": "display:inline-table", "d:tbcp": "display:table-caption", "d:tbcl": "display:table-column", "d:tbclg": "display:table-column-group", "d:tbhg": "display:table-header-group", "d:tbfg": "display:table-footer-group", "d:tbr": "display:table-row", "d:tbrg": "display:table-row-group", "d:tbc": "display:table-cell", "d:rb": "display:ruby", "d:rbb": "display:ruby-base", "d:rbbg": "display:ruby-base-group", "d:rbt": "display:ruby-text", "d:rbtg": "display:ruby-text-group", "vis": "visibility", "v:v": "visibility:visible", "v:h": "visibility:hidden", "v:c": "visibility:collapse", "ov": "overflow", "ov:v": "overflow:visible", "ov:h": "overflow:hidden", "ov:s": "overflow:scroll", "ov:a": "overflow:auto", "ovx": "overflow-x", "ovx:v": "overflow-x:visible", "ovx:h": "overflow-x:hidden", "ovx:s": "overflow-x:scroll", "ovx:a": "overflow-x:auto", "ovy": "overflow-y", "ovy:v": "overflow-y:visible", "ovy:h": "overflow-y:hidden", "ovy:s": "overflow-y:scroll", "ovy:a": "overflow-y:auto", "ovs": "overflow-style", "ovs:a": "overflow-style:auto", "ovs:s": "overflow-style:scrollbar", "ovs:p": "overflow-style:panner", "ovs:m": "overflow-style:move", "ovs:mq": "overflow-style:marquee", "zoo": "zoom:1", "cp": "clip", "cp:a": "clip:auto", "cp:r": "clip:rect()", "rz": "resize", "rz:n": "resize:none", "rz:b": "resize:both", "rz:h": "resize:horizontal", "rz:v": "resize:vertical", "cur": "cursor", "cur:a": "cursor:auto", "cur:d": "cursor:default", "cur:c": "cursor:crosshair", "cur:ha": "cursor:hand", "cur:he": "cursor:help", "cur:m": "cursor:move", "cur:p": "cursor:pointer", "cur:t": "cursor:text", // Margin & Padding "mar": "margin", "m:au": "margin:0 auto", "mt": "margin-top", "mt:a": "margin-top:auto", "mr": "margin-right", "mr:a": "margin-right:auto", "mb": "margin-bottom", "mb:a": "margin-bottom:auto", "ml": "margin-left", "ml:a": "margin-left:auto", "pad": "padding", "pt": "padding-top", "pr": "padding-right", "pb": "padding-bottom", "pl": "padding-left", // Box Sizing "bxz": "box-sizing", "bxz:cb": "box-sizing:content-box", "bxz:bb": "box-sizing:border-box", "bxsh": "box-shadow", "bxsh:n": "box-shadow:none", "bxsh+": "box-shadow:0 0 0 #000", "wid": "width", "w:a": "width:auto", "hei": "height", "h:a": "height:auto", "maw": "max-width", "maw:n": "max-width:none", "mah": "max-height", "mah:n": "max-height:none", "miw": "min-width", "mih": "min-height", // Font "fon": "font", "fon+": "font:1em Arial, sans-serif", "fw": "font-weight", "fw:n": "font-weight:normal", "fw:b": "font-weight:bold", "fw:br": "font-weight:bolder", "fw:lr": "font-weight:lighter", "fs": "font-style", "fs:n": "font-style:normal", "fs:i": "font-style:italic", "fs:o": "font-style:oblique", "fv": "font-variant", "fv:n": "font-variant:normal", "fv:sc": "font-variant:small-caps", "fz": "font-size", "fza": "font-size-adjust", "fza:n": "font-size-adjust:none", "ff": "font-family", "ff:s": "font-family:serif", "ff:ss": "font-family:sans-serif", "ff:c": "font-family:cursive", "ff:f": "font-family:fantasy", "ff:m": "font-family:monospace", "fef": "font-effect", "fef:n": "font-effect:none", "fef:eg": "font-effect:engrave", "fef:eb": "font-effect:emboss", "fef:o": "font-effect:outline", "fem": "font-emphasize", "femp": "font-emphasize-position", "femp:b": "font-emphasize-position:before", "femp:a": "font-emphasize-position:after", "fems": "font-emphasize-style", "fems:n": "font-emphasize-style:none", "fems:ac": "font-emphasize-style:accent", "fems:dt": "font-emphasize-style:dot", "fems:c": "font-emphasize-style:circle", "fems:ds": "font-emphasize-style:disc", "fsm": "font-smooth", "fsm:au": "font-smooth:auto", "fsm:n": "font-smooth:never", "fsm:al": "font-smooth:always", "fst": "font-stretch", "fst:n": "font-stretch:normal", "fst:uc": "font-stretch:ultra-condensed", "fst:ec": "font-stretch:extra-condensed", "fst:c": "font-stretch:condensed", "fst:sc": "font-stretch:semi-condensed", "fst:se": "font-stretch:semi-expanded", "fst:e": "font-stretch:expanded", "fst:ee": "font-stretch:extra-expanded", "fst:ue": "font-stretch:ultra-expanded", // Text "va": "vertical-align", "va:sup": "vertical-align:super", "va:t": "vertical-align:top", "va:tt": "vertical-align:text-top", "va:m": "vertical-align:middle", "va:bl": "vertical-align:baseline", "va:b": "vertical-align:bottom", "va:tb": "vertical-align:text-bottom", "va:sub": "vertical-align:sub", "ta": "text-align", "ta:le": "text-align:left", "ta:c": "text-align:center", "ta:r": "text-align:right", "ta:j": "text-align:justify", "tal": "text-align-last", "tal:a": "text-align-last:auto", "tal:l": "text-align-last:left", "tal:c": "text-align-last:center", "tal:r": "text-align-last:right", "ted": "text-decoration", "ted:n": "text-decoration:none", "ted:u": "text-decoration:underline", "ted:o": "text-decoration:overline", "ted:l": "text-decoration:line-through", "te": "text-emphasis", "te:n": "text-emphasis:none", "te:ac": "text-emphasis:accent", "te:dt": "text-emphasis:dot", "te:c": "text-emphasis:circle", "te:ds": "text-emphasis:disc", "te:b": "text-emphasis:before", "te:a": "text-emphasis:after", "teh": "text-height", "teh:a": "text-height:auto", "teh:f": "text-height:font-size", "teh:t": "text-height:text-size", "teh:m": "text-height:max-size", "ti": "text-indent", "ti:-": "text-indent:-9999px", "tj": "text-justify", "tj:a": "text-justify:auto", "tj:iw": "text-justify:inter-word", "tj:ii": "text-justify:inter-ideograph", "tj:ic": "text-justify:inter-cluster", "tj:d": "text-justify:distribute", "tj:k": "text-justify:kashida", "tj:t": "text-justify:tibetan", "tol": "text-outline", "tol+": "text-outline:0 0 #000", "tol:n": "text-outline:none", "tr": "text-replace", "tr:n": "text-replace:none", "tt": "text-transform", "tt:n": "text-transform:none", "tt:c": "text-transform:capitalize", "tt:u": "text-transform:uppercase", "tt:l": "text-transform:lowercase", "tw": "text-wrap", "tw:n": "text-wrap:normal", "tw:no": "text-wrap:none", "tw:u": "text-wrap:unrestricted", "tw:s": "text-wrap:suppress", "tsh": "text-shadow", "tsh+": "text-shadow:0 0 0 #000", "tsh:n": "text-shadow:none", "lh": "line-height", "lts": "letter-spacing", "whs": "white-space", "whs:n": "white-space:normal", "whs:p": "white-space:pre", "whs:nw": "white-space:nowrap", "whs:pw": "white-space:pre-wrap", "whs:pl": "white-space:pre-line", "whsc": "white-space-collapse", "whsc:n": "white-space-collapse:normal", "whsc:k": "white-space-collapse:keep-all", "whsc:l": "white-space-collapse:loose", "whsc:bs": "white-space-collapse:break-strict", "whsc:ba": "white-space-collapse:break-all", "wob": "word-break", "wob:n": "word-break:normal", "wob:k": "word-break:keep-all", "wob:l": "word-break:loose", "wob:bs": "word-break:break-strict", "wob:ba": "word-break:break-all", "wos": "word-spacing", "wow": "word-wrap", "wow:nm": "word-wrap:normal", "wow:n": "word-wrap:none", "wow:u": "word-wrap:unrestricted", "wow:s": "word-wrap:suppress", // Background "bg": "background", "bg+": "background:#fff url() 0 0 no-repeat", "bg:n": "background:none", "bgc": "background-color:#fff", "bgc:t": "background-color:transparent", "bgi": "background-image:url()", "bgi:n": "background-image:none", "bgr": "background-repeat", "bgr:r": "background-repeat:repeat", "bgr:n": "background-repeat:no-repeat", "bgr:x": "background-repeat:repeat-x", "bgr:y": "background-repeat:repeat-y", "bga": "background-attachment", "bga:f": "background-attachment:fixed", "bga:s": "background-attachment:scroll", "bgp": "background-position:0 0", "bgpx": "background-position-x", "bgpy": "background-position-y", "bgbk": "background-break", "bgbk:bb": "background-break:bounding-box", "bgbk:eb": "background-break:each-box", "bgbk:c": "background-break:continuous", "bgcp": "background-clip", "bgcp:bb": "background-clip:border-box", "bgcp:pb": "background-clip:padding-box", "bgcp:cb": "background-clip:content-box", "bgcp:nc": "background-clip:no-clip", "bgo": "background-origin", "bgo:pb": "background-origin:padding-box", "bgo:bb": "background-origin:border-box", "bgo:cb": "background-origin:content-box", "bgz": "background-size", "bgz:a": "background-size:auto", "bgz:ct": "background-size:contain", "bgz:cv": "background-size:cover", // Color "col": "color:#000", "op": "opacity", "hsl": "hsl(359,100%,100%)", "hsla": "hsla(359,100%,100%,0.5)", "rgb": "rgb(255,255,255)", "rgba": "rgba(255,255,255,0.5)", // Generated Content "ct": "content", "ct:n": "content:normal", "ct:oq": "content:open-quote", "ct:noq": "content:no-open-quote", "ct:cq": "content:close-quote", "ct:ncq": "content:no-close-quote", "ct:a": "content:attr()", "ct:c": "content:counter()", "ct:cs": "content:counters()", "quo": "quotes", "q:n": "quotes:none", "q:ru": "quotes:'\00AB' '\00BB' '\201E' '\201C'", "q:en": "quotes:'\201C' '\201D' '\2018' '\2019'", "coi": "counter-increment", "cor": "counter-reset", // Outline "out": "outline", "o:n": "outline:none", "oo": "outline-offset", "ow": "outline-width", "os": "outline-style", "oc": "outline-color:#000", "oc:i": "outline-color:invert", // Table "tbl": "table-layout", "tbl:a": "table-layout:auto", "tbl:f": "table-layout:fixed", "cps": "caption-side", "cps:t": "caption-side:top", "cps:b": "caption-side:bottom", "ec": "empty-cells", "ec:s": "empty-cells:show", "ec:h": "empty-cells:hide", // Border "bd": "border", "bd+": "border:1px solid #000", "bd:n": "border:none", "bdbk": "border-break", "bdbk:c": "border-break:close", "bdcl": "border-collapse", "bdcl:c": "border-collapse:collapse", "bdcl:s": "border-collapse:separate", "bdc": "border-color:#000", "bdi": "border-image:url()", "bdi:n": "border-image:none", "bdti": "border-top-image:url()", "bdti:n": "border-top-image:none", "bdri": "border-right-image:url()", "bdri:n": "border-right-image:none", "bdbi": "border-bottom-image:url()", "bdbi:n": "border-bottom-image:none", "bdli": "border-left-image:url()", "bdli:n": "border-left-image:none", "bdci": "border-corner-image:url()", "bdci:n": "border-corner-image:none", "bdci:c": "border-corner-image:continue", "bdtli": "border-top-left-image:url()", "bdtli:n": "border-top-left-image:none", "bdtli:c": "border-top-left-image:continue", "bdtri": "border-top-right-image:url()", "bdtri:n": "border-top-right-image:none", "bdtri:c": "border-top-right-image:continue", "bdbri": "border-bottom-right-image:url()", "bdbri:n": "border-bottom-right-image:none", "bdbri:c": "border-bottom-right-image:continue", "bdbli": "border-bottom-left-image:url()", "bdbli:n": "border-bottom-left-image:none", "bdbli:c": "border-bottom-left-image:continue", "bdf": "border-fit", "bdf:c": "border-fit:clip", "bdf:r": "border-fit:repeat", "bdf:sc": "border-fit:scale", "bdf:st": "border-fit:stretch", "bdf:ow": "border-fit:overwrite", "bdf:of": "border-fit:overflow", "bdf:sp": "border-fit:space", "bdlt": "border-length", "bdlt:a": "border-length:auto", "bdsp": "border-spacing", "bds": "border-style", "bds:n": "border-style:none", "bds:h": "border-style:hidden", "bds:dt": "border-style:dotted", "bds:ds": "border-style:dashed", "bds:s": "border-style:solid", "bds:db": "border-style:double", "bds:dd": "border-style:dot-dash", "bds:ddd": "border-style:dot-dot-dash", "bds:w": "border-style:wave", "bds:g": "border-style:groove", "bds:r": "border-style:ridge", "bds:i": "border-style:inset", "bds:o": "border-style:outset", "bdw": "border-width", "bdt": "border-top", "bdt+": "border-top:1px solid #000", "bdt:n": "border-top:none", "bdtw": "border-top-width", "bdts": "border-top-style", "bdts:n": "border-top-style:none", "bdtc": "border-top-color:#000", "bdr": "border-right", "bdr+": "border-right:1px solid #000", "bdr:n": "border-right:none", "bdrw": "border-right-width", "bdrs": "border-right-style", "bdrs:n": "border-right-style:none", "bdrc": "border-right-color:#000", "bdb": "border-bottom", "bdb+": "border-bottom:1px solid #000", "bdb:n": "border-bottom:none", "bdbw": "border-bottom-width", "bdbs": "border-bottom-style", "bdbs:n": "border-bottom-style:none", "bdbc": "border-bottom-color:#000", "bdl": "border-left", "bdl+": "border-left:1px solid #000", "bdl:n": "border-left:none", "bdlw": "border-left-width", "bdls": "border-left-style", "bdls:n": "border-left-style:none", "bdlc": "border-left-color:#000", "bdrsa": "border-radius", "bdtrrs": "border-top-right-radius", "bdtlrs": "border-top-left-radius", "bdbrrs": "border-bottom-right-radius", "bdblrs": "border-bottom-left-radius", // Lists "lis": "list-style", "lis:n": "list-style:none", "lisp": "list-style-position", "lisp:i": "list-style-position:inside", "lisp:o": "list-style-position:outside", "list": "list-style-type", "list:n": "list-style-type:none", "list:d": "list-style-type:disc", "list:c": "list-style-type:circle", "list:s": "list-style-type:square", "list:dc": "list-style-type:decimal", "list:dclz": "list-style-type:decimal-leading-zero", "list:lr": "list-style-type:lower-roman", "list:ur": "list-style-type:upper-roman", "lisi": "list-style-image", "lisi:n": "list-style-image:none", // Print "pgbb": "page-break-before", "pgbb:au": "page-break-before:auto", "pgbb:al": "page-break-before:always", "pgbb:l": "page-break-before:left", "pgbb:r": "page-break-before:right", "pgbi": "page-break-inside", "pgbi:au": "page-break-inside:auto", "pgbi:av": "page-break-inside:avoid", "pgba": "page-break-after", "pgba:au": "page-break-after:auto", "pgba:al": "page-break-after:always", "pgba:l": "page-break-after:left", "pgba:r": "page-break-after:right", "orp": "orphans", "widows": "widows", // Others "ipt": "!important", "ffa": "@font-family {<br>&nbsp;&nbsp;font-family:;<br>&nbsp;&nbsp;src:url();<br>}", "ffa+": "@font-family {<br>&nbsp;&nbsp;font-family: 'FontName';<br>&nbsp;&nbsp;src: url('FileName.eot');<br>&nbsp;&nbsp;src: url('FileName.eot?#iefix') format('embedded-opentype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.woff') format('woff'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.ttf') format('truetype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.svg#FontName') format('svg');<br>&nbsp;&nbsp;font-style: normal;<br>&nbsp;&nbsp;font-weight: normal;<br>}", "imp": "@import url()", "mp": "@media print {}", "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop')", "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'", "trf": "transform", "trf:r": "transform:rotate(90deg)", "trf:sc": "transform:scale(x,y)", "trf:scx": "transform:scaleX(x)", "trf:scy": "transform:scaleY(y)", "trf:skx": "transform:skewX(90deg)", "trf:sky": "transform:skewY(90deg)", "trf:t": "transform:translate(x,y)", "trf:tx": "transform:translateX(x)", "trf:ty": "transform:translateY(y)", "trs": "transition", "trsde": "transition-delay", "trsdu": "transition-duration", "trsp": "transition-property", "trstf": "transition-timing-function", "ani": "animation", "ann": "animation-name", "adu": "animation-duration", "atf": "animation-timing-function", "ade": "animation-delay", "aic": "animation-iteration-count", "adi": "animation-direction", "aps": "animation-play-state", "key": "@keyframes {}", "ms": "@media screen and () {}", "in": "inherit", "tra": "transparent", "beh": "behavior:url()", "cha": "@charset''", // Pseudo Class "ac": " :active{}", "ac:a": "&:active{}", "af": " :after{}", "af:a": "&:after{}", "be": " :before{}", "be:a": "&:before{}", "ch": " :checked{}", "ch:a": "&:checked{}", "dsa": " :disabled{}<i>[da]</i>", "dsa:a": "&:disabled{}<i>[da:a]</i>", "en": " :enabled{}", "en:a": "&:enabled{}", "fc": " :first-child{}", "fc:a": "&:first-child{}", "fle": " :first-letter{}", "fle:a": "&:first-letter{}", "fli": " :first-line{}", "fli:a": "&:first-line{}", "foc": " :focus{}", "foc:a": "&:focus{}", "ho": " :hover{}", "ho:a": "&:hover{}", "ln": " :lang(){}", "ln:a": "&:lang(){}", "lc": " :last-child{}", "lc:a": "&:last-child{}", // "li": " :link{}", // "li:a": "&:link{}", "nc": " :nth-child(){}", "nc:a": "&:nth-child(){}", "vit": " :visited{}", "vit:a": "&:visited{}", "tgt": " :target{}", "tgt:a": "&:target{}", "fot": " :first-of-type{}", "fot:a": "&:first-of-type{}", "lot": " :last-of-type{}", "lot:a": "&:last-of-type{}", "not": " :nth-of-type(){}", "not:a": "&:nth-of-type(){}", // Scss & Sass "ext": "@extend", "inc": "@include", "mix": "@mixin", "ieh": "ie-hex-str()" }; } o.helpers.units = function(v, def) { if(!v.toString().match(/[%|in|cm|mm|em|ex|pt|pc|px|deg|ms|s]/)) return v + (def || '%'); else return v; } var extend = require("./helpers/extend"), fs = require('fs'), path = require('path') var walk = function(dir) { return walkClientSide(); var results = []; var list = fs.readdirSync(dir); for(var i=0; i<list.length; i++) { var file = dir + '/' + list[i]; var stat = fs.statSync(file); if (stat && stat.isDirectory()) { results = results.concat(walk(file)); } else { results.push(file); } } return results; }; o.index = { absurd: null, init: function(decoration) { if(typeof decoration != 'undefined') { this.absurd = decoration; } // getting atoms and molecules var files = walk(__dirname + "/lib/"), self = this; for(var i=0; i<files.length; i++) { var file = path.basename(files[i]); (function(m) { var module = require(m); self.absurd.plugin(file.replace(".js", ""), function(absurd, value) { return module(value); }); })(files[i]); } // converting snippets to plugins var snippets = require(__dirname + "/helpers/snippets")(); for(var atom in snippets) { atom = atom.split(":"); (function(pluginName) { self.absurd.plugin(pluginName, function(absurd, value, prefixes) { if(prefixes === false) { prefixes = ''; } var s, r = {}; if(s = snippets[pluginName + ':' + value]) { s = s.split(':'); r[prefixes + s[0]] = s[1] || ''; } else if(s = snippets[pluginName]){ r[prefixes + s] = value; } return r; }); })(atom.shift()); } return this; } } o.lib.atoms.atoms = function(value) { var toObj = function(value, r) { value = value.replace(/( )?:( )?/, ':').split(':'); r = r || {}; r[value[0]] = value[1] || ''; return r; } var processArr = function(value) { var r = {}; for(var i=0; i<value.length; i++) { toObj(value[i], r); } return r; } if(typeof value == 'string') { return processArr(value.replace(/( )?\/( )?/g, '/').split('/')); } else if(typeof value == 'object') { if(!(value instanceof Array)) { return value; } else { return processArr(value); } } } /*! Animate.css - http://daneden.me/animate Licensed under the MIT license Copyright (c) 2013 Daniel Eden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ o.lib.molecules.animate = function(value) { var r = {}; r['-wmso-animation-name'] = ''; r['-wmso-animation-duration'] = '1s', name = ''; if(typeof value === 'string') { r['-wmso-animation-name'] = value; } else if(typeof value === 'object') { if(value instanceof Array) { if(value.length === 1) { r['-wmso-animation-name'] = value[0]; } else if(value.length === 2) { r = { keyframes: { name: value[0], frames: value[1] } }; } else { value = r = {}; } } else { r['-wmso-animation-name'] = value.name; value.duration ? r['-wmso-animation-duration'] = value.duration : ''; value.fillMode ? r['-wmso-animation-fill-mode'] = value.fillMode : ''; value.timingFunction ? r['-wmso-animation-timing-function'] = value.timingFunction : ''; value.iterationCount ? r['-wmso-animation-iteration-count'] = value.iterationCount : ''; value.delay ? r['-wmso-animation-delay'] = value.delay : ''; value.direction ? r['-wmso-animation-direction'] = value.direction : ''; value.playState ? r['-wmso-animation-play-state'] = value.playState : ''; if(value.frames) { r.keyframes = { name: value.name, frames: value.frames } } } } switch(r['-wmso-animation-name']) { case "blink": r.keyframes = { name: "blink", frames: { "0%, 100%": { transparent: 0 }, "50%": { transparent: 1 } } } break; case "bounce": r.keyframes = { name: "bounce", frames: { "0%, 20%, 50%, 80%, 100%": { "-wmso-transform": "translateY(0)" }, "40%": { "-wmso-transform": "translateY(-30px)" }, "60%": { "-wmso-transform": "translateY(-15px)" } } } break; case "flash": r.keyframes = { name: "flash", frames: { "0%, 50%, 100%": { "opacity": "1" }, "25%, 75%": { "opacity": "0" } } } break; case "pulse": r.keyframes = { name: "pulse", frames: { "0%": { "-wmso-transform": "scale(1)" }, "50%": { "-wmso-transform": "scale(1.1)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "shake": r.keyframes = { name: "shake", frames: { "0%, 100%": { "-wmso-transform": "translateX(0)" }, "10%, 30%, 50%, 70%, 90%": { "-wmso-transform": "translateX(-10px)" }, "20%, 40%, 60%, 80%": { "-wmso-transform": "translateX(10px)" } } } break; case "swing": r.keyframes = { name: "swing", frames: { "20%": { "-wmso-transform": "rotate(15deg)" }, "40%": { "-wmso-transform": "rotate(-10deg)" }, "60%": { "-wmso-transform": "rotate(5deg)" }, "80%": { "-wmso-transform": "rotate(-5deg)" }, "100%": { "-wmso-transform": "rotate(0deg)" } } } break; case "tada": r.keyframes = { name: "tada", frames: { "0%": { "-wmso-transform": "scale(1)" }, "10%, 20%": { "-wmso-transform": "scale(0.9) rotate(-3deg)" }, "30%, 50%, 70%, 90%": { "-wmso-transform": "scale(1.1) rotate(3deg)" }, "40%, 60%, 80%": { "-wmso-transform": "scale(1.1) rotate(-3deg)" }, "100%": { "-wmso-transform": "scale(1) rotate(0)" } } } break; case "wobble": r.keyframes = { name: "wobble", frames: { "0%": { "-wmso-transform": "translateX(0%)" }, "15%": { "-wmso-transform": "translateX(-25%) rotate(-5deg)" }, "30%": { "-wmso-transform": "translateX(20%) rotate(3deg)" }, "45%": { "-wmso-transform": "translateX(-15%) rotate(-3deg)" }, "60%": { "-wmso-transform": "translateX(10%) rotate(2deg)" }, "75%": { "-wmso-transform": "translateX(-5%) rotate(-1deg)" }, "100%": { "-wmso-transform": "translateX(0%)" } } } break; case "bounceIn": r.keyframes = { name: "bounceIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "scale(.3)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.05)" }, "70%": { "-wmso-transform": "scale(.9)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "bounceInDown": r.keyframes = { name: "bounceInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(30px)" }, "80%": { "-wmso-transform": "translateY(-10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceInLeft": r.keyframes = { name: "bounceInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(30px)" }, "80%": { "-wmso-transform": "translateX(-10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInRight": r.keyframes = { name: "bounceInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(-30px)" }, "80%": { "-wmso-transform": "translateX(10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInUp": r.keyframes = { name: "bounceInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(-30px)" }, "80%": { "-wmso-transform": "translateY(10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceOut": r.keyframes = { name: "bounceOut", frames: { "0%": { "-wmso-transform": "scale(1)" }, "25%": { "-wmso-transform": "scale(.95)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.1)" }, "100%": { "opacity": "0", "-wmso-transform": "scale(.3)" } } } break; case "bounceOutDown": r.keyframes = { name: "bounceOutDown", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "bounceOutLeft": r.keyframes = { name: "bounceOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "bounceOutRight": r.keyframes = { name: "bounceOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "bounceOutUp": r.keyframes = { name: "bounceOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "fadeIn": r.keyframes = { name: "fadeIn", frames: { "0%": { "opacity": "0" }, "100%": { "opacity": "1" } } } break; case "fadeInDown": r.keyframes = { name: "fadeInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInDownBig": r.keyframes = { name: "fadeInDownBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInLeft": r.keyframes = { name: "fadeInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInLeftBig": r.keyframes = { name: "fadeInLeftBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRight": r.keyframes = { name: "fadeInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRightBig": r.keyframes = { name: "fadeInRightBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInUp": r.keyframes = { name: "fadeInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInUpBig": r.keyframes = { name: "fadeInUpBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeOut": r.keyframes = { name: "fadeOut", frames: { "0%": { "opacity": "1" }, "100%": { "opacity": "0" } } } break; case "fadeOutDown": r.keyframes = { name: "fadeOutDown", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(20px)" } } } break; case "fadeOutDownBig": r.keyframes = { name: "fadeOutDownBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "fadeOutLeft": r.keyframes = { name: "fadeOutLeft", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" } } } break; case "fadeOutLeftBig": r.keyframes = { name: "fadeOutLeftBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "fadeOutRight": r.keyframes = { name: "fadeOutRight", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(20px)" } } } break; case "fadeOutRightBig": r.keyframes = { name: "fadeOutRightBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "fadeOutUp": r.keyframes = { name: "fadeOutUp", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" } } } break; case "fadeOutUpBig": r.keyframes = { name: "fadeOutUpBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "flip": r.keyframes = { name: "flip", frames: { "0%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(0) scale(1)", "animation-timing-function": "ease-out" }, "40%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(170deg) scale(1)", "animation-timing-function": "ease-out" }, "50%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(190deg) scale(1)", "animation-timing-function": "ease-in" }, "80%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(.95)", "animation-timing-function": "ease-in" }, "100%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(1)", "animation-timing-function": "ease-in" } } } break; case "flipInX": r.keyframes = { name: "flipInX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateX(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateX(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" } } } break; case "flipInY": r.keyframes = { name: "flipInY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateY(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateY(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" } } } break; case "flipOutX": r.keyframes = { name: "flipOutX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" } } } break; case "flipOutY": r.keyframes = { name: "flipOutY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" } } } break; case "lightSpeedIn": r.keyframes = { name: "lightSpeedIn", frames: { "0%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" }, "60%": { "-wmso-transform": "translateX(-20%) skewX(30deg)", "opacity": "1" }, "80%": { "-wmso-transform": "translateX(0%) skewX(-15deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" } } } break; case "lightSpeedOut": r.keyframes = { name: "lightSpeedOut", frames: { "0%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" } } } break; case "rotateIn": r.keyframes = { name: "rotateIn", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(-200deg)", "opacity": "0" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownLeft": r.keyframes = { name: "rotateInDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownRight": r.keyframes = { name: "rotateInDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpLeft": r.keyframes = { name: "rotateInUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpRight": r.keyframes = { name: "rotateInUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateOut": r.keyframes = { name: "rotateOut", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(200deg)", "opacity": "0" } } } break; case "rotateOutDownLeft": r.keyframes = { name: "rotateOutDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "rotateOutDownRight": r.keyframes = { name: "rotateOutDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpLeft": r.keyframes = { name: "rotateOutUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpRight": r.keyframes = { name: "rotateOutUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "slideInDown": r.keyframes = { name: "slideInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "slideInLeft": r.keyframes = { name: "slideInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideInRight": r.keyframes = { name: "slideInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideOutLeft": r.keyframes = { name: "slideOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "slideOutRight": r.keyframes = { name: "slideOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "slideOutUp": r.keyframes = { name: "slideOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "hinge": r.keyframes = { name: "hinge", frames: { "0%": { "-wmso-transform": "rotate(0)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "20%, 60%": { "-wmso-transform": "rotate(80deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "40%": { "-wmso-transform": "rotate(60deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "80%": { "-wmso-transform": "rotate(60deg) translateY(0)", "opacity": "1", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "100%": { "-wmso-transform": "translateY(700px)", "opacity": "0" } } } break; case "rollIn": r.keyframes = { name: "rollIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-100%) rotate(-120deg)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" } } } break; case "rollOut": r.keyframes = { name: "rollOut", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(100%) rotate(120deg)" } } } break; } return r; } o.lib.molecules.blur = function(value) { return { '-wms-filter': 'blur(' + value + 'px)' } } o.lib.molecules.brightness = function(value) { return { '-wms-filter': 'brightness(' + value + ')' } } o.lib.molecules.calc = function(value) { var args = require('../../helpers/args')(value), r = {}; r['LhProperty'] = '0'; r['~~1~~' + args[0]] = '-webkit-calc(' + args[1] + ')'; r['~~2~~' + args[0]] = '-moz-calc(' + args[1] + ')'; r['~~3~~' + args[0]] = 'calc(' + args[1] + ')'; return r; } o.lib.molecules.cf = function(value) { var r = {}, clearing = { content: '" "', display: 'table', clear: 'both' }; switch(value) { case 'before': r['&:before'] = clearing; break; case 'after': r['&:after'] = clearing; break; default: r['&:before'] = clearing; r['&:after'] = clearing; break; } return r; } o.lib.molecules.contrast = function(value) { return { '-wms-filter': 'contrast(' + value + '%)' } } o.lib.molecules.dropshadow = function(value) { return { '-wms-filter': 'drop-shadow(' + value + ')' } } var getMSColor = function(color) { color = color.toString().replace('#', ''); if(color.length == 3) { var tmp = ''; for(var i=0; i<color.length; i++) { tmp += color[i] + color[i]; } color = tmp; } return '#FF' + color.toUpperCase(); } o.lib.molecules.gradient = function(value) { var r = {}, args = require('../../helpers/args')(value); switch(typeof value) { case 'string': var deg = args[args.length-1]; if(deg.indexOf('deg') > 0) { deg = parseInt(args.pop().replace('deg', '')); } else { deg = 0; } var numOfStops = args.length, stepsPercents = Math.floor(100 / (numOfStops-1)).toFixed(2), gradientValue = [], msGradientType = (deg >= 45 && deg <= 135) || (deg >= 225 && deg <= 315) ? 1 : 0, msStartColor = msGradientType === 0 ? getMSColor(args[args.length-1]) : getMSColor(args[0]), msEndColor = msGradientType === 0 ? getMSColor(args[0]) : getMSColor(args[args.length-1]); for(var i=0; i<numOfStops; i++) { if(args[i].indexOf('%') > 0) { gradientValue.push(args[i]); } else { gradientValue.push(args[i] + ' ' + (i*stepsPercents) + '%'); } } gradientValue = deg + 'deg, ' + gradientValue.join(', '); return [ { 'background': '-webkit-linear-gradient(' + gradientValue + ')' }, { '~~1~~background': '-moz-linear-gradient(' + gradientValue + ')' }, { '~~2~~background': '-ms-linear-gradient(' + gradientValue + ')' }, { '~~3~~background': '-o-linear-gradient(' + gradientValue + ')' }, { '~~4~~background': 'linear-gradient(' + gradientValue + ')' }, { 'filter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\', endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' }, { 'MsFilter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\',endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' } ] break; } return {}; } o.lib.molecules.grid = function(value) { var args = require('../../helpers/args')(value); if(args.length == 2) { var res = { cf: 'both' } res[args[1]] = { fl: 'l', '-mw-bxz': 'bb', wid: (100 / parseInt(args[0])).toFixed(2) + '%' } return res; } else { return {}; } } o.lib.molecules.invert = function(value) { return { '-wms-filter': 'invert(' + value + '%)' } } o.lib.molecules.moveto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), x = units(!args[0] || args[0] == '' ? 0 : args[0], 'px'), y = units(!args[1] || args[1] == '' ? 0 : args[1], 'px'), z = units(!args[2] || args[2] == '' ? 0 : args[2], 'px'); if(args.length == 2) { return {"-ws-trf": ">translate(" + x + "," + y + ")"}; } else if(args.length == 3) { return {"-ws-trf": ">translate3d(" + x + "," + y + "," + z + ")"}; } } o.lib.molecules.rotateto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value); if(args.length == 1) { return {"-ws-trf": ">rotate(" + units(args[0], 'deg') + ")"}; } } o.lib.molecules.saturate = function(value) { return { '-wms-filter': 'saturate(' + value + 'deg)' } } o.lib.molecules.scaleto = function(value) { var args = require('../../helpers/args')(value), x = !args[0] || args[0] == '' ? 0 : args[0], y = !args[1] || args[1] == '' ? 0 : args[1]; if(args.length == 2) { return {"-ws-trf": ">scale(" + x + "," + y + ")"}; } } o.lib.molecules.sepia = function(value) { return { '-wms-filter': 'sepia(' + value + '%)' } } o.lib.molecules.size = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), r = {}; if(args.length == 2) { if(args[0] != '') { r.width = units(args[0]); } if(args[1] != '') { r.height = units(args[1]); } return r; } else { return { width: units(args[0]), height: units(args[0]) } } } o.lib.molecules.transparent = function(value) { var args = require('../../helpers/args')(value), r = {}; value = parseFloat(value); r['-s-filter'] = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=' + (value * 100) + ')'; r['filter'] = 'alpha(opacity=' + (value * 100) + ')'; r['-m-opacity'] = value; r['opacity'] = value; r['KhtmlOpacity'] = value; return r; }; return o.index; })(window);
cloudrifles/cdnjs
ajax/libs/absurd/0.3.146/absurd.organic.js
JavaScript
mit
50,879
/* version: 0.3.138, born: 3-2-2014 18:19 */ var Organic = (function(w){ var o = { helpers: {}, lib: { atoms: {}, molecules: {} } } var require = function(v) { if(v == "./helpers/extend") { return o.helpers.extend; } else if(v == "/helpers/snippets" || v == "../../helpers/snippets") { return o.helpers.snippets; } else if(v == "/lib/atoms/atoms" || v == "../../lib/atoms/atoms" || v == "../atoms/atoms.js") { return o.lib.atoms.atoms; } else if(v == "../../helpers/units") { return o.helpers.units; } else if(v == "../../helpers/args") { return o.helpers.args; } else if(v == "path") { return { basename: function(f) { return f.split("/").pop(); } } } else { var moduleParts = v.split("/"); return (function getModule(currentModule) { var part = moduleParts.shift().replace(".js", ""); if(currentModule[part]) { if(moduleParts.length == 0) { return currentModule[part]; } else { return getModule(currentModule[part]) } } })(o); } } var __dirname = ''; var walkClientSide = function(res, obj, path) { if(typeof res == 'undefined') res = []; if(typeof obj == 'undefined') obj = o.lib; if(typeof path == 'undefined') path = "lib/"; for(var part in obj) { if(typeof obj[part] == 'function') { res.push(path + part + ".js"); } else { walkClientSide(res, obj[part], path + part + "/"); } } return res; };o.helpers.args = function(value) { value = value.toString().replace(/\/ /g, '/').split('/'); return value; } o.helpers.extend = function() { var process = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var result = arguments[0]; for(var i=1; i<arguments.length; i++) { result = process(result, arguments[i]); } return result; } o.helpers.snippets = function() { // http://peters-playground.com/Emmet-Css-Snippets-for-Sublime-Text-2/ return { // Visual Formatting "pos": "position", "pos:s": "position:static", "pos:a": "position:absolute", "pos:r": "position:relative", "pos:f": "position:fixed", // "top": "top", "t:a": "top:auto", "rig": "right", "r:a": "right:auto", "bot": "bottom", // "b:a": "bottom:auto", // breaks the multiple comma selectors "lef": "left", "l:a": "left:auto", "zin": "z-index", "z:a": "z-index:auto", "fl": "float", "fl:n": "float:none", "fl:l": "float:left", "fl:r": "float:right", "cl": "clear", "cl:n": "clear:none", "cl:l": "clear:left", "cl:r": "clear:right", "cl:b": "clear:both", "dis": "display", "d:n": "display:none", "d:b": "display:block", "d:i": "display:inline", "d:ib": "display:inline-block", "d:li": "display:list-item", "d:ri": "display:run-in", "d:cp": "display:compact", "d:tb": "display:table", "d:itb": "display:inline-table", "d:tbcp": "display:table-caption", "d:tbcl": "display:table-column", "d:tbclg": "display:table-column-group", "d:tbhg": "display:table-header-group", "d:tbfg": "display:table-footer-group", "d:tbr": "display:table-row", "d:tbrg": "display:table-row-group", "d:tbc": "display:table-cell", "d:rb": "display:ruby", "d:rbb": "display:ruby-base", "d:rbbg": "display:ruby-base-group", "d:rbt": "display:ruby-text", "d:rbtg": "display:ruby-text-group", "vis": "visibility", "v:v": "visibility:visible", "v:h": "visibility:hidden", "v:c": "visibility:collapse", "ov": "overflow", "ov:v": "overflow:visible", "ov:h": "overflow:hidden", "ov:s": "overflow:scroll", "ov:a": "overflow:auto", "ovx": "overflow-x", "ovx:v": "overflow-x:visible", "ovx:h": "overflow-x:hidden", "ovx:s": "overflow-x:scroll", "ovx:a": "overflow-x:auto", "ovy": "overflow-y", "ovy:v": "overflow-y:visible", "ovy:h": "overflow-y:hidden", "ovy:s": "overflow-y:scroll", "ovy:a": "overflow-y:auto", "ovs": "overflow-style", "ovs:a": "overflow-style:auto", "ovs:s": "overflow-style:scrollbar", "ovs:p": "overflow-style:panner", "ovs:m": "overflow-style:move", "ovs:mq": "overflow-style:marquee", "zoo": "zoom:1", "cp": "clip", "cp:a": "clip:auto", "cp:r": "clip:rect()", "rz": "resize", "rz:n": "resize:none", "rz:b": "resize:both", "rz:h": "resize:horizontal", "rz:v": "resize:vertical", "cur": "cursor", "cur:a": "cursor:auto", "cur:d": "cursor:default", "cur:c": "cursor:crosshair", "cur:ha": "cursor:hand", "cur:he": "cursor:help", "cur:m": "cursor:move", "cur:p": "cursor:pointer", "cur:t": "cursor:text", // Margin & Padding "mar": "margin", "m:au": "margin:0 auto", "mt": "margin-top", "mt:a": "margin-top:auto", "mr": "margin-right", "mr:a": "margin-right:auto", "mb": "margin-bottom", "mb:a": "margin-bottom:auto", "ml": "margin-left", "ml:a": "margin-left:auto", "pad": "padding", "pt": "padding-top", "pr": "padding-right", "pb": "padding-bottom", "pl": "padding-left", // Box Sizing "bxz": "box-sizing", "bxz:cb": "box-sizing:content-box", "bxz:bb": "box-sizing:border-box", "bxsh": "box-shadow", "bxsh:n": "box-shadow:none", "bxsh+": "box-shadow:0 0 0 #000", "wid": "width", "w:a": "width:auto", "hei": "height", "h:a": "height:auto", "maw": "max-width", "maw:n": "max-width:none", "mah": "max-height", "mah:n": "max-height:none", "miw": "min-width", "mih": "min-height", // Font "fon": "font", "fon+": "font:1em Arial, sans-serif", "fw": "font-weight", "fw:n": "font-weight:normal", "fw:b": "font-weight:bold", "fw:br": "font-weight:bolder", "fw:lr": "font-weight:lighter", "fs": "font-style", "fs:n": "font-style:normal", "fs:i": "font-style:italic", "fs:o": "font-style:oblique", "fv": "font-variant", "fv:n": "font-variant:normal", "fv:sc": "font-variant:small-caps", "fz": "font-size", "fza": "font-size-adjust", "fza:n": "font-size-adjust:none", "ff": "font-family", "ff:s": "font-family:serif", "ff:ss": "font-family:sans-serif", "ff:c": "font-family:cursive", "ff:f": "font-family:fantasy", "ff:m": "font-family:monospace", "fef": "font-effect", "fef:n": "font-effect:none", "fef:eg": "font-effect:engrave", "fef:eb": "font-effect:emboss", "fef:o": "font-effect:outline", "fem": "font-emphasize", "femp": "font-emphasize-position", "femp:b": "font-emphasize-position:before", "femp:a": "font-emphasize-position:after", "fems": "font-emphasize-style", "fems:n": "font-emphasize-style:none", "fems:ac": "font-emphasize-style:accent", "fems:dt": "font-emphasize-style:dot", "fems:c": "font-emphasize-style:circle", "fems:ds": "font-emphasize-style:disc", "fsm": "font-smooth", "fsm:au": "font-smooth:auto", "fsm:n": "font-smooth:never", "fsm:al": "font-smooth:always", "fst": "font-stretch", "fst:n": "font-stretch:normal", "fst:uc": "font-stretch:ultra-condensed", "fst:ec": "font-stretch:extra-condensed", "fst:c": "font-stretch:condensed", "fst:sc": "font-stretch:semi-condensed", "fst:se": "font-stretch:semi-expanded", "fst:e": "font-stretch:expanded", "fst:ee": "font-stretch:extra-expanded", "fst:ue": "font-stretch:ultra-expanded", // Text "va": "vertical-align", "va:sup": "vertical-align:super", "va:t": "vertical-align:top", "va:tt": "vertical-align:text-top", "va:m": "vertical-align:middle", "va:bl": "vertical-align:baseline", "va:b": "vertical-align:bottom", "va:tb": "vertical-align:text-bottom", "va:sub": "vertical-align:sub", "ta": "text-align", "ta:le": "text-align:left", "ta:c": "text-align:center", "ta:r": "text-align:right", "ta:j": "text-align:justify", "tal": "text-align-last", "tal:a": "text-align-last:auto", "tal:l": "text-align-last:left", "tal:c": "text-align-last:center", "tal:r": "text-align-last:right", "ted": "text-decoration", "ted:n": "text-decoration:none", "ted:u": "text-decoration:underline", "ted:o": "text-decoration:overline", "ted:l": "text-decoration:line-through", "te": "text-emphasis", "te:n": "text-emphasis:none", "te:ac": "text-emphasis:accent", "te:dt": "text-emphasis:dot", "te:c": "text-emphasis:circle", "te:ds": "text-emphasis:disc", "te:b": "text-emphasis:before", "te:a": "text-emphasis:after", "teh": "text-height", "teh:a": "text-height:auto", "teh:f": "text-height:font-size", "teh:t": "text-height:text-size", "teh:m": "text-height:max-size", "ti": "text-indent", "ti:-": "text-indent:-9999px", "tj": "text-justify", "tj:a": "text-justify:auto", "tj:iw": "text-justify:inter-word", "tj:ii": "text-justify:inter-ideograph", "tj:ic": "text-justify:inter-cluster", "tj:d": "text-justify:distribute", "tj:k": "text-justify:kashida", "tj:t": "text-justify:tibetan", "tol": "text-outline", "tol+": "text-outline:0 0 #000", "tol:n": "text-outline:none", "tr": "text-replace", "tr:n": "text-replace:none", "tt": "text-transform", "tt:n": "text-transform:none", "tt:c": "text-transform:capitalize", "tt:u": "text-transform:uppercase", "tt:l": "text-transform:lowercase", "tw": "text-wrap", "tw:n": "text-wrap:normal", "tw:no": "text-wrap:none", "tw:u": "text-wrap:unrestricted", "tw:s": "text-wrap:suppress", "tsh": "text-shadow", "tsh+": "text-shadow:0 0 0 #000", "tsh:n": "text-shadow:none", "lh": "line-height", "lts": "letter-spacing", "whs": "white-space", "whs:n": "white-space:normal", "whs:p": "white-space:pre", "whs:nw": "white-space:nowrap", "whs:pw": "white-space:pre-wrap", "whs:pl": "white-space:pre-line", "whsc": "white-space-collapse", "whsc:n": "white-space-collapse:normal", "whsc:k": "white-space-collapse:keep-all", "whsc:l": "white-space-collapse:loose", "whsc:bs": "white-space-collapse:break-strict", "whsc:ba": "white-space-collapse:break-all", "wob": "word-break", "wob:n": "word-break:normal", "wob:k": "word-break:keep-all", "wob:l": "word-break:loose", "wob:bs": "word-break:break-strict", "wob:ba": "word-break:break-all", "wos": "word-spacing", "wow": "word-wrap", "wow:nm": "word-wrap:normal", "wow:n": "word-wrap:none", "wow:u": "word-wrap:unrestricted", "wow:s": "word-wrap:suppress", // Background "bg": "background", "bg+": "background:#fff url() 0 0 no-repeat", "bg:n": "background:none", "bgc": "background-color:#fff", "bgc:t": "background-color:transparent", "bgi": "background-image:url()", "bgi:n": "background-image:none", "bgr": "background-repeat", "bgr:r": "background-repeat:repeat", "bgr:n": "background-repeat:no-repeat", "bgr:x": "background-repeat:repeat-x", "bgr:y": "background-repeat:repeat-y", "bga": "background-attachment", "bga:f": "background-attachment:fixed", "bga:s": "background-attachment:scroll", "bgp": "background-position:0 0", "bgpx": "background-position-x", "bgpy": "background-position-y", "bgbk": "background-break", "bgbk:bb": "background-break:bounding-box", "bgbk:eb": "background-break:each-box", "bgbk:c": "background-break:continuous", "bgcp": "background-clip", "bgcp:bb": "background-clip:border-box", "bgcp:pb": "background-clip:padding-box", "bgcp:cb": "background-clip:content-box", "bgcp:nc": "background-clip:no-clip", "bgo": "background-origin", "bgo:pb": "background-origin:padding-box", "bgo:bb": "background-origin:border-box", "bgo:cb": "background-origin:content-box", "bgz": "background-size", "bgz:a": "background-size:auto", "bgz:ct": "background-size:contain", "bgz:cv": "background-size:cover", // Color "col": "color:#000", "op": "opacity", "hsl": "hsl(359,100%,100%)", "hsla": "hsla(359,100%,100%,0.5)", "rgb": "rgb(255,255,255)", "rgba": "rgba(255,255,255,0.5)", // Generated Content "ct": "content", "ct:n": "content:normal", "ct:oq": "content:open-quote", "ct:noq": "content:no-open-quote", "ct:cq": "content:close-quote", "ct:ncq": "content:no-close-quote", "ct:a": "content:attr()", "ct:c": "content:counter()", "ct:cs": "content:counters()", "quo": "quotes", "q:n": "quotes:none", "q:ru": "quotes:'\00AB' '\00BB' '\201E' '\201C'", "q:en": "quotes:'\201C' '\201D' '\2018' '\2019'", "coi": "counter-increment", "cor": "counter-reset", // Outline "out": "outline", "o:n": "outline:none", "oo": "outline-offset", "ow": "outline-width", "os": "outline-style", "oc": "outline-color:#000", "oc:i": "outline-color:invert", // Table "tbl": "table-layout", "tbl:a": "table-layout:auto", "tbl:f": "table-layout:fixed", "cps": "caption-side", "cps:t": "caption-side:top", "cps:b": "caption-side:bottom", "ec": "empty-cells", "ec:s": "empty-cells:show", "ec:h": "empty-cells:hide", // Border "bd": "border", "bd+": "border:1px solid #000", "bd:n": "border:none", "bdbk": "border-break", "bdbk:c": "border-break:close", "bdcl": "border-collapse", "bdcl:c": "border-collapse:collapse", "bdcl:s": "border-collapse:separate", "bdc": "border-color:#000", "bdi": "border-image:url()", "bdi:n": "border-image:none", "bdti": "border-top-image:url()", "bdti:n": "border-top-image:none", "bdri": "border-right-image:url()", "bdri:n": "border-right-image:none", "bdbi": "border-bottom-image:url()", "bdbi:n": "border-bottom-image:none", "bdli": "border-left-image:url()", "bdli:n": "border-left-image:none", "bdci": "border-corner-image:url()", "bdci:n": "border-corner-image:none", "bdci:c": "border-corner-image:continue", "bdtli": "border-top-left-image:url()", "bdtli:n": "border-top-left-image:none", "bdtli:c": "border-top-left-image:continue", "bdtri": "border-top-right-image:url()", "bdtri:n": "border-top-right-image:none", "bdtri:c": "border-top-right-image:continue", "bdbri": "border-bottom-right-image:url()", "bdbri:n": "border-bottom-right-image:none", "bdbri:c": "border-bottom-right-image:continue", "bdbli": "border-bottom-left-image:url()", "bdbli:n": "border-bottom-left-image:none", "bdbli:c": "border-bottom-left-image:continue", "bdf": "border-fit", "bdf:c": "border-fit:clip", "bdf:r": "border-fit:repeat", "bdf:sc": "border-fit:scale", "bdf:st": "border-fit:stretch", "bdf:ow": "border-fit:overwrite", "bdf:of": "border-fit:overflow", "bdf:sp": "border-fit:space", "bdlt": "border-length", "bdlt:a": "border-length:auto", "bdsp": "border-spacing", "bds": "border-style", "bds:n": "border-style:none", "bds:h": "border-style:hidden", "bds:dt": "border-style:dotted", "bds:ds": "border-style:dashed", "bds:s": "border-style:solid", "bds:db": "border-style:double", "bds:dd": "border-style:dot-dash", "bds:ddd": "border-style:dot-dot-dash", "bds:w": "border-style:wave", "bds:g": "border-style:groove", "bds:r": "border-style:ridge", "bds:i": "border-style:inset", "bds:o": "border-style:outset", "bdw": "border-width", "bdt": "border-top", "bdt+": "border-top:1px solid #000", "bdt:n": "border-top:none", "bdtw": "border-top-width", "bdts": "border-top-style", "bdts:n": "border-top-style:none", "bdtc": "border-top-color:#000", "bdr": "border-right", "bdr+": "border-right:1px solid #000", "bdr:n": "border-right:none", "bdrw": "border-right-width", "bdrs": "border-right-style", "bdrs:n": "border-right-style:none", "bdrc": "border-right-color:#000", "bdb": "border-bottom", "bdb+": "border-bottom:1px solid #000", "bdb:n": "border-bottom:none", "bdbw": "border-bottom-width", "bdbs": "border-bottom-style", "bdbs:n": "border-bottom-style:none", "bdbc": "border-bottom-color:#000", "bdl": "border-left", "bdl+": "border-left:1px solid #000", "bdl:n": "border-left:none", "bdlw": "border-left-width", "bdls": "border-left-style", "bdls:n": "border-left-style:none", "bdlc": "border-left-color:#000", "bdrsa": "border-radius", "bdtrrs": "border-top-right-radius", "bdtlrs": "border-top-left-radius", "bdbrrs": "border-bottom-right-radius", "bdblrs": "border-bottom-left-radius", // Lists "lis": "list-style", "lis:n": "list-style:none", "lisp": "list-style-position", "lisp:i": "list-style-position:inside", "lisp:o": "list-style-position:outside", "list": "list-style-type", "list:n": "list-style-type:none", "list:d": "list-style-type:disc", "list:c": "list-style-type:circle", "list:s": "list-style-type:square", "list:dc": "list-style-type:decimal", "list:dclz": "list-style-type:decimal-leading-zero", "list:lr": "list-style-type:lower-roman", "list:ur": "list-style-type:upper-roman", "lisi": "list-style-image", "lisi:n": "list-style-image:none", // Print "pgbb": "page-break-before", "pgbb:au": "page-break-before:auto", "pgbb:al": "page-break-before:always", "pgbb:l": "page-break-before:left", "pgbb:r": "page-break-before:right", "pgbi": "page-break-inside", "pgbi:au": "page-break-inside:auto", "pgbi:av": "page-break-inside:avoid", "pgba": "page-break-after", "pgba:au": "page-break-after:auto", "pgba:al": "page-break-after:always", "pgba:l": "page-break-after:left", "pgba:r": "page-break-after:right", "orp": "orphans", "widows": "widows", // Others "ipt": "!important", "ffa": "@font-family {<br>&nbsp;&nbsp;font-family:;<br>&nbsp;&nbsp;src:url();<br>}", "ffa+": "@font-family {<br>&nbsp;&nbsp;font-family: 'FontName';<br>&nbsp;&nbsp;src: url('FileName.eot');<br>&nbsp;&nbsp;src: url('FileName.eot?#iefix') format('embedded-opentype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.woff') format('woff'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.ttf') format('truetype'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url('FileName.svg#FontName') format('svg');<br>&nbsp;&nbsp;font-style: normal;<br>&nbsp;&nbsp;font-weight: normal;<br>}", "imp": "@import url()", "mp": "@media print {}", "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop')", "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'", "trf": "transform", "trf:r": "transform:rotate(90deg)", "trf:sc": "transform:scale(x,y)", "trf:scx": "transform:scaleX(x)", "trf:scy": "transform:scaleY(y)", "trf:skx": "transform:skewX(90deg)", "trf:sky": "transform:skewY(90deg)", "trf:t": "transform:translate(x,y)", "trf:tx": "transform:translateX(x)", "trf:ty": "transform:translateY(y)", "trs": "transition", "trsde": "transition-delay", "trsdu": "transition-duration", "trsp": "transition-property", "trstf": "transition-timing-function", "ani": "animation", "ann": "animation-name", "adu": "animation-duration", "atf": "animation-timing-function", "ade": "animation-delay", "aic": "animation-iteration-count", "adi": "animation-direction", "aps": "animation-play-state", "key": "@keyframes {}", "ms": "@media screen and () {}", "in": "inherit", "tra": "transparent", "beh": "behavior:url()", "cha": "@charset''", // Pseudo Class "ac": " :active{}", "ac:a": "&:active{}", "af": " :after{}", "af:a": "&:after{}", "be": " :before{}", "be:a": "&:before{}", "ch": " :checked{}", "ch:a": "&:checked{}", "dsa": " :disabled{}<i>[da]</i>", "dsa:a": "&:disabled{}<i>[da:a]</i>", "en": " :enabled{}", "en:a": "&:enabled{}", "fc": " :first-child{}", "fc:a": "&:first-child{}", "fle": " :first-letter{}", "fle:a": "&:first-letter{}", "fli": " :first-line{}", "fli:a": "&:first-line{}", "foc": " :focus{}", "foc:a": "&:focus{}", "ho": " :hover{}", "ho:a": "&:hover{}", "ln": " :lang(){}", "ln:a": "&:lang(){}", "lc": " :last-child{}", "lc:a": "&:last-child{}", // "li": " :link{}", // "li:a": "&:link{}", "nc": " :nth-child(){}", "nc:a": "&:nth-child(){}", "vit": " :visited{}", "vit:a": "&:visited{}", "tgt": " :target{}", "tgt:a": "&:target{}", "fot": " :first-of-type{}", "fot:a": "&:first-of-type{}", "lot": " :last-of-type{}", "lot:a": "&:last-of-type{}", "not": " :nth-of-type(){}", "not:a": "&:nth-of-type(){}", // Scss & Sass "ext": "@extend", "inc": "@include", "mix": "@mixin", "ieh": "ie-hex-str()" }; } o.helpers.units = function(v, def) { if(!v.toString().match(/[%|in|cm|mm|em|ex|pt|pc|px|deg|ms|s]/)) return v + (def || '%'); else return v; } var extend = require("./helpers/extend"), fs = require('fs'), path = require('path') var walk = function(dir) { return walkClientSide(); var results = []; var list = fs.readdirSync(dir); for(var i=0; i<list.length; i++) { var file = dir + '/' + list[i]; var stat = fs.statSync(file); if (stat && stat.isDirectory()) { results = results.concat(walk(file)); } else { results.push(file); } } return results; }; o.index = { absurd: null, init: function(decoration) { if(typeof decoration != 'undefined') { this.absurd = decoration; } // getting atoms and molecules var files = walk(__dirname + "/lib/"), self = this; for(var i=0; i<files.length; i++) { var file = path.basename(files[i]); (function(m) { var module = require(m); self.absurd.plugin(file.replace(".js", ""), function(absurd, value) { return module(value); }); })(files[i]); } // converting snippets to plugins var snippets = require(__dirname + "/helpers/snippets")(); for(var atom in snippets) { atom = atom.split(":"); (function(pluginName) { self.absurd.plugin(pluginName, function(absurd, value, prefixes) { if(prefixes === false) { prefixes = ''; } var s, r = {}; if(s = snippets[pluginName + ':' + value]) { s = s.split(':'); r[prefixes + s[0]] = s[1] || ''; } else if(s = snippets[pluginName]){ r[prefixes + s] = value; } return r; }); })(atom.shift()); } return this; } } o.lib.atoms.atoms = function(value) { var toObj = function(value, r) { value = value.replace(/( )?:( )?/, ':').split(':'); r = r || {}; r[value[0]] = value[1] || ''; return r; } var processArr = function(value) { var r = {}; for(var i=0; i<value.length; i++) { toObj(value[i], r); } return r; } if(typeof value == 'string') { return processArr(value.replace(/( )?\/( )?/g, '/').split('/')); } else if(typeof value == 'object') { if(!(value instanceof Array)) { return value; } else { return processArr(value); } } } /*! Animate.css - http://daneden.me/animate Licensed under the MIT license Copyright (c) 2013 Daniel Eden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ o.lib.molecules.animate = function(value) { var r = {}; r['-wmso-animation-name'] = ''; r['-wmso-animation-duration'] = '1s', name = ''; if(typeof value === 'string') { r['-wmso-animation-name'] = value; } else if(typeof value === 'object') { if(value instanceof Array) { if(value.length === 1) { r['-wmso-animation-name'] = value[0]; } else if(value.length === 2) { r = { keyframes: { name: value[0], frames: value[1] } }; } else { value = r = {}; } } else { r['-wmso-animation-name'] = value.name; value.duration ? r['-wmso-animation-duration'] = value.duration : ''; value.fillMode ? r['-wmso-animation-fill-mode'] = value.fillMode : ''; value.timingFunction ? r['-wmso-animation-timing-function'] = value.timingFunction : ''; value.iterationCount ? r['-wmso-animation-iteration-count'] = value.iterationCount : ''; value.delay ? r['-wmso-animation-delay'] = value.delay : ''; value.direction ? r['-wmso-animation-direction'] = value.direction : ''; value.playState ? r['-wmso-animation-play-state'] = value.playState : ''; if(value.frames) { r.keyframes = { name: value.name, frames: value.frames } } } } switch(r['-wmso-animation-name']) { case "blink": r.keyframes = { name: "blink", frames: { "0%, 100%": { transparent: 0 }, "50%": { transparent: 1 } } } break; case "bounce": r.keyframes = { name: "bounce", frames: { "0%, 20%, 50%, 80%, 100%": { "-wmso-transform": "translateY(0)" }, "40%": { "-wmso-transform": "translateY(-30px)" }, "60%": { "-wmso-transform": "translateY(-15px)" } } } break; case "flash": r.keyframes = { name: "flash", frames: { "0%, 50%, 100%": { "opacity": "1" }, "25%, 75%": { "opacity": "0" } } } break; case "pulse": r.keyframes = { name: "pulse", frames: { "0%": { "-wmso-transform": "scale(1)" }, "50%": { "-wmso-transform": "scale(1.1)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "shake": r.keyframes = { name: "shake", frames: { "0%, 100%": { "-wmso-transform": "translateX(0)" }, "10%, 30%, 50%, 70%, 90%": { "-wmso-transform": "translateX(-10px)" }, "20%, 40%, 60%, 80%": { "-wmso-transform": "translateX(10px)" } } } break; case "swing": r.keyframes = { name: "swing", frames: { "20%": { "-wmso-transform": "rotate(15deg)" }, "40%": { "-wmso-transform": "rotate(-10deg)" }, "60%": { "-wmso-transform": "rotate(5deg)" }, "80%": { "-wmso-transform": "rotate(-5deg)" }, "100%": { "-wmso-transform": "rotate(0deg)" } } } break; case "tada": r.keyframes = { name: "tada", frames: { "0%": { "-wmso-transform": "scale(1)" }, "10%, 20%": { "-wmso-transform": "scale(0.9) rotate(-3deg)" }, "30%, 50%, 70%, 90%": { "-wmso-transform": "scale(1.1) rotate(3deg)" }, "40%, 60%, 80%": { "-wmso-transform": "scale(1.1) rotate(-3deg)" }, "100%": { "-wmso-transform": "scale(1) rotate(0)" } } } break; case "wobble": r.keyframes = { name: "wobble", frames: { "0%": { "-wmso-transform": "translateX(0%)" }, "15%": { "-wmso-transform": "translateX(-25%) rotate(-5deg)" }, "30%": { "-wmso-transform": "translateX(20%) rotate(3deg)" }, "45%": { "-wmso-transform": "translateX(-15%) rotate(-3deg)" }, "60%": { "-wmso-transform": "translateX(10%) rotate(2deg)" }, "75%": { "-wmso-transform": "translateX(-5%) rotate(-1deg)" }, "100%": { "-wmso-transform": "translateX(0%)" } } } break; case "bounceIn": r.keyframes = { name: "bounceIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "scale(.3)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.05)" }, "70%": { "-wmso-transform": "scale(.9)" }, "100%": { "-wmso-transform": "scale(1)" } } } break; case "bounceInDown": r.keyframes = { name: "bounceInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(30px)" }, "80%": { "-wmso-transform": "translateY(-10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceInLeft": r.keyframes = { name: "bounceInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(30px)" }, "80%": { "-wmso-transform": "translateX(-10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInRight": r.keyframes = { name: "bounceInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateX(-30px)" }, "80%": { "-wmso-transform": "translateX(10px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "bounceInUp": r.keyframes = { name: "bounceInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "60%": { "opacity": "1", "-wmso-transform": "translateY(-30px)" }, "80%": { "-wmso-transform": "translateY(10px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "bounceOut": r.keyframes = { name: "bounceOut", frames: { "0%": { "-wmso-transform": "scale(1)" }, "25%": { "-wmso-transform": "scale(.95)" }, "50%": { "opacity": "1", "-wmso-transform": "scale(1.1)" }, "100%": { "opacity": "0", "-wmso-transform": "scale(.3)" } } } break; case "bounceOutDown": r.keyframes = { name: "bounceOutDown", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "bounceOutLeft": r.keyframes = { name: "bounceOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "bounceOutRight": r.keyframes = { name: "bounceOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "bounceOutUp": r.keyframes = { name: "bounceOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "20%": { "opacity": "1", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "fadeIn": r.keyframes = { name: "fadeIn", frames: { "0%": { "opacity": "0" }, "100%": { "opacity": "1" } } } break; case "fadeInDown": r.keyframes = { name: "fadeInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInDownBig": r.keyframes = { name: "fadeInDownBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInLeft": r.keyframes = { name: "fadeInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInLeftBig": r.keyframes = { name: "fadeInLeftBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRight": r.keyframes = { name: "fadeInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInRightBig": r.keyframes = { name: "fadeInRightBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0)" } } } break; case "fadeInUp": r.keyframes = { name: "fadeInUp", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(20px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeInUpBig": r.keyframes = { name: "fadeInUpBig", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" }, "100%": { "opacity": "1", "-wmso-transform": "translateY(0)" } } } break; case "fadeOut": r.keyframes = { name: "fadeOut", frames: { "0%": { "opacity": "1" }, "100%": { "opacity": "0" } } } break; case "fadeOutDown": r.keyframes = { name: "fadeOutDown", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(20px)" } } } break; case "fadeOutDownBig": r.keyframes = { name: "fadeOutDownBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(2000px)" } } } break; case "fadeOutLeft": r.keyframes = { name: "fadeOutLeft", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-20px)" } } } break; case "fadeOutLeftBig": r.keyframes = { name: "fadeOutLeftBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "fadeOutRight": r.keyframes = { name: "fadeOutRight", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(20px)" } } } break; case "fadeOutRightBig": r.keyframes = { name: "fadeOutRightBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "fadeOutUp": r.keyframes = { name: "fadeOutUp", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-20px)" } } } break; case "fadeOutUpBig": r.keyframes = { name: "fadeOutUpBig", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "flip": r.keyframes = { name: "flip", frames: { "0%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(0) scale(1)", "animation-timing-function": "ease-out" }, "40%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(170deg) scale(1)", "animation-timing-function": "ease-out" }, "50%": { "-wmso-transform": "perspective(400px) translateZ(150px) rotateY(190deg) scale(1)", "animation-timing-function": "ease-in" }, "80%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(.95)", "animation-timing-function": "ease-in" }, "100%": { "-wmso-transform": "perspective(400px) translateZ(0) rotateY(360deg) scale(1)", "animation-timing-function": "ease-in" } } } break; case "flipInX": r.keyframes = { name: "flipInX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateX(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateX(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" } } } break; case "flipInY": r.keyframes = { name: "flipInY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" }, "40%": { "-wmso-transform": "perspective(400px) rotateY(-10deg)" }, "70%": { "-wmso-transform": "perspective(400px) rotateY(10deg)" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" } } } break; case "flipOutX": r.keyframes = { name: "flipOutX", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateX(90deg)", "opacity": "0" } } } break; case "flipOutY": r.keyframes = { name: "flipOutY", frames: { "0%": { "-wmso-transform": "perspective(400px) rotateY(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "perspective(400px) rotateY(90deg)", "opacity": "0" } } } break; case "lightSpeedIn": r.keyframes = { name: "lightSpeedIn", frames: { "0%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" }, "60%": { "-wmso-transform": "translateX(-20%) skewX(30deg)", "opacity": "1" }, "80%": { "-wmso-transform": "translateX(0%) skewX(-15deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" } } } break; case "lightSpeedOut": r.keyframes = { name: "lightSpeedOut", frames: { "0%": { "-wmso-transform": "translateX(0%) skewX(0deg)", "opacity": "1" }, "100%": { "-wmso-transform": "translateX(100%) skewX(-30deg)", "opacity": "0" } } } break; case "rotateIn": r.keyframes = { name: "rotateIn", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(-200deg)", "opacity": "0" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownLeft": r.keyframes = { name: "rotateInDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInDownRight": r.keyframes = { name: "rotateInDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpLeft": r.keyframes = { name: "rotateInUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateInUpRight": r.keyframes = { name: "rotateInUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" } } } break; case "rotateOut": r.keyframes = { name: "rotateOut", frames: { "0%": { "transform-origin": "center center", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "center center", "-wmso-transform": "rotate(200deg)", "opacity": "0" } } } break; case "rotateOutDownLeft": r.keyframes = { name: "rotateOutDownLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "rotateOutDownRight": r.keyframes = { name: "rotateOutDownRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpLeft": r.keyframes = { name: "rotateOutUpLeft", frames: { "0%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "left bottom", "-wmso-transform": "rotate(-90deg)", "opacity": "0" } } } break; case "rotateOutUpRight": r.keyframes = { name: "rotateOutUpRight", frames: { "0%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(0)", "opacity": "1" }, "100%": { "transform-origin": "right bottom", "-wmso-transform": "rotate(90deg)", "opacity": "0" } } } break; case "slideInDown": r.keyframes = { name: "slideInDown", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" }, "100%": { "-wmso-transform": "translateY(0)" } } } break; case "slideInLeft": r.keyframes = { name: "slideInLeft", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideInRight": r.keyframes = { name: "slideInRight", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" }, "100%": { "-wmso-transform": "translateX(0)" } } } break; case "slideOutLeft": r.keyframes = { name: "slideOutLeft", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(-2000px)" } } } break; case "slideOutRight": r.keyframes = { name: "slideOutRight", frames: { "0%": { "-wmso-transform": "translateX(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(2000px)" } } } break; case "slideOutUp": r.keyframes = { name: "slideOutUp", frames: { "0%": { "-wmso-transform": "translateY(0)" }, "100%": { "opacity": "0", "-wmso-transform": "translateY(-2000px)" } } } break; case "hinge": r.keyframes = { name: "hinge", frames: { "0%": { "-wmso-transform": "rotate(0)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "20%, 60%": { "-wmso-transform": "rotate(80deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "40%": { "-wmso-transform": "rotate(60deg)", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "80%": { "-wmso-transform": "rotate(60deg) translateY(0)", "opacity": "1", "transform-origin": "top left", "animation-timing-function": "ease-in-out" }, "100%": { "-wmso-transform": "translateY(700px)", "opacity": "0" } } } break; case "rollIn": r.keyframes = { name: "rollIn", frames: { "0%": { "opacity": "0", "-wmso-transform": "translateX(-100%) rotate(-120deg)" }, "100%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" } } } break; case "rollOut": r.keyframes = { name: "rollOut", frames: { "0%": { "opacity": "1", "-wmso-transform": "translateX(0px) rotate(0deg)" }, "100%": { "opacity": "0", "-wmso-transform": "translateX(100%) rotate(120deg)" } } } break; } return r; } o.lib.molecules.cf = function(value) { var r = {}, clearing = { content: '" "', display: 'table', clear: 'both' }; switch(value) { case 'before': r['&:before'] = clearing; break; case 'after': r['&:after'] = clearing; break; default: r['&:before'] = clearing; r['&:after'] = clearing; break; } return r; } o.lib.molecules.grid = function(value) { var args = require('../../helpers/args')(value); if(args.length == 2) { var res = { cf: 'both' } res[args[1]] = { fl: 'l', '-mw-bxz': 'bb', wid: (100 / parseInt(args[0])).toFixed(2) + '%' } return res; } else { return {}; } } o.lib.molecules.moveto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), x = units(!args[0] || args[0] == '' ? 0 : args[0], 'px'), y = units(!args[1] || args[1] == '' ? 0 : args[1], 'px'), z = units(!args[2] || args[2] == '' ? 0 : args[2], 'px'); if(args.length == 2) { return {"-ws-trf": ">translate(" + x + "," + y + ")"}; } else if(args.length == 3) { return {"-ws-trf": ">translate3d(" + x + "," + y + "," + z + ")"}; } } o.lib.molecules.rotateto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value); if(args.length == 1) { return {"-ws-trf": ">rotate(" + units(args[0], 'deg') + ")"}; } } o.lib.molecules.scaleto = function(value) { var args = require('../../helpers/args')(value), x = !args[0] || args[0] == '' ? 0 : args[0], y = !args[1] || args[1] == '' ? 0 : args[1]; if(args.length == 2) { return {"-ws-trf": ">scale(" + x + "," + y + ")"}; } } o.lib.molecules.size = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), r = {}; if(args.length == 2) { if(args[0] != '') { r.width = units(args[0]); } if(args[1] != '') { r.height = units(args[1]); } return r; } else { return { width: units(args[0]), height: units(args[0]) } } } o.lib.molecules.transparent = function(value) { var args = require('../../helpers/args')(value), r = {}; value = parseFloat(value); r['-s-filter'] = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=' + (value * 100) + ')'; r['filter'] = 'alpha(opacity=' + (value * 100) + ')'; r['-m-opacity'] = value; r['opacity'] = value; r['KhtmlOpacity'] = value; return r; }; return o.index; })(window);
masimakopoulos/cdnjs
ajax/libs/absurd/0.3.138/absurd.organic.js
JavaScript
mit
47,805
/* version: 0.0.49 */ var Absurd = (function(w) { var lib = { api: {}, helpers: {}, plugins: {}, processors: { css: { plugins: {}}, html: { plugins: {}} } }; var require = function(v) { switch(v) { case "/../processors/html/HTML.js": return lib.processors.html.HTML; break; } return function() {} }; var __dirname = ""; var client = function() { return function(arg) { /******************************************* Copied directly from /lib/API.js */ var extend = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var _api = { defaultProcessor: lib.processors.css.CSS() }, _rules = {}, _storage = {}, _plugins = {}, _hooks = {}; _api.getRules = function(stylesheet) { if(typeof stylesheet === 'undefined') { return _rules; } else { if(typeof _rules[stylesheet] === 'undefined') { _rules[stylesheet] = []; } return _rules[stylesheet]; } } _api.getPlugins = function() { return _plugins; } _api.getStorage = function() { return _storage; } _api.flush = function() { _rules = {}; _storage = []; } _api.import = function() { if(_api.callHooks("import", arguments)) return _api; return _api; } // hooks _api.addHook = function(method, callback) { if(!_hooks[method]) _hooks[method] = []; var isAlreadyAdded = false; for(var i=0; c=_hooks[method][i]; i++) { if(c === callback) { isAlreadyAdded = true; } } isAlreadyAdded === false ? _hooks[method].push(callback) : null; } _api.callHooks = function(method, args) { if(_hooks[method]) { for(var i=0; c=_hooks[method][i]; i++) { if(c.apply(_api, args) === true) return true; } } return false; } // internal variables _api.numOfAddedRules = 0; /******************************************* Copied directly from /lib/API.js */ // client side specific methods _api.compile = function(callback, options) { if(_api.callHooks("compile", arguments)) return _api; var defaultOptions = { combineSelectors: true, minify: false, processor: _api.defaultProcessor }; options = extend(defaultOptions, options || {}); options.processor( _api.getRules(), callback || function() {}, {combineSelectors: true} ); _api.flush(); } // registering api methods for(var method in lib.api) { if(method !== "compile") { _api[method] = lib.api[method](_api); _api[method] = (function(method) { return function() { var f = lib.api[method](_api); if(_api.callHooks(method, arguments)) return _api; return f.apply(_api, arguments); } })(method); } } // registering plugins for(var pluginName in lib.plugins) { _api.plugin(pluginName, lib.plugins[pluginName]()); } // accept function if(typeof arg === "function") { arg(_api); } return _api; } } lib.api.add = function(API) { var checkAndExecutePlugin = function(selector, prop, value, stylesheet) { var plugin = API.getPlugins()[prop]; if(typeof plugin !== 'undefined') { var pluginResponse = plugin(API, value); if(pluginResponse) { addRule(selector, pluginResponse, stylesheet); } return true; } else { return false; } } var clearing = function(props) { // plugins var plugins = API.getPlugins(); for(var prop in props) { if(typeof plugins[prop] !== 'undefined') { props[prop] = false; } } // pseudo classes for(var prop in props) { if(prop.charAt(0) === ":") { props[prop] = false; } } } var checkForNesting = function(selector, props, stylesheet) { for(var prop in props) { if(typeof props[prop] === 'object') { // check for pseudo classes if(prop.charAt(0) === ":") { addRule(selector + prop, props[prop], stylesheet); // check for media query } else if(prop.indexOf("@media") === 0 || prop.indexOf("@supports") === 0) { addRule(selector, props[prop], prop); // check for plugins } else if(checkAndExecutePlugin(selector, prop, props[prop], stylesheet) === false) { addRule(selector + " " + prop, props[prop], stylesheet); } props[prop] = false; } else if(typeof props[prop] === 'function') { props[prop] = props[prop](); checkForNesting(selector, props, stylesheet); } else { if(checkAndExecutePlugin(selector, prop, props[prop], stylesheet)) { props[prop] = false; } } } } var addRule = function(selector, props, stylesheet) { // if array is passed as props if(typeof props.length !== 'undefined' && typeof props === "object") { for(var i=0; prop=props[i]; i++) { addRule(selector, prop, stylesheet); } return; } // check for plugin if(checkAndExecutePlugin(null, selector, props, stylesheet)) { return; } // if the selector is already there if(typeof API.getRules(stylesheet || "mainstream")[selector] == 'object') { var current = API.getRules(stylesheet || "mainstream")[selector]; for(var propNew in props) { // overwrite already added value current[propNew] = props[propNew]; } // no, the selector is still not added } else { API.getRules(stylesheet || "mainstream")[selector] = props; } checkForNesting(selector, props, stylesheet || "mainstream"); clearing(props); } var add = function(rules, stylesheet) { API.numOfAddedRules += 1; for(var selector in rules) { if(typeof rules[selector].length !== 'undefined' && typeof rules[selector] === "object") { for(var i=0; r=rules[selector][i]; i++) { addRule(selector, r, stylesheet || "mainstream"); } } else { addRule(selector, rules[selector], stylesheet || "mainstream"); } } return API; } return add; } var extend = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; lib.api.compile = function(api) { return function() { var path = null, callback = null, options = null; for(var i=0; i<arguments.length; i++) { switch(typeof arguments[i]) { case "function": callback = arguments[i]; break; case "string": path = arguments[i]; break; case "object": options = arguments[i]; break; } } var _defaultOptions = { combineSelectors: true, minify: false, processor: api.defaultProcessor }; options = extend(_defaultOptions, options || {}); options.processor( api.getRules(), function(err, result) { if(path != null) { try { fs.writeFile(path, result, function (err) { callback(err, result); }); } catch(err) { callback(err); } } else { callback(err, result); } api.flush(); }, options ); } } lib.api.compileFile = function(api) { return api.compile; } var ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; }; lib.api.darken = function(api) { return function(color, percents) { return ColorLuminance(color, -(percents/100)); } } lib.api.hook = function(api) { return function(method, callback) { api.addHook(method, callback); return api; } } var ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; }; lib.api.lighten = function(api) { return function(color, percents) { return ColorLuminance(color, percents/100); } } var metamorphosis = { html: function(api) { api.defaultProcessor = require(__dirname + "/../processors/html/HTML.js")(); api.hook("add", function(tags, template) { api.getRules(template || "mainstream").push(tags); return true; }); } } lib.api.morph = function(api) { return function(type) { if(metamorphosis[type]) { api.flush(); metamorphosis[type](api); } return api; } } lib.api.plugin = function(api) { var plugin = function(name, func) { api.getPlugins()[name] = func; return api; } return plugin; } lib.api.raw = function(api) { return function(raw) { var o = {}, v = {}; var id = "____raw_" + api.numOfAddedRules; v[id] = raw; o[id] = v; api.add(o); return api; } } lib.api.register = function(api) { return function(method, func) { api[method] = func; return api; } } lib.api.storage = function(API) { var _s = API.getStorage(); var storage = function(name, value) { if(typeof value != "undefined") { _s[name] = value; } else { if(_s[name]) { return _s[name]; } else { throw new Error("There is no data in the storage associated with '" + name + "'"); } } return API; } return storage; } // credits: http://www.sitepoint.com/javascript-generate-lighter-darker-color/ lib.helpers.ColorLuminance = function (hex, lum) { // validate hex string hex = String(hex).replace(/[^0-9a-f]/gi, ''); if (hex.length < 6) { hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; } lum = lum || 0; // convert to decimal and change luminosity var rgb = "#", c, i; for (i = 0; i < 3; i++) { c = parseInt(hex.substr(i*2,2), 16); c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); rgb += ("00"+c).substr(c.length); } return rgb; } lib.helpers.RequireUncached = function(module) { delete require.cache[require.resolve(module)] return require(module); } var cleanCSS = require('clean-css'), newline = '\n', defaultOptions = { combineSelectors: true, minify: false }; var toCSS = function(rules) { var css = ''; for(var selector in rules) { // handling raw content if(selector.indexOf("____raw") === 0) { css += rules[selector][selector] + newline; // handling normal styles } else { var entity = selector + ' {' + newline; for(var prop in rules[selector]) { var value = rules[selector][prop]; if(value === "") { value = '""'; } entity += ' ' + transformUppercase(prop) + ': ' + value + ';' + newline; } entity += '}' + newline; css += entity; } } return css; } // dealing with false values var filterRules = function(rules) { var arr = {}; for(var selector in rules) { var areThereAnyProps = false; var props = {}; for(var prop in rules[selector]) { var value = rules[selector][prop]; if(value !== false) { areThereAnyProps = true; props[prop] = value; } } if(areThereAnyProps) { arr[selector] = props; } } return arr; } // combining selectors var combineSelectors = function(rules) { var map = {}, arr = {}; // creating the map for(var selector in rules) { var props = rules[selector]; for(var prop in props) { var value = props[prop]; if(!map[prop]) map[prop] = {}; if(!map[prop][value]) map[prop][value] = []; map[prop][value].push(selector); } } // converting the map to usual rules object for(var prop in map) { var values = map[prop]; for(var value in values) { var selectors = values[value]; if(!arr[selectors.join(", ")]) arr[selectors.join(", ")] = {} var selector = arr[selectors.join(", ")]; selector[prop] = value; } } return arr; } // transform uppercase to [-lowercase] var transformUppercase = function(prop) { var transformed = ""; for(var i=0; c=prop.charAt(i); i++) { if(c === c.toUpperCase() && c.toLowerCase() !== c.toUpperCase()) { transformed += "-" + c.toLowerCase(); } else { transformed += c; } } return transformed; } lib.processors.css.CSS = function() { return function(rules, callback, options) { options = options || defaultOptions; var css = ''; for(var stylesheet in rules) { var r = filterRules(rules[stylesheet]); r = options.combineSelectors ? combineSelectors(r) : r; if(stylesheet === "mainstream") { css += toCSS(r); } else { css += stylesheet + " {" + newline + toCSS(r) + "}" + newline; } } // Minification if(options.minify) { css = cleanCSS.process(css); if(callback) callback(null, css); } else { if(callback) callback(null, css); } return css; } } lib.processors.css.plugins.charset = function() { return function(api, charsetValue) { if(typeof charsetValue === "string") { api.raw("@charset: \"" + charsetValue + "\";"); } else if(typeof charsetValue === "object") { charsetValue = charsetValue.charset.replace(/:/g, '').replace(/'/g, '').replace(/"/g, '').replace(/ /g, ''); api.raw("@charset: \"" + charsetValue + "\";"); } } } lib.processors.css.plugins.document = function() { return function(api, value) { if(typeof value === "object") { var stylesheet = ''; stylesheet += '@' + value.vendor + 'document'; stylesheet += ' ' + value.document; if(value.rules && value.rules.length) { for(var i=0; rule=value.rules[i]; i++) { api.handlecssrule(rule, stylesheet); } } else if(typeof value.styles != "undefined") { api.add(value.styles, stylesheet); } } } } lib.processors.css.plugins.keyframes = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { // js or json if(typeof value.frames != "undefined") { var content = '@keyframes ' + value.name + " {\n"; content += processor({mainstream: value.frames}); content += "}"; api.raw(content + "\n" + content.replace("@keyframes", "@-webkit-keyframes")); // css } else if(typeof value.keyframes != "undefined") { var content = '@keyframes ' + value.name + " {\n"; var frames = {}; for(var i=0; rule=value.keyframes[i]; i++) { if(rule.type === "keyframe") { var f = frames[rule.values] = {}; for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { f[declaration.property] = declaration.value; } } } } content += processor({mainstream: frames}); content += "}"; api.raw(content + "\n" + content.replace("@keyframes", "@-webkit-keyframes")); } } } } lib.processors.css.plugins.media = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { var content = '@media ' + value.media + " {\n"; var rules = {}; for(var i=0; rule=value.rules[i]; i++) { var r = rules[rule.selectors.toString()] = {}; if(rule.type === "rule") { for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { r[declaration.property] = declaration.value; } } } } content += processor({mainstream: rules}); content += "}"; api.raw(content); } } } lib.processors.css.plugins.namespace = function() { return function(api, value) { if(typeof value === "string") { api.raw("@namespace: \"" + value + "\";"); } else if(typeof value === "object") { value = value.namespace.replace(/: /g, '').replace(/'/g, '').replace(/"/g, '').replace(/ /g, '').replace(/:h/g, 'h'); api.raw("@namespace: \"" + value + "\";"); } } } lib.processors.css.plugins.page = function() { return function(api, value) { if(typeof value === "object") { var content = ""; if(value.selectors.length > 0) { content += "@page " + value.selectors.join(", ") + " {\n"; } else { content += "@page {\n"; } for(var i=0; declaration=value.declarations[i]; i++) { if(declaration.type == "declaration") { content += " " + declaration.property + ": " + declaration.value + ";\n"; } } content += "}"; api.raw(content); } } } lib.processors.css.plugins.supports = function() { return function(api, value) { var processor = require(__dirname + "/../CSS.js")(); if(typeof value === "object") { var content = '@supports ' + value.supports + " {\n"; var rules = {}; for(var i=0; rule=value.rules[i]; i++) { var r = rules[rule.selectors.toString()] = {}; if(rule.type === "rule") { for(var j=0; declaration=rule.declarations[j]; j++) { if(declaration.type === "declaration") { r[declaration.property] = declaration.value; } } } } content += processor({mainstream: rules}); content += "}"; api.raw(content); } } } var data = null, newline = '\n', defaultOptions = {}, tags = []; var transformUppercase = function(prop) { var transformed = ""; for(var i=0; c=prop.charAt(i); i++) { if(c === c.toUpperCase() && c.toLowerCase() !== c.toUpperCase()) { transformed += "-" + c.toLowerCase(); } else { transformed += c; } } return transformed; } var processTemplate = function(templateName) { var html = ''; for(var template in data) { if(template == templateName) { var numOfRules = data[template].length; for(var i=0; i<numOfRules; i++) { html += process('', data[template][i]); } } } return html; } var process = function(tagName, obj) { // console.log("------------------------\n", tagName, ">", obj); var html = '', attrs = '', childs = ''; if(typeof obj === "string") { return packTag(tagName, attrs, obj); } var addToChilds = function(value) { if(childs != '') { childs += newline; } childs += value; } // process directives for(var directiveName in obj) { var value = obj[directiveName]; switch(directiveName) { case "_attrs": for(var attrName in value) { if(typeof value[attrName] === "function") { attrs += " " + transformUppercase(attrName) + "=\"" + value[attrName]() + "\""; } else { attrs += " " + transformUppercase(attrName) + "=\"" + value[attrName] + "\""; } } obj[directiveName] = false; break; case "_": addToChilds(value); obj[directiveName] = false; break; case "_tpl": if(typeof value == "string") { addToChilds(processTemplate(value)); } else if(typeof value == "object" && value.length && value.length > 0) { var tmp = ''; for(var i=0; tpl=value[i]; i++) { tmp += processTemplate(tpl) if(i < value.length-1) tmp += newline; } addToChilds(tmp); } obj[directiveName] = false; break; } } for(var name in obj) { var value = obj[name]; if(value !== false) { switch(typeof value) { case "string": addToChilds(process(name, value)); break; case "object": if(value.length && value.length > 0) { var tmp = ''; for(var i=0; v=value[i]; i++) { tmp += process('', typeof v == "function" ? v() : v); if(i < value.length-1) tmp += newline; } addToChilds(process(name, tmp)); } else { addToChilds(process(name, value)); } break; case "function": addToChilds(process(name, value())); break; } } } if(tagName != '') { html += packTag(tagName, attrs, childs); } else { html += childs; } return html; } var packTag = function(tagName, attrs, childs) { var html = ''; if(childs !== '') { html += '<' + transformUppercase(tagName) + attrs + '>' + newline + childs + newline + '</' + transformUppercase(tagName) + '>'; } else { html += '<' + transformUppercase(tagName) + attrs + '/>'; } return html; } lib.processors.html.HTML = function() { return function(rules, callback, options) { data = rules; callback = callback || function() {}; options = options || defaultOptions; var html = processTemplate("mainstream"); callback(null, html); return html; } }; return client(); })(window);
thesandlord/cdnjs
ajax/libs/absurd/0.0.50/absurd.js
JavaScript
mit
20,876
/* ========================================================== * sco.valid.js * http://github.com/terebentina/sco.js * ========================================================== * Copyright 2013 Dan Caragea. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ /*jshint laxcomma:true, sub:true, browser:true, jquery:true, smarttabs:true */ ;(function($, undefined) { "use strict"; var pluginName = 'scojs_valid'; function Valid($form, options) { this.options = $.extend({}, $.fn[pluginName].defaults, options); this.$form = $form; this.allowed_rules = []; this.errors = {}; var self = this; $.each(this.methods, function(k, v) { self.allowed_rules.push(k); }); } $.extend(Valid.prototype, { // this is the main function - it returns either true if the validation passed or false validate: function() { var self = this ,form_fields = this.$form.serializeArray() ,all_fields = this.$form.find(':input[name]').map(function() {return this.name;}).get() ; // remove any possible displayed errors from previous runs $.each(this.errors, function(field_name, error) { var $input = self.$form.find('[name="' + field_name + '"]'); $input.siblings('span.message').html(''); if (self.options.wrapper !== null) { $input.closest(self.options.wrapper).removeClass('error'); } }); this.errors = {}; $.each(self.options.rules, function(field_name, rules) { var field = null ,normalized_rules = {} ; // find the field in the form $.each(form_fields, function(k, v) { if (v.name === field_name) { field = v; return false; } }); // if field was not found, it could mean 2 things: mispelled field name in the rules or the field is not a successful control // even if it's not successful we have to validate it if (field === null) { if ($.inArray(field_name, all_fields) !== -1) { field = {name: field_name, value: self.get_field_value(field_name)}; } } // if it's still null then it's either mispelled or disabled. We don't care either way if (field !== null) { $.each(rules, function(rule_idx, rule_value) { // determine the method to call and its args // only string and objects are allowed if ($.type(rule_value) === 'string') { // make sure the requested method actually exists. if ($.inArray(rule_value, self.allowed_rules) !== -1) { normalized_rules[rule_value] = null; } } else { // if not string then we assume it's a {key: val} object. Only 1 key is allowed $.each(rule_value, function(k, v) { // make sure the requested method actually exists. if ($.inArray(k, self.allowed_rules) !== -1) { normalized_rules[k] = v; return false; } }); } }); $.each(normalized_rules, function(fn_name, fn_args) { // call the method with the requested args if (self.methods[fn_name].call(self, field.name, field.value, fn_args, normalized_rules) !== true) { self.errors[field.name] = self.format.call(self, field.name, fn_name, fn_args); } }); } }); if (!$.isEmptyObject(this.errors)) { this.show(this.errors); return false; } else { return true; } }, show: function(errors) { var self = this; $.each(errors, function(k, v) { var $input = self.$form.find('[name="' + k + '"]'), $span = $input.siblings('.message'); if (self.options.wrapper !== null) { $input.closest(self.options.wrapper).addClass('error'); } if ($span.length === 0) { $span = $('<span/>', {'class': 'message'}); $input.after($span); } $span.html(v); }); }, methods: { not_empty: function(field, value) { return value !== null && $.trim(value).length > 0; }, min_length: function(field, value, min_len, all_rules) { var length = $.trim(value).length ,result = (length >= min_len); if (!all_rules['not_empty']) { result = result || length === 0; } return result; }, max_length: function(field, value, max_len) { return $.trim(value).length <= max_len; }, regex: function(field, value, regexp) { return regexp.test(value); }, email: function(field, value) { // by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ var regex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i; return regex.test($.trim(value)); }, url: function(field, value) { // by Scott Gonzalez: http://projects.scottsplayground.com/iri/ var regex = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i; return regex.test(value); }, exact_length: function(field, value, exact_length, all_rules) { var length = $.trim(value).length ,result = (length === exact_length); if (!all_rules['not_empty']) { result = result || length === 0; } return result; }, equals: function(field, value, target) { return value === target; }, ip: function(field, value) { var regex = /^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/i; return regex.test($.trim(value)); }, credit_card: function(field, value) { // accept only spaces, digits and dashes if (/[^0-9 \-]+/.test(value)) { return false; } var nCheck = 0 ,nDigit = 0 ,bEven = false; value = value.replace(/\D/g, ""); for (var n = value.length - 1; n >= 0; n--) { var cDigit = value.charAt(n); nDigit = parseInt(cDigit, 10); if (bEven) { if ((nDigit *= 2) > 9) { nDigit -= 9; } } nCheck += nDigit; bEven = !bEven; } return (nCheck % 10) === 0; }, alpha: function(field, value) { var regex = /^[a-z]*$/i; return regex.test(value); }, alpha_numeric: function(field, value) { var regex = /^[a-z0-9]*$/i; return regex.test(value); }, alpha_dash: function(field, value) { var regex = /^[a-z0-9_\-]*$/i; return regex.test(value); }, digit: function(field, value) { var regex = /^\d*$/; return regex.test(value); }, numeric: function(field, value) { var regex = /^([\+\-]?[0-9]+(\.[0-9]+)?)?$/; return regex.test(value); }, // same as numeric decimal: function(field, value) { var regex = /^([\+\-]?[0-9]+(\.[0-9]+)?)?$/; return regex.test(value); }, matches: function(field, value, param) { return value === this.$form.find('[name="' + param + '"]').val(); } }, messages: { not_empty: 'This field is required.' ,min_length: 'Please enter at least :value characters.' ,max_length: 'Please enter no more than :value characters.' ,regex: '' ,email: 'Please enter a valid email address.' ,url: 'Please enter a valid URL.' ,exact_length: 'Please enter exactly :value characters.' ,equals: '' ,ip: '' ,credit_card: 'Please enter a valid credit card number.' ,alpha: '' ,alpha_numeric: '' ,alpha_dash: '' ,digit: 'Please enter only digits.' ,numeric: 'Please enter a valid number.' ,decimal: 'Please enter a decimal number.' ,matches: 'Must match the previous value.' }, /** * finds the most specific error message string and replaces any ":value" substring with the actual value */ format: function(field_name, rule, params) { var message; if (typeof this.options.messages[field_name] !== 'undefined' && typeof this.options.messages[field_name][rule] !== 'undefined') { message = this.options.messages[field_name][rule]; } else { message = this.messages[rule]; } if ($.type(params) !== 'undefined' && params !== null) { if ($.type(params) === 'boolean' || $.type(params) === 'string' || $.type(params) === 'number') { params = {value: params}; } $.each(params, function(k, v) { message = message.replace(new RegExp(':' + k, 'ig'), v); }); } return message; }, /** * get a normalized value for a form field. */ get_field_value: function(field_name) { var $input = this.$form.find('[name="' + field_name + '"]'); if ($input.is('[type="checkbox"], [type="radio"]')) { return $input.is(':checked') ? $input.val() : null; } else { return $input.val(); } } }); /** * main function to use on a form (like $('#form).scojs_valid({...})). Performs validation of the form, sets the error messages on form inputs and returns * true/false depending on whether the form passed validation or not * * @param hash/string options the hash of rules and messages to validate the form against (and messages to show if failed validation) or the string "option" * @param {string} key the option key to retrieve or set. If the third param of the function is available then act as a setter, otherwise as a getter. * @param {mixed} value the value to set on the key */ $.fn[pluginName] = function(options, key, value) { var $form = this.eq(0) ,validator = $form.data(pluginName); if ($.type(options) === 'object') { if (!validator) { var opts = $.extend({}, $.fn[pluginName].defaults, options, $form.data()); validator = new Valid($form, opts); $form.data(pluginName, validator).attr('novalidate', 'novalidate'); } $form.ajaxForm({ beforeSubmit: function() { return validator.validate(); } ,dataType: 'json' ,success: function(response, status, xhr, $form) { if (response.status === 'fail') { if (typeof options.onFail !== 'function' || options.onFail.call(this, response, validator, $form) !== false) { validator.show(response.data.errors); } } else if (response.status === 'error') { if (typeof options.onError !== 'function' || options.onError.call(this, response, validator, $form) !== false) { $.scojs_message(response.message, $.scojs_message.TYPE_ERROR); } } else if (response.status === 'success') { if (typeof options.onSuccess !== 'function' || options.onSuccess.call(this, response, validator, $form) !== false) { if (response.data.next) { if (response.data.next === '.') { // refresh current page window.location.href = window.location.href.replace(/#.*$/, ''); } else if (response.data.next === 'x') { // close the parent modal $form.closest('.modal').trigger('close'); } else { window.location.href = response.data.next; } } if (response.data.message) { $.scojs_message(response.data.message, $.scojs_message.TYPE_OK); } } } } }); // allow chaining return this; } else if (options === 'option') { if ($.type(value) === 'undefined') { return validator.options[key]; } else { validator.options[key] = value; return validator; } } else { return validator ? validator : this; } }; $[pluginName] = function(form, options) { if (typeof form === 'string') { form = $(form); } return new Valid(form, options); }; $.fn[pluginName].defaults = { wrapper: 'label' // the html tag that wraps the field and which defines a "row" of the form ,rules: {} // array of rules to check the form against. Each value should be either a string with the name of the method to use as rule or a hash like {method: <method params>} ,messages: {} // custom error messages like {username: {not_empty: 'hey you forgot to enter your username', min_length: 'come on, more than 2 chars, ok?'}, password: {....}} }; })(jQuery);
kennynaoh/cdnjs
ajax/libs/sco.js/1.0.0/js/sco.valid.js
JavaScript
mit
14,126
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ namespace Doctrine\DBAL\Sharding\SQLAzure\Schema; use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Index; /** * Converts a single tenant schema into a multi-tenant schema for SQL Azure * Federations under the following assumptions: * * - Every table is part of the multi-tenant application, only explicitly * excluded tables are non-federated. The behavior of the tables being in * global or federated database is undefined. It depends on you selecting a * federation before DDL statements or not. * - Every Primary key of a federated table is extended by another column * 'tenant_id' with a default value of the SQLAzure function * `federation_filtering_value('tenant_id')`. * - You always have to work with `filtering=On` when using federations with this * multi-tenant approach. * - Primary keys are either using globally unique ids (GUID, Table Generator) * or you explicitly add the tenent_id in every UPDATE or DELETE statement * (otherwise they will affect the same-id rows from other tenents as well). * SQLAzure throws errors when you try to create IDENTIY columns on federated * tables. * * @author Benjamin Eberlei <kontakt@beberlei.de> */ class MultiTenantVisitor implements Visitor { /** * @var array */ private $excludedTables = array(); /** * @var string */ private $tenantColumnName; /** * @var string */ private $tenantColumnType = 'integer'; /** * Name of the federation distribution, defaulting to the tenantColumnName * if not specified. * * @var string */ private $distributionName; /** * @param array $excludedTables * @param string $tenantColumnName * @param string|null $distributionName */ public function __construct(array $excludedTables = array(), $tenantColumnName = 'tenant_id', $distributionName = null) { $this->excludedTables = $excludedTables; $this->tenantColumnName = $tenantColumnName; $this->distributionName = $distributionName ?: $tenantColumnName; } /** * {@inheritdoc} */ public function acceptTable(Table $table) { if (in_array($table->getName(), $this->excludedTables)) { return; } $table->addColumn($this->tenantColumnName, $this->tenantColumnType, array( 'default' => "federation_filtering_value('". $this->distributionName ."')", )); $clusteredIndex = $this->getClusteredIndex($table); $indexColumns = $clusteredIndex->getColumns(); $indexColumns[] = $this->tenantColumnName; if ($clusteredIndex->isPrimary()) { $table->dropPrimaryKey(); $table->setPrimaryKey($indexColumns); } else { $table->dropIndex($clusteredIndex->getName()); $table->addIndex($indexColumns, $clusteredIndex->getName()); $table->getIndex($clusteredIndex->getName())->addFlag('clustered'); } } /** * @param \Doctrine\DBAL\Schema\Table $table * * @return \Doctrine\DBAL\Schema\Index * * @throws \RuntimeException */ private function getClusteredIndex($table) { foreach ($table->getIndexes() as $index) { if ($index->isPrimary() && ! $index->hasFlag('nonclustered')) { return $index; } elseif ($index->hasFlag('clustered')) { return $index; } } throw new \RuntimeException("No clustered index found on table " . $table->getName()); } /** * {@inheritdoc} */ public function acceptSchema(Schema $schema) { } /** * {@inheritdoc} */ public function acceptColumn(Table $table, Column $column) { } /** * {@inheritdoc} */ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) { } /** * {@inheritdoc} */ public function acceptIndex(Table $table, Index $index) { } /** * {@inheritdoc} */ public function acceptSequence(Sequence $sequence) { } }
Akhenoth/Factorian
concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php
PHP
mit
5,346
var util = require('util'), colors = require('colors'), http = require('http'), httpProxy = require('../../lib/node-http-proxy'), Store = require('../helpers/store') http.createServer(new Store().handler()).listen(7531) // Now we set up our proxy. httpProxy.createServer( // This is where our middlewares go, with any options desired - in this case, // the list of routes/URLs and their destinations. require('proxy-by-url')({ '/store': { port: 7531, host: 'localhost' }, '/': { port: 9000, host: 'localhost' } }) ).listen(8000); // // Target Http Server (to listen for requests on 'localhost') // http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); res.end(); }).listen(9000); // And finally, some colored startup output. util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow);
captain-pj/LASP
node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware2.js
JavaScript
mit
1,099
(function ( factory ) { if ( typeof define === 'function' && define.amd ) { // AMD. Register as an anonymous module. define( [ 'jquery' ], factory ); } else if ( typeof exports === 'object' ) { // Node/CommonJS factory( require( 'jquery' ) ); } else { // Browser globals factory( jQuery ); } }( function ( jQuery ) { /* * jQuery mmenu header addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ !function(e){function t(t){return"boolean"==typeof t&&(t={add:t,update:t}),"object"!=typeof t&&(t={}),!t.add||t.add instanceof Array||(t.add=["prev","title","next"]),t=e.extend(!0,{},e[s].defaults[d],t)}function a(e){return e}function n(){f=!0,r=e[s]._c,i=e[s]._d,h=e[s]._e,r.add("header hasheader prev next close title"),o=e[s].glbl}var s="mmenu",d="header";e[s].prototype["_init_"+d]=function(s){f||n();var i=this.vars[d+"_added"];this.vars[d+"_added"]=!0,i||(this.opts[d]=t(this.opts[d]),this.conf[d]=a(this.conf[d]));var l=this,c=this.opts[d];if(this.conf[d],!i&&c.add){if(c.content)var p=c.content;else for(var p="",u=0,v=c.add.length;v>u;u++)switch(c.add[u]){case"prev":case"next":case"close":p+='<a class="'+r[c.add[u]]+'" href="#"></a>';break;case"title":p+='<span class="'+r.title+'"></span>';break;default:p+=c.add[u]}e('<div class="'+r.header+'" />').prependTo(this.$menu).append(p)}var m=e("div."+r.header,this.$menu);if(m.length){if(this.$menu.addClass(r.hasheader),c.update){var b=m.find("."+r.title),_=m.find("."+r.prev),x=m.find("."+r.next),N=m.find("."+r.close),g=!1;o.$page&&(g="#"+o.$page.attr("id"),N.attr("href",g)),s.each(function(){var t=e(this),a=t.find("."+l.conf.classNames[d].panelHeader),n=t.find("."+l.conf.classNames[d].panelPrev),s=t.find("."+l.conf.classNames[d].panelNext),i=a.html(),o=n.attr("href"),f=s.attr("href"),p=n.html(),u=s.html();i||(i=t.find("."+r.subclose).html()),i||(i=c.title),o||(o=t.find("."+r.subclose).attr("href"));var v=function(){b[i?"show":"hide"](),b.html(i),_[o?"attr":"removeAttr"]("href",o),_[o||p?"show":"hide"](),_.html(p),x[f?"attr":"removeAttr"]("href",f),x[f||u?"show":"hide"](),x.html(u)};t.on(h.open,v),t.hasClass(r.current)&&v()})}"function"==typeof this._init_buttonbars&&this._init_buttonbars(m)}},e[s].addons.push(d),e[s].defaults[d]={add:!1,content:!1,title:"Menu",update:!1},e[s].configuration.classNames[d]={panelHeader:"Header",panelNext:"Next",panelPrev:"Prev"};var r,i,h,o,f=!1}(jQuery); }));
ekeneijeoma/cdnjs
ajax/libs/jQuery.mmenu/4.6.4/js/umd/addons/jquery.mmenu.header.umd.js
JavaScript
mit
2,465
/* forward-proxy.js: Example of proxying over HTTP with additional forward proxy Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var util = require('util'), colors = require('colors'), http = require('http'), httpProxy = require('../../lib/node-http-proxy'); // // Setup proxy server with forwarding // httpProxy.createServer(9000, 'localhost', { forward: { port: 9001, host: 'localhost' } }).listen(8003); // // Target Http Server // http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); res.end(); }).listen(9000); // // Target Http Forwarding Server // http.createServer(function (req, res) { util.puts('Receiving forward for: ' + req.url); res.writeHead(200, { 'Content-Type': 'text/plain' }); res.write('request successfully forwarded to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); res.end(); }).listen(9001); util.puts('http proxy server '.blue + 'started '.green.bold + 'on port '.blue + '8003 '.yellow + 'with forward proxy'.magenta.underline); util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); util.puts('http forward server '.blue + 'started '.green.bold + 'on port '.blue + '9001 '.yellow);
jenniemai/TruckOn
node_modules/karma/node_modules/http-proxy/examples/http/forward-proxy.js
JavaScript
mit
2,446
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; z-index: 2000; position: fixed; margin: auto; top: 12px; left: 0; right: 0; bottom: 0; width: 200px; height: 50px; overflow: hidden; } .pace .pace-progress { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); display: block; position: absolute; right: 100%; margin-right: -7px; width: 93%; top: 7px; height: 14px; font-size: 12px; background: #7c60e0; color: #7c60e0; line-height: 60px; font-weight: bold; font-family: Helvetica, Arial, "Lucida Grande", sans-serif; -webkit-box-shadow: 120px 0 #fff, 240px 0 #fff; -ms-box-shadow: 120px 0 #fff, 240px 0 #fff; box-shadow: 120px 0 #fff, 240px 0 #fff; } .pace .pace-progress:after { content: attr(data-progress-text); display: inline-block; position: fixed; width: 45px; text-align: right; right: 0; padding-right: 16px; top: 4px; } .pace .pace-progress[data-progress-text="0%"]:after { right: -200px } .pace .pace-progress[data-progress-text="1%"]:after { right: -198.14px } .pace .pace-progress[data-progress-text="2%"]:after { right: -196.28px } .pace .pace-progress[data-progress-text="3%"]:after { right: -194.42px } .pace .pace-progress[data-progress-text="4%"]:after { right: -192.56px } .pace .pace-progress[data-progress-text="5%"]:after { right: -190.7px } .pace .pace-progress[data-progress-text="6%"]:after { right: -188.84px } .pace .pace-progress[data-progress-text="7%"]:after { right: -186.98px } .pace .pace-progress[data-progress-text="8%"]:after { right: -185.12px } .pace .pace-progress[data-progress-text="9%"]:after { right: -183.26px } .pace .pace-progress[data-progress-text="10%"]:after { right: -181.4px } .pace .pace-progress[data-progress-text="11%"]:after { right: -179.54px } .pace .pace-progress[data-progress-text="12%"]:after { right: -177.68px } .pace .pace-progress[data-progress-text="13%"]:after { right: -175.82px } .pace .pace-progress[data-progress-text="14%"]:after { right: -173.96px } .pace .pace-progress[data-progress-text="15%"]:after { right: -172.1px } .pace .pace-progress[data-progress-text="16%"]:after { right: -170.24px } .pace .pace-progress[data-progress-text="17%"]:after { right: -168.38px } .pace .pace-progress[data-progress-text="18%"]:after { right: -166.52px } .pace .pace-progress[data-progress-text="19%"]:after { right: -164.66px } .pace .pace-progress[data-progress-text="20%"]:after { right: -162.8px } .pace .pace-progress[data-progress-text="21%"]:after { right: -160.94px } .pace .pace-progress[data-progress-text="22%"]:after { right: -159.08px } .pace .pace-progress[data-progress-text="23%"]:after { right: -157.22px } .pace .pace-progress[data-progress-text="24%"]:after { right: -155.36px } .pace .pace-progress[data-progress-text="25%"]:after { right: -153.5px } .pace .pace-progress[data-progress-text="26%"]:after { right: -151.64px } .pace .pace-progress[data-progress-text="27%"]:after { right: -149.78px } .pace .pace-progress[data-progress-text="28%"]:after { right: -147.92px } .pace .pace-progress[data-progress-text="29%"]:after { right: -146.06px } .pace .pace-progress[data-progress-text="30%"]:after { right: -144.2px } .pace .pace-progress[data-progress-text="31%"]:after { right: -142.34px } .pace .pace-progress[data-progress-text="32%"]:after { right: -140.48px } .pace .pace-progress[data-progress-text="33%"]:after { right: -138.62px } .pace .pace-progress[data-progress-text="34%"]:after { right: -136.76px } .pace .pace-progress[data-progress-text="35%"]:after { right: -134.9px } .pace .pace-progress[data-progress-text="36%"]:after { right: -133.04px } .pace .pace-progress[data-progress-text="37%"]:after { right: -131.18px } .pace .pace-progress[data-progress-text="38%"]:after { right: -129.32px } .pace .pace-progress[data-progress-text="39%"]:after { right: -127.46px } .pace .pace-progress[data-progress-text="40%"]:after { right: -125.6px } .pace .pace-progress[data-progress-text="41%"]:after { right: -123.74px } .pace .pace-progress[data-progress-text="42%"]:after { right: -121.88px } .pace .pace-progress[data-progress-text="43%"]:after { right: -120.02px } .pace .pace-progress[data-progress-text="44%"]:after { right: -118.16px } .pace .pace-progress[data-progress-text="45%"]:after { right: -116.3px } .pace .pace-progress[data-progress-text="46%"]:after { right: -114.44px } .pace .pace-progress[data-progress-text="47%"]:after { right: -112.58px } .pace .pace-progress[data-progress-text="48%"]:after { right: -110.72px } .pace .pace-progress[data-progress-text="49%"]:after { right: -108.86px } .pace .pace-progress[data-progress-text="50%"]:after { right: -107px } .pace .pace-progress[data-progress-text="51%"]:after { right: -105.14px } .pace .pace-progress[data-progress-text="52%"]:after { right: -103.28px } .pace .pace-progress[data-progress-text="53%"]:after { right: -101.42px } .pace .pace-progress[data-progress-text="54%"]:after { right: -99.56px } .pace .pace-progress[data-progress-text="55%"]:after { right: -97.7px } .pace .pace-progress[data-progress-text="56%"]:after { right: -95.84px } .pace .pace-progress[data-progress-text="57%"]:after { right: -93.98px } .pace .pace-progress[data-progress-text="58%"]:after { right: -92.12px } .pace .pace-progress[data-progress-text="59%"]:after { right: -90.26px } .pace .pace-progress[data-progress-text="60%"]:after { right: -88.4px } .pace .pace-progress[data-progress-text="61%"]:after { right: -86.53999999999999px } .pace .pace-progress[data-progress-text="62%"]:after { right: -84.68px } .pace .pace-progress[data-progress-text="63%"]:after { right: -82.82px } .pace .pace-progress[data-progress-text="64%"]:after { right: -80.96000000000001px } .pace .pace-progress[data-progress-text="65%"]:after { right: -79.1px } .pace .pace-progress[data-progress-text="66%"]:after { right: -77.24px } .pace .pace-progress[data-progress-text="67%"]:after { right: -75.38px } .pace .pace-progress[data-progress-text="68%"]:after { right: -73.52px } .pace .pace-progress[data-progress-text="69%"]:after { right: -71.66px } .pace .pace-progress[data-progress-text="70%"]:after { right: -69.8px } .pace .pace-progress[data-progress-text="71%"]:after { right: -67.94px } .pace .pace-progress[data-progress-text="72%"]:after { right: -66.08px } .pace .pace-progress[data-progress-text="73%"]:after { right: -64.22px } .pace .pace-progress[data-progress-text="74%"]:after { right: -62.36px } .pace .pace-progress[data-progress-text="75%"]:after { right: -60.5px } .pace .pace-progress[data-progress-text="76%"]:after { right: -58.64px } .pace .pace-progress[data-progress-text="77%"]:after { right: -56.78px } .pace .pace-progress[data-progress-text="78%"]:after { right: -54.92px } .pace .pace-progress[data-progress-text="79%"]:after { right: -53.06px } .pace .pace-progress[data-progress-text="80%"]:after { right: -51.2px } .pace .pace-progress[data-progress-text="81%"]:after { right: -49.34px } .pace .pace-progress[data-progress-text="82%"]:after { right: -47.480000000000004px } .pace .pace-progress[data-progress-text="83%"]:after { right: -45.62px } .pace .pace-progress[data-progress-text="84%"]:after { right: -43.76px } .pace .pace-progress[data-progress-text="85%"]:after { right: -41.9px } .pace .pace-progress[data-progress-text="86%"]:after { right: -40.04px } .pace .pace-progress[data-progress-text="87%"]:after { right: -38.18px } .pace .pace-progress[data-progress-text="88%"]:after { right: -36.32px } .pace .pace-progress[data-progress-text="89%"]:after { right: -34.46px } .pace .pace-progress[data-progress-text="90%"]:after { right: -32.6px } .pace .pace-progress[data-progress-text="91%"]:after { right: -30.740000000000002px } .pace .pace-progress[data-progress-text="92%"]:after { right: -28.880000000000003px } .pace .pace-progress[data-progress-text="93%"]:after { right: -27.02px } .pace .pace-progress[data-progress-text="94%"]:after { right: -25.16px } .pace .pace-progress[data-progress-text="95%"]:after { right: -23.3px } .pace .pace-progress[data-progress-text="96%"]:after { right: -21.439999999999998px } .pace .pace-progress[data-progress-text="97%"]:after { right: -19.58px } .pace .pace-progress[data-progress-text="98%"]:after { right: -17.72px } .pace .pace-progress[data-progress-text="99%"]:after { right: -15.86px } .pace .pace-progress[data-progress-text="100%"]:after { right: -14px } .pace .pace-activity { position: absolute; width: 100%; height: 28px; z-index: 2001; box-shadow: inset 0 0 0 2px #7c60e0, inset 0 0 0 7px #FFF; border-radius: 10px; } .pace.pace-inactive { display: none; }
js-data/cdnjs
ajax/libs/pace/1.0.1/themes/purple/pace-theme-loading-bar.css
CSS
mit
9,477
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u0635", "\u0645" ], "DAY": [ "\u0627\u0644\u0623\u062d\u062f", "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062e\u0645\u064a\u0633", "\u0627\u0644\u062c\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062a" ], "ERANAMES": [ "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", "\u0645\u064a\u0644\u0627\u062f\u064a" ], "ERAS": [ "\u0642.\u0645", "\u0645" ], "FIRSTDAYOFWEEK": 5, "MONTH": [ "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0634\u0628\u0627\u0637", "\u0622\u0630\u0627\u0631", "\u0646\u064a\u0633\u0627\u0646", "\u0623\u064a\u0627\u0631", "\u062d\u0632\u064a\u0631\u0627\u0646", "\u062a\u0645\u0648\u0632", "\u0622\u0628", "\u0623\u064a\u0644\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" ], "SHORTDAY": [ "\u0627\u0644\u0623\u062d\u062f", "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062e\u0645\u064a\u0633", "\u0627\u0644\u062c\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062a" ], "SHORTMONTH": [ "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0634\u0628\u0627\u0637", "\u0622\u0630\u0627\u0631", "\u0646\u064a\u0633\u0627\u0646", "\u0623\u064a\u0627\u0631", "\u062d\u0632\u064a\u0631\u0627\u0646", "\u062a\u0645\u0648\u0632", "\u0622\u0628", "\u0623\u064a\u0644\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" ], "STANDALONEMONTH": [ "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0634\u0628\u0627\u0637", "\u0622\u0630\u0627\u0631", "\u0646\u064a\u0633\u0627\u0646", "\u0623\u064a\u0627\u0631", "\u062d\u0632\u064a\u0631\u0627\u0646", "\u062a\u0645\u0648\u0632", "\u0622\u0628", "\u0623\u064a\u0644\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644", "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a", "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644" ], "WEEKENDRANGE": [ 4, 5 ], "fullDate": "EEEE\u060c d MMMM\u060c y", "longDate": "d MMMM\u060c y", "medium": "dd\u200f/MM\u200f/y h:mm:ss a", "mediumDate": "dd\u200f/MM\u200f/y", "mediumTime": "h:mm:ss a", "short": "d\u200f/M\u200f/y h:mm a", "shortDate": "d\u200f/M\u200f/y", "shortTime": "h:mm a" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "din", "DECIMAL_SEP": "\u066b", "GROUP_SEP": "\u066c", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "-\u00a4\u00a0", "negSuf": "", "posPre": "\u00a4\u00a0", "posSuf": "" } ] }, "id": "ar-jo", "localeID": "ar_JO", "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} }); }]);
dakshshah96/cdnjs
ajax/libs/angular-i18n/1.5.6/angular-locale_ar-jo.js
JavaScript
mit
4,406
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631", "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631" ], "DAY": [ "\u06cc\u06a9\u0634\u0646\u0628\u0647", "\u062f\u0648\u0634\u0646\u0628\u0647", "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", "\u062c\u0645\u0639\u0647", "\u0634\u0646\u0628\u0647" ], "ERANAMES": [ "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f", "\u0645\u06cc\u0644\u0627\u062f\u06cc" ], "ERAS": [ "\u0642.\u0645.", "\u0645." ], "FIRSTDAYOFWEEK": 5, "MONTH": [ "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", "\u0641\u0648\u0631\u06cc\u0647\u0654", "\u0645\u0627\u0631\u0633", "\u0622\u0648\u0631\u06cc\u0644", "\u0645\u0647\u0654", "\u0698\u0648\u0626\u0646", "\u0698\u0648\u0626\u06cc\u0647\u0654", "\u0627\u0648\u062a", "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", "\u0627\u06a9\u062a\u0628\u0631", "\u0646\u0648\u0627\u0645\u0628\u0631", "\u062f\u0633\u0627\u0645\u0628\u0631" ], "SHORTDAY": [ "\u06cc\u06a9\u0634\u0646\u0628\u0647", "\u062f\u0648\u0634\u0646\u0628\u0647", "\u0633\u0647\u200c\u0634\u0646\u0628\u0647", "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647", "\u067e\u0646\u062c\u0634\u0646\u0628\u0647", "\u062c\u0645\u0639\u0647", "\u0634\u0646\u0628\u0647" ], "SHORTMONTH": [ "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654", "\u0641\u0648\u0631\u06cc\u0647\u0654", "\u0645\u0627\u0631\u0633", "\u0622\u0648\u0631\u06cc\u0644", "\u0645\u0647\u0654", "\u0698\u0648\u0626\u0646", "\u0698\u0648\u0626\u06cc\u0647\u0654", "\u0627\u0648\u062a", "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", "\u0627\u06a9\u062a\u0628\u0631", "\u0646\u0648\u0627\u0645\u0628\u0631", "\u062f\u0633\u0627\u0645\u0628\u0631" ], "STANDALONEMONTH": [ "\u0698\u0627\u0646\u0648\u06cc\u0647", "\u0641\u0648\u0631\u06cc\u0647", "\u0645\u0627\u0631\u0633", "\u0622\u0648\u0631\u06cc\u0644", "\u0645\u0647", "\u0698\u0648\u0626\u0646", "\u0698\u0648\u0626\u06cc\u0647", "\u0627\u0648\u062a", "\u0633\u067e\u062a\u0627\u0645\u0628\u0631", "\u0627\u06a9\u062a\u0628\u0631", "\u0646\u0648\u0627\u0645\u0628\u0631", "\u062f\u0633\u0627\u0645\u0628\u0631" ], "WEEKENDRANGE": [ 4, 4 ], "fullDate": "EEEE d MMMM y", "longDate": "d MMMM y", "medium": "d MMM y H:mm:ss", "mediumDate": "d MMM y", "mediumTime": "H:mm:ss", "short": "y/M/d H:mm", "shortDate": "y/M/d", "shortTime": "H:mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "Rial", "DECIMAL_SEP": "\u066b", "GROUP_SEP": "\u066c", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "-\u200e\u00a4", "negSuf": "", "posPre": "\u200e\u00a4", "posSuf": "" } ] }, "id": "fa-ir", "localeID": "fa_IR", "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]);
sufuf3/cdnjs
ajax/libs/angular-i18n/1.6.0-rc.0/angular-locale_fa-ir.js
JavaScript
mit
3,883
/*! * socket.io-node * Copyright(c) 2011 LearnBoost <dev@learnboost.com> * MIT Licensed */ var vm = require('vm') , should = require('should'); /** * Generates evn variables for the vm so we can `emulate` a browser. * @returns {Object} evn variables */ exports.env = function env () { var details = { location: { port: 8080 , host: 'www.example.org' , hostname: 'www.example.org' , href: 'http://www.example.org/example/' , pathname: '/example/' , protocol: 'http:' , search: '' , hash: '' } , console: { log: function(){}, info: function(){}, warn: function(){}, error: function(){} } , navigator: { userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit' + '/534.27 (KHTML, like Gecko) Chrome/12.0.716.0 Safari/534.27' , appName: 'socket.io' , platform: process.platform , appVersion: process.version , } , name: 'socket.io' , innerWidth: 1024 , innerHeight: 768 , length: 1 , outerWidth: 1024 , outerHeight: 768 , pageXOffset: 0 , pageYOffset: 0 , screenX: 0 , screenY: 0 , screenLeft: 0 , screenTop: 0 , scrollX: 0 , scrollY: 0 , scrollTop: 0 , scrollLeft: 0 , screen: { width: 0 , height: 0 } }; // circular references details.window = details.self = details.contentWindow = details; // callable methods details.Image = details.scrollTo = details.scrollBy = details.scroll = details.resizeTo = details.resizeBy = details.prompt = details.print = details.open = details.moveTo = details.moveBy = details.focus = details.createPopup = details.confirm = details.close = details.blur = details.alert = details.clearTimeout = details.clearInterval = details.setInterval = details.setTimeout = details.XMLHttpRequest = details.getComputedStyle = details.trigger = details.dispatchEvent = details.removeEventListener = details.addEventListener = function(){}; // frames details.frames = [details]; // document details.document = details; details.document.domain = details.location.href; return details; }; /** * Executes a script in a browser like env and returns * the result * * @param {String} contents The script content * @returns {Object} The evaluated script. */ exports.execute = function execute (contents) { var env = exports.env() , script = vm.createScript(contents); // run the script with `browser like` globals script.runInNewContext(env); return env; };
lrntc/Raspberry-IoT-Clock
node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js
JavaScript
mit
2,639
YUI.add('selector-native', function (Y, NAME) { (function(Y) { /** * The selector-native module provides support for native querySelector * @module dom * @submodule selector-native * @for Selector */ /** * Provides support for using CSS selectors to query the DOM * @class Selector * @static * @for Selector */ Y.namespace('Selector'); // allow native module to standalone var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition', OWNER_DOCUMENT = 'ownerDocument'; var Selector = { _types: { esc: { token: '\uE000', re: /\\[:\[\]\(\)#\.\'\>+~"]/gi }, attr: { token: '\uE001', re: /(\[[^\]]*\])/g }, pseudo: { token: '\uE002', re: /(\([^\)]*\))/g } }, useNative: true, _escapeId: function(id) { if (id) { id = id.replace(/([:\[\]\(\)#\.'<>+~"])/g,'\\$1'); } return id; }, _compare: ('sourceIndex' in Y.config.doc.documentElement) ? function(nodeA, nodeB) { var a = nodeA.sourceIndex, b = nodeB.sourceIndex; if (a === b) { return 0; } else if (a > b) { return 1; } return -1; } : (Y.config.doc.documentElement[COMPARE_DOCUMENT_POSITION] ? function(nodeA, nodeB) { if (nodeA[COMPARE_DOCUMENT_POSITION](nodeB) & 4) { return -1; } else { return 1; } } : function(nodeA, nodeB) { var rangeA, rangeB, compare; if (nodeA && nodeB) { rangeA = nodeA[OWNER_DOCUMENT].createRange(); rangeA.setStart(nodeA, 0); rangeB = nodeB[OWNER_DOCUMENT].createRange(); rangeB.setStart(nodeB, 0); compare = rangeA.compareBoundaryPoints(1, rangeB); // 1 === Range.START_TO_END } return compare; }), _sort: function(nodes) { if (nodes) { nodes = Y.Array(nodes, 0, true); if (nodes.sort) { nodes.sort(Selector._compare); } } return nodes; }, _deDupe: function(nodes) { var ret = [], i, node; for (i = 0; (node = nodes[i++]);) { if (!node._found) { ret[ret.length] = node; node._found = true; } } for (i = 0; (node = ret[i++]);) { node._found = null; node.removeAttribute('_found'); } return ret; }, /** * Retrieves a set of nodes based on a given CSS selector. * @method query * * @param {string} selector The CSS Selector to test the node against. * @param {HTMLElement} root optional An HTMLElement to start the query from. Defaults to Y.config.doc * @param {Boolean} firstOnly optional Whether or not to return only the first match. * @return {Array} An array of nodes that match the given selector. * @static */ query: function(selector, root, firstOnly, skipNative) { root = root || Y.config.doc; var ret = [], useNative = (Y.Selector.useNative && Y.config.doc.querySelector && !skipNative), queries = [[selector, root]], query, result, i, fn = (useNative) ? Y.Selector._nativeQuery : Y.Selector._bruteQuery; if (selector && fn) { // split group into seperate queries if (!skipNative && // already done if skipping (!useNative || root.tagName)) { // split native when element scoping is needed queries = Selector._splitQueries(selector, root); } for (i = 0; (query = queries[i++]);) { result = fn(query[0], query[1], firstOnly); if (!firstOnly) { // coerce DOM Collection to Array result = Y.Array(result, 0, true); } if (result) { ret = ret.concat(result); } } if (queries.length > 1) { // remove dupes and sort by doc order ret = Selector._sort(Selector._deDupe(ret)); } } Y.log('query: ' + selector + ' returning: ' + ret.length, 'info', 'Selector'); return (firstOnly) ? (ret[0] || null) : ret; }, _replaceSelector: function(selector) { var esc = Y.Selector._parse('esc', selector), // pull escaped colon, brackets, etc. attrs, pseudos; // first replace escaped chars, which could be present in attrs or pseudos selector = Y.Selector._replace('esc', selector); // then replace pseudos before attrs to avoid replacing :not([foo]) pseudos = Y.Selector._parse('pseudo', selector); selector = Selector._replace('pseudo', selector); attrs = Y.Selector._parse('attr', selector); selector = Y.Selector._replace('attr', selector); return { esc: esc, attrs: attrs, pseudos: pseudos, selector: selector }; }, _restoreSelector: function(replaced) { var selector = replaced.selector; selector = Y.Selector._restore('attr', selector, replaced.attrs); selector = Y.Selector._restore('pseudo', selector, replaced.pseudos); selector = Y.Selector._restore('esc', selector, replaced.esc); return selector; }, _replaceCommas: function(selector) { var replaced = Y.Selector._replaceSelector(selector), selector = replaced.selector; if (selector) { selector = selector.replace(/,/g, '\uE007'); replaced.selector = selector; selector = Y.Selector._restoreSelector(replaced); } return selector; }, // allows element scoped queries to begin with combinator // e.g. query('> p', document.body) === query('body > p') _splitQueries: function(selector, node) { if (selector.indexOf(',') > -1) { selector = Y.Selector._replaceCommas(selector); } var groups = selector.split('\uE007'), // split on replaced comma token queries = [], prefix = '', id, i, len; if (node) { // enforce for element scoping if (node.nodeType === 1) { // Elements only id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } prefix = '[id="' + id + '"] '; } for (i = 0, len = groups.length; i < len; ++i) { selector = prefix + groups[i]; queries.push([selector, node]); } } return queries; }, _nativeQuery: function(selector, root, one) { if (Y.UA.webkit && selector.indexOf(':checked') > -1 && (Y.Selector.pseudos && Y.Selector.pseudos.checked)) { // webkit (chrome, safari) fails to pick up "selected" with "checked" return Y.Selector.query(selector, root, one, true); // redo with skipNative true to try brute query } try { //Y.log('trying native query with: ' + selector, 'info', 'selector-native'); return root['querySelector' + (one ? '' : 'All')](selector); } catch(e) { // fallback to brute if available //Y.log('native query error; reverting to brute query with: ' + selector, 'info', 'selector-native'); return Y.Selector.query(selector, root, one, true); // redo with skipNative true } }, filter: function(nodes, selector) { var ret = [], i, node; if (nodes && selector) { for (i = 0; (node = nodes[i++]);) { if (Y.Selector.test(node, selector)) { ret[ret.length] = node; } } } else { Y.log('invalid filter input (nodes: ' + nodes + ', selector: ' + selector + ')', 'warn', 'Selector'); } return ret; }, test: function(node, selector, root) { var ret = false, useFrag = false, groups, parent, item, items, frag, id, i, j, group; if (node && node.tagName) { // only test HTMLElements if (typeof selector == 'function') { // test with function ret = selector.call(node, node); } else { // test with query // we need a root if off-doc groups = selector.split(','); if (!root && !Y.DOM.inDoc(node)) { parent = node.parentNode; if (parent) { root = parent; } else { // only use frag when no parent to query frag = node[OWNER_DOCUMENT].createDocumentFragment(); frag.appendChild(node); root = frag; useFrag = true; } } root = root || node[OWNER_DOCUMENT]; id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } for (i = 0; (group = groups[i++]);) { // TODO: off-dom test group += '[id="' + id + '"]'; items = Y.Selector.query(group, root); for (j = 0; item = items[j++];) { if (item === node) { ret = true; break; } } if (ret) { break; } } if (useFrag) { // cleanup frag.removeChild(node); } }; } return ret; }, /** * A convenience function to emulate Y.Node's aNode.ancestor(selector). * @param {HTMLElement} element An HTMLElement to start the query from. * @param {String} selector The CSS selector to test the node against. * @return {HTMLElement} The ancestor node matching the selector, or null. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @static * @method ancestor */ ancestor: function (element, selector, testSelf) { return Y.DOM.ancestor(element, function(n) { return Y.Selector.test(n, selector); }, testSelf); }, _parse: function(name, selector) { return selector.match(Y.Selector._types[name].re); }, _replace: function(name, selector) { var o = Y.Selector._types[name]; return selector.replace(o.re, o.token); }, _restore: function(name, selector, items) { if (items) { var token = Y.Selector._types[name].token, i, len; for (i = 0, len = items.length; i < len; ++i) { selector = selector.replace(token, items[i]); } } return selector; } }; Y.mix(Y.Selector, Selector, true); })(Y); }, '@VERSION@', {"requires": ["dom-base"]});
sahat/cdnjs
ajax/libs/yui/3.7.1/selector-native/selector-native-debug.js
JavaScript
mit
11,629
YUI.add('selector-native', function (Y, NAME) { (function(Y) { /** * The selector-native module provides support for native querySelector * @module dom * @submodule selector-native * @for Selector */ /** * Provides support for using CSS selectors to query the DOM * @class Selector * @static * @for Selector */ Y.namespace('Selector'); // allow native module to standalone var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition', OWNER_DOCUMENT = 'ownerDocument'; var Selector = { _types: { esc: { token: '\uE000', re: /\\[:\[\]\(\)#\.\'\>+~"]/gi }, attr: { token: '\uE001', re: /(\[[^\]]*\])/g }, pseudo: { token: '\uE002', re: /(\([^\)]*\))/g } }, useNative: true, _escapeId: function(id) { if (id) { id = id.replace(/([:\[\]\(\)#\.'<>+~"])/g,'\\$1'); } return id; }, _compare: ('sourceIndex' in Y.config.doc.documentElement) ? function(nodeA, nodeB) { var a = nodeA.sourceIndex, b = nodeB.sourceIndex; if (a === b) { return 0; } else if (a > b) { return 1; } return -1; } : (Y.config.doc.documentElement[COMPARE_DOCUMENT_POSITION] ? function(nodeA, nodeB) { if (nodeA[COMPARE_DOCUMENT_POSITION](nodeB) & 4) { return -1; } else { return 1; } } : function(nodeA, nodeB) { var rangeA, rangeB, compare; if (nodeA && nodeB) { rangeA = nodeA[OWNER_DOCUMENT].createRange(); rangeA.setStart(nodeA, 0); rangeB = nodeB[OWNER_DOCUMENT].createRange(); rangeB.setStart(nodeB, 0); compare = rangeA.compareBoundaryPoints(1, rangeB); // 1 === Range.START_TO_END } return compare; }), _sort: function(nodes) { if (nodes) { nodes = Y.Array(nodes, 0, true); if (nodes.sort) { nodes.sort(Selector._compare); } } return nodes; }, _deDupe: function(nodes) { var ret = [], i, node; for (i = 0; (node = nodes[i++]);) { if (!node._found) { ret[ret.length] = node; node._found = true; } } for (i = 0; (node = ret[i++]);) { node._found = null; node.removeAttribute('_found'); } return ret; }, /** * Retrieves a set of nodes based on a given CSS selector. * @method query * * @param {string} selector The CSS Selector to test the node against. * @param {HTMLElement} root optional An HTMLElement to start the query from. Defaults to Y.config.doc * @param {Boolean} firstOnly optional Whether or not to return only the first match. * @return {Array} An array of nodes that match the given selector. * @static */ query: function(selector, root, firstOnly, skipNative) { root = root || Y.config.doc; var ret = [], useNative = (Y.Selector.useNative && Y.config.doc.querySelector && !skipNative), queries = [[selector, root]], query, result, i, fn = (useNative) ? Y.Selector._nativeQuery : Y.Selector._bruteQuery; if (selector && fn) { // split group into seperate queries if (!skipNative && // already done if skipping (!useNative || root.tagName)) { // split native when element scoping is needed queries = Selector._splitQueries(selector, root); } for (i = 0; (query = queries[i++]);) { result = fn(query[0], query[1], firstOnly); if (!firstOnly) { // coerce DOM Collection to Array result = Y.Array(result, 0, true); } if (result) { ret = ret.concat(result); } } if (queries.length > 1) { // remove dupes and sort by doc order ret = Selector._sort(Selector._deDupe(ret)); } } return (firstOnly) ? (ret[0] || null) : ret; }, _replaceSelector: function(selector) { var esc = Y.Selector._parse('esc', selector), // pull escaped colon, brackets, etc. attrs, pseudos; // first replace escaped chars, which could be present in attrs or pseudos selector = Y.Selector._replace('esc', selector); // then replace pseudos before attrs to avoid replacing :not([foo]) pseudos = Y.Selector._parse('pseudo', selector); selector = Selector._replace('pseudo', selector); attrs = Y.Selector._parse('attr', selector); selector = Y.Selector._replace('attr', selector); return { esc: esc, attrs: attrs, pseudos: pseudos, selector: selector }; }, _restoreSelector: function(replaced) { var selector = replaced.selector; selector = Y.Selector._restore('attr', selector, replaced.attrs); selector = Y.Selector._restore('pseudo', selector, replaced.pseudos); selector = Y.Selector._restore('esc', selector, replaced.esc); return selector; }, _replaceCommas: function(selector) { var replaced = Y.Selector._replaceSelector(selector), selector = replaced.selector; if (selector) { selector = selector.replace(/,/g, '\uE007'); replaced.selector = selector; selector = Y.Selector._restoreSelector(replaced); } return selector; }, // allows element scoped queries to begin with combinator // e.g. query('> p', document.body) === query('body > p') _splitQueries: function(selector, node) { if (selector.indexOf(',') > -1) { selector = Y.Selector._replaceCommas(selector); } var groups = selector.split('\uE007'), // split on replaced comma token queries = [], prefix = '', id, i, len; if (node) { // enforce for element scoping if (node.nodeType === 1) { // Elements only id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } prefix = '[id="' + id + '"] '; } for (i = 0, len = groups.length; i < len; ++i) { selector = prefix + groups[i]; queries.push([selector, node]); } } return queries; }, _nativeQuery: function(selector, root, one) { if (Y.UA.webkit && selector.indexOf(':checked') > -1 && (Y.Selector.pseudos && Y.Selector.pseudos.checked)) { // webkit (chrome, safari) fails to pick up "selected" with "checked" return Y.Selector.query(selector, root, one, true); // redo with skipNative true to try brute query } try { return root['querySelector' + (one ? '' : 'All')](selector); } catch(e) { // fallback to brute if available return Y.Selector.query(selector, root, one, true); // redo with skipNative true } }, filter: function(nodes, selector) { var ret = [], i, node; if (nodes && selector) { for (i = 0; (node = nodes[i++]);) { if (Y.Selector.test(node, selector)) { ret[ret.length] = node; } } } else { } return ret; }, test: function(node, selector, root) { var ret = false, useFrag = false, groups, parent, item, items, frag, id, i, j, group; if (node && node.tagName) { // only test HTMLElements if (typeof selector == 'function') { // test with function ret = selector.call(node, node); } else { // test with query // we need a root if off-doc groups = selector.split(','); if (!root && !Y.DOM.inDoc(node)) { parent = node.parentNode; if (parent) { root = parent; } else { // only use frag when no parent to query frag = node[OWNER_DOCUMENT].createDocumentFragment(); frag.appendChild(node); root = frag; useFrag = true; } } root = root || node[OWNER_DOCUMENT]; id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } for (i = 0; (group = groups[i++]);) { // TODO: off-dom test group += '[id="' + id + '"]'; items = Y.Selector.query(group, root); for (j = 0; item = items[j++];) { if (item === node) { ret = true; break; } } if (ret) { break; } } if (useFrag) { // cleanup frag.removeChild(node); } }; } return ret; }, /** * A convenience function to emulate Y.Node's aNode.ancestor(selector). * @param {HTMLElement} element An HTMLElement to start the query from. * @param {String} selector The CSS selector to test the node against. * @return {HTMLElement} The ancestor node matching the selector, or null. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @static * @method ancestor */ ancestor: function (element, selector, testSelf) { return Y.DOM.ancestor(element, function(n) { return Y.Selector.test(n, selector); }, testSelf); }, _parse: function(name, selector) { return selector.match(Y.Selector._types[name].re); }, _replace: function(name, selector) { var o = Y.Selector._types[name]; return selector.replace(o.re, o.token); }, _restore: function(name, selector, items) { if (items) { var token = Y.Selector._types[name].token, i, len; for (i = 0, len = items.length; i < len; ++i) { selector = selector.replace(token, items[i]); } } return selector; } }; Y.mix(Y.Selector, Selector, true); })(Y); }, '@VERSION@', {"requires": ["dom-base"]});
pzp1997/cdnjs
ajax/libs/yui/3.9.1/selector-native/selector-native.js
JavaScript
mit
11,205
YUI.add("widget-stdmod",function(e,t){function H(t){this._stdModNode=this.get(w),e.before(this._renderUIStdMod,this,O),e.before(this._bindUIStdMod,this,M),e.before(this._syncUIStdMod,this,_)}var n=e.Lang,r=e.Node,i=e.UA,s=e.Widget,o="",u="hd",a="bd",f="ft",l="header",c="body",h="footer",p="fillHeight",d="stdmod",v="Node",m="Content",g="firstChild",y="childNodes",b="ownerDocument",w="contentBox",E="height",S="offsetHeight",x="auto",T="headerContentChange",N="bodyContentChange",C="footerContentChange",k="fillHeightChange",L="heightChange",A="contentUpdate",O="renderUI",M="bindUI",_="syncUI",D="_applyParsedConfig",P=e.Widget.UI_SRC;H.HEADER=l,H.BODY=c,H.FOOTER=h,H.AFTER="after",H.BEFORE="before",H.REPLACE="replace";var B=H.HEADER,j=H.BODY,F=H.FOOTER,I=B+m,q=F+m,R=j+m;H.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:H.BODY,validator:function(e){return this._validateFillHeight(e)}}},H.HTML_PARSER={headerContent:function(e){return this._parseStdModHTML(B)},bodyContent:function(e){return this._parseStdModHTML(j)},footerContent:function(e){return this._parseStdModHTML(F)}},H.SECTION_CLASS_NAMES={header:s.getClassName(u),body:s.getClassName(a),footer:s.getClassName(f)},H.TEMPLATES={header:'<div class="'+H.SECTION_CLASS_NAMES[B]+'"></div>',body:'<div class="'+H.SECTION_CLASS_NAMES[j]+'"></div>',footer:'<div class="'+H.SECTION_CLASS_NAMES[F]+'"></div>'},H.prototype={_syncUIStdMod:function(){var e=this._stdModParsed;(!e||!e[I])&&this._uiSetStdMod(B,this.get(I)),(!e||!e[R])&&this._uiSetStdMod(j,this.get(R)),(!e||!e[q])&&this._uiSetStdMod(F,this.get(q)),this._uiSetFillHeight(this.get(p))},_renderUIStdMod:function(){this._stdModNode.addClass(s.getClassName(d)),this._renderStdModSections(),this.after(T,this._afterHeaderChange),this.after(N,this._afterBodyChange),this.after(C,this._afterFooterChange)},_renderStdModSections:function(){n.isValue(this.get(I))&&this._renderStdMod(B),n.isValue(this.get(R))&&this._renderStdMod(j),n.isValue(this.get(q))&&this._renderStdMod(F)},_bindUIStdMod:function(){this.after(k,this._afterFillHeightChange),this.after(L,this._fillHeight),this.after(A,this._fillHeight)},_afterHeaderChange:function(e){e.src!==P&&this._uiSetStdMod(B,e.newVal,e.stdModPosition)},_afterBodyChange:function(e){e.src!==P&&this._uiSetStdMod(j,e.newVal,e.stdModPosition)},_afterFooterChange:function(e){e.src!==P&&this._uiSetStdMod(F,e.newVal,e.stdModPosition)},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal)},_validateFillHeight:function(e){return!e||e==H.BODY||e==H.HEADER||e==H.FOOTER},_uiSetFillHeight:function(e){var t=this.getStdModNode(e),n=this._currFillNode;n&&t!==n&&n.setStyle(E,o),t&&(this._currFillNode=t),this._fillHeight()},_fillHeight:function(){if(this.get(p)){var e=this.get(E);e!=o&&e!=x&&this.fillHeight(this._currFillNode)}},_uiSetStdMod:function(e,t,r){if(n.isValue(t)){var i=this.getStdModNode(e,!0);this._addStdModContent(i,t,r),this.set(e+m,this._getStdModContent(e),{src:P})}else this._eraseStdMod(e);this.fire(A)},_renderStdMod:function(e){var t=this.get(w),n=this._findStdModSection(e);return n||(n=this._getStdModTemplate(e)),this._insertStdModSection(t,e,n),this[e+v]=n,this[e+v]},_eraseStdMod:function(e){var t=this.getStdModNode(e);t&&(t.remove(!0),delete this[e+v])},_insertStdModSection:function(e,t,n){var r=e.get(g);if(t===F||!r)e.appendChild(n);else if(t===B)e.insertBefore(n,r);else{var i=this[F+v];i?e.insertBefore(n,i):e.appendChild(n)}},_getStdModTemplate:function(e){return r.create(H.TEMPLATES[e],this._stdModNode.get(b))},_addStdModContent:function(e,t,n){switch(n){case H.BEFORE:n=0;break;case H.AFTER:n=undefined;break;default:n=H.REPLACE}e.insert(t,n)},_getPreciseHeight:function(e){var t=e?e.get(S):0,n="getBoundingClientRect";if(e&&e.hasMethod(n)){var r=e.invoke(n);r&&(t=r.bottom-r.top)}return t},_findStdModSection:function(e){return this.get(w).one("> ."+H.SECTION_CLASS_NAMES[e])},_parseStdModHTML:function(t){var n=this._findStdModSection(t);return n?(this._stdModParsed||(this._stdModParsed={},e.before(this._applyStdModParsedConfig,this,D)),this._stdModParsed[t+m]=1,n.get("innerHTML")):null},_applyStdModParsedConfig:function(e,t,n){var r=this._stdModParsed;r&&(r[I]=!(I in t)&&I in r,r[R]=!(R in t)&&R in r,r[q]=!(q in t)&&q in r)},_getStdModContent:function(e){return this[e+v]?this[e+v].get(y):null},setStdModContent:function(e,t,n){this.set(e+m,t,{stdModPosition:n})},getStdModNode:function(e,t){var n=this[e+v]||null;return!n&&t&&(n=this._renderStdMod(e)),n},fillHeight:function(e){if(e){var t=this.get(w),r=[this.headerNode,this.bodyNode,this.footerNode],s,o,u=0,a=0,f=!1;for(var l=0,c=r.length;l<c;l++)s=r[l],s&&(s!==e?u+=this._getPreciseHeight(s):f=!0);f&&((i.ie||i.opera)&&e.set(S,0),o=t.get(S)-parseInt(t.getComputedStyle("paddingTop"),10)-parseInt(t.getComputedStyle("paddingBottom"),10)-parseInt(t.getComputedStyle("borderBottomWidth"),10)-parseInt(t.getComputedStyle("borderTopWidth"),10),n.isNumber(o)&&(a=o-u,a>=0&&e.set(S,a)))}}},e.WidgetStdMod=H},"@VERSION@",{requires:["base-build","widget"]});
r3x/cdnjs
ajax/libs/yui/3.8.0/widget-stdmod/widget-stdmod-min.js
JavaScript
mit
5,071
var isLength = require('../internal/isLength'), isObjectLike = require('../internal/isObjectLike'); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Used for native method references. */ var objectProto = Object.prototype; /** * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objToString = objectProto.toString; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ function isTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; } module.exports = isTypedArray;
jeffshen18/React-Course
node_modules/lodash/lang/isTypedArray.js
JavaScript
mit
2,499
var createPartial = require('../internal/createPartial'); /** Used to compose bitmasks for wrapper metadata. */ var PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with `partial` arguments prepended * to those provided to the new function. This method is like `_.bind` except * it does **not** alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method does not set the "length" property of partially * applied functions. * * @static * @memberOf _ * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * var greet = function(greeting, name) { * return greeting + ' ' + name; * }; * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); * // => 'hello fred' * * // using placeholders * var greetFred = _.partial(greet, _, 'fred'); * greetFred('hi'); * // => 'hi fred' */ var partial = createPartial(PARTIAL_FLAG); // Assign default placeholders. partial.placeholder = {}; module.exports = partial;
JonHMChan/descartes
node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-block-scoping/node_modules/lodash/function/partial.js
JavaScript
mit
1,287
YUI.add('resize-proxy', function (Y, NAME) { var ACTIVE_HANDLE_NODE = 'activeHandleNode', CURSOR = 'cursor', DRAG_CURSOR = 'dragCursor', HOST = 'host', PARENT_NODE = 'parentNode', PROXY = 'proxy', PROXY_NODE = 'proxyNode', RESIZE = 'resize', RESIZE_PROXY = 'resize-proxy', WRAPPER = 'wrapper', getCN = Y.ClassNameManager.getClassName, CSS_RESIZE_PROXY = getCN(RESIZE, PROXY); /** Adds a `proxyNode` attribute and resizes it instead of the actual node. __very similar to DDProxy__ var resize = new Y.Resize({ //Selector of the node to resize node: '#demo' }); resize.plug(Y.Plugin.ResizeProxy); @class ResizeProxy @module resize @submodule resize-proxy @constructor @extends Plugin.Base @namespace Plugin */ function ResizeProxy() { ResizeProxy.superclass.constructor.apply(this, arguments); } Y.mix(ResizeProxy, { NAME: RESIZE_PROXY, NS: PROXY, ATTRS: { /** * The Resize proxy element. * * @attribute proxyNode * @default Generated using an internal HTML markup * @type String|Node */ proxyNode: { setter: Y.one, valueFn: function() { return Y.Node.create(this.PROXY_TEMPLATE); } } } }); Y.extend(ResizeProxy, Y.Plugin.Base, { /** * Template used to create the resize proxy. * * @property PROXY_TEMPLATE * @type {String} */ PROXY_TEMPLATE: '<div class="'+CSS_RESIZE_PROXY+'"></div>', initializer: function() { var instance = this; instance.afterHostEvent('resize:start', instance._afterResizeStart); instance.beforeHostMethod('_resize', instance._beforeHostResize); instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd); }, destructor: function() { var instance = this; instance.get(PROXY_NODE).remove(true); }, _afterHostResizeEnd: function(event) { var instance = this, drag = event.dragEvent.target; // reseting actXY from drag when drag end drag.actXY = []; // if proxy is true, hide it on resize end instance._syncProxyUI(); instance.get(PROXY_NODE).hide(); }, _afterResizeStart: function() { var instance = this; instance._renderProxy(); }, _beforeHostResize: function(event) { var instance = this, host = this.get(HOST); host._handleResizeAlignEvent(event.dragEvent); // if proxy is true _syncProxyUI instead of _syncUI instance._syncProxyUI(); return new Y.Do.Prevent(); }, /** * Render the <a href="ResizeProxy.html#attr_proxyNode">proxyNode</a> element and * make it sibling of the <a href="Resize.html#attr_node">node</a>. * * @method _renderProxy * @protected */ _renderProxy: function() { var instance = this, host = this.get(HOST), proxyNode = instance.get(PROXY_NODE); if (!proxyNode.inDoc()) { host.get(WRAPPER).get(PARENT_NODE).append( proxyNode.hide() ); } }, /** * Sync the proxy UI with internal values from * <a href="ResizeProxy.html#property_info">info</a>. * * @method _syncProxyUI * @protected */ _syncProxyUI: function() { var instance = this, host = this.get(HOST), info = host.info, activeHandleNode = host.get(ACTIVE_HANDLE_NODE), proxyNode = instance.get(PROXY_NODE), cursor = activeHandleNode.getStyle(CURSOR); proxyNode.show().setStyle(CURSOR, cursor); host.delegate.dd.set(DRAG_CURSOR, cursor); proxyNode.sizeTo(info.offsetWidth, info.offsetHeight); proxyNode.setXY([ info.left, info.top ]); } }); Y.namespace('Plugin'); Y.Plugin.ResizeProxy = ResizeProxy; }, '@VERSION@', {"requires": ["plugin", "resize-base"]});
aaqibrasheed/cdnjs
ajax/libs/yui/3.10.2/resize-proxy/resize-proxy-debug.js
JavaScript
mit
4,050
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; namespace Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Fscc { /// <summary> /// the response packet of FileNormalizedNameInformation /// </summary> public class FsccFileNormalizedNameInformationResponsePacket : FsccEmptyPacket { #region Properties /// <summary> /// the command of fscc packet /// </summary> public override uint Command { get { return (uint)FileInformationCommand.FileNormalizedNameInformation; } } #endregion #region Constructors /// <summary> /// default constructor /// </summary> public FsccFileNormalizedNameInformationResponsePacket() : base() { throw new NotImplementedException("Windows file systems do not implement this file information class"); } #endregion } }
dongruiqing/WindowsProtocolTestSuites
ProtoSDK/MS-FSCC/Messages/FsccFileNormalizedNameInformationResponsePacket.cs
C#
mit
1,107
using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace BeYourMarket.Model.Models.Mapping { public class MessageParticipantMap : EntityTypeConfiguration<MessageParticipant> { public MessageParticipantMap() { // Primary Key this.HasKey(t => t.ID); // Properties this.Property(t => t.UserID) .IsRequired() .HasMaxLength(128); // Table & Column Mappings this.ToTable("MessageParticipant"); this.Property(t => t.ID).HasColumnName("ID"); this.Property(t => t.MessageThreadID).HasColumnName("MessageThreadID"); this.Property(t => t.UserID).HasColumnName("UserID"); // Relationships this.HasRequired(t => t.AspNetUser) .WithMany(t => t.MessageParticipants) .HasForeignKey(d => d.UserID).WillCascadeOnDelete(); this.HasRequired(t => t.MessageThread) .WithMany(t => t.MessageParticipants) .HasForeignKey(d => d.MessageThreadID); } } }
sebvst/beyourmarket
src/BeYourMarket.Model/Models/Mapping/MessageParticipantMap.cs
C#
mit
1,158
# encoding: utf-8 """ Step implementations for block content containers """ from behave import given, then, when from docx import Document from docx.table import Table from helpers import test_docx # given =================================================== @given('a document containing a table') def given_a_document_containing_a_table(context): context.document = Document(test_docx('blk-containing-table')) @given('a paragraph') def given_a_paragraph(context): context.document = Document() context.paragraph = context.document.add_paragraph() # when ==================================================== @when('I add a paragraph') def when_add_paragraph(context): document = context.document context.p = document.add_paragraph() @when('I add a table') def when_add_table(context): rows, cols = 2, 2 context.document.add_table(rows, cols) # then ===================================================== @then('I can access the table') def then_can_access_table(context): table = context.document.tables[-1] assert isinstance(table, Table) @then('the new table appears in the document') def then_new_table_appears_in_document(context): table = context.document.tables[-1] assert isinstance(table, Table)
SimplyAgree/python-docx
features/steps/block.py
Python
mit
1,266
<div style="font-weight: bold;margin-left:15px;">example22.php</div><link rel="stylesheet" href="../phphl.css" type="text/css"><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 </pre></td><td class="hl-main" valign="top"><pre><span class="hl-inlinetags">&lt;?php</span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> content=&quot;text/plain; charset=utf-8&quot;</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">jpgraph/jpgraph.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">jpgraph/jpgraph_bar.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$data1y</span><span class="hl-code">=</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">,</span><span class="hl-number">8</span><span class="hl-code">,</span><span class="hl-number">19</span><span class="hl-code">,</span><span class="hl-number">3</span><span class="hl-code">,</span><span class="hl-number">10</span><span class="hl-code">,</span><span class="hl-number">5</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$data2y</span><span class="hl-code">=</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">,</span><span class="hl-number">2</span><span class="hl-code">,</span><span class="hl-number">11</span><span class="hl-code">,</span><span class="hl-number">7</span><span class="hl-code">,</span><span class="hl-number">14</span><span class="hl-code">,</span><span class="hl-number">4</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the graph. These two calls are always required</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Graph</span><span class="hl-brackets">(</span><span class="hl-number">310</span><span class="hl-code">,</span><span class="hl-number">200</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetScale</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">textlin</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetShadow</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">img</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetMargin</span><span class="hl-brackets">(</span><span class="hl-number">40</span><span class="hl-code">,</span><span class="hl-number">30</span><span class="hl-code">,</span><span class="hl-number">20</span><span class="hl-code">,</span><span class="hl-number">40</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the bar plots</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$b1plot</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">BarPlot</span><span class="hl-brackets">(</span><span class="hl-var">$data1y</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$b1plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFillColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">orange</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$b2plot</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">BarPlot</span><span class="hl-brackets">(</span><span class="hl-var">$data2y</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$b2plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFillColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">blue</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the grouped bar plot</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$gbplot</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GroupBarPlot</span><span class="hl-brackets">(</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-var">$b1plot</span><span class="hl-code">,</span><span class="hl-var">$b2plot</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$gbplot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetWidth</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.9</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> ...and add it to the graPH</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$gbplot</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Adjusting the width</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">xaxis</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">X-title</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">yaxis</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Y-title</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">yaxis</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">xaxis</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Display the graph</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Stroke</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-inlinetags">?&gt;</span></pre></td></tr></table></div>
Kstro/sepas
Resources/jpgraph/docportal/chunkhtml/example_src/example22.html
HTML
mit
9,777
require File.expand_path('test_helper', File.dirname(__FILE__)) class Student extend ActiveModel::Naming end class ApplicationController < ActionController::Base include InheritedResources::DSL end class StudentsController < ApplicationController inherit_resources respond_to :html, :xml def edit edit! do |format| format.xml { render :text => 'Render XML' } end end def new @something = 'magical' new! end create!(:location => "http://test.host/") do |success, failure| success.html { render :text => "I won't redirect!" } failure.xml { render :text => "I shouldn't be rendered" } end update! do |success, failure| success.html { redirect_to(resource_url) } failure.html { render :text => "I won't render!" } end destroy! do |format| format.html { render :text => "Destroyed!" } end end class AliasesTest < ActionController::TestCase tests StudentsController def test_assignments_before_calling_alias Student.stubs(:new).returns(mock_student) get :new assert_response :success assert_equal 'magical', assigns(:something) end def test_controller_should_render_new Student.stubs(:new).returns(mock_student) get :new assert_response :success assert_equal 'New HTML', @response.body.strip end def test_expose_the_requested_user_on_edit Student.expects(:find).with('42').returns(mock_student) get :edit, :id => '42' assert_equal mock_student, assigns(:student) assert_response :success end def test_controller_should_render_edit Student.stubs(:find).returns(mock_student) get :edit assert_response :success assert_equal 'Edit HTML', @response.body.strip end def test_render_xml_when_it_is_given_as_a_block @request.accept = 'application/xml' Student.stubs(:find).returns(mock_student) get :edit assert_response :success assert_equal 'Render XML', @response.body end def test_is_not_redirected_on_create_with_success_if_success_block_is_given Student.stubs(:new).returns(mock_student(:save => true)) @controller.stubs(:resource_url).returns('http://test.host/') post :create assert_response :success assert_equal "I won't redirect!", @response.body end def test_dumb_responder_quietly_receives_everything_on_failure @request.accept = 'text/html' Student.stubs(:new).returns(mock_student(:save => false, :errors => {:some => :error})) @controller.stubs(:resource_url).returns('http://test.host/') post :create assert_response :success assert_equal "New HTML", @response.body.strip end def test_html_is_the_default_when_only_xml_is_overwriten @request.accept = '*/*' Student.stubs(:new).returns(mock_student(:save => false, :errors => {:some => :error})) @controller.stubs(:resource_url).returns('http://test.host/') post :create assert_response :success assert_equal "New HTML", @response.body.strip end def test_wont_render_edit_template_on_update_with_failure_if_failure_block_is_given Student.stubs(:find).returns(mock_student(:update_attributes => false, :errors => { :fail => true })) put :update assert_response :success assert_equal "I won't render!", @response.body end def test_dumb_responder_quietly_receives_everything_on_success Student.stubs(:find).returns(mock_student(:update_attributes => true)) @controller.stubs(:resource_url).returns('http://test.host/') put :update, :id => '42', :student => {:these => 'params'} assert_equal mock_student, assigns(:student) end def test_block_is_called_when_student_is_destroyed Student.stubs(:find).returns(mock_student(:destroy => true)) delete :destroy assert_response :success assert_equal "Destroyed!", @response.body end def test_options_are_used_in_respond_with @request.accept = "application/xml" mock_student = mock_student(:save => true, :to_xml => "XML") Student.stubs(:new).returns(mock_student) # Bug in mocha does not accept strings on respond_to mock_student.singleton_class.class_eval do def respond_to?(method, *) method == "to_xml" || super end end post :create assert_equal "http://test.host/", @response.location end protected def mock_student(expectations={}) @mock_student ||= begin student = mock(expectations.except(:errors)) student.stubs(:class).returns(Student) student.stubs(:errors).returns(expectations.fetch(:errors, {})) student end end end
jinutm/silvfinal
vendor/bundle/ruby/2.1.0/gems/inherited_resources-1.4.1/test/aliases_test.rb
Ruby
mit
4,573
/*! nice Validator 0.7.3 * (c) 2012-2014 Jony Zhang <zj86@live.cn>, MIT Licensed * http://niceue.com/validator/ */ .n-inline-block,.nice-validator input,.nice-validator select,.nice-validator textarea,.msg-wrap,.n-icon,.n-msg{display:inline-block;*display:inline;*zoom:1} .msg-box{position:relative;*zoom:1} .msg-wrap{position:relative;white-space:nowrap; min-height:24px;} .msg-wrap.wrap{white-space:normal;} .msg-wrap,.n-icon,.n-msg{vertical-align:middle;} .n-arrow{position:absolute;overflow:hidden;} .n-arrow b,.n-arrow i{position:absolute;left:0;top:0;border:0;margin:0;padding:0;overflow:hidden;font-weight:400;font-style:normal;font-size:12px;font-family:serif;line-height:14px;_line-height:15px} .n-arrow i{text-shadow:none} .n-icon{width:16px;height:16px;overflow:hidden;background-repeat:no-repeat} .n-msg{display:inline-block;line-height:15px;margin-left:2px;*margin-top:-1px;_margin-top:0;font-size:12px;} .n-error{color:#c33} .n-ok{color:#390} .n-tip,.n-loading{color:#808080} .n-error .n-icon{background-position:0 0} .n-ok .n-icon{background-position:-16px 0} .n-tip .n-icon{background-position:-32px 0} .n-loading .n-icon{background:url("images/loading.gif") 0 center no-repeat !important} .n-top,.n-right,.n-bottom,.n-left{display:inline-block;line-height:0;vertical-align:top;outline:0} .n-top .n-arrow,.n-bottom .n-arrow{height:6px;width:12px;left:8px} .n-left .n-arrow,.n-right .n-arrow{width:6px;height:12px;top:4px} .n-top{vertical-align:top;} .n-top .msg-wrap{margin-bottom:6px} .n-top .n-arrow{bottom:-6px;} .n-top .n-arrow b{top:-6px} .n-top .n-arrow i{top:-7px} .n-bottom{vertical-align:bottom;} .n-bottom .msg-wrap{margin-top:6px} .n-bottom .n-arrow{top:-6px;} .n-bottom .n-arrow b{top:-1px} .n-bottom .n-arrow i{top:0} .n-left .msg-wrap{right:100%;margin-right:6px} .n-left .n-arrow{right:-6px;} .n-left .n-arrow b{left:-6px} .n-left .n-arrow i{left:-7px} .n-right .msg-wrap{margin-left:6px} .n-right .n-arrow{left:-6px;} .n-right .n-arrow b{left:1px} .n-right .n-arrow i{left:2px} .n-default .n-left,.n-default .n-right{margin-top:5px} .n-default .n-top .msg-wrap{bottom:100%} .n-default .n-bottom .msg-wrap{top:100%} .n-default .msg-wrap{position:absolute;z-index:1;} .n-default .msg-wrap .n-icon{background-image:url("images/validator_default.png")} .n-default .n-tip .n-icon{display:none} .n-simple .msg-wrap{position:absolute;z-index:1;} .n-simple .msg-wrap .n-icon{background-image:url("images/validator_simple.png")} .n-simple .n-top .msg-wrap{bottom:100%} .n-simple .n-bottom .msg-wrap{top:100%} .n-simple .n-left,.n-simple .n-right{margin-top:5px} .n-simple .n-bottom .msg-wrap{margin-top:3px} .n-simple .n-tip .n-icon{display:none} .n-yellow .msg-wrap{position:absolute;z-index:1;padding:4px 6px;font-size:12px;border:1px solid transparent;background-color:#fffcef;border-color:#ffbb76;color:#db7c22;box-shadow:0 1px 3px #ccc;border-radius:2px;} .n-yellow .msg-wrap .n-arrow b{color:#ffbb76;text-shadow:0 0 2px #ccc} .n-yellow .msg-wrap .n-arrow i{color:#fffcef} .n-yellow .msg-wrap .n-icon{background-image:url("images/validator_simple.png")} .n-yellow .n-top .msg-wrap{bottom:100%} .n-yellow .n-bottom .msg-wrap{top:100%} .n-yellow .n-tip,.n-yellow .n-ok,.n-yellow .n-loading{background-color:#f8fdff;border-color:#ddd;color:#333;box-shadow:0 1px 3px #ccc;} .n-yellow .n-tip .n-arrow b,.n-yellow .n-ok .n-arrow b,.n-yellow .n-loading .n-arrow b{color:#ddd;text-shadow:0 0 2px #ccc} .n-yellow .n-tip .n-arrow i,.n-yellow .n-ok .n-arrow i,.n-yellow .n-loading .n-arrow i{color:#f8fdff} .n-yellow .n-tip .n-icon{display:none} .n-red .msg-wrap{position:absolute;z-index:1;padding:4px 6px 3px;font-size:12px;border:1px solid transparent;background-color:#fff6f6;border-color:#ff6464;color:#ff2929;box-shadow:0 1px 3px #ccc;border-radius:2px;} .n-red .msg-wrap .n-arrow b{color:#ff6464;text-shadow:0 0 2px #ccc} .n-red .msg-wrap .n-arrow i{color:#ffecec;} .n-red .msg-wrap .n-icon{background-image:url("images/validator_simple.png")} .n-red .n-top .msg-wrap{bottom:100%} .n-red .n-bottom .msg-wrap{top:100%} .n-red .n-tip,.n-red .n-ok,.n-red .n-loading{background-color:#f8fdff;border-color:#ddd;color:#333;} .n-red .n-ok{color:#008800; background-color:#f5fdf5; border-color:#008800;} .n-red .msg-wrap.n-ok .n-arrow b{color:#008800;} .n-red .msg-wrap.n-ok .n-arrow i{color:#f5fdf5;} .n-red .n-tip{color:#db7c22; background-color:#fffcef; border-color:#ffbb76;} .n-red .msg-wrap.n-tip .n-arrow b{color:#ffbb76;} .n-red .msg-wrap.n-tip .n-arrow i{color:#fffcef;} .n-red .n-tip .n-arrow b,.n-red .n-ok .n-arrow b,.n-red .n-loading .n-arrow b{color:#ddd;text-shadow:0 0 2px #ccc} .n-red .n-tip .n-arrow i,.n-red .n-ok .n-arrow i,.n-red .n-loading .n-arrow i{color:#f8fdff} .n-red .n-tip .n-icon{display:none}
peterpang55/test-composer
public/BJUI/plugins/niceValidator/jquery.validator.css
CSS
mit
4,745
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2012 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------------- */ #include "OgreShaderGLSLProgramProcessor.h" #include "OgreShaderProgramSet.h" #include "OgreShaderProgram.h" #include "OgreLogManager.h" #include "OgreHighLevelGpuProgramManager.h" #include "OgreHighLevelGpuProgram.h" namespace Ogre { namespace RTShader { String GLSLProgramProcessor::TargetLanguage = "glsl"; //----------------------------------------------------------------------------- GLSLProgramProcessor::GLSLProgramProcessor() { } //----------------------------------------------------------------------------- GLSLProgramProcessor::~GLSLProgramProcessor() { StringVector::iterator it = mLibraryPrograms.begin(); StringVector::iterator itEnd = mLibraryPrograms.end(); for (; it != itEnd; ++it) { HighLevelGpuProgramManager::getSingleton().remove(*it); } mLibraryPrograms.clear(); } //----------------------------------------------------------------------------- bool GLSLProgramProcessor::preCreateGpuPrograms(ProgramSet* programSet) { Program* vsProgram = programSet->getCpuVertexProgram(); Program* fsProgram = programSet->getCpuFragmentProgram(); Function* vsMain = vsProgram->getEntryPointFunction(); Function* fsMain = fsProgram->getEntryPointFunction(); bool success; // Compact vertex shader outputs. success = ProgramProcessor::compactVsOutputs(vsMain, fsMain); if (success == false) return false; return true; } //----------------------------------------------------------------------------- bool GLSLProgramProcessor::postCreateGpuPrograms(ProgramSet* programSet) { Program* vsCpuProgram = programSet->getCpuVertexProgram(); Program* fsCpuProgram = programSet->getCpuFragmentProgram(); GpuProgramPtr vsGpuProgram = programSet->getGpuVertexProgram(); GpuProgramPtr fsGpuProgram = programSet->getGpuFragmentProgram(); // Bind sub shaders for the vertex shader. bindSubShaders(vsCpuProgram, vsGpuProgram); // Bind sub shaders for the fragment shader. bindSubShaders(fsCpuProgram, fsGpuProgram); // Bind vertex shader auto parameters. bindAutoParameters(programSet->getCpuVertexProgram(), programSet->getGpuVertexProgram()); // Bind fragment shader auto parameters. bindAutoParameters(programSet->getCpuFragmentProgram(), programSet->getGpuFragmentProgram()); // Bind texture samplers for the vertex shader. bindTextureSamplers(vsCpuProgram, vsGpuProgram); // Bind texture samplers for the fragment shader. bindTextureSamplers(fsCpuProgram, fsGpuProgram); return true; } //----------------------------------------------------------------------------- void GLSLProgramProcessor::bindSubShaders(Program* program, GpuProgramPtr pGpuProgram) { if (program->getDependencyCount() > 0) { // Get all attached shaders so we do not attach shaders twice. // maybe GLSLProgram should take care of that ( prevent add duplicate shaders ) String attachedShaders = pGpuProgram->getParameter("attach"); String subShaderDef = ""; for (unsigned int i=0; i < program->getDependencyCount(); ++i) { // Here we append _VS and _FS to the library shaders (so max each lib shader // is compiled twice once as vertex and once as fragment shader) String subShaderName = program->getDependency(i); if (program->getType() == GPT_VERTEX_PROGRAM) { subShaderName += "_VS"; } else { subShaderName += "_FS"; } // Check if the library shader already compiled if(!HighLevelGpuProgramManager::getSingleton().resourceExists(subShaderName)) { // Create the library shader HighLevelGpuProgramPtr pSubGpuProgram = HighLevelGpuProgramManager::getSingleton().createProgram(subShaderName, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TargetLanguage, program->getType()); // Set the source name String sourceName = program->getDependency(i) + "." + TargetLanguage; pSubGpuProgram->setSourceFile(sourceName); // If we have compile errors than stop processing if (pSubGpuProgram->hasCompileError()) { OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Could not compile shader library from the source file: " + sourceName, "GLSLProgramProcessor::bindSubShaders" ); } mLibraryPrograms.push_back(subShaderName); } // Check if the lib shader already attached to this shader if (attachedShaders.find(subShaderName) == String::npos) { // Append the shader name to subShaders subShaderDef += subShaderName + " "; } } // Check if we have something to attach if (subShaderDef.length() > 0) { pGpuProgram->setParameter("attach", subShaderDef); } } } //----------------------------------------------------------------------------- void GLSLProgramProcessor::bindTextureSamplers(Program* pCpuProgram, GpuProgramPtr pGpuProgram) { GpuProgramParametersSharedPtr pGpuParams = pGpuProgram->getDefaultParameters(); const UniformParameterList& progParams = pCpuProgram->getParameters(); UniformParameterConstIterator itParams; // Bind the samplers. for (itParams=progParams.begin(); itParams != progParams.end(); ++itParams) { const UniformParameterPtr pCurParam = *itParams; if (pCurParam->isSampler()) { pGpuParams->setNamedConstant(pCurParam->getName(), pCurParam->getIndex()); } } } } }
largerussiangames/ogre
Components/RTShaderSystem/src/OgreShaderGLSLProgramProcessor.cpp
C++
mit
6,572
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.4 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGRUBY /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if (<obj is ok>) { if (<need new object>) { *ptr = <ptr to new allocated object>; return SWIG_NEWOBJ; } else { *ptr = <ptr to old object>; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #include <ruby.h> /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which * breaks using rb_intern as an lvalue, as SWIG does. We work around this * issue for now by disabling this. * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645 */ #ifdef rb_intern # undef rb_intern #endif /* Remove global macros defined in Ruby's win32.h */ #ifdef write # undef write #endif #ifdef read # undef read #endif #ifdef bind # undef bind #endif #ifdef close # undef close #endif #ifdef connect # undef connect #endif /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ #ifndef NUM2LL #define NUM2LL(x) NUM2LONG((x)) #endif #ifndef LL2NUM #define LL2NUM(x) INT2NUM((long) (x)) #endif #ifndef ULL2NUM #define ULL2NUM(x) UINT2NUM((unsigned long) (x)) #endif /* Ruby 1.7 doesn't (yet) define NUM2ULL() */ #ifndef NUM2ULL #ifdef HAVE_LONG_LONG #define NUM2ULL(x) rb_num2ull((x)) #else #define NUM2ULL(x) NUM2ULONG(x) #endif #endif /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ /* Define these for older versions so we can just write code the new way */ #ifndef RSTRING_LEN # define RSTRING_LEN(x) RSTRING(x)->len #endif #ifndef RSTRING_PTR # define RSTRING_PTR(x) RSTRING(x)->ptr #endif #ifndef RSTRING_END # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) #endif #ifndef RARRAY_LEN # define RARRAY_LEN(x) RARRAY(x)->len #endif #ifndef RARRAY_PTR # define RARRAY_PTR(x) RARRAY(x)->ptr #endif #ifndef RFLOAT_VALUE # define RFLOAT_VALUE(x) RFLOAT(x)->value #endif #ifndef DOUBLE2NUM # define DOUBLE2NUM(x) rb_float_new(x) #endif #ifndef RHASH_TBL # define RHASH_TBL(x) (RHASH(x)->tbl) #endif #ifndef RHASH_ITER_LEV # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) #endif #ifndef RHASH_IFNONE # define RHASH_IFNONE(x) (RHASH(x)->ifnone) #endif #ifndef RHASH_SIZE # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) #endif #ifndef RHASH_EMPTY_P # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) #endif #ifndef RSTRUCT_LEN # define RSTRUCT_LEN(x) RSTRUCT(x)->len #endif #ifndef RSTRUCT_PTR # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr #endif /* * Need to be very careful about how these macros are defined, especially * when compiling C++ code or C code with an ANSI C compiler. * * VALUEFUNC(f) is a macro used to typecast a C function that implements * a Ruby method so that it can be passed as an argument to API functions * like rb_define_method() and rb_define_singleton_method(). * * VOIDFUNC(f) is a macro used to typecast a C function that implements * either the "mark" or "free" stuff for a Ruby Data object, so that it * can be passed as an argument to API functions like Data_Wrap_Struct() * and Data_Make_Struct(). */ #ifdef __cplusplus # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((void (*)()) f) # else # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # else /* These definitions should work for Ruby 1.7+ */ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # endif # endif #else # define VALUEFUNC(f) (f) # define VOIDFUNC(f) (f) #endif /* Don't use for expressions have side effect */ #ifndef RB_STRING_VALUE #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) #endif #ifndef StringValue #define StringValue(s) RB_STRING_VALUE(s) #endif #ifndef StringValuePtr #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) #endif #ifndef StringValueLen #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) #endif #ifndef SafeStringValue #define SafeStringValue(v) do {\ StringValue(v);\ rb_check_safe_str(v);\ } while (0) #endif #ifndef HAVE_RB_DEFINE_ALLOC_FUNC #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") #endif #define _mSWIG_defined static VALUE _mSWIG = Qnil; /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ /* Define some additional error types */ #define SWIG_ObjectPreviouslyDeletedError -100 /* Define custom exceptions for errors that do not map to existing Ruby exceptions. Note this only works for C++ since a global cannot be initialized by a function in C. For C, fallback to rb_eRuntimeError.*/ #define SWIG_rb_eNullReferenceError_defined static VALUE SWIG_rb_eNullReferenceError = Qnil; SWIGINTERN VALUE getNullReferenceError(void) { if (SWIG_rb_eNullReferenceError == Qnil) { SWIG_rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); } return SWIG_rb_eNullReferenceError; } #define SWIG_rb_eObjectPreviouslyDeleted_defined static VALUE SWIG_rb_eObjectPreviouslyDeleted = Qnil; SWIGINTERN VALUE getObjectPreviouslyDeletedError(void) { if (SWIG_rb_eObjectPreviouslyDeleted == Qnil) { SWIG_rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); } return SWIG_rb_eObjectPreviouslyDeleted; } SWIGINTERN VALUE SWIG_Ruby_ErrorType(int SWIG_code) { VALUE type; switch (SWIG_code) { case SWIG_MemoryError: type = rb_eNoMemError; break; case SWIG_IOError: type = rb_eIOError; break; case SWIG_RuntimeError: type = rb_eRuntimeError; break; case SWIG_IndexError: type = rb_eIndexError; break; case SWIG_TypeError: type = rb_eTypeError; break; case SWIG_DivisionByZero: type = rb_eZeroDivError; break; case SWIG_OverflowError: type = rb_eRangeError; break; case SWIG_SyntaxError: type = rb_eSyntaxError; break; case SWIG_ValueError: type = rb_eArgError; break; case SWIG_SystemError: type = rb_eFatal; break; case SWIG_AttributeError: type = rb_eRuntimeError; break; case SWIG_NullReferenceError: type = getNullReferenceError(); break; case SWIG_ObjectPreviouslyDeletedError: type = getObjectPreviouslyDeletedError(); break; case SWIG_UnknownError: type = rb_eRuntimeError; break; default: type = rb_eRuntimeError; } return type; } /* This function is called when a user inputs a wrong argument to a method. */ SWIGINTERN const char* Ruby_Format_TypeError( const char* msg, const char* type, const char* name, const int argn, VALUE input ) { char buf[128]; VALUE str; VALUE asStr; if ( msg && *msg ) { str = rb_str_new2(msg); } else { str = rb_str_new(NULL, 0); } str = rb_str_cat2( str, "Expected argument " ); sprintf( buf, "%d of type ", argn-1 ); str = rb_str_cat2( str, buf ); str = rb_str_cat2( str, type ); str = rb_str_cat2( str, ", but got " ); str = rb_str_cat2( str, rb_obj_classname(input) ); str = rb_str_cat2( str, " " ); asStr = rb_inspect(input); if ( RSTRING_LEN(asStr) > 30 ) { str = rb_str_cat( str, StringValuePtr(asStr), 30 ); str = rb_str_cat2( str, "..." ); } else { str = rb_str_append( str, asStr ); } if ( name ) { str = rb_str_cat2( str, "\n\tin SWIG method '" ); str = rb_str_cat2( str, name ); str = rb_str_cat2( str, "'" ); } return StringValuePtr( str ); } /* This function is called when an overloaded method fails */ SWIGINTERN void Ruby_Format_OverloadedError( const int argc, const int maxargs, const char* method, const char* prototypes ) { const char* msg = "Wrong # of arguments"; if ( argc <= maxargs ) msg = "Wrong arguments"; rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" "Possible C/C++ prototypes are:\n%s", msg, method, prototypes); } /* ----------------------------------------------------------------------------- * rubytracking.swg * * This file contains support for tracking mappings from * Ruby objects to C++ objects. This functionality is needed * to implement mark functions for Ruby's mark and sweep * garbage collector. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* Ruby 1.8 actually assumes the first case. */ #if SIZEOF_VOIDP == SIZEOF_LONG # define SWIG2NUM(v) LONG2NUM((unsigned long)v) # define NUM2SWIG(x) (unsigned long)NUM2LONG(x) #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG # define SWIG2NUM(v) LL2NUM((unsigned long long)v) # define NUM2SWIG(x) (unsigned long long)NUM2LL(x) #else # error sizeof(void*) is not the same as long or long long #endif /* Global Ruby hash table to store Trackings from C/C++ structs to Ruby Objects. */ #define swig_ruby_trackings_defined static VALUE swig_ruby_trackings = Qnil; /* Global variable that stores a reference to the ruby hash table delete function. */ #define swig_ruby_hash_delete_defined static ID swig_ruby_hash_delete = 0; /* Setup a Ruby hash table to store Trackings */ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { /* Create a ruby hash table to store Trackings from C++ objects to Ruby objects. */ /* Try to see if some other .so has already created a tracking hash table, which we keep hidden in an instance var in the SWIG module. This is done to allow multiple DSOs to share the same tracking table. */ ID trackings_id = rb_intern( "@__trackings__" ); VALUE verbose = rb_gv_get("VERBOSE"); rb_gv_set("VERBOSE", Qfalse); swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id ); rb_gv_set("VERBOSE", verbose); /* No, it hasn't. Create one ourselves */ if ( swig_ruby_trackings == Qnil ) { swig_ruby_trackings = rb_hash_new(); rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings ); } /* Now store a reference to the hash table delete function so that we only have to look it up once.*/ swig_ruby_hash_delete = rb_intern("delete"); } /* Get a Ruby number to reference a pointer */ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) { /* We cast the pointer to an unsigned long and then store a reference to it using a Ruby number object. */ /* Convert the pointer to a Ruby number */ return SWIG2NUM(ptr); } /* Get a Ruby number to reference an object */ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) { /* We cast the object to an unsigned long and then store a reference to it using a Ruby number object. */ /* Convert the Object to a Ruby number */ return SWIG2NUM(object); } /* Get a Ruby object from a previously stored reference */ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) { /* The provided Ruby number object is a reference to the Ruby object we want.*/ /* Convert the Ruby number to a Ruby object */ return NUM2SWIG(reference); } /* Add a Tracking from a C/C++ struct to a Ruby object */ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { /* In a Ruby hash table we store the pointer and the associated Ruby object. The trick here is that we cannot store the Ruby object directly - if we do then it cannot be garbage collected. So instead we typecast it as a unsigned long and convert it to a Ruby number object.*/ /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Get a reference to the Ruby object as a Ruby number */ VALUE value = SWIG_RubyObjectToReference(object); /* Store the mapping to the global hash table. */ rb_hash_aset(swig_ruby_trackings, key, value); } /* Get the Ruby object that owns the specified C/C++ struct */ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Now lookup the value stored in the global hash table */ VALUE value = rb_hash_aref(swig_ruby_trackings, key); if (value == Qnil) { /* No object exists - return nil. */ return Qnil; } else { /* Convert this value to Ruby object */ return SWIG_RubyReferenceToObject(value); } } /* Remove a Tracking from a C/C++ struct to a Ruby object. It is very important to remove objects once they are destroyed since the same memory address may be reused later to create a new object. */ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { /* Get a reference to the pointer as a Ruby number */ VALUE key = SWIG_RubyPtrToReference(ptr); /* Delete the object from the hash table by calling Ruby's do this we need to call the Hash.delete method.*/ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key); } /* This is a helper method that unlinks a Ruby object from its underlying C++ object. This is needed if the lifetime of the Ruby object is longer than the C++ object */ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { VALUE object = SWIG_RubyInstanceFor(ptr); if (object != Qnil) { DATA_PTR(object) = 0; } } #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Ruby API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif SWIGINTERN VALUE SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { if (NIL_P(target)) { target = o; } else { if (TYPE(target) != T_ARRAY) { VALUE o2 = target; target = rb_ary_new(); rb_ary_push(target, o2); } rb_ary_push(target, o); } return target; } /* For ruby1.8.4 and earlier. */ #ifndef RUBY_INIT_STACK RUBY_EXTERN void Init_stack(VALUE* addr); # define RUBY_INIT_STACK \ VALUE variable_in_this_stack_frame; \ Init_stack(&variable_in_this_stack_frame); #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * rubyrun.swg * * This file contains the runtime support for Ruby modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 /* for raw pointers */ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) #define swig_owntype ruby_owntype /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg) #define SWIG_fail goto fail /* Ruby-specific SWIG API */ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) #include "assert.h" /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif typedef struct { VALUE klass; VALUE mImpl; void (*mark)(void *); void (*destroy)(void *); int trackObjects; } swig_class; /* Global pointer used to keep some internal SWIG stuff */ #define _cSWIG_Pointer_defined static VALUE _cSWIG_Pointer = Qnil; #define swig_runtime_data_type_pointer_defined static VALUE swig_runtime_data_type_pointer = Qnil; /* Global IDs used to keep some internal SWIG stuff */ #define swig_arity_id_defined static ID swig_arity_id = 0; #define swig_call_id_defined static ID swig_call_id = 0; /* If your swig extension is to be run within an embedded ruby and has director callbacks, you should set -DRUBY_EMBEDDED during compilation. This will reset ruby's stack frame on each entry point from the main program the first time a virtual director function is invoked (in a non-recursive way). If this is not done, you run the risk of Ruby trashing the stack. */ #ifdef RUBY_EMBEDDED # define SWIG_INIT_STACK \ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ ++swig_virtual_calls; # define SWIG_RELEASE_STACK --swig_virtual_calls; # define Ruby_DirectorTypeMismatchException(x) \ rb_raise( rb_eTypeError, "%s", x ); return c_result; #define swig_virtual_calls_defined static unsigned int swig_virtual_calls = 0; #else /* normal non-embedded extension */ # define SWIG_INIT_STACK # define SWIG_RELEASE_STACK # define Ruby_DirectorTypeMismatchException(x) \ throw Swig::DirectorTypeMismatchException( x ); #endif /* RUBY_EMBEDDED */ SWIGRUNTIME VALUE getExceptionClass(void) { //static int init = 0; static VALUE rubyExceptionClass ; //if (!init) { //init = 1; rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); //} return rubyExceptionClass; } /* This code checks to see if the Ruby object being raised as part of an exception inherits from the Ruby class Exception. If so, the object is simply returned. If not, then a new Ruby exception object is created and that will be returned to Ruby.*/ SWIGRUNTIME VALUE SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { VALUE exceptionClass = getExceptionClass(); if (rb_obj_is_kind_of(obj, exceptionClass)) { return obj; } else { return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); } } /* Initialize Ruby runtime support */ SWIGRUNTIME void SWIG_Ruby_InitRuntime(void) { //if (_mSWIG == Qnil) { _mSWIG = rb_define_module("SWIG"); swig_call_id = rb_intern("call"); swig_arity_id = rb_intern("arity"); //} } /* Define Ruby class for C type */ SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { VALUE klass; char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); if (NIL_P(_cSWIG_Pointer)) { _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); } klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); free((void *) klass_name); } /* Create a new pointer object */ SWIGRUNTIME VALUE SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) { int own = flags & SWIG_POINTER_OWN; int track; char *klass_name; swig_class *sklass; VALUE klass; VALUE obj; if (!ptr) return Qnil; if (type->clientdata) { sklass = (swig_class *) type->clientdata; /* Are we tracking this class and have we already returned this Ruby object? */ track = sklass->trackObjects; if (track) { obj = SWIG_RubyInstanceFor(ptr); /* Check the object's type and make sure it has the correct type. It might not in cases where methods do things like downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; } } } /* Create a new Ruby object */ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), ( own ? VOIDFUNC(sklass->destroy) : (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) ), ptr); /* If tracking is on for this class then track this object. */ if (track) { SWIG_RubyAddTracking(ptr, obj); } } else { klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); klass = rb_const_get(_mSWIG, rb_intern(klass_name)); free((void *) klass_name); obj = Data_Wrap_Struct(klass, 0, 0, ptr); } rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Create a new class instance (always owned) */ SWIGRUNTIME VALUE SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) { VALUE obj; swig_class *sklass = (swig_class *) type->clientdata; obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Get type mangle from class name */ SWIGRUNTIMEINLINE char * SWIG_Ruby_MangleStr(VALUE obj) { VALUE stype = rb_iv_get(obj, "@__swigtype__"); return StringValuePtr(stype); } /* Acquire a pointer value */ typedef void (*ruby_owntype)(void*); SWIGRUNTIME ruby_owntype SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) { if (obj) { ruby_owntype oldown = RDATA(obj)->dfree; RDATA(obj)->dfree = own; return oldown; } else { return 0; } } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own) { char *c; swig_cast_info *tc; void *vptr = 0; /* Grab the pointer */ if (NIL_P(obj)) { *ptr = 0; return SWIG_OK; } else { if (TYPE(obj) != T_DATA) { return SWIG_ERROR; } Data_Get_Struct(obj, void, vptr); } if (own) *own = RDATA(obj)->dfree; /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we need to reset the destructor since the Ruby object no longer owns the underlying C++ object.*/ if (flags & SWIG_POINTER_DISOWN) { /* Is tracking on for this class? */ int track = 0; if (ty && ty->clientdata) { swig_class *sklass = (swig_class *) ty->clientdata; track = sklass->trackObjects; } if (track) { /* We are tracking objects for this class. Thus we change the destructor * to SWIG_RubyRemoveTracking. This allows us to * remove the mapping from the C++ to Ruby object * when the Ruby object is garbage collected. If we don't * do this, then it is possible we will return a reference * to a Ruby object that no longer exists thereby crashing Ruby. */ RDATA(obj)->dfree = SWIG_RubyRemoveTracking; } else { RDATA(obj)->dfree = 0; } } /* Do type-checking if type info was provided */ if (ty) { if (ty->clientdata) { if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { if (vptr == 0) { /* The object has already been deleted */ return SWIG_ObjectPreviouslyDeletedError; } *ptr = vptr; return SWIG_OK; } } if ((c = SWIG_MangleStr(obj)) == NULL) { return SWIG_ERROR; } tc = SWIG_TypeCheck(c, ty); if (!tc) { return SWIG_ERROR; } else { int newmemory = 0; *ptr = SWIG_TypeCast(tc, vptr, &newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } } else { *ptr = vptr; } return SWIG_OK; } /* Check convert */ SWIGRUNTIMEINLINE int SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) { char *c = SWIG_MangleStr(obj); if (!c) return 0; return SWIG_TypeCheck(c,ty) != 0; } SWIGRUNTIME VALUE SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; *(r++) = '_'; r = SWIG_PackData(r, ptr, sz); strcpy(r, type->name); return rb_str_new2(result); } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c; if (TYPE(obj) != T_STRING) goto type_error; c = StringValuePtr(obj); /* Pointer values must start with leading underscore */ if (*c != '_') goto type_error; c++; c = SWIG_UnpackData(c, ptr, sz); if (ty) { tc = SWIG_TypeCheck(c, ty); if (!tc) goto type_error; } return SWIG_OK; type_error: return SWIG_ERROR; } SWIGRUNTIME swig_module_info * SWIG_Ruby_GetModule(void) { VALUE pointer; swig_module_info *ret = 0; VALUE verbose = rb_gv_get("VERBOSE"); /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ rb_gv_set("VERBOSE", Qfalse); /* first check if pointer already created */ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); if (pointer != Qnil) { Data_Get_Struct(pointer, swig_module_info, ret); } /* reinstate warnings */ rb_gv_set("VERBOSE", verbose); return ret; } SWIGRUNTIME void SWIG_Ruby_SetModule(swig_module_info *pointer) { /* register a new class */ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); /* create and store the structure pointer to a global variable */ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); } /* This function can be used to check whether a proc or method or similarly callable function has been passed. Usually used in a %typecheck, like: %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { $result = SWIG_Ruby_isCallable( $input ); } */ SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) return 1; return 0; } /* This function can be used to check the arity (number of arguments) a proc or method can take. Usually used in a %typecheck. Valid arities will be that equal to minimal or those < 0 which indicate a variable number of parameters at the end. */ SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; return 1; } return 0; } #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] static swig_type_info *swig_types[2]; static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init Init_RawSensorsNative #define SWIG_name "RawSensorsNative" static VALUE mRawSensorsNative; #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK #define SWIGVERSION 0x020004 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) (void *)((const void *)(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) #include "ruby/ext/rho/rhoruby.h" extern VALUE rawsensors_get_property(const char* property_name); extern void rawsensors_set_property(const char* property_name, const char* value); extern VALUE rawsensors_is_available(const char* sensor_name); extern void rawsensors_getSensorData(); #define get_property rawsensors_get_property #define set_property rawsensors_set_property #define is_available rawsensors_is_available #define getSensorData rawsensors_getSensorData SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { if (TYPE(obj) == T_STRING) { #if defined(StringValuePtr) char *cstr = StringValuePtr(obj); #else char *cstr = STR2CSTR(obj); #endif size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } } if (psize) *psize = size; return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *)vptr; if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN VALUE _wrap_get_property(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","get_property", 1, argv[0] )); } arg1 = (char *)(buf1); result = (VALUE)get_property((char const *)arg1); vresult = result; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return vresult; fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return Qnil; } SWIGINTERN VALUE _wrap_set_property(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","set_property", 1, argv[0] )); } arg1 = (char *)(buf1); res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","set_property", 2, argv[1] )); } arg2 = (char *)(buf2); set_property((char const *)arg1,(char const *)arg2); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return Qnil; } SWIGINTERN VALUE _wrap_is_available(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; VALUE result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","is_available", 1, argv[0] )); } arg1 = (char *)(buf1); result = (VALUE)is_available((char const *)arg1); vresult = result; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return vresult; fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return Qnil; } SWIGINTERN VALUE _wrap_getSensorData(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } getSensorData(); return Qnil; fail: return Qnil; } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; // clear static variables for support reinitialization #ifdef SWIG_rb_eNullReferenceError_defined SWIG_rb_eNullReferenceError = Qnil; #endif #ifdef SWIG_rb_eObjectPreviouslyDeleted_defined SWIG_rb_eObjectPreviouslyDeleted = Qnil; #endif //#ifdef _mSWIG_defined // _mSWIG = Qnil; //#endif #ifdef _cSWIG_Pointer_defined _cSWIG_Pointer = Qnil; #endif #ifdef swig_runtime_data_type_pointer_defined swig_runtime_data_type_pointer = Qnil; #endif #ifdef swig_arity_id_defined swig_arity_id = 0; #endif #ifdef swig_call_id_defined swig_call_id = 0; #endif #ifdef swig_virtual_calls_defined swig_virtual_calls = 0; #endif #ifdef swig_ruby_trackings_defined swig_ruby_trackings = Qnil; #endif #ifdef swig_ruby_hash_delete_defined swig_ruby_hash_delete = 0; #endif /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif /* */ #ifdef __cplusplus extern "C" #endif SWIGEXPORT void Init_RawSensorsNative(void) { size_t i; SWIG_InitRuntime(); mRawSensorsNative = rb_define_module("RawSensorsNative"); SWIG_InitializeModule(0); for (i = 0; i < swig_module.size; i++) { SWIG_define_class(swig_module.types[i]); } SWIG_RubyInitializeTrackings(); rb_define_module_function(mRawSensorsNative, "get_property", _wrap_get_property, -1); rb_define_module_function(mRawSensorsNative, "set_property", _wrap_set_property, -1); rb_define_module_function(mRawSensorsNative, "is_available", _wrap_is_available, -1); rb_define_module_function(mRawSensorsNative, "getSensorData", _wrap_getSensorData, -1); }
UIKit0/rhodes
lib/extensions/rawsensors/ext/rawsensors/shared/ruby/rawsensors_wrap.c
C
mit
68,037
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package co.aikar.timings; import net.minecraft.world.World; /** * Set of timers per world, to track world specific Timings. */ public class WorldTimingsHandler { public final Timing mobSpawn; public final Timing doChunkUnload; public final Timing doPortalForcer; public final Timing scheduledBlocks; public final Timing scheduledBlocksCleanup; public final Timing scheduledBlocksTicking; public final Timing chunkTicks; public final Timing chunkTicksBlocks; public final Timing doVillages; public final Timing doChunkMap; public final Timing doChunkGC; public final Timing doSounds; public final Timing entityRemoval; public final Timing entityTick; public final Timing tileEntityTick; public final Timing tileEntityPending; public final Timing tracker; public final Timing doTick; public final Timing tickEntities; public final Timing syncChunkLoadTimer; public final Timing syncChunkLoadDataTimer; public final Timing syncChunkLoadStructuresTimer; public final Timing syncChunkLoadEntitiesTimer; public final Timing syncChunkLoadTileEntitiesTimer; public final Timing syncChunkLoadTileTicksTimer; public final Timing syncChunkLoadPostTimer; public WorldTimingsHandler(World world) { String name = world.getWorldInfo().getWorldName() + " - "; this.mobSpawn = SpongeTimingsFactory.ofSafe(name + "mobSpawn"); this.doChunkUnload = SpongeTimingsFactory.ofSafe(name + "doChunkUnload"); this.scheduledBlocks = SpongeTimingsFactory.ofSafe(name + "Scheduled Blocks"); this.scheduledBlocksCleanup = SpongeTimingsFactory.ofSafe(name + "Scheduled Blocks - Cleanup"); this.scheduledBlocksTicking = SpongeTimingsFactory.ofSafe(name + "Scheduled Blocks - Ticking"); this.chunkTicks = SpongeTimingsFactory.ofSafe(name + "Chunk Ticks"); this.chunkTicksBlocks = SpongeTimingsFactory.ofSafe(name + "Chunk Ticks - Blocks"); this.doVillages = SpongeTimingsFactory.ofSafe(name + "doVillages"); this.doChunkMap = SpongeTimingsFactory.ofSafe(name + "doChunkMap"); this.doSounds = SpongeTimingsFactory.ofSafe(name + "doSounds"); this.doChunkGC = SpongeTimingsFactory.ofSafe(name + "doChunkGC"); this.doPortalForcer = SpongeTimingsFactory.ofSafe(name + "doPortalForcer"); this.entityTick = SpongeTimingsFactory.ofSafe(name + "entityTick"); this.entityRemoval = SpongeTimingsFactory.ofSafe(name + "entityRemoval"); this.tileEntityTick = SpongeTimingsFactory.ofSafe(name + "tileEntityTick"); this.tileEntityPending = SpongeTimingsFactory.ofSafe(name + "tileEntityPending"); this.syncChunkLoadTimer = SpongeTimingsFactory.ofSafe(name + "syncChunkLoad"); this.syncChunkLoadDataTimer = SpongeTimingsFactory.ofSafe(name + "syncChunkLoad - Data"); this.syncChunkLoadStructuresTimer = SpongeTimingsFactory.ofSafe(name + "chunkLoad - Structures"); this.syncChunkLoadEntitiesTimer = SpongeTimingsFactory.ofSafe(name + "chunkLoad - Entities"); this.syncChunkLoadTileEntitiesTimer = SpongeTimingsFactory.ofSafe(name + "chunkLoad - TileEntities"); this.syncChunkLoadTileTicksTimer = SpongeTimingsFactory.ofSafe(name + "chunkLoad - TileTicks"); this.syncChunkLoadPostTimer = SpongeTimingsFactory.ofSafe(name + "chunkLoad - Post"); this.tracker = SpongeTimingsFactory.ofSafe(name + "tracker"); this.doTick = SpongeTimingsFactory.ofSafe(name + "doTick"); this.tickEntities = SpongeTimingsFactory.ofSafe(name + "tickEntities"); } }
Kiskae/SpongeCommon
src/main/java/co/aikar/timings/WorldTimingsHandler.java
Java
mit
4,877
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> </head> <body> [page:Curve] &rarr; <h1>[name]</h1> <div class="desc">Create a smooth 2d spline curve from a series of points</div> <h2>Example</h2> <code> //Create a sine-like wave var curve = new THREE.SplineCurve([ new THREE.Vector2(-10, 0), new THREE.Vector2(-5, 5), new THREE.Vector2( 0, 0), new THREE.Vector2( 5, -5), new THREE.Vector2(10, 0) ]); var path = new THREE.Path( curve.getPoints(50) ); var geometry = path.createPointsGeometry( 50 ); var material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); var object3d = new THREE.Line( geometry, material ); </code> <h2>Constructor</h2> <h3>[name]([page:Array points])</h3> <div>points – An array of [page:Vector2] points</div> <h2>Properties</h2> <h3>[property:Array points]</h3> <h2>Methods</h2> <h3>See [page:Curve] for inherited methods</h3> <h2>Source</h2> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] </body> </html>
plepers/three.js
docs/api/extras/curves/SplineCurve.html
HTML
mit
1,204
/*--- { "skip": true } ---*/ /*=== *** test_raw (duk_safe_call) Hello world from a file! return value is: 123 compile rc=1 -> SyntaxError: invalid object literal (line 1) top: 0 ==> rc=0, result='undefined' ===*/ #define TMPFILE "/tmp/duk-test-compile-file-temp.js" #include <stdio.h> static void write_file(const char *filename, const char *data) { FILE *f; size_t ret; /* Write temporary data to a temp file. This now expects to be * executed on Linux, so that /tmp works. Less than ideal, also * doesn't delete the temporary file. */ f = fopen(filename, "wb"); if (!f) { printf("failed to open %s\n", TMPFILE); return; } ret = fwrite((const void *) data, 1, strlen(data), f); fflush(f); fclose(f); f = NULL; if (ret != strlen(data)) { printf("failed to write test data fully\n"); return; } } static duk_ret_t test_raw(duk_context *ctx, void *udata) { const char *data1 = "print('Hello world from a file!'); 123;"; const char *data2 = "print('Hello world from a file, with syntax error'); obj = {"; duk_ret_t rc; (void) udata; write_file(TMPFILE, data1); duk_compile_file(ctx, 0, TMPFILE); duk_call(ctx, 0); printf("return value is: %s\n", duk_safe_to_string(ctx, -1)); duk_pop(ctx); write_file(TMPFILE, data2); rc = duk_pcompile_file(ctx, 0, TMPFILE); printf("compile rc=%d -> %s\n", (int) rc, duk_safe_to_string(ctx, -1)); duk_pop(ctx); printf("top: %ld\n", (long) duk_get_top(ctx)); return 0; } void test(duk_context *ctx) { TEST_SAFE_CALL(test_raw); }
svaarala/duktape
tests/api/test-compile-file.c
C
mit
1,520
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(292) var __weex_style__ = __webpack_require__(293) var __weex_script__ = __webpack_require__(294) __weex_define__('@weex-component/07aaf1221ad656e37ebe37291f40d193', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) __weex_bootstrap__('@weex-component/07aaf1221ad656e37ebe37291f40d193',undefined,undefined) /***/ }, /* 1 */, /* 2 */, /* 3 */, /* 4 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(5); __webpack_require__(9); __webpack_require__(13); __webpack_require__(17); __webpack_require__(21); __webpack_require__(25); __webpack_require__(66); __webpack_require__(70); __webpack_require__(74); __webpack_require__(78); __webpack_require__(79); /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(6) var __weex_style__ = __webpack_require__(7) var __weex_script__ = __webpack_require__(8) __weex_define__('@weex-component/wxc-button', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 6 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": function () {return ['btn', 'btn-' + (this.type), 'btn-sz-' + (this.size)]}, "children": [ { "type": "text", "classList": function () {return ['btn-txt', 'btn-txt-' + (this.type), 'btn-txt-sz-' + (this.size)]}, "attr": { "value": function () {return this.value} } } ] } /***/ }, /* 7 */ /***/ function(module, exports) { module.exports = { "btn": { "marginBottom": 0, "alignItems": "center", "justifyContent": "center", "borderWidth": 1, "borderStyle": "solid", "borderColor": "#333333" }, "btn-default": { "color": "rgb(51,51,51)" }, "btn-primary": { "backgroundColor": "rgb(40,96,144)", "borderColor": "rgb(40,96,144)" }, "btn-success": { "backgroundColor": "rgb(92,184,92)", "borderColor": "rgb(76,174,76)" }, "btn-info": { "backgroundColor": "rgb(91,192,222)", "borderColor": "rgb(70,184,218)" }, "btn-warning": { "backgroundColor": "rgb(240,173,78)", "borderColor": "rgb(238,162,54)" }, "btn-danger": { "backgroundColor": "rgb(217,83,79)", "borderColor": "rgb(212,63,58)" }, "btn-link": { "borderColor": "rgba(0,0,0,0)", "borderRadius": 0 }, "btn-txt-default": { "color": "rgb(51,51,51)" }, "btn-txt-primary": { "color": "rgb(255,255,255)" }, "btn-txt-success": { "color": "rgb(255,255,255)" }, "btn-txt-info": { "color": "rgb(255,255,255)" }, "btn-txt-warning": { "color": "rgb(255,255,255)" }, "btn-txt-danger": { "color": "rgb(255,255,255)" }, "btn-txt-link": { "color": "rgb(51,122,183)" }, "btn-sz-large": { "width": 300, "height": 100, "paddingTop": 25, "paddingBottom": 25, "paddingLeft": 40, "paddingRight": 40, "borderRadius": 15 }, "btn-sz-middle": { "width": 240, "height": 80, "paddingTop": 15, "paddingBottom": 15, "paddingLeft": 30, "paddingRight": 30, "borderRadius": 10 }, "btn-sz-small": { "width": 170, "height": 60, "paddingTop": 12, "paddingBottom": 12, "paddingLeft": 25, "paddingRight": 25, "borderRadius": 7 }, "btn-txt-sz-large": { "fontSize": 45 }, "btn-txt-sz-middle": { "fontSize": 35 }, "btn-txt-sz-small": { "fontSize": 30 } } /***/ }, /* 8 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { type: 'default', size: 'large', value: '' }}, methods: {} };} /* generated by weex-loader */ /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(10) var __weex_style__ = __webpack_require__(11) var __weex_script__ = __webpack_require__(12) __weex_define__('@weex-component/wxc-hn', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 10 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": function () {return ['h' + (this.level)]}, "style": { "justifyContent": "center" }, "children": [ { "type": "text", "classList": function () {return ['txt-h' + (this.level)]}, "attr": { "value": function () {return this.value} } } ] } /***/ }, /* 11 */ /***/ function(module, exports) { module.exports = { "h1": { "height": 110, "paddingTop": 20, "paddingBottom": 20 }, "h2": { "height": 110, "paddingTop": 20, "paddingBottom": 20 }, "h3": { "height": 110, "paddingTop": 20, "paddingBottom": 20 }, "txt-h1": { "fontSize": 70 }, "txt-h2": { "fontSize": 52 }, "txt-h3": { "fontSize": 42 } } /***/ }, /* 12 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { level: 1, value: '' }}, methods: {} };} /* generated by weex-loader */ /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(14) var __weex_style__ = __webpack_require__(15) var __weex_script__ = __webpack_require__(16) __weex_define__('@weex-component/wxc-list-item', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 14 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "item" ], "events": { "touchstart": "touchstart", "touchend": "touchend" }, "style": { "backgroundColor": function () {return this.bgColor} }, "children": [ { "type": "content" } ] } /***/ }, /* 15 */ /***/ function(module, exports) { module.exports = { "item": { "paddingTop": 25, "paddingBottom": 25, "paddingLeft": 35, "paddingRight": 35, "height": 160, "justifyContent": "center", "borderBottomWidth": 1, "borderColor": "#dddddd" } } /***/ }, /* 16 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { bgColor: '#ffffff' }}, methods: { touchstart: function touchstart() {}, touchend: function touchend() {} } };} /* generated by weex-loader */ /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(18) var __weex_style__ = __webpack_require__(19) var __weex_script__ = __webpack_require__(20) __weex_define__('@weex-component/wxc-panel', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 18 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": function () {return ['panel', 'panel-' + (this.type)]}, "style": { "borderWidth": function () {return this.border} }, "children": [ { "type": "text", "classList": function () {return ['panel-header', 'panel-header-' + (this.type)]}, "style": { "paddingTop": function () {return this.paddingHead}, "paddingBottom": function () {return this.paddingHead}, "paddingLeft": function () {return this.paddingHead*1.5}, "paddingRight": function () {return this.paddingHead*1.5} }, "attr": { "value": function () {return this.title} } }, { "type": "div", "classList": function () {return ['panel-body', 'panel-body-' + (this.type)]}, "style": { "paddingTop": function () {return this.paddingBody}, "paddingBottom": function () {return this.paddingBody}, "paddingLeft": function () {return this.paddingBody*1.5}, "paddingRight": function () {return this.paddingBody*1.5} }, "children": [ { "type": "content" } ] } ] } /***/ }, /* 19 */ /***/ function(module, exports) { module.exports = { "panel": { "marginBottom": 20, "backgroundColor": "#ffffff", "borderColor": "#dddddd", "borderWidth": 1 }, "panel-primary": { "borderColor": "rgb(40,96,144)" }, "panel-success": { "borderColor": "rgb(76,174,76)" }, "panel-info": { "borderColor": "rgb(70,184,218)" }, "panel-warning": { "borderColor": "rgb(238,162,54)" }, "panel-danger": { "borderColor": "rgb(212,63,58)" }, "panel-header": { "backgroundColor": "#f5f5f5", "fontSize": 40, "color": "#333333" }, "panel-header-primary": { "backgroundColor": "rgb(40,96,144)", "color": "#ffffff" }, "panel-header-success": { "backgroundColor": "rgb(92,184,92)", "color": "#ffffff" }, "panel-header-info": { "backgroundColor": "rgb(91,192,222)", "color": "#ffffff" }, "panel-header-warning": { "backgroundColor": "rgb(240,173,78)", "color": "#ffffff" }, "panel-header-danger": { "backgroundColor": "rgb(217,83,79)", "color": "#ffffff" } } /***/ }, /* 20 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { type: 'default', title: '', paddingBody: 20, paddingHead: 20, dataClass: '', border: 0 }}, ready: function ready() {} };} /* generated by weex-loader */ /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(22) var __weex_style__ = __webpack_require__(23) var __weex_script__ = __webpack_require__(24) __weex_define__('@weex-component/wxc-tip', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 22 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": function () {return ['tip', 'tip-' + (this.type)]}, "children": [ { "type": "text", "classList": function () {return ['tip-txt', 'tip-txt-' + (this.type)]}, "attr": { "value": function () {return this.value} } } ] } /***/ }, /* 23 */ /***/ function(module, exports) { module.exports = { "tip": { "paddingLeft": 36, "paddingRight": 36, "paddingTop": 36, "paddingBottom": 36, "borderRadius": 10 }, "tip-txt": { "fontSize": 28 }, "tip-success": { "backgroundColor": "#dff0d8", "borderColor": "#d6e9c6" }, "tip-txt-success": { "color": "#3c763d" }, "tip-info": { "backgroundColor": "#d9edf7", "borderColor": "#bce8f1" }, "tip-txt-info": { "color": "#31708f" }, "tip-warning": { "backgroundColor": "#fcf8e3", "borderColor": "#faebcc" }, "tip-txt-warning": { "color": "#8a6d3b" }, "tip-danger": { "backgroundColor": "#f2dede", "borderColor": "#ebccd1" }, "tip-txt-danger": { "color": "#a94442" } } /***/ }, /* 24 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { type: 'success', value: '' }} };} /* generated by weex-loader */ /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(26) var __weex_style__ = __webpack_require__(27) var __weex_script__ = __webpack_require__(28) __weex_define__('@weex-component/wxc-countdown', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 26 */ /***/ function(module, exports) { module.exports = { "type": "div", "style": { "overflow": "hidden", "flexDirection": "row" }, "events": { "appear": "appeared", "disappear": "disappeared" }, "children": [ { "type": "content" } ] } /***/ }, /* 27 */ /***/ function(module, exports) { module.exports = { "wrap": { "overflow": "hidden" } } /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { module.exports = function(module, exports, __weex_require__){'use strict'; var _assign = __webpack_require__(29); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = { data: function () {return { now: 0, remain: 0, time: { elapse: 0, D: '0', DD: '0', h: '0', hh: '00', H: '0', HH: '0', m: '0', mm: '00', M: '0', MM: '0', s: '0', ss: '00', S: '0', SS: '0' }, outofview: false }}, ready: function ready() { if (this.remain <= 0) { return; } this.now = Date.now(); this.nextTick(); }, methods: { nextTick: function nextTick() { if (this.outofview) { setTimeout(this.nextTick.bind(this), 1000); } else { this.time.elapse = parseInt((Date.now() - this.now) / 1000); if (this.calc()) { this.$emit('tick', (0, _assign2.default)({}, this.time)); setTimeout(this.nextTick.bind(this), 1000); } else { this.$emit('alarm', (0, _assign2.default)({}, this.time)); } this._app.updateActions(); } }, format: function format(str) { if (str.length >= 2) { return str; } else { return '0' + str; } }, calc: function calc() { var remain = this.remain - this.time.elapse; if (remain < 0) { remain = 0; } this.time.D = String(parseInt(remain / 86400)); this.time.DD = this.format(this.time.D); this.time.h = String(parseInt((remain - parseInt(this.time.D) * 86400) / 3600)); this.time.hh = this.format(this.time.h); this.time.H = String(parseInt(remain / 3600)); this.time.HH = this.format(this.time.H); this.time.m = String(parseInt((remain - parseInt(this.time.H) * 3600) / 60)); this.time.mm = this.format(this.time.m); this.time.M = String(parseInt(remain / 60)); this.time.MM = this.format(this.time.M); this.time.s = String(remain - parseInt(this.time.M) * 60); this.time.ss = this.format(this.time.s); this.time.S = String(remain); this.time.SS = this.format(this.time.S); return remain > 0; }, appeared: function appeared() { this.outofview = false; }, disappeared: function disappeared() { this.outofview = true; } } };} /* generated by weex-loader */ /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(30), __esModule: true }; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(31); module.exports = __webpack_require__(34).Object.assign; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(32); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(47)}); /***/ }, /* 32 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(33) , core = __webpack_require__(34) , ctx = __webpack_require__(35) , hide = __webpack_require__(37) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function(C){ var F = function(a, b, c){ if(this instanceof C){ switch(arguments.length){ case 0: return new C; case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if(IS_PROTO){ (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, /* 33 */ /***/ function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }, /* 34 */ /***/ function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(36); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }, /* 36 */ /***/ function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(38) , createDesc = __webpack_require__(46); module.exports = __webpack_require__(42) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(39) , IE8_DOM_DEFINE = __webpack_require__(41) , toPrimitive = __webpack_require__(45) , dP = Object.defineProperty; exports.f = __webpack_require__(42) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }, /* 39 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(40); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }, /* 40 */ /***/ function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(42) && !__webpack_require__(43)(function(){ return Object.defineProperty(__webpack_require__(44)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(43)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 43 */ /***/ function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(40) , document = __webpack_require__(33).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(40); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }, /* 46 */ /***/ function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(48) , gOPS = __webpack_require__(63) , pIE = __webpack_require__(64) , toObject = __webpack_require__(65) , IObject = __webpack_require__(52) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(43)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(49) , enumBugKeys = __webpack_require__(62); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { var has = __webpack_require__(50) , toIObject = __webpack_require__(51) , arrayIndexOf = __webpack_require__(55)(false) , IE_PROTO = __webpack_require__(59)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }, /* 50 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(52) , defined = __webpack_require__(54); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(53); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, /* 53 */ /***/ function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }, /* 54 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(51) , toLength = __webpack_require__(56) , toIndex = __webpack_require__(58); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(57) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }, /* 57 */ /***/ function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(57) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(60)('keys') , uid = __webpack_require__(61); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(33) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }, /* 61 */ /***/ function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }, /* 62 */ /***/ function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, /* 63 */ /***/ function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }, /* 64 */ /***/ function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(54); module.exports = function(it){ return Object(defined(it)); }; /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(67) var __weex_style__ = __webpack_require__(68) var __weex_script__ = __webpack_require__(69) __weex_define__('@weex-component/wxc-marquee', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 67 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "wrap" ], "events": { "appear": "appeared", "disappear": "disappeared" }, "children": [ { "type": "div", "id": "anim", "classList": [ "anim" ], "children": [ { "type": "content" } ] } ] } /***/ }, /* 68 */ /***/ function(module, exports) { module.exports = { "wrap": { "overflow": "hidden", "position": "relative" }, "anim": { "flexDirection": "column", "position": "absolute", "transform": "translateY(0) translateZ(0)" } } /***/ }, /* 69 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { step: 0, count: 0, index: 1, duration: 0, interval: 0, outofview: false }}, ready: function ready() { if (this.interval > 0 && this.step > 0 && this.duration > 0) { this.nextTick(); } }, methods: { nextTick: function nextTick() { var self = this; if (this.outofview) { setTimeout(self.nextTick.bind(self), self.interval); } else { setTimeout(function () { self.animation(self.nextTick.bind(self)); }, self.interval); } }, animation: function animation(cb) { var self = this; var offset = -self.step * self.index; var $animation = __weex_require__('@weex-module/animation'); $animation.transition(this.$el('anim'), { styles: { transform: 'translateY(' + String(offset) + 'px) translateZ(0)' }, timingFunction: 'ease', duration: self.duration }, function () { self.index = (self.index + 1) % self.count; self.$emit('change', { index: self.index, count: self.count }); cb && cb(); }); }, appeared: function appeared() { this.outofview = false; }, disappeared: function disappeared() { this.outofview = true; } } };} /* generated by weex-loader */ /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(71) var __weex_style__ = __webpack_require__(72) var __weex_script__ = __webpack_require__(73) __weex_define__('@weex-component/wxc-navbar', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 71 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "container" ], "style": { "height": function () {return this.height}, "backgroundColor": function () {return this.backgroundColor} }, "attr": { "dataRole": function () {return this.dataRole} }, "children": [ { "type": "text", "classList": [ "right-text" ], "style": { "color": function () {return this.rightItemColor} }, "attr": { "naviItemPosition": "right", "value": function () {return this.rightItemTitle} }, "shown": function () {return !this.rightItemSrc}, "events": { "click": "onclickrightitem" } }, { "type": "image", "classList": [ "right-image" ], "attr": { "naviItemPosition": "right", "src": function () {return this.rightItemSrc} }, "shown": function () {return this.rightItemSrc}, "events": { "click": "onclickrightitem" } }, { "type": "text", "classList": [ "left-text" ], "style": { "color": function () {return this.leftItemColor} }, "attr": { "naviItemPosition": "left", "value": function () {return this.leftItemTitle} }, "shown": function () {return !this.leftItemSrc}, "events": { "click": "onclickleftitem" } }, { "type": "image", "classList": [ "left-image" ], "attr": { "naviItemPosition": "left", "src": function () {return this.leftItemSrc} }, "shown": function () {return this.leftItemSrc}, "events": { "click": "onclickleftitem" } }, { "type": "text", "classList": [ "center-text" ], "style": { "color": function () {return this.titleColor} }, "attr": { "naviItemPosition": "center", "value": function () {return this.title} } } ] } /***/ }, /* 72 */ /***/ function(module, exports) { module.exports = { "container": { "flexDirection": "row", "position": "fixed", "top": 0, "left": 0, "right": 0, "width": 750 }, "right-text": { "position": "absolute", "bottom": 28, "right": 32, "textAlign": "right", "fontSize": 32, "fontFamily": "'Open Sans', sans-serif" }, "left-text": { "position": "absolute", "bottom": 28, "left": 32, "textAlign": "left", "fontSize": 32, "fontFamily": "'Open Sans', sans-serif" }, "center-text": { "position": "absolute", "bottom": 25, "left": 172, "right": 172, "textAlign": "center", "fontSize": 36, "fontWeight": "bold" }, "left-image": { "position": "absolute", "bottom": 20, "left": 28, "width": 50, "height": 50 }, "right-image": { "position": "absolute", "bottom": 20, "right": 28, "width": 50, "height": 50 } } /***/ }, /* 73 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { dataRole: 'navbar', backgroundColor: 'black', height: 88, title: "", titleColor: 'black', rightItemSrc: '', rightItemTitle: '', rightItemColor: 'black', leftItemSrc: '', leftItemTitle: '', leftItemColor: 'black' }}, methods: { onclickrightitem: function onclickrightitem(e) { this.$dispatch('naviBar.rightItem.click', {}); }, onclickleftitem: function onclickleftitem(e) { this.$dispatch('naviBar.leftItem.click', {}); } } };} /* generated by weex-loader */ /***/ }, /* 74 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(70) var __weex_template__ = __webpack_require__(75) var __weex_style__ = __webpack_require__(76) var __weex_script__ = __webpack_require__(77) __weex_define__('@weex-component/wxc-navpage', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 75 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "wrapper" ], "children": [ { "type": "wxc-navbar", "attr": { "dataRole": function () {return this.dataRole}, "height": function () {return this.height}, "backgroundColor": function () {return this.backgroundColor}, "title": function () {return this.title}, "titleColor": function () {return this.titleColor}, "leftItemSrc": function () {return this.leftItemSrc}, "leftItemTitle": function () {return this.leftItemTitle}, "leftItemColor": function () {return this.leftItemColor}, "rightItemSrc": function () {return this.rightItemSrc}, "rightItemTitle": function () {return this.rightItemTitle}, "rightItemColor": function () {return this.rightItemColor} } }, { "type": "div", "classList": [ "wrapper" ], "style": { "marginTop": function () {return this.height} }, "children": [ { "type": "content" } ] } ] } /***/ }, /* 76 */ /***/ function(module, exports) { module.exports = { "wrapper": { "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": 0, "width": 750 } } /***/ }, /* 77 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { dataRole: 'navbar', backgroundColor: 'black', height: 88, title: "", titleColor: 'black', rightItemSrc: '', rightItemTitle: '', rightItemColor: 'black', leftItemSrc: '', leftItemTitle: '', leftItemColor: 'black' }} };} /* generated by weex-loader */ /***/ }, /* 78 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(79) var __weex_template__ = __webpack_require__(83) var __weex_style__ = __webpack_require__(84) var __weex_script__ = __webpack_require__(85) __weex_define__('@weex-component/wxc-tabbar', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { var __weex_template__ = __webpack_require__(80) var __weex_style__ = __webpack_require__(81) var __weex_script__ = __webpack_require__(82) __weex_define__('@weex-component/wxc-tabitem', [], function(__weex_require__, __weex_exports__, __weex_module__) { __weex_script__(__weex_module__, __weex_exports__, __weex_require__) if (__weex_exports__.__esModule && __weex_exports__.default) { __weex_module__.exports = __weex_exports__.default } __weex_module__.exports.template = __weex_template__ __weex_module__.exports.style = __weex_style__ }) /***/ }, /* 80 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "container" ], "style": { "backgroundColor": function () {return this.backgroundColor} }, "events": { "click": "onclickitem" }, "children": [ { "type": "image", "classList": [ "top-line" ], "attr": { "src": "http://gtms03.alicdn.com/tps/i3/TB1mdsiMpXXXXXpXXXXNw4JIXXX-640-4.png" } }, { "type": "image", "classList": [ "tab-icon" ], "attr": { "src": function () {return this.icon} } }, { "type": "text", "classList": [ "tab-text" ], "style": { "color": function () {return this.titleColor} }, "attr": { "value": function () {return this.title} } } ] } /***/ }, /* 81 */ /***/ function(module, exports) { module.exports = { "container": { "flex": 1, "flexDirection": "column", "alignItems": "center", "justifyContent": "center", "height": 88 }, "top-line": { "position": "absolute", "top": 0, "left": 0, "right": 0, "height": 2 }, "tab-icon": { "marginTop": 5, "width": 40, "height": 40 }, "tab-text": { "marginTop": 5, "textAlign": "center", "fontSize": 20 } } /***/ }, /* 82 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { index: 0, title: '', titleColor: '#000000', icon: '', backgroundColor: '#ffffff' }}, methods: { onclickitem: function onclickitem(e) { var vm = this; var params = { index: vm.index }; vm.$dispatch('tabItem.onClick', params); } } };} /* generated by weex-loader */ /***/ }, /* 83 */ /***/ function(module, exports) { module.exports = { "type": "div", "classList": [ "wrapper" ], "children": [ { "type": "embed", "classList": [ "content" ], "style": { "visibility": function () {return this.visibility} }, "repeat": function () {return this.tabItems}, "attr": { "src": function () {return this.src}, "type": "weex" } }, { "type": "div", "classList": [ "tabbar" ], "append": "tree", "children": [ { "type": "wxc-tabitem", "repeat": function () {return this.tabItems}, "attr": { "index": function () {return this.index}, "icon": function () {return this.icon}, "title": function () {return this.title}, "titleColor": function () {return this.titleColor} } } ] } ] } /***/ }, /* 84 */ /***/ function(module, exports) { module.exports = { "wrapper": { "width": 750, "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": 0 }, "content": { "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": 0, "marginTop": 0, "marginBottom": 88 }, "tabbar": { "flexDirection": "row", "position": "fixed", "bottom": 0, "left": 0, "right": 0, "height": 88 } } /***/ }, /* 85 */ /***/ function(module, exports) { module.exports = function(module, exports, __weex_require__){'use strict'; module.exports = { data: function () {return { tabItems: [], selectedIndex: 0, selectedColor: '#ff0000', unselectedColor: '#000000' }}, created: function created() { this.selected(this.selectedIndex); this.$on('tabItem.onClick', function (e) { var detail = e.detail; this.selectedIndex = detail.index; this.selected(detail.index); var params = { index: detail.index }; this.$dispatch('tabBar.onClick', params); }); }, methods: { selected: function selected(index) { for (var i = 0; i < this.tabItems.length; i++) { var tabItem = this.tabItems[i]; if (i == index) { tabItem.icon = tabItem.selectedImage; tabItem.titleColor = this.selectedColor; tabItem.visibility = 'visible'; } else { tabItem.icon = tabItem.image; tabItem.titleColor = this.unselectedColor; tabItem.visibility = 'hidden'; } } } } };} /* generated by weex-loader */ /***/ }, /* 86 */, /* 87 */, /* 88 */, /* 89 */, /* 90 */, /* 91 */, /* 92 */, /* 93 */, /* 94 */, /* 95 */, /* 96 */, /* 97 */, /* 98 */, /* 99 */, /* 100 */, /* 101 */, /* 102 */, /* 103 */, /* 104 */, /* 105 */, /* 106 */, /* 107 */, /* 108 */, /* 109 */, /* 110 */, /* 111 */, /* 112 */, /* 113 */, /* 114 */, /* 115 */, /* 116 */, /* 117 */, /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */, /* 123 */, /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */, /* 131 */, /* 132 */, /* 133 */, /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */, /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */, /* 144 */, /* 145 */, /* 146 */, /* 147 */, /* 148 */, /* 149 */, /* 150 */, /* 151 */, /* 152 */, /* 153 */, /* 154 */, /* 155 */, /* 156 */, /* 157 */, /* 158 */, /* 159 */, /* 160 */, /* 161 */, /* 162 */, /* 163 */, /* 164 */, /* 165 */, /* 166 */, /* 167 */, /* 168 */, /* 169 */, /* 170 */, /* 171 */, /* 172 */, /* 173 */, /* 174 */, /* 175 */, /* 176 */, /* 177 */, /* 178 */, /* 179 */, /* 180 */, /* 181 */, /* 182 */, /* 183 */, /* 184 */, /* 185 */, /* 186 */, /* 187 */, /* 188 */, /* 189 */, /* 190 */, /* 191 */, /* 192 */, /* 193 */, /* 194 */, /* 195 */, /* 196 */, /* 197 */, /* 198 */, /* 199 */, /* 200 */, /* 201 */, /* 202 */, /* 203 */, /* 204 */, /* 205 */, /* 206 */, /* 207 */, /* 208 */, /* 209 */, /* 210 */, /* 211 */, /* 212 */, /* 213 */, /* 214 */, /* 215 */, /* 216 */, /* 217 */, /* 218 */, /* 219 */, /* 220 */, /* 221 */, /* 222 */, /* 223 */, /* 224 */, /* 225 */, /* 226 */, /* 227 */, /* 228 */, /* 229 */, /* 230 */, /* 231 */, /* 232 */, /* 233 */, /* 234 */, /* 235 */, /* 236 */, /* 237 */, /* 238 */, /* 239 */, /* 240 */, /* 241 */, /* 242 */, /* 243 */, /* 244 */, /* 245 */, /* 246 */, /* 247 */, /* 248 */, /* 249 */, /* 250 */, /* 251 */, /* 252 */, /* 253 */, /* 254 */, /* 255 */, /* 256 */, /* 257 */, /* 258 */, /* 259 */, /* 260 */, /* 261 */, /* 262 */, /* 263 */, /* 264 */, /* 265 */, /* 266 */, /* 267 */, /* 268 */, /* 269 */, /* 270 */, /* 271 */, /* 272 */, /* 273 */, /* 274 */, /* 275 */, /* 276 */, /* 277 */, /* 278 */, /* 279 */, /* 280 */, /* 281 */, /* 282 */, /* 283 */, /* 284 */, /* 285 */, /* 286 */, /* 287 */, /* 288 */, /* 289 */, /* 290 */, /* 291 */, /* 292 */ /***/ function(module, exports) { module.exports = { "type": "div", "children": [ { "type": "scroller", "children": [ { "type": "wxc-panel", "attr": { "title": "active", "type": "primary" }, "children": [ { "type": "div", "classList": [ "wrapper" ], "children": [ { "type": "image", "attr": { "src": function () {return this.logoUrl} }, "classList": [ "logo" ] }, { "type": "text", "classList": [ "title" ], "attr": { "value": "please click image" } } ] } ] }, { "type": "wxc-panel", "attr": { "title": "focus", "type": "primary" }, "children": [ { "type": "input", "attr": { "type": "text", "placeholder": "Input Text", "autofocus": function () {return this.autofocus}, "value": "test active" }, "classList": [ "focusinput" ], "events": { "change": "onchange", "input": "oninput" } } ] }, { "type": "wxc-panel", "attr": { "title": "enabled", "type": "primary" }, "children": [ { "type": "input", "attr": { "type": "text", "placeholder": "Input Text", "autofocus": function () {return this.autofocus}, "value": "test active" }, "classList": [ "enabledinput" ], "events": { "change": "onchange", "input": "oninput" } } ] }, { "type": "wxc-panel", "attr": { "title": "disabled", "type": "primary" }, "children": [ { "type": "input", "attr": { "type": "text", "placeholder": "Input Text", "autofocus": function () {return this.autofocus}, "value": "test active", "disabled": "true" }, "classList": [ "disabledinput" ], "events": { "change": "onchange", "input": "oninput" } } ] } ] } ] } /***/ }, /* 293 */ /***/ function(module, exports) { module.exports = { "wrapper": { "alignItems": "center", "marginTop": 20 }, "title": { "fontSize": 24 }, "logo": { "width": 360, "height": 82, "backgroundColor": "#008000", "width:active": 180, "height:active": 82, "backgroundColor:active": "#FF0000" }, "focusinput": { "fontSize": 60, "height": 80, "width": 700, "color:focus": "#008000", "backgroundColor:focus": "#FF0000" }, "enabledinput": { "fontSize": 60, "height": 80, "width": 700, "color:enabled": "#FFFF00", "backgroundColor:enabled": "#0000FF" }, "disabledinput": { "fontSize": 60, "height": 80, "width": 700, "color:disabled": "#FFFFFF", "backgroundColor:disabled": "#808080" } } /***/ }, /* 294 */ /***/ function(module, exports, __webpack_require__) { module.exports = function(module, exports, __weex_require__){'use strict'; __webpack_require__(4); module.exports = { data: function () {return { logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png', autofocus: false }}, methods: {} };} /* generated by weex-loader */ /***/ } /******/ ]);
loves9/weexapp
WeexClient/bundlejs/showcase/pseudo-class.js
JavaScript
mit
56,496
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of Knut Reinert or the FU Berlin nor the names of // its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. // // ========================================================================== // Author: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de> // ========================================================================== // Concatenate multiple files from soft-masked FASTA (masked sequence is // lower case) to hard-masked FASTA (replaced by Ns) and write to stdout. // // USAGE: soft_to_hard_masking IN1.fa [IN2.fa ...] > out.fa // ========================================================================== #include <iostream> #include <cctype> #include <seqan/basic.h> #include <seqan/sequence.h> #include <seqan/file.h> // For printing SeqAn Strings. #include <seqan/stream.h> template <typename TStream> void convertToHardMasked(TStream & stream, char const * filename) { using namespace seqan; std::fstream in(filename, std::ios::binary | std::ios::in); if (!in.good()) { std::cerr << "ERROR: Could not open " << filename << '\n'; return; } RecordReader<std::fstream, SinglePass<> > reader(in); CharString buffer; while (!atEnd(reader)) { clear(buffer); int res = readLine(buffer, reader); if (res != 0) { std::cerr << "ERROR: Could not read from " << filename << '\n'; return; } // Header lines are not touched. if (front(buffer) != '>') { typedef typename Iterator<CharString, Rooted>::Type TIter; for (TIter it = begin(buffer, Rooted()); !atEnd(it); goNext(it)) if (std::islower(*it)) *it = 'N'; } stream << buffer << '\n'; } } int main(int argc, char const ** argv) { for (int i = 1; i < argc; ++i) { std::cerr << argv[i] << '\n'; convertToHardMasked(std::cout, argv[i]); } return 0; }
bkahlert/seqan-research
raw/workshop13/workshop2013-data-20130926/trunk/core/demos/soft_to_hard_masking.cpp
C++
mit
3,690
/*! * @primer/css/product * http://primer.style/css * * Released under MIT license. Copyright (c) 2019 GitHub Inc. */.flash{position:relative;padding:20px 16px;border-style:solid;border-width:1px;border-radius:6px}.flash p:last-child{margin-bottom:0}.flash .octicon{margin-right:12px}.flash-messages{margin-bottom:24px}.flash-close{float:right;padding:16px;margin:-16px;text-align:center;cursor:pointer;background:none;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.flash-close:hover{opacity:0.7}.flash-close:active{opacity:0.5}.flash-close .octicon{margin-right:0}.flash-action{float:right;margin-top:-3px;margin-left:24px;background-clip:padding-box}.flash{color:var(--color-alert-info-text);background-image:linear-gradient(var(--color-alert-info-bg), var(--color-alert-info-bg));border-color:var(--color-alert-info-border)}.flash .octicon{color:var(--color-alert-info-icon)}.flash-warn{color:var(--color-alert-warn-text);background-image:linear-gradient(var(--color-alert-warn-bg), var(--color-alert-warn-bg));border-color:var(--color-alert-warn-border)}.flash-warn .octicon{color:var(--color-alert-warn-icon)}.flash-error{color:var(--color-alert-error-text);background-image:linear-gradient(var(--color-alert-error-bg), var(--color-alert-error-bg));border-color:var(--color-alert-error-border)}.flash-error .octicon{color:var(--color-alert-error-icon)}.flash-success{color:var(--color-alert-success-text);background-image:linear-gradient(var(--color-alert-success-bg), var(--color-alert-success-bg));border-color:var(--color-alert-success-border)}.flash-success .octicon{color:var(--color-alert-success-icon)}.flash-full{margin-top:-1px;border-width:1px 0;border-radius:0}.flash-banner{position:fixed;top:0;z-index:90;width:100%;border-top:0;border-right:0;border-left:0;border-radius:0}.flash-full,.flash-banner{background-color:var(--color-bg-canvas)}.warning{padding:.5em;margin-bottom:0.8em;font-weight:600;background-color:var(--color-alert-warn-bg)}.autocomplete-results{position:absolute;z-index:99;width:100%;max-height:20em;overflow-y:auto;font-size:13px;list-style:none;background:var(--color-bg-overlay);border:1px solid var(--color-border-primary);border-radius:6px;box-shadow:var(--color-autocomplete-shadow)}.autocomplete-item{display:block;width:100%;padding:4px 8px;overflow:hidden;font-weight:600;color:var(--color-text-primary);text-align:left;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background-color:var(--color-bg-overlay);border:0}.autocomplete-item:hover{color:var(--color-state-hover-primary-text);text-decoration:none;background-color:var(--color-state-hover-primary-bg)}.autocomplete-item:hover *{color:inherit !important}.autocomplete-item.selected,.autocomplete-item[aria-selected=true],.autocomplete-item.navigation-focus{color:var(--color-state-selected-primary-text);text-decoration:none;background-color:var(--color-state-selected-primary-bg)}.autocomplete-item.selected *,.autocomplete-item[aria-selected=true] *,.autocomplete-item.navigation-focus *{color:inherit !important}.suggester{position:relative;top:0;left:0;min-width:180px;padding:0;margin:0;margin-top:24px;list-style:none;cursor:pointer;background:var(--color-bg-overlay);border:1px solid var(--color-border-primary);border-radius:6px;box-shadow:var(--color-autocomplete-shadow)}.suggester li{display:block;padding:4px 8px;font-weight:500;border-bottom:1px solid var(--color-autocomplete-row-border)}.suggester li small{font-weight:400;color:var(--color-text-secondary)}.suggester li:last-child{border-bottom:0;border-bottom-right-radius:6px;border-bottom-left-radius:6px}.suggester li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}.suggester li:hover{color:var(--color-state-hover-primary-text);text-decoration:none;background:var(--color-state-hover-primary-bg)}.suggester li:hover small{color:var(--color-state-hover-primary-text)}.suggester li[aria-selected="true"],.suggester li.navigation-focus{color:var(--color-state-selected-primary-text);text-decoration:none;background:var(--color-state-selected-primary-bg)}.suggester li[aria-selected="true"] small,.suggester li.navigation-focus small{color:var(--color-state-selected-primary-text)}.suggester-container{position:absolute;top:0;left:0;z-index:30}@media (max-width: 544px){.page-responsive .suggester-container{right:8px !important;left:8px !important}.page-responsive .suggester li{padding:8px 16px}}.avatar{display:inline-block;overflow:hidden;line-height:1;vertical-align:middle;background-color:var(--color-avatar-bg);border-radius:6px;flex-shrink:0;box-shadow:0 0 0 1px var(--color-avatar-border)}.avatar-link{float:left;line-height:1}.avatar-group-item{display:inline-block;margin-bottom:3px}.avatar-1,.avatar-2,.avatar-small{border-radius:4px}.avatar-1{width:16px;height:16px}.avatar-2{width:20px;height:20px}.avatar-3{width:24px;height:24px}.avatar-4{width:28px;height:28px}.avatar-5{width:32px;height:32px}.avatar-6{width:40px;height:40px}.avatar-7{width:48px;height:48px}.avatar-8{width:64px;height:64px}.avatar-parent-child{position:relative}.avatar-child{position:absolute;right:-15%;bottom:-9%;background-color:var(--color-bg-canvas);border-radius:4px;box-shadow:var(--color-avatar-child-shadow)}.AvatarStack{position:relative;min-width:26px;height:20px}.AvatarStack .AvatarStack-body{position:absolute}.AvatarStack.AvatarStack--two{min-width:36px}.AvatarStack.AvatarStack--three-plus{min-width:46px}.AvatarStack-body{display:flex;background:var(--color-bg-canvas)}.AvatarStack-body .avatar{position:relative;z-index:2;display:flex;width:20px;height:20px;box-sizing:content-box;margin-right:-11px;background-color:var(--color-bg-canvas);border-right:1px solid var(--color-bg-canvas);border-radius:4px;transition:margin 0.1s ease-in-out}.AvatarStack-body .avatar:first-child{z-index:3}.AvatarStack-body .avatar:last-child{z-index:1;border-right:0}.AvatarStack-body .avatar img{border-radius:4px}.AvatarStack-body .avatar:nth-child(n+4){display:none;opacity:0}.AvatarStack-body:hover .avatar{margin-right:3px}.AvatarStack-body:hover .avatar:nth-child(n+4){display:flex;opacity:1}.AvatarStack-body:hover .avatar-more{display:none !important}.avatar.avatar-more{z-index:1;margin-right:0;background:var(--color-bg-tertiary)}.avatar.avatar-more::before,.avatar.avatar-more::after{position:absolute;display:block;height:20px;content:"";border-radius:2px;outline:1px solid var(--color-bg-canvas)}.avatar.avatar-more::before{width:17px;background:var(--color-avatar-stack-fade-more)}.avatar.avatar-more::after{width:14px;background:var(--color-avatar-stack-fade)}.AvatarStack--right .AvatarStack-body{right:0;flex-direction:row-reverse}.AvatarStack--right .AvatarStack-body:hover .avatar{margin-right:0;margin-left:3px}.AvatarStack--right .avatar.avatar-more{background:var(--color-avatar-stack-fade)}.AvatarStack--right .avatar.avatar-more::before{width:5px}.AvatarStack--right .avatar.avatar-more::after{width:2px;background:var(--color-bg-tertiary)}.AvatarStack--right .avatar{margin-right:0;margin-left:-11px;border-right:0;border-left:1px solid var(--color-bg-canvas)}.CircleBadge{display:flex;align-items:center;justify-content:center;background-color:var(--color-bg-canvas);border-radius:50%;box-shadow:var(--color-shadow-medium)}.CircleBadge-icon{max-width:60% !important;height:auto !important;max-height:55% !important}.CircleBadge--small{width:56px;height:56px}.CircleBadge--medium{width:96px;height:96px}.CircleBadge--large{width:128px;height:128px}.DashedConnection{position:relative}.DashedConnection::before{position:absolute;top:50%;left:0;width:100%;content:"";border-bottom:2px dashed var(--color-border-primary)}.DashedConnection .CircleBadge{position:relative}.blankslate{position:relative;padding:32px;text-align:center}.blankslate p{color:var(--color-text-secondary)}.blankslate code{padding:2px 5px 3px;font-size:14px;background:var(--color-bg-canvas);border:1px solid var(--color-auto-gray-0);border-radius:6px}.blankslate img{width:56px;height:56px}.blankslate-icon{margin-right:4px;margin-bottom:8px;margin-left:4px;color:var(--color-blankslate-icon)}.blankslate-capped{border-radius:0 0 6px 6px}.blankslate-spacious{padding:80px 40px}.blankslate-narrow{max-width:485px;margin:0 auto}.blankslate-large img{width:80px;height:80px}.blankslate-large h3{margin:16px 0;font-size:24px}.blankslate-large p{font-size:16px}.blankslate-clean-background{border:0}.branch-name{display:inline-block;padding:2px 6px;font:12px "SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;color:var(--color-branch-name-text);background-color:var(--color-branch-name-bg);border-radius:6px}.branch-name .octicon{margin:1px -2px 0 0;color:var(--color-branch-name-icon)}a.branch-name{color:var(--color-text-link);background-color:var(--color-branch-name-link-bg)}a.branch-name .octicon{color:var(--color-branch-name-link-icon)}.dropdown{position:relative}.dropdown-caret{display:inline-block;width:0;height:0;vertical-align:middle;content:"";border-style:solid;border-width:4px 4px 0;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;width:160px;padding-top:4px;padding-bottom:4px;margin-top:2px;list-style:none;background-color:var(--color-bg-overlay);background-clip:padding-box;border:1px solid var(--color-border-primary);border-radius:6px;box-shadow:var(--color-dropdown-shadow)}.dropdown-menu::before,.dropdown-menu::after{position:absolute;display:inline-block;content:""}.dropdown-menu::before{border:8px solid transparent;border-bottom-color:var(--color-border-primary)}.dropdown-menu::after{border:7px solid transparent;border-bottom-color:var(--color-bg-overlay)}.dropdown-menu>ul{list-style:none}.dropdown-menu-no-overflow{width:auto}.dropdown-menu-no-overflow .dropdown-item{padding:4px 16px;overflow:visible;text-overflow:inherit}.dropdown-item{display:block;padding:4px 8px 4px 16px;overflow:hidden;color:var(--color-text-primary);text-overflow:ellipsis;white-space:nowrap}.dropdown-item:focus,.dropdown-item:hover{color:var(--color-state-hover-primary-text);text-decoration:none;background-color:var(--color-state-hover-primary-bg);outline:none}.dropdown-item:focus>.octicon,.dropdown-item:hover>.octicon{color:inherit;opacity:1}.dropdown-item.btn-link{width:100%;text-align:left}.dropdown-signout{width:100%;text-align:left;background:none;border:0}.dropdown-divider{display:block;height:0;margin:8px 0;border-top:1px solid var(--color-border-primary)}.dropdown-header{padding:4px 16px;font-size:12px;color:var(--color-text-secondary)}.dropdown-item[aria-checked="false"] .octicon-check{display:none}.dropdown-menu-w{top:0;right:100%;left:auto;width:auto;margin-top:0;margin-right:8px}.dropdown-menu-w::before{top:10px;right:-16px;left:auto;border-color:transparent;border-left-color:var(--color-border-primary)}.dropdown-menu-w::after{top:11px;right:-14px;left:auto;border-color:transparent;border-left-color:var(--color-bg-overlay)}.dropdown-menu-e{top:0;left:100%;width:auto;margin-top:0;margin-left:8px}.dropdown-menu-e::before{top:10px;left:-16px;border-color:transparent;border-right-color:var(--color-border-primary)}.dropdown-menu-e::after{top:11px;left:-14px;border-color:transparent;border-right-color:var(--color-bg-overlay)}.dropdown-menu-ne{top:auto;bottom:100%;left:0;margin-bottom:3px}.dropdown-menu-ne::before,.dropdown-menu-ne::after{top:auto;right:auto}.dropdown-menu-ne::before{bottom:-8px;left:9px;border-top:8px solid var(--color-border-primary);border-right:8px solid transparent;border-bottom:0;border-left:8px solid transparent}.dropdown-menu-ne::after{bottom:-7px;left:10px;border-top:7px solid var(--color-bg-overlay);border-right:7px solid transparent;border-bottom:0;border-left:7px solid transparent}.dropdown-menu-s{right:50%;left:auto;transform:translateX(50%)}.dropdown-menu-s::before{top:-16px;right:50%;transform:translateX(50%)}.dropdown-menu-s::after{top:-14px;right:50%;transform:translateX(50%)}.dropdown-menu-sw{right:0;left:auto}.dropdown-menu-sw::before{top:-16px;right:9px;left:auto}.dropdown-menu-sw::after{top:-14px;right:10px;left:auto}.dropdown-menu-se::before{top:-16px;left:9px}.dropdown-menu-se::after{top:-14px;left:10px}.Header{z-index:32;display:flex;padding:16px;font-size:14px;line-height:1.5;color:var(--color-header-text);background-color:var(--color-header-bg);align-items:center;flex-wrap:nowrap}.Header-item{display:flex;margin-right:16px;align-self:stretch;align-items:center;flex-wrap:nowrap}.Header-item--full{flex:auto}.Header-link{font-weight:600;color:var(--color-header-logo);white-space:nowrap}.Header-link:hover,.Header-link:focus{color:var(--color-header-text);text-decoration:none}.IssueLabel{display:inline-block;padding:0 7px;font-size:12px;font-weight:500;line-height:18px;border:1px solid transparent;border-radius:2em}.IssueLabel .g-emoji{position:relative;top:-0.05em;display:inline-block;font-size:1em;line-height:1}.IssueLabel:hover{text-decoration:none}.IssueLabel--big{padding-right:10px;padding-left:10px;line-height:22px}.labels{position:relative}.label,.Label{display:inline-block;padding:0 7px;font-size:12px;font-weight:500;line-height:18px;border:1px solid transparent;border-radius:2em;background-color:transparent !important;border-color:var(--color-label-border)}.label:hover,.Label:hover{text-decoration:none}.Label--large{padding-right:10px;padding-left:10px;line-height:22px}.Label--inline{display:inline;padding:0.1667em 0.5em;font-size:0.9em}.Label--primary{color:var(--color-label-primary-text);border-color:var(--color-label-primary-border)}.Label--secondary{color:var(--color-label-secondary-text);border-color:var(--color-label-secondary-border)}.Label--info{color:var(--color-label-info-text);border-color:var(--color-label-info-border)}.Label--success{color:var(--color-label-success-text);border-color:var(--color-label-success-border)}.Label--warning{color:var(--color-label-warning-text);border-color:var(--color-label-warning-border)}.Label--danger{color:var(--color-label-danger-text);border-color:var(--color-label-danger-border)}.state,.State{display:inline-block;padding:5px 12px;font-size:14px;font-weight:500;line-height:20px;text-align:center;white-space:nowrap;border-radius:2em}.state,.State,.State--draft{color:var(--color-pr-state-draft-text);background-color:var(--color-pr-state-draft-bg);border:1px solid var(--color-pr-state-draft-border)}.State--open{color:var(--color-pr-state-open-text);background-color:var(--color-pr-state-open-bg);border-color:var(--color-pr-state-open-border)}.State--merged{color:var(--color-pr-state-merged-text);background-color:var(--color-pr-state-merged-bg);border-color:var(--color-pr-state-merged-border)}.State--closed{color:var(--color-pr-state-closed-text);background-color:var(--color-pr-state-closed-bg);border-color:var(--color-pr-state-closed-border)}.State--small{padding:0 10px;font-size:12px;line-height:24px}.State--small .octicon{width:1em}.Counter{display:inline-block;min-width:20px;padding:0 6px;font-size:12px;font-weight:500;line-height:18px;color:var(--color-counter-text);text-align:center;background-color:var(--color-counter-bg);border:1px solid transparent;border-radius:2em}.Counter:empty{display:none}.Counter .octicon{vertical-align:text-top;opacity:0.8}.Counter--primary{color:var(--color-counter-primary-text);background-color:var(--color-counter-primary-bg)}.Counter--secondary{color:var(--color-counter-secondary-text);background-color:var(--color-counter-secondary-bg)}.diffstat{font-size:12px;font-weight:600;color:var(--color-text-secondary);white-space:nowrap;cursor:default}.diffstat-block-deleted,.diffstat-block-added,.diffstat-block-neutral{display:inline-block;width:8px;height:8px;margin-left:1px;outline-offset:-1px}.diffstat-block-deleted{background-color:var(--color-diffstat-deletion-bg);outline:1px solid var(--color-diffstat-deletion-border)}.diffstat-block-added{background-color:var(--color-diffstat-addition-bg);outline:1px solid var(--color-diffstat-addition-border)}.diffstat-block-neutral{background-color:var(--color-diffstat-neutral-bg);outline:1px solid var(--color-diffstat-neutral-border)}.AnimatedEllipsis{display:inline-block;overflow:hidden;vertical-align:bottom}.AnimatedEllipsis::after{display:inline-block;content:"...";animation:AnimatedEllipsis-keyframes 1.2s steps(4, jump-none) infinite}@keyframes AnimatedEllipsis-keyframes{0%{transform:translateX(-100%)}}.markdown-body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px "SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;line-height:10px;color:var(--color-auto-gray-7);vertical-align:middle;background-color:var(--color-bg-secondary);border:solid 1px var(--color-border-tertiary);border-bottom-color:var(--color-border-tertiary);border-radius:6px;box-shadow:inset 0 -1px 0 var(--color-border-tertiary)}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--color-text-danger)}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:16px}.markdown-body hr{height:.25em;padding:0;margin:24px 0;background-color:var(--color-border-primary);border:0}.markdown-body blockquote{padding:0 1em;color:var(--color-text-tertiary);border-left:0.25em solid var(--color-markdown-blockquote-border)}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--color-text-primary);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{font-size:inherit}.markdown-body h1{padding-bottom:0.3em;font-size:2em;border-bottom:1px solid var(--color-border-secondary)}.markdown-body h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid var(--color-border-secondary)}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:0.875em}.markdown-body h6{font-size:0.85em;color:var(--color-text-tertiary)}.markdown-body ul,.markdown-body ol{padding-left:2em}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body ol[type="a"]{list-style-type:lower-alpha}.markdown-body ol[type="i"]{list-style-type:lower-roman}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;width:max-content;max-width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--color-markdown-table-border)}.markdown-body table tr{background-color:var(--color-bg-primary);border-top:1px solid var(--color-markdown-table-tr-border)}.markdown-body table tr:nth-child(2n){background-color:var(--color-bg-tertiary)}.markdown-body table img{background-color:transparent}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:var(--color-bg-primary)}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--color-markdown-frame-border)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--color-text-primary)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:0.2em 0.4em;margin:0;font-size:85%;background-color:var(--color-markdown-code-bg);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--color-bg-tertiary);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:var(--color-bg-primary);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:var(--color-bg-tertiary);border-top:0}.Popover{position:absolute;z-index:100}.Popover-message{position:relative;width:232px;margin-right:auto;margin-left:auto}.Popover-message::before,.Popover-message::after{position:absolute;left:50%;display:inline-block;content:""}.Popover-message::before{top:-16px;margin-left:-9px;border:8px solid transparent;border-bottom-color:var(--color-border-primary)}.Popover-message::after{top:-14px;margin-left:-8px;border:7px solid transparent;border-bottom-color:var(--color-bg-overlay)}.Popover-message.Box{background-color:var(--color-bg-overlay)}.Popover-message--bottom::before,.Popover-message--bottom::after,.Popover-message--bottom-right::before,.Popover-message--bottom-right::after,.Popover-message--bottom-left::before,.Popover-message--bottom-left::after{top:auto;border-bottom-color:transparent}.Popover-message--bottom::before,.Popover-message--bottom-right::before,.Popover-message--bottom-left::before{bottom:-16px;border-top-color:var(--color-border-primary)}.Popover-message--bottom::after,.Popover-message--bottom-right::after,.Popover-message--bottom-left::after{bottom:-14px;border-top-color:var(--color-bg-overlay)}.Popover-message--top-right,.Popover-message--bottom-right{right:-9px;margin-right:0}.Popover-message--top-right::before,.Popover-message--top-right::after,.Popover-message--bottom-right::before,.Popover-message--bottom-right::after{left:auto;margin-left:0}.Popover-message--top-right::before,.Popover-message--bottom-right::before{right:20px}.Popover-message--top-right::after,.Popover-message--bottom-right::after{right:21px}.Popover-message--top-left,.Popover-message--bottom-left{left:-9px;margin-left:0}.Popover-message--top-left::before,.Popover-message--top-left::after,.Popover-message--bottom-left::before,.Popover-message--bottom-left::after{left:24px;margin-left:0}.Popover-message--top-left::after,.Popover-message--bottom-left::after{left:25px}.Popover-message--right::before,.Popover-message--right::after,.Popover-message--right-top::before,.Popover-message--right-top::after,.Popover-message--right-bottom::before,.Popover-message--right-bottom::after,.Popover-message--left::before,.Popover-message--left::after,.Popover-message--left-top::before,.Popover-message--left-top::after,.Popover-message--left-bottom::before,.Popover-message--left-bottom::after{top:50%;left:auto;margin-left:0;border-bottom-color:transparent}.Popover-message--right::before,.Popover-message--right-top::before,.Popover-message--right-bottom::before,.Popover-message--left::before,.Popover-message--left-top::before,.Popover-message--left-bottom::before{margin-top:-9px}.Popover-message--right::after,.Popover-message--right-top::after,.Popover-message--right-bottom::after,.Popover-message--left::after,.Popover-message--left-top::after,.Popover-message--left-bottom::after{margin-top:-8px}.Popover-message--right::before,.Popover-message--right-top::before,.Popover-message--right-bottom::before{right:-16px;border-left-color:var(--color-border-primary)}.Popover-message--right::after,.Popover-message--right-top::after,.Popover-message--right-bottom::after{right:-14px;border-left-color:var(--color-bg-overlay)}.Popover-message--left::before,.Popover-message--left-top::before,.Popover-message--left-bottom::before{left:-16px;border-right-color:var(--color-border-primary)}.Popover-message--left::after,.Popover-message--left-top::after,.Popover-message--left-bottom::after{left:-14px;border-right-color:var(--color-bg-overlay)}.Popover-message--right-top::before,.Popover-message--right-top::after,.Popover-message--left-top::before,.Popover-message--left-top::after{top:24px}.Popover-message--right-bottom::before,.Popover-message--right-bottom::after,.Popover-message--left-bottom::before,.Popover-message--left-bottom::after{top:auto}.Popover-message--right-bottom::before,.Popover-message--left-bottom::before{bottom:16px}.Popover-message--right-bottom::after,.Popover-message--left-bottom::after{bottom:17px}@media (min-width: 544px){.Popover-message--large{min-width:320px}}.Progress{display:flex;height:8px;overflow:hidden;background-color:var(--color-auto-gray-2);border-radius:6px;outline:1px solid transparent}.Progress--large{height:10px}.Progress--small{height:5px}.Progress-item{outline:2px solid transparent}.Progress-item+.Progress-item{margin-left:2px}.SelectMenu{position:fixed;top:0;right:0;bottom:0;left:0;z-index:99;display:flex;padding:16px;pointer-events:none;flex-direction:column}@media (min-width: 544px){.SelectMenu{position:absolute;top:auto;right:auto;bottom:auto;left:auto;padding:0}}.SelectMenu::before{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;content:"";background-color:var(--color-select-menu-backdrop-bg)}@media (min-width: 544px){.SelectMenu::before{display:none}}.SelectMenu-modal{position:relative;z-index:99;display:flex;max-height:66%;margin:auto 0;overflow:hidden;pointer-events:auto;flex-direction:column;background-color:var(--color-bg-overlay);border:1px solid var(--color-select-menu-backdrop-border);border-radius:12px;box-shadow:var(--color-select-menu-shadow);animation:SelectMenu-modal-animation 0.12s cubic-bezier(0, 0.1, 0.1, 1) backwards}@keyframes SelectMenu-modal-animation{0%{opacity:0;transform:scale(0.9)}}@keyframes SelectMenu-modal-animation--sm{0%{opacity:0;transform:translateY(-16px)}}@media (min-width: 544px){.SelectMenu-modal{width:300px;height:auto;max-height:480px;margin:8px 0 16px 0;font-size:12px;border-color:var(--color-border-primary);border-radius:6px;box-shadow:var(--color-shadow-large);animation-name:SelectMenu-modal-animation--sm}}.SelectMenu-header{display:flex;padding:16px;flex:none;align-items:center;border-bottom:1px solid var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-header{padding:7px 7px 7px 16px}}.SelectMenu-title{flex:1;font-size:14px;font-weight:600}@media (min-width: 544px){.SelectMenu-title{font-size:inherit}}.SelectMenu-closeButton{padding:16px;margin:-16px;line-height:1;color:var(--color-icon-tertiary);background-color:transparent;border:0}@media (min-width: 544px){.SelectMenu-closeButton{padding:8px;margin:-8px -7px}}.SelectMenu-filter{padding:16px;margin:0;border-bottom:1px solid var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-filter{padding:8px}}.SelectMenu-input{display:block;width:100%}@media (min-width: 544px){.SelectMenu-input{font-size:14px}}.SelectMenu-list{position:relative;padding:0;margin:0;margin-bottom:-1px;flex:auto;overflow-x:hidden;overflow-y:auto;background-color:var(--color-bg-overlay);-webkit-overflow-scrolling:touch}.SelectMenu-item{display:flex;align-items:center;width:100%;padding:16px;overflow:hidden;color:var(--color-text-primary);text-align:left;cursor:pointer;background-color:var(--color-bg-overlay);border:0;border-bottom:1px solid var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-item{padding-top:7px;padding-bottom:7px}}.SelectMenu-list--borderless .SelectMenu-item{border-bottom:0}.SelectMenu-icon{width:16px;margin-right:8px;flex-shrink:0}.SelectMenu-icon--check{visibility:hidden;transition:transform 0.12s cubic-bezier(0.5, 0.1, 1, 0.5),visibility 0s 0.12s linear;transform:scale(0)}.SelectMenu-tabs{display:flex;flex-shrink:0;overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px 0 var(--color-select-menu-border-secondary);-webkit-overflow-scrolling:touch}.SelectMenu-tabs::-webkit-scrollbar{display:none}@media (min-width: 544px){.SelectMenu-tabs{padding:8px 8px 0 8px}}.SelectMenu-tab{flex:1;padding:8px 16px;font-size:12px;font-weight:500;color:var(--color-text-tertiary);text-align:center;background-color:transparent;border:0;box-shadow:inset 0 -1px 0 var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-tab{flex:none;padding:4px 16px;border:1px solid transparent;border-bottom-width:0;border-top-left-radius:6px;border-top-right-radius:6px}}.SelectMenu-tab[aria-selected="true"]{z-index:1;color:var(--color-text-primary);cursor:default;background-color:var(--color-bg-overlay);box-shadow:0 0 0 1px var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-tab[aria-selected="true"]{border-color:var(--color-select-menu-border-secondary);box-shadow:none}}.SelectMenu-message{padding:7px 16px;text-align:center;background-color:var(--color-bg-overlay);border-bottom:1px solid var(--color-select-menu-border-secondary)}.SelectMenu-blankslate,.SelectMenu-loading{padding:24px 16px;text-align:center;background-color:var(--color-bg-overlay)}.SelectMenu-divider{padding:4px 16px;margin:0;font-size:12px;font-weight:500;color:var(--color-text-tertiary);background-color:var(--color-bg-tertiary);border-bottom:1px solid var(--color-select-menu-border-secondary)}.SelectMenu-list--borderless .SelectMenu-divider{border-top:1px solid var(--color-select-menu-border-secondary)}.SelectMenu-list--borderless .SelectMenu-divider:empty{padding:0;border-top:0}.SelectMenu-footer{z-index:0;padding:8px 16px;font-size:12px;color:var(--color-text-tertiary);text-align:center;border-top:1px solid var(--color-select-menu-border-secondary)}@media (min-width: 544px){.SelectMenu-footer{padding:7px 16px}}.SelectMenu--hasFilter .SelectMenu-modal{height:80%;max-height:none;margin-top:0}@media (min-width: 544px){.SelectMenu--hasFilter .SelectMenu-modal{height:auto;max-height:480px;margin-top:8px}}.SelectMenu-closeButton:focus,.SelectMenu-tab:focus,.SelectMenu-item:focus{outline:0}.SelectMenu-item:hover{text-decoration:none}.SelectMenu-item[aria-checked=true]{font-weight:500;color:var(--color-text-primary)}.SelectMenu-item[aria-checked=true] .SelectMenu-icon--check{visibility:visible;transition:transform 0.12s cubic-bezier(0, 0, 0.2, 1),visibility 0s linear;transform:scale(1)}.SelectMenu-item:disabled,.SelectMenu-item[aria-disabled=true]{color:var(--color-text-disabled);pointer-events:none}@media (hover: hover){body:not(.intent-mouse) .SelectMenu-closeButton:focus,.SelectMenu-closeButton:hover{color:var(--color-text-primary)}.SelectMenu-closeButton:active{color:var(--color-text-secondary)}body:not(.intent-mouse) .SelectMenu-item:focus,.SelectMenu-item:hover{background-color:var(--color-state-hover-secondary-bg)}.SelectMenu-item:active{background-color:var(--color-bg-secondary)}body:not(.intent-mouse) .SelectMenu-tab:focus{background-color:var(--color-select-menu-tap-focus-bg)}.SelectMenu-tab:hover{color:var(--color-text-primary)}.SelectMenu-tab:not([aria-selected="true"]):active{color:var(--color-text-primary);background-color:var(--color-bg-tertiary)}}@media (hover: none){.SelectMenu-item:focus,.SelectMenu-item:active{background-color:var(--color-bg-secondary)}.SelectMenu-item{-webkit-tap-highlight-color:var(--color-select-menu-tap-highlight)}}.Subhead{display:flex;padding-bottom:8px;margin-bottom:16px;border-bottom:1px solid var(--color-border-secondary);flex-flow:row wrap}.Subhead--spacious{margin-top:40px}.Subhead-heading{font-size:24px;font-weight:400;flex:1 1 auto}.Subhead-heading--danger{font-weight:600;color:var(--color-text-danger)}.Subhead-description{font-size:14px;color:var(--color-text-secondary);flex:1 100%}.Subhead-actions{align-self:center;justify-content:flex-end}.TimelineItem{position:relative;display:flex;padding:16px 0;margin-left:16px}.TimelineItem::before{position:absolute;top:0;bottom:0;left:0;display:block;width:2px;content:"";background-color:var(--color-border-secondary)}.TimelineItem:target .TimelineItem-badge{border-color:var(--color-timeline-target-badge-border);box-shadow:0 0 0.2em var(--color-timeline-target-badge-shadow)}.TimelineItem-badge{position:relative;z-index:1;display:flex;width:32px;height:32px;margin-right:8px;margin-left:-15px;color:var(--color-icon-secondary);align-items:center;background-color:var(--color-timeline-badge-bg);border:2px solid var(--color-bg-canvas);border-radius:50%;justify-content:center;flex-shrink:0}.TimelineItem-badge--success{color:var(--color-text-white);background-color:var(--color-btn-primary-bg);border:1px solid var(--color-timeline-badge-success-border)}.TimelineItem-body{min-width:0;max-width:100%;margin-top:4px;color:var(--color-timeline-text);flex:auto}.TimelineItem-avatar{position:absolute;left:-72px;z-index:1}.TimelineItem-break{position:relative;z-index:1;height:24px;margin:0;margin-bottom:-16px;margin-left:-56px;background-color:var(--color-bg-canvas);border:0;border-top:4px solid var(--color-border-primary)}.TimelineItem--condensed{padding-top:4px;padding-bottom:0}.TimelineItem--condensed:last-child{padding-bottom:16px}.TimelineItem--condensed .TimelineItem-badge{height:16px;margin-top:8px;margin-bottom:8px;color:var(--color-icon-secondary);background-color:var(--color-bg-canvas);border:0}.Toast{display:flex;margin:8px;color:var(--color-toast-text);background-color:var(--color-toast-bg);border-radius:6px;box-shadow:inset 0 0 0 1px var(--color-toast-border),var(--color-toast-shadow)}@media (min-width: 544px){.Toast{width:max-content;max-width:450px;margin:16px}}.Toast-icon{display:flex;align-items:center;justify-content:center;width:48px;flex-shrink:0;color:var(--color-toast-icon);background-color:var(--color-toast-icon-bg);border:1px solid var(--color-toast-icon-border);border-right:0;border-top-left-radius:inherit;border-bottom-left-radius:inherit}.Toast-content{padding:16px}.Toast-dismissButton{max-height:54px;padding:16px;color:inherit;background-color:transparent;border:0}.Toast-dismissButton:focus,.Toast-dismissButton:hover{outline:none;opacity:0.7}.Toast-dismissButton:active{opacity:0.5}.Toast--loading{color:var(--color-toast-loading-text);box-shadow:inset 0 0 0 1px var(--color-toast-loading-border),var(--color-toast-shadow)}.Toast--loading .Toast-icon{color:var(--color-toast-loading-icon);background-color:var(--color-toast-loading-icon-bg);border-color:var(--color-toast-loading-icon-border)}.Toast--error{color:var(--color-toast-danger-text);box-shadow:inset 0 0 0 1px var(--color-toast-danger-border),var(--color-toast-shadow)}.Toast--error .Toast-icon{color:var(--color-toast-danger-icon);background-color:var(--color-toast-danger-icon-bg);border-color:var(--color-toast-danger-icon-border)}.Toast--warning{color:var(--color-toast-warning-text);box-shadow:inset 0 0 0 1px var(--color-toast-warning-border),var(--color-toast-shadow)}.Toast--warning .Toast-icon{color:var(--color-toast-warning-icon);background-color:var(--color-toast-warning-icon-bg);border-color:var(--color-toast-warning-icon-border)}.Toast--success{color:var(--color-toast-success-text);box-shadow:inset 0 0 0 1px var(--color-toast-success-border),var(--color-toast-shadow)}.Toast--success .Toast-icon{color:var(--color-toast-success-icon);background-color:var(--color-toast-success-icon-bg);border-color:var(--color-toast-success-icon-border)}.Toast--animateIn{animation:Toast--animateIn 0.18s cubic-bezier(0.22, 0.61, 0.36, 1) backwards}@keyframes Toast--animateIn{0%{opacity:0;transform:translateY(100%)}}.Toast--animateOut{animation:Toast--animateOut 0.18s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards}@keyframes Toast--animateOut{100%{pointer-events:none;opacity:0;transform:translateY(100%)}}.Toast--spinner{animation:Toast--spinner 1000ms linear infinite}@keyframes Toast--spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} /*# sourceMappingURL=product.css.map */
cdnjs/cdnjs
ajax/libs/Primer/0.0.0-2021328111152/product.css
CSS
mit
38,886
# Getting a timestamp in the format YYYYMMDDHHMMSS ## NOTE: For clarity and consistency, all examples below will use the same timestamp; 2013 October 20 09:38:26 import time print time.localtime() # time chunks smaller than ten are not zero-padded ##time.struct_time(tm_year=2013, tm_mon=10, tm_mday=20, tm_hour=9, tm_min=38, tm_sec=26, tm_wday=6, tm_yday=293, tm_isdst=1) # The slices that I want are year (slice zero) through second (slice five), so I need the slicing indices [0:6] print time.localtime()[:6] ##(2013, 10, 20, 9, 38, 26 # So my instinct is to use a str.join() to glue together all of the pieces that I want, slices [0:6] ##>>> ''.join(time.localtime()[:6]) ## ##Traceback (most recent call last): ## File "<pyshell#9>", line 1, in <module> ## ''.join(time.localtime()[:6]) ##TypeError: sequence item 0: expected string, int found # But that instinct turns out to be wrong, because join wants to glue together strings, not ints. # There are many solutions to this problem. # Method #1: Looping (the easy but long way) timestamp = [] for time_chunk in time.localtime()[:6]: timestamp.append(str(time_chunk)) print "Method #1: ", ''.join(timestamp) # Method #2: Passing an arbitrary number of arguments (quick but somewhat ugly) print "Method #2: ", '{0}{1}{2}{3}{4}{5}'.format(*time.localtime()[:6]) # Method #3: List comprehension print "Method #3: ", ''.join([str(time_chunk) for time_chunk in time.localtime()[:6]])
shannonturner/python-lessons
section_15_(intermediate)/timestamp.py
Python
mit
1,494
/* * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.actuate.endpoint.mvc; import java.util.Map; import org.springframework.boot.actuate.endpoint.MetricsEndpoint; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; /** * Adapter to expose {@link MetricsEndpoint} as an {@link MvcEndpoint}. * * @author Dave Syer * @author Andy Wilkinson * @author Sergei Egorov */ public class MetricsMvcEndpoint extends EndpointMvcAdapter { private final MetricsEndpoint delegate; public MetricsMvcEndpoint(MetricsEndpoint delegate) { super(delegate); this.delegate = delegate; } @RequestMapping(value = "/{name:.*}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody @HypermediaDisabled public Object value(@PathVariable String name) { if (!this.delegate.isEnabled()) { // Shouldn't happen - MVC endpoint shouldn't be registered when delegate's // disabled return getDisabledResponse(); } return new NamePatternMapFilter(this.delegate.invoke()).getResults(name); } /** * {@link NamePatternFilter} for the Map source. */ private class NamePatternMapFilter extends NamePatternFilter<Map<String, ?>> { NamePatternMapFilter(Map<String, ?> source) { super(source); } @Override protected void getNames(Map<String, ?> source, NameCallback callback) { for (String name : source.keySet()) { try { callback.addName(name); } catch (NoSuchMetricException ex) { // Metric with null value. Continue. } } } @Override protected Object getOptionalValue(Map<String, ?> source, String name) { return source.get(name); } @Override protected Object getValue(Map<String, ?> source, String name) { Object value = getOptionalValue(source, name); if (value == null) { throw new NoSuchMetricException("No such metric: " + name); } return value; } } /** * Exception thrown when the specified metric cannot be found. */ @SuppressWarnings("serial") @ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "No such metric") public static class NoSuchMetricException extends RuntimeException { public NoSuchMetricException(String string) { super(string); } } }
rokn/Count_Words_2015
testing/spring-boot-master/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpoint.java
Java
mit
3,146
/* * Amazium (http://www.amazium.co.uk) * Copyright 2010 - 2013, Mike Ballan * Licensed under MIT (https://github.com/OwlyStuff/Amazium/blob/master/LICENSE) */ /*********************************************** Screen 100% ***********************************************/ .row-max { margin:0 auto; padding:0; width:100%; display:table; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; } .row-max .row-max { padding:0; } .row-max .grid_1, .row-max .grid_2, .row-max .grid_3, .row-max .grid_4, .row-max .grid_5, .row-max .grid_6, .row-max .grid_7, .row-max .grid_8, .row-max .grid_9, .row-max .grid_10, .row-max .grid_11, .row-max .grid_12 { margin:0; padding:0 20px; float:left; display:inline; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; } .row-max .grid_1 { width:8.333%; } .row-max .grid_2 { width:16.667%; } .row-max .grid_3 { width:25%; } .row-max .grid_4 { width:33.333%; } .row-max .grid_5 { width:41.667%; } .row-max .grid_6 { width:50%; } .row-max .grid_7 { width:58.333%; } .row-max .grid_8 { width:66.667%; } .row-max .grid_9 { width:75%; } .row-max .grid_10 { width:83.333%; } .row-max .grid_11 { width:91.667%; } .row-max .grid_12 { width:100%; } .row-max .offset_1 { margin-left:8.333%; } .row-max .offset_2 { margin-left:16.667%; } .row-max .offset_3 { margin-left:25%; } .row-max .offset_4 { margin-left:33.333%; } .row-max .offset_5 { margin-left:41.667%; } .row-max .offset_6 { margin-left:50%; } .row-max .offset_7 { margin-left:58.333%; } .row-max .offset_8 { margin-left:66.667%; } .row-max .offset_9 { margin-left:75%; } .row-max .offset_10 { margin-left:83.333%; } .row-max .offset_11 { margin-left:91.667%; } /*********************************************** Mobile ***********************************************/ @media only screen and (max-width: 767px) { .row-max { padding:0 16px; display:block; } .row-max .row-max { margin:0; padding:0; width:100%; display:block; } .row-max .grid_1, .row-max .grid_2, .row-max .grid_3, .row-max .grid_4, .row-max .grid_5, .row-max .grid_6, .row-max .grid_7, .row-max .grid_8, .row-max .grid_9, .row-max .grid_10, .row-max .grid_11, .row-max .grid_12 { width:100%; margin:10px 0 0 0; float:none; display:block; } }
pauldpaul/pauldpaul.github.io
css/amazium-percent.css
CSS
mit
3,101
<div style="font-weight: bold;margin-left:15px;">radarex8.php</div><link rel="stylesheet" href="../phphl.css" type="text/css"><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 </pre></td><td class="hl-main" valign="top"><pre><span class="hl-inlinetags">&lt;?php</span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> content=&quot;text/plain; charset=utf-8&quot;</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">jpgraph/jpgraph.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">jpgraph/jpgraph_radar.php</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the basic radar graph</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">RadarGraph</span><span class="hl-brackets">(</span><span class="hl-number">300</span><span class="hl-code">,</span><span class="hl-number">200</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment">$graph-&gt;img-&gt;SetAntiAliasing();</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> Set background color and shadow</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">white</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetShadow</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Position the graph</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetCenter</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.4</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.55</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Setup the axis formatting </span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">axis</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Setup the grid lines</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">grid</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetLineStyle</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">solid</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">grid</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">navy</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">grid</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Show</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">HideTickMarks</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Setup graph titles</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Quality result</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">title</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_FONT1</span><span class="hl-code">,</span><span class="hl-identifier">FS_BOLD</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetTitles</span><span class="hl-brackets">(</span><span class="hl-var">$gDateLocale</span><span class="hl-code">-&gt;</span><span class="hl-identifier">GetShortMonth</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the first radar plot </span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$plot</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">RadarPlot</span><span class="hl-brackets">(</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">,</span><span class="hl-number">80</span><span class="hl-code">,</span><span class="hl-number">60</span><span class="hl-code">,</span><span class="hl-number">90</span><span class="hl-code">,</span><span class="hl-number">71</span><span class="hl-code">,</span><span class="hl-number">81</span><span class="hl-code">,</span><span class="hl-number">47</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetLegend</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Goal</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">red</span><span class="hl-quotes">&quot;</span><span class="hl-code">,</span><span class="hl-quotes">&quot;</span><span class="hl-string">lightred</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFill</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetLineWeight</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Create the second radar plot</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$plot2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">RadarPlot</span><span class="hl-brackets">(</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">,</span><span class="hl-number">40</span><span class="hl-code">,</span><span class="hl-number">30</span><span class="hl-code">,</span><span class="hl-number">80</span><span class="hl-code">,</span><span class="hl-number">31</span><span class="hl-code">,</span><span class="hl-number">51</span><span class="hl-code">,</span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot2</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetLegend</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Actual</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot2</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetLineWeight</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot2</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">blue</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$plot2</span><span class="hl-code">-&gt;</span><span class="hl-identifier">SetFill</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> Add the plots to the graph</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$plot2</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$plot</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//</span><span class="hl-comment"> And output the graph</span><span class="hl-comment"></span><span class="hl-code"> </span><span class="hl-var">$graph</span><span class="hl-code">-&gt;</span><span class="hl-identifier">Stroke</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-inlinetags">?&gt;</span></pre></td></tr></table></div>
Kstro/sepas
Resources/jpgraph/docportal/chunkhtml/example_src/radarex8.html
HTML
mit
11,921
// // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/boostorg/beast // #include <boost/beast/websocket/detail/frame.hpp> #include <boost/beast/unit_test/suite.hpp> namespace boost { namespace beast { namespace websocket { namespace detail { class frame_test : public beast::unit_test::suite { public: void testCloseCodes() { BEAST_EXPECT(! is_valid_close_code(0)); BEAST_EXPECT(! is_valid_close_code(1)); BEAST_EXPECT(! is_valid_close_code(999)); BEAST_EXPECT(! is_valid_close_code(1004)); BEAST_EXPECT(! is_valid_close_code(1005)); BEAST_EXPECT(! is_valid_close_code(1006)); BEAST_EXPECT(! is_valid_close_code(1016)); BEAST_EXPECT(! is_valid_close_code(2000)); BEAST_EXPECT(! is_valid_close_code(2999)); BEAST_EXPECT(is_valid_close_code(1000)); BEAST_EXPECT(is_valid_close_code(1002)); BEAST_EXPECT(is_valid_close_code(3000)); BEAST_EXPECT(is_valid_close_code(4000)); BEAST_EXPECT(is_valid_close_code(5000)); } struct test_fh : frame_header { test_fh() { op = detail::opcode::text; fin = true; mask = false; rsv1 = false; rsv2 = false; rsv3 = false; len = 0; key = 0; } }; void testWriteFrame() { test_fh fh; fh.rsv2 = true; fh.rsv3 = true; fh.len = 65536; frame_buffer fb; write(fb, fh); } void run() override { testWriteFrame(); testCloseCodes(); } }; BEAST_DEFINE_TESTSUITE(beast,websocket,frame); } // detail } // websocket } // beast } // boost
c72578/poedit
deps/boost/libs/beast/test/beast/websocket/frame.cpp
C++
mit
1,940
export default { el: { colorpicker: { confirm: '확인', clear: '초기화' }, datepicker: { now: '지금', today: '오늘', cancel: '취소', clear: '초기화', confirm: '확인', selectDate: '날짜 선택', selectTime: '시간 선택', startDate: '시작 날짜', startTime: '시작 시간', endDate: '종료 날짜', endTime: '종료 시간', prevYear: '지난해', nextYear: '다음해', prevMonth: '지난달', nextMonth: '다음달', year: '년', month1: '1월', month2: '2월', month3: '3월', month4: '4월', month5: '5월', month6: '6월', month7: '7월', month8: '8월', month9: '9월', month10: '10월', month11: '11월', month12: '12월', // week: 'week', weeks: { sun: '일', mon: '월', tue: '화', wed: '수', thu: '목', fri: '금', sat: '토' }, months: { jan: '1월', feb: '2월', mar: '3월', apr: '4월', may: '5월', jun: '6월', jul: '7월', aug: '8월', sep: '9월', oct: '10월', nov: '11월', dec: '12월' } }, select: { loading: '불러오는 중', noMatch: '맞는 데이터가 없습니다', noData: '데이터 없음', placeholder: '선택' }, cascader: { noMatch: '맞는 데이터가 없습니다', loading: '불러오는 중', placeholder: '선택' }, pagination: { goto: '이동', pagesize: '/page', total: '총 {total}', pageClassifier: '' }, messagebox: { title: '메시지', confirm: '확인', cancel: '취소', error: '올바르지 않은 입력' }, upload: { deleteTip: '클릭시 삭제됩니다', delete: '삭제', preview: '미리보기', continue: '계속하기' }, table: { emptyText: '데이터 없음', confirmFilter: '확인', resetFilter: '초기화', clearFilter: '전체', sumText: '합' }, tree: { emptyText: '데이터 없음' }, transfer: { noMatch: '맞는 데이터가 없습니다', noData: '데이터 없음', titles: ['리스트 1', '리스트 2'], filterPlaceholder: ' 입력하세요', noCheckedFormat: '{total} 항목', hasCheckedFormat: '{checked}/{total} 선택됨' } } };
baiyaaaaa/element
src/locale/lang/ko.js
JavaScript
mit
2,569
<?php namespace Guzzle\Tests\Http\Curl; use Guzzle\Common\Event; use Guzzle\Common\Exception\ExceptionCollection;; use Guzzle\Common\Collection; use Guzzle\Common\Log\ClosureLogAdapter; use Guzzle\Http\Client; use Guzzle\Http\Message\Request; use Guzzle\Http\Message\Response; use Guzzle\Http\Message\RequestFactory; use Guzzle\Http\Curl\CurlMulti; use Guzzle\Http\Exception\CurlException; use Guzzle\Http\Plugin\LogPlugin; use Guzzle\Tests\Mock\MockMulti; /** * @group server * @covers Guzzle\Http\Curl\CurlMulti */ class CurlMultiTest extends \Guzzle\Tests\GuzzleTestCase { /** * @var Guzzle\Http\Curl\CurlMulti */ private $multi; /** * @var Guzzle\Common\Collection */ private $updates; private $mock; /** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->updates = new Collection(); $this->multi = new MockMulti(); $this->mock = $this->getWildcardObserver($this->multi); } /** * @covers Guzzle\Http\Curl\CurlMulti::getInstance */ public function testReturnsCachedInstance() { $c = CurlMulti::getInstance(); $this->assertInstanceOf('Guzzle\\Http\\Curl\\CurlMultiInterface', $c); $this->assertSame($c, CurlMulti::getInstance()); } /** * @covers Guzzle\Http\Curl\CurlMulti::__construct * @covers Guzzle\Http\Curl\CurlMulti::__destruct */ public function testConstructorCreateMultiHandle() { $this->assertInternalType('resource', $this->multi->getHandle()); $this->assertEquals('curl_multi', get_resource_type($this->multi->getHandle())); } /** * @covers Guzzle\Http\Curl\CurlMulti::__destruct */ public function testDestructorClosesMultiHandle() { $handle = $this->multi->getHandle(); $this->multi->__destruct(); $this->assertFalse(is_resource($handle)); } /** * @covers Guzzle\Http\Curl\curlMulti::add * @covers Guzzle\Http\Curl\curlMulti::all * @covers Guzzle\Http\Curl\curlMulti::count */ public function testRequestsCanBeAddedAndCounted() { $multi = new CurlMulti(); $mock = $this->getWildcardObserver($multi); $request1 = new Request('GET', 'http://www.google.com/'); $multi->add($request1); $this->assertEquals(array($request1), $multi->all()); $request2 = new Request('POST', 'http://www.google.com/'); $multi->add($request2); $this->assertEquals(array($request1, $request2), $multi->all()); $this->assertEquals(2, count($multi)); $this->assertTrue($mock->has(CurlMulti::ADD_REQUEST)); $this->assertFalse($mock->has(CurlMulti::REMOVE_REQUEST)); $this->assertFalse($mock->has(CurlMulti::POLLING)); $this->assertFalse($mock->has(CurlMulti::COMPLETE)); } /** * @covers Guzzle\Http\Curl\CurlMulti::remove * @covers Guzzle\Http\Curl\CurlMulti::all */ public function testRequestsCanBeRemoved() { $request1 = new Request('GET', 'http://www.google.com/'); $this->multi->add($request1); $request2 = new Request('PUT', 'http://www.google.com/'); $this->multi->add($request2); $this->assertEquals(array($request1, $request2), $this->multi->all()); $this->assertSame($this->multi, $this->multi->remove($request1)); $this->assertEquals(array($request2), $this->multi->all()); } /** * @covers Guzzle\Http\Curl\CurlMulti::reset */ public function testsResetRemovesRequestsAndResetsState() { $request1 = new Request('GET', 'http://www.google.com/'); $this->multi->add($request1); $this->multi->reset(); $this->assertEquals(array(), $this->multi->all()); $this->assertEquals('idle', $this->multi->getState()); } /** * @covers Guzzle\Http\Curl\CurlMulti::send * @covers Guzzle\Http\Curl\CurlMulti::getState */ public function testSendsRequestsInParallel() { $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\nBody"); $this->assertEquals('idle', $this->multi->getState()); $request = new Request('GET', $this->getServer()->getUrl()); $this->multi->add($request); $this->multi->send(); $this->assertEquals('idle', $this->multi->getState()); $this->assertTrue($this->mock->has(CurlMulti::ADD_REQUEST)); $this->assertTrue($this->mock->has(CurlMulti::COMPLETE)); $this->assertEquals('Body', $request->getResponse()->getBody()->__toString()); // Sending it again will not do anything because there are no requests $this->multi->send(); } /** * @covers Guzzle\Http\Curl\CurlMulti::send */ public function testSendsRequestsThroughCurl() { $this->getServer()->enqueue(array( "HTTP/1.1 204 No content\r\n" . "Content-Length: 0\r\n" . "Server: Jetty(6.1.3)\r\n\r\n", "HTTP/1.1 200 OK\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Length: 4\r\n" . "Server: Jetty(6.1.3)\r\n\r\n" . "data" )); $request1 = new Request('GET', $this->getServer()->getUrl()); $mock1 = $this->getWildcardObserver($request1); $request2 = new Request('GET', $this->getServer()->getUrl()); $mock2 = $this->getWildcardObserver($request2); $this->multi->add($request1); $this->multi->add($request2); $this->multi->send(); $response1 = $request1->getResponse(); $response2 = $request2->getResponse(); $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response1); $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response2); $this->assertTrue($response1->getBody(true) == 'data' || $response2->getBody(true) == 'data'); $this->assertTrue($response1->getBody(true) == '' || $response2->getBody(true) == ''); $this->assertTrue($response1->getStatusCode() == '204' || $response2->getStatusCode() == '204'); $this->assertNotEquals((string) $response1, (string) $response2); $this->assertTrue($mock1->has('request.before_send')); $this->assertTrue($mock2->has('request.before_send')); } /** * @covers Guzzle\Http\Curl\CurlMulti::send */ public function testSendsThroughCurlAndAggregatesRequestExceptions() { $this->getServer()->enqueue(array( "HTTP/1.1 200 OK\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Length: 4\r\n" . "Server: Jetty(6.1.3)\r\n" . "\r\n" . "data", "HTTP/1.1 204 No content\r\n" . "Content-Length: 0\r\n" . "Server: Jetty(6.1.3)\r\n" . "\r\n", "HTTP/1.1 404 Not Found\r\n" . "Content-Length: 0\r\n" . "\r\n" )); $request1 = new Request('GET', $this->getServer()->getUrl()); $request2 = new Request('HEAD', $this->getServer()->getUrl()); $request3 = new Request('GET', $this->getServer()->getUrl()); $this->multi->add($request1); $this->multi->add($request2); $this->multi->add($request3); try { $this->multi->send(); $this->fail('ExceptionCollection not thrown when aggregating request exceptions'); } catch (ExceptionCollection $e) { $this->assertInstanceOf('ArrayIterator', $e->getIterator()); $this->assertEquals(1, count($e)); $exceptions = $e->getIterator(); $response1 = $request1->getResponse(); $response2 = $request2->getResponse(); $response3 = $request3->getResponse(); $this->assertNotEquals((string) $response1, (string) $response2); $this->assertNotEquals((string) $response3, (string) $response1); $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response1); $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response2); $this->assertInstanceOf('Guzzle\\Http\\Message\\Response', $response3); $failed = $exceptions[0]->getResponse(); $this->assertEquals(404, $failed->getStatusCode()); $this->assertEquals(1, count($e)); // Test the IteratorAggregate functionality foreach ($e as $except) { $this->assertEquals($failed, $except->getResponse()); } } } /** * @covers Guzzle\Http\Curl\CurlMulti::send * @covers Guzzle\Http\Curl\CurlMulti::processResponse */ public function testCurlErrorsAreCaught() { $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); try { $request = RequestFactory::getInstance()->create('GET', 'http://127.0.0.1:9876/'); $request->setClient(new Client()); $request->getCurlOptions()->set(CURLOPT_FRESH_CONNECT, true); $request->getCurlOptions()->set(CURLOPT_FORBID_REUSE, true); $request->getCurlOptions()->set(CURLOPT_CONNECTTIMEOUT_MS, 5); $request->send(); $this->fail('CurlException not thrown'); } catch (CurlException $e) { $m = $e->getMessage(); $this->assertContains('[curl] ', $m); $this->assertContains('[url] http://127.0.0.1:9876/', $m); $this->assertContains('[debug] ', $m); $this->assertContains('[info] array (', $m); } } /** * @covers Guzzle\Http\Curl\CurlMulti */ public function testRemovesQueuedRequests() { $request = RequestFactory::getInstance()->create('GET', 'http://127.0.0.1:9876/'); $request->setClient(new Client()); $request->setResponse(new Response(200), true); $this->multi->add($request); $this->multi->send(); $this->assertTrue($this->mock->has(CurlMulti::ADD_REQUEST)); $this->assertTrue($this->mock->has(CurlMulti::POLLING) === false); $this->assertTrue($this->mock->has(CurlMulti::COMPLETE) !== false); } /** * @covers Guzzle\Http\Curl\CurlMulti */ public function testRemovesQueuedRequestsAddedInTransit() { $this->getServer()->flush(); $this->getServer()->enqueue(array( "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" )); $client = new Client($this->getServer()->getUrl()); $r = $client->get(); $r->getEventDispatcher()->addListener('request.receive.status_line', function(Event $event) use ($client) { // Create a request using a queued response $request = $client->get()->setResponse(new Response(200), true); $request->send(); }); $r->send(); $this->assertEquals(1, count($this->getServer()->getReceivedRequests(false))); } /** * @covers Guzzle\Http\Curl\CurlMulti */ public function testProperlyBlocksBasedOnRequestsInScope() { $this->getServer()->flush(); $this->getServer()->enqueue(array( "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest1", "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest2", "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest3", "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest4", "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest5", "HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\ntest6", "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" )); $client = new Client($this->getServer()->getUrl()); $requests = array( $client->get(), $client->get() ); $sendHeadFunction = function($event) use ($client) { $client->head()->send(); }; // Sends 2 new requests in the middle of a CurlMulti loop while other requests // are completing. This causes the scope of the multi handle to go up. $callback = function(Event $event) use ($client, $sendHeadFunction) { $client->getConfig()->set('called', $client->getConfig('called') + 1); if ($client->getConfig('called') <= 2) { $request = $client->get(); $request->getEventDispatcher()->addListener('request.complete', $sendHeadFunction); $request->send(); } }; $requests[0]->getEventDispatcher()->addListener('request.complete', $callback); $client->send($requests); $this->assertEquals(4, count($this->getServer()->getReceivedRequests(false))); } /** * @covers Guzzle\Http\Curl\CurlMulti * @expectedException RuntimeException * @expectedExceptionMessage Testing! */ public function testCatchesExceptionsBeforeSendingCurlMulti() { $client = new Client($this->getServer()->getUrl()); $multi = new CurlMulti(); $client->setCurlMulti($multi); $multi->getEventDispatcher()->addListener(CurlMulti::BEFORE_SEND, function() { throw new \RuntimeException('Testing!'); }); $client->get()->send(); } /** * @covers Guzzle\Http\Curl\CurlMulti * @covers Guzzle\Http\Curl\CurlMulti::removeErroredRequest * @expectedException Guzzle\Common\Exception\ExceptionCollection * @expectedExceptionMessage Thrown before sending! */ public function testCatchesExceptionsBeforeSendingRequests() { $client = new Client($this->getServer()->getUrl()); $request = $client->get(); $request->getEventDispatcher()->addListener('request.before_send', function() { throw new \RuntimeException('Thrown before sending!'); }); $client->send(array($request)); } /** * @covers Guzzle\Http\Curl\CurlMulti * @covers Guzzle\Http\Curl\CurlMulti::removeErroredRequest * @expectedException Guzzle\Http\Exception\BadResponseException */ public function testCatchesExceptionsWhenRemovingQueuedRequests() { $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); $client = new Client($this->getServer()->getUrl()); $r = $client->get(); $r->getEventDispatcher()->addListener('request.sent', function() use ($client) { // Create a request using a queued response $client->get()->setResponse(new Response(404), true)->send(); }); $r->send(); } /** * @covers Guzzle\Http\Curl\CurlMulti * @covers Guzzle\Http\Curl\CurlMulti::removeErroredRequest * @expectedException Guzzle\Http\Exception\BadResponseException */ public function testCatchesExceptionsWhenRemovingQueuedRequestsBeforeSending() { $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); $client = new Client($this->getServer()->getUrl()); $r = $client->get(); $r->getEventDispatcher()->addListener('request.before_send', function() use ($client) { // Create a request using a queued response $client->get()->setResponse(new Response(404), true)->send(); }); $r->send(); } /** * @covers Guzzle\Http\Curl\CurlMulti::send * @covers Guzzle\Http\Curl\CurlMulti::removeErroredRequest * @expectedException Guzzle\Common\Exception\ExceptionCollection * @expectedExceptionMessage test */ public function testCatchesRandomExceptionsThrownDuringPerform() { $client = new Client($this->getServer()->getUrl()); $multi = $this->getMock('Guzzle\\Http\\Curl\\CurlMulti', array('perform')); $multi->expects($this->once()) ->method('perform') ->will($this->throwException(new \Exception('test'))); $multi->add($client->get()); $multi->send(); } /** * @covers Guzzle\Http\Curl\CurlMulti::send */ public function testDoesNotSendRequestsDecliningToBeSent() { if (!defined('CURLOPT_TIMEOUT_MS')) { $this->markTestSkipped('Update curl'); } // Create a client that is bound to fail connecting $client = new Client('http://localhost:123', array( 'curl.CURLOPT_PORT' => 123, 'curl.CURLOPT_CONNECTTIMEOUT_MS' => 1, )); $request = $client->get(); $multi = new CurlMulti(); $multi->add($request); // Listen for request exceptions, and when they occur, first change the // state of the request back to transferring, and then just allow it to // exception out $request->getEventDispatcher()->addListener('request.exception', function(Event $event) use ($multi) { $retries = $event['request']->getParams()->get('retries'); // Allow the first failure to retry if ($retries == 0) { $event['request']->setState('transfer'); $event['request']->getParams()->set('retries', 1); // Remove the request to try again $multi->remove($event['request']); $multi->add($event['request'], true); } }); try { $multi->send(); $this->fail('Did not throw an exception at all!?!'); } catch (\Exception $e) { $this->assertEquals(1, $request->getParams()->get('retries')); } } /** * @covers Guzzle\Http\Curl\CurlMulti::send */ public function testDoesNotThrowExceptionsWhenRequestsRecoverWithRetry() { $this->getServer()->flush(); $client = new Client($this->getServer()->getUrl()); $request = $client->get(); $request->getEventDispatcher()->addListener('request.before_send', function(Event $event) { $event['request']->setResponse(new Response(200)); }); $multi = new CurlMulti(); $multi->add($request); $multi->send(); $this->assertEquals(0, count($this->getServer()->getReceivedRequests(false))); } /** * @covers Guzzle\Http\Curl\CurlMulti::send */ public function testDoesNotThrowExceptionsWhenRequestsRecoverWithSuccess() { // Attempt a port that 99.9% is not listening $client = new Client('http://localhost:123'); $request = $client->get(); // Ensure it times out quickly if needed $request->getCurlOptions()->set(CURLOPT_TIMEOUT_MS, 1)->set(CURLOPT_CONNECTTIMEOUT_MS, 1); $request->getEventDispatcher()->addListener('request.exception', function(Event $event) use (&$count) { $event['request']->setResponse(new Response(200)); }); $multi = new CurlMulti(); $multi->add($request); $multi->send(); // Ensure that the exception was caught, and the response was set manually $this->assertEquals(200, $request->getResponse()->getStatusCode()); } /** * @covers Guzzle\Http\Curl\CurlMulti::reset */ public function testHardResetReopensMultiHandle() { $this->getServer()->enqueue(array( "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n", "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n" )); $client = new Client($this->getServer()->getUrl()); $message = ''; $plugin = new LogPlugin(new ClosureLogAdapter(function($msg) use (&$message) { $message .= $msg . "\n"; }), LogPlugin::LOG_VERBOSE); $client->getEventDispatcher()->addSubscriber($plugin); $request = $client->get(); $multi = new CurlMulti(); $multi->add($request); $multi->send(); $multi->reset(true); $multi->add($request); $multi->send(); $this->assertNotContains('Re-using existing connection', $message); } /** * @covers Guzzle\Http\Curl\CurlMulti::checkCurlResult */ public function testThrowsMeaningfulExceptionsForCurlMultiErrors() { $multi = new CurlMulti(); // Set the state of the multi object to sending to trigger the exception $reflector = new \ReflectionMethod('Guzzle\Http\Curl\CurlMulti', 'checkCurlResult'); $reflector->setAccessible(true); // Successful $reflector->invoke($multi, 0); // Known error try { $reflector->invoke($multi, CURLM_BAD_HANDLE); $this->fail('Expected an exception here'); } catch (CurlException $e) { $this->assertContains('The passed-in handle is not a valid CURLM handle.', $e->getMessage()); $this->assertContains('CURLM_BAD_HANDLE', $e->getMessage()); $this->assertContains(strval(CURLM_BAD_HANDLE), $e->getMessage()); } // Unknown error try { $reflector->invoke($multi, 255); $this->fail('Expected an exception here'); } catch (CurlException $e) { $this->assertEquals('Unexpected cURL error: 255', $e->getMessage()); } } /** * @covers Guzzle\Http\Curl\curlMulti::add */ public function testAddsAsyncRequestsNormallyWhenNotSending() { $multi = new CurlMulti(); $request = new Request('GET', 'http://www.google.com/'); $multi->add($request, true); // Ensure that the request was added at the correct next scope $requests = $this->readAttribute($multi, 'requests'); $this->assertEquals(array($request), $requests[0]); } /** * @covers Guzzle\Http\Curl\CurlMulti::send * @covers Guzzle\Http\Message\EntityEnclosingRequest::setState */ public function testRequestBeforeSendIncludesContentLengthHeaderIfEmptyBody() { $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); $request = new Request('PUT', $this->getServer()->getUrl()); $that = $this; $request->getEventDispatcher()->addListener('request.before_send', function ($event) use ($that) { $that->assertEquals(0, $event['request']->getHeader('Content-Length')); }); $this->multi->add($request); $this->multi->send(); } }
cappadona/Suma
analysis/src/lib/php/vendor/guzzlehttp/guzzle/tests/Guzzle/Tests/Http/Curl/CurlMultiTest.php
PHP
mit
22,456
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <base href="../../../../" /> <script src="list.js"></script> <script src="page.js"></script> <link type="text/css" rel="stylesheet" href="page.css" /> </head> <body> [page:Curve] &rarr; <h1>[name]</h1> <p class="desc"> 使用[link:https://en.wikipedia.org/wiki/Centripetal_Catmull-Rom_spline Catmull-Rom]算法, 从一系列的点创建一条平滑的三维样条曲线。</p> <h2>示例</h2> <code> //Create a closed wavey loop var curve = new THREE.CatmullRomCurve3( [ new THREE.Vector3( -10, 0, 10 ), new THREE.Vector3( -5, 5, 5 ), new THREE.Vector3( 0, 0, 0 ), new THREE.Vector3( 5, -5, 5 ), new THREE.Vector3( 10, 0, 10 ) ] ); var points = curve.getPoints( 50 ); var geometry = new THREE.BufferGeometry().setFromPoints( points ); var material = new THREE.LineBasicMaterial( { color : 0xff0000 } ); // Create the final object to add to the scene var curveObject = new THREE.Line( geometry, material ); </code> <h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines]</h3> <h2>构造函数</h2> <h3>[name]( [param:Array points], [param:Boolean closed], [param:String curveType], [param:Float tension] )</h3> <p> points – [page:Vector3]点数组<br/> closed – 该曲线是否闭合,默认值为false。<br/> curveType – 曲线的类型,默认值为*centripetal*。<br/> tension – 曲线的张力,默认为*0.5*。 </p> <h2>属性</h2> <p>请参阅其基类[page:Curve]来了解共有属性。</p> <h3>[property:Boolean isCatmullRomCurve3]</h3> <p> 用于检查该类或者其派生类是否为CatmullRomCurve3。默认值为*true*。<br /><br /> 你不应当对这一属性进行改变,它在内部使用,以用于优化。 </p> <h3>[property:Array points]</h3> <p>定义了这一曲线的[page:Vector3]点数组,数组中至少需要两个点。</p> <h3>[property:Boolean closed]</h3> <p>当该值为true时,曲线将会闭合(环回自身)。</p> <h3>[property:String curveType]</h3> <p>可能的值为*centripetal*、*chordal*和*catmullrom*。</p> <h3>[property:float tension]</h3> <p>当[page:.type]为*catmullrom*时,定义catmullrom的张力。</p> <h2>方法</h2> <p>请参阅其基类[page:Curve]来了解共有方法。</p> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] </body> </html>
framelab/three.js
docs/api/zh/extras/curves/CatmullRomCurve3.html
HTML
mit
2,461
/* * jQuery Superfish Menu Plugin - v1.7.5 * Copyright (c) 2014 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(function ($, w) { "use strict"; var methods = (function () { // private properties and methods go here var c = { bcClass: 'sf-breadcrumb', menuClass: 'sf-js-enabled', anchorClass: 'sf-with-ul', menuArrowClass: 'sf-arrows' }, ios = (function () { var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent); if (ios) { // iOS clicks only bubble as far as body children $(w).load(function () { $('body').children().on('click', $.noop); }); } return ios; })(), wp7 = (function () { var style = document.documentElement.style; return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent)); })(), unprefixedPointerEvents = (function () { return (!!w.PointerEvent); })(), toggleMenuClasses = function ($menu, o) { var classes = c.menuClass; if (o.cssArrows) { classes += ' ' + c.menuArrowClass; } $menu.toggleClass(classes); }, setPathToCurrent = function ($menu, o) { return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) .addClass(o.hoverClass + ' ' + c.bcClass) .filter(function () { return ($(this).children(o.popUpSelector).hide().show().length); }).removeClass(o.pathClass); }, toggleAnchorClass = function ($li) { $li.children('a').toggleClass(c.anchorClass); }, toggleTouchAction = function ($menu) { var msTouchAction = $menu.css('ms-touch-action'); var touchAction = $menu.css('touch-action'); touchAction = touchAction || msTouchAction; touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y'; $menu.css({ 'ms-touch-action': touchAction, 'touch-action': touchAction }); }, applyHandlers = function ($menu, o) { var targets = 'li:has(' + o.popUpSelector + ')'; if ($.fn.hoverIntent && !o.disableHI) { $menu.hoverIntent(over, out, targets); } else { $menu .on('mouseenter.superfish', targets, over) .on('mouseleave.superfish', targets, out); } var touchevent = 'MSPointerDown.superfish'; if (unprefixedPointerEvents) { touchevent = 'pointerdown.superfish'; } if (!ios) { touchevent += ' touchend.superfish'; } if (wp7) { touchevent += ' mousedown.superfish'; } $menu .on('focusin.superfish', 'li', over) .on('focusout.superfish', 'li', out) .on(touchevent, 'a', o, touchHandler); }, touchHandler = function (e) { var $this = $(this), $ul = $this.siblings(e.data.popUpSelector); if ($ul.length > 0 && $ul.is(':hidden')) { $this.one('click.superfish', false); if (e.type === 'MSPointerDown' || e.type === 'pointerdown') { $this.trigger('focus'); } else { $.proxy(over, $this.parent('li'))(); } } }, over = function () { var $this = $(this), o = getOptions($this); clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out = function () { var $this = $(this), o = getOptions($this); if (ios) { $.proxy(close, $this, o)(); } else { clearTimeout(o.sfTimer); o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay); } }, close = function (o) { o.retainPath = ($.inArray(this[0], o.$path) > -1); this.superfish('hide'); if (!this.parents('.' + o.hoverClass).length) { o.onIdle.call(getMenu(this)); if (o.$path.length) { $.proxy(over, o.$path)(); } } }, getMenu = function ($el) { return $el.closest('.' + c.menuClass); }, getOptions = function ($el) { return getMenu($el).data('sf-options'); }; return { // public methods hide: function (instant) { if (this.length) { var $this = this, o = getOptions($this); if (!o) { return this; } var not = (o.retainPath === true) ? o.$path : '', $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), speed = o.speedOut; if (instant) { $ul.show(); speed = 0; } o.retainPath = false; o.onBeforeHide.call($ul); $ul.stop(true, true).animate(o.animationOut, speed, function () { var $this = $(this); o.onHide.call($this); }); } return this; }, show: function () { var o = getOptions(this); if (!o) { return this; } var $this = this.addClass(o.hoverClass), $ul = $this.children(o.popUpSelector); o.onBeforeShow.call($ul); $ul.stop(true, true).animate(o.animation, o.speed, function () { o.onShow.call($ul); }); return this; }, destroy: function () { return this.each(function () { var $this = $(this), o = $this.data('sf-options'), $hasPopUp; if (!o) { return false; } $hasPopUp = $this.find(o.popUpSelector).parent('li'); clearTimeout(o.sfTimer); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); // remove event handlers $this.off('.superfish').off('.hoverIntent'); // clear animation's inline display style $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) { return style.replace(/display[^;]+;?/g, ''); }); // reset 'current' path classes o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); $this.find('.' + o.hoverClass).removeClass(o.hoverClass); o.onDestroy.call($this); $this.removeData('sf-options'); }); }, init: function (op) { return this.each(function () { var $this = $(this); if ($this.data('sf-options')) { return false; } var o = $.extend({}, $.fn.superfish.defaults, op), $hasPopUp = $this.find(o.popUpSelector).parent('li'); o.$path = setPathToCurrent($this, o); $this.data('sf-options', o); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); applyHandlers($this, o); $hasPopUp.not('.' + c.bcClass).superfish('hide', true); o.onInit.call(this); }); } }; })(); $.fn.superfish = function (method, args) { if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || ! method) { return methods.init.apply(this, arguments); } else { return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); } }; $.fn.superfish.defaults = { popUpSelector: 'ul,.sf-mega', // within menu context hoverClass: 'sfHover', pathClass: 'overrideThisToUse', pathLevels: 1, delay: 800, animation: {opacity: 'show'}, animationOut: {opacity: 'hide'}, speed: 'normal', speedOut: 'fast', cssArrows: true, disableHI: false, onInit: $.noop, onBeforeShow: $.noop, onShow: $.noop, onBeforeHide: $.noop, onHide: $.noop, onIdle: $.noop, onDestroy: $.noop }; })(jQuery, window);
emmy41124/cdnjs
ajax/libs/superfish/1.7.5/js/superfish.js
JavaScript
mit
7,221
(function(){ "use strict"; var root = this, Chart = root.Chart, //Cache a local reference to Chart.helpers helpers = Chart.helpers; var defaultConfig = { //Boolean - Show a backdrop to the scale label scaleShowLabelBackdrop : true, //String - The colour of the label backdrop scaleBackdropColor : "rgba(255,255,255,0.75)", // Boolean - Whether the scale should begin at zero scaleBeginAtZero : true, //Number - The backdrop padding above & below the label in pixels scaleBackdropPaddingY : 2, //Number - The backdrop padding to the side of the label in pixels scaleBackdropPaddingX : 2, //Boolean - Show line for each value in the scale scaleShowLine : true, //Boolean - Stroke a line around each segment in the chart segmentShowStroke : true, //String - The colour of the stroke on each segment. segmentStrokeColor : "#fff", //Number - The width of the stroke value in pixels segmentStrokeWidth : 2, //Number - Amount of animation steps animationSteps : 100, //String - Animation easing effect. animationEasing : "easeOutBounce", //Boolean - Whether to animate the rotation of the chart animateRotate : true, //Boolean - Whether to animate scaling the chart from the centre animateScale : false, //String - A legend template legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>" }; Chart.Type.extend({ //Passing in a name registers this chart in the Chart namespace name: "PolarArea", //Providing a defaults will also register the deafults in the chart namespace defaults : defaultConfig, //Initialize is fired when the chart is initialized - Data is passed in as a parameter //Config is automatically merged by the core of Chart.js, and is available at this.options initialize: function(data){ this.segments = []; //Declare segment class as a chart instance specific class, so it can share props for this instance this.SegmentArc = Chart.Arc.extend({ showStroke : this.options.segmentShowStroke, strokeWidth : this.options.segmentStrokeWidth, strokeColor : this.options.segmentStrokeColor, ctx : this.chart.ctx, innerRadius : 0, x : this.chart.width/2, y : this.chart.height/2 }); this.scale = new Chart.RadialScale({ display: this.options.showScale, fontStyle: this.options.scaleFontStyle, fontSize: this.options.scaleFontSize, fontFamily: this.options.scaleFontFamily, fontColor: this.options.scaleFontColor, showLabels: this.options.scaleShowLabels, showLabelBackdrop: this.options.scaleShowLabelBackdrop, backdropColor: this.options.scaleBackdropColor, backdropPaddingY : this.options.scaleBackdropPaddingY, backdropPaddingX: this.options.scaleBackdropPaddingX, lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0, lineColor: this.options.scaleLineColor, lineArc: true, width: this.chart.width, height: this.chart.height, xCenter: this.chart.width/2, yCenter: this.chart.height/2, ctx : this.chart.ctx, templateString: this.options.scaleLabel, valuesCount: data.length }); this.updateScaleRange(data); this.scale.update(); helpers.each(data,function(segment,index){ this.addData(segment,index,true); },this); //Set up tooltip events on the chart if (this.options.showTooltips){ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){ var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : []; helpers.each(this.segments,function(segment){ segment.restore(["fillColor"]); }); helpers.each(activeSegments,function(activeSegment){ activeSegment.fillColor = activeSegment.highlightColor; }); this.showTooltip(activeSegments); }); } this.render(); }, getSegmentsAtEvent : function(e){ var segmentsArray = []; var location = helpers.getRelativePosition(e); helpers.each(this.segments,function(segment){ if (segment.inRange(location.x,location.y)) segmentsArray.push(segment); },this); return segmentsArray; }, addData : function(segment, atIndex, silent){ var index = atIndex || this.segments.length; this.segments.splice(index, 0, new this.SegmentArc({ fillColor: segment.color, highlightColor: segment.highlight || segment.color, label: segment.label, value: segment.value, outerRadius: (this.options.animateScale) ? 0 : this.scale.calculateCenterOffset(segment.value), circumference: (this.options.animateRotate) ? 0 : this.scale.getCircumference(), startAngle: Math.PI * 1.5 })); if (!silent){ this.reflow(); this.update(); } }, removeData: function(atIndex){ var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1; this.segments.splice(indexToDelete, 1); this.reflow(); this.update(); }, calculateTotal: function(data){ this.total = 0; helpers.each(data,function(segment){ this.total += segment.value; },this); this.scale.valuesCount = this.segments.length; }, updateScaleRange: function(datapoints){ var valuesArray = []; helpers.each(datapoints,function(segment){ valuesArray.push(segment.value); }); var scaleSizes = (this.options.scaleOverride) ? { steps: this.options.scaleSteps, stepValue: this.options.scaleStepWidth, min: this.options.scaleStartValue, max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth) } : helpers.calculateScaleRange( valuesArray, helpers.min([this.chart.width, this.chart.height])/2, this.options.scaleFontSize, this.options.scaleBeginAtZero, this.options.scaleIntegersOnly ); helpers.extend( this.scale, scaleSizes, { size: helpers.min([this.chart.width, this.chart.height]), xCenter: this.chart.width/2, yCenter: this.chart.height/2 } ); }, update : function(){ this.calculateTotal(this.segments); helpers.each(this.segments,function(segment){ segment.save(); }); this.reflow(); this.render(); }, reflow : function(){ helpers.extend(this.SegmentArc.prototype,{ x : this.chart.width/2, y : this.chart.height/2 }); this.updateScaleRange(this.segments); this.scale.update(); helpers.extend(this.scale,{ xCenter: this.chart.width/2, yCenter: this.chart.height/2 }); helpers.each(this.segments, function(segment){ segment.update({ outerRadius : this.scale.calculateCenterOffset(segment.value) }); }, this); }, draw : function(ease){ var easingDecimal = ease || 1; //Clear & draw the canvas this.clear(); helpers.each(this.segments,function(segment, index){ segment.transition({ circumference : this.scale.getCircumference(), outerRadius : this.scale.calculateCenterOffset(segment.value) },easingDecimal); segment.endAngle = segment.startAngle + segment.circumference; // If we've removed the first segment we need to set the first one to // start at the top. if (index === 0){ segment.startAngle = Math.PI * 1.5; } //Check to see if it's the last segment, if not get the next and update the start angle if (index < this.segments.length - 1){ this.segments[index+1].startAngle = segment.endAngle; } segment.draw(); }, this); this.scale.draw(); } }); }).call(this);
snegovick/Chart.js
src/Chart.PolarArea.js
JavaScript
mit
7,641
/*! * Nodeunit * Copyright (c) 2010 Caolan McMahon * MIT Licensed */ /** * Module dependencies */ var nodeunit = require('../nodeunit'), utils = require('../utils'), fs = require('fs'), path = require('path'), AssertionError = require('assert').AssertionError; /** * Reporter info string */ exports.info = "Pretty minimal output"; /** * Run all tests within each module, reporting the results to the command-line. * * @param {Array} files * @api public */ exports.run = function (files, options, callback) { if (!options) { // load default options var content = fs.readFileSync( __dirname + '/../../bin/nodeunit.json', 'utf8' ); options = JSON.parse(content); } var red = function (str) { return options.error_prefix + str + options.error_suffix; }; var green = function (str) { return options.ok_prefix + str + options.ok_suffix; }; var magenta = function (str) { return options.assertion_prefix + str + options.assertion_suffix; }; var bold = function (str) { return options.bold_prefix + str + options.bold_suffix; }; var start = new Date().getTime(); var opts = { testspec: options.testspec, testFullSpec: options.testFullSpec, moduleStart: function (name) { process.stdout.write(bold(name) + ': '); }, moduleDone: function (name, assertions) { console.log(''); if (assertions.failures()) { assertions.forEach(function (a) { if (a.failed()) { a = utils.betterErrors(a); if (a.error instanceof AssertionError && a.message) { console.log( 'Assertion in test ' + bold(a.testname) + ': ' + magenta(a.message) ); } console.log(a.error.stack + '\n'); } }); } }, testStart: function () { }, testDone: function (name, assertions) { if (!assertions.failures()) { process.stdout.write('.'); } else { process.stdout.write(red('F')); assertions.forEach(function (assertion) { assertion.testname = name; }); } }, done: function (assertions) { var end = new Date().getTime(); var duration = end - start; if (assertions.failures()) { console.log( '\n' + bold(red('FAILURES: ')) + assertions.failures() + '/' + assertions.length + ' assertions failed (' + assertions.duration + 'ms)' ); } else { console.log( '\n' + bold(green('OK: ')) + assertions.length + ' assertions (' + assertions.duration + 'ms)' ); } if (callback) callback(assertions.failures() ? new Error('We have got test failures.') : undefined); } }; if (files && files.length) { var paths = files.map(function (p) { return path.join(process.cwd(), p); }); nodeunit.runFiles(paths, opts); } else { nodeunit.runModules(files,opts); } };
wenjoy/homePage
node_modules/geetest/node_modules/request/node_modules/karma/node_modules/load-grunt-tasks/node_modules/findup-sync/node_modules/grunt-contrib-nodeunit/node_modules/grunt-contrib-clean/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/lib/reporters/minimal.js
JavaScript
mit
3,493
Ext.String=(function(){var i=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,m=/('|\\)/g,h=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,n=/^\s+|\s+$/g,j=/\s+/,l=/(^[^a-z]*|[^\w])/gi,e,a,g,d,f=function(p,o){return e[o]},k=function(p,o){return(o in a)?a[o]:String.fromCharCode(parseInt(o.substr(2),10))},c=function(p,o){if(p===null||p===undefined||o===null||o===undefined){return false}return o.length<=p.length};return{insert:function(q,r,p){if(!q){return r}if(!r){return q}var o=q.length;if(!p&&p!==0){p=o}if(p<0){p*=-1;if(p>=o){p=0}else{p=o-p}}if(p===0){q=r+q}else{if(p>=q.length){q+=r}else{q=q.substr(0,p)+r+q.substr(p)}}return q},startsWith:function(q,r,p){var o=c(q,r);if(o){if(p){q=q.toLowerCase();r=r.toLowerCase()}o=q.lastIndexOf(r,0)===0}return o},endsWith:function(r,p,q){var o=c(r,p);if(o){if(q){r=r.toLowerCase();p=p.toLowerCase()}o=r.indexOf(p,r.length-p.length)!==-1}return o},createVarName:function(o){return o.replace(l,"")},htmlEncode:function(o){return(!o)?o:String(o).replace(g,f)},htmlDecode:function(o){return(!o)?o:String(o).replace(d,k)},addCharacterEntities:function(p){var o=[],s=[],q,r;for(q in p){r=p[q];a[q]=r;e[r]=q;o.push(r);s.push(q)}g=new RegExp("("+o.join("|")+")","g");d=new RegExp("("+s.join("|")+"|&#[0-9]{1,5};)","g")},resetCharacterEntities:function(){e={};a={};this.addCharacterEntities({"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"',"&#39;":"'"})},urlAppend:function(p,o){if(!Ext.isEmpty(o)){return p+(p.indexOf("?")===-1?"?":"&")+o}return p},trim:function(o){return o.replace(i,"")},capitalize:function(o){return o.charAt(0).toUpperCase()+o.substr(1)},uncapitalize:function(o){return o.charAt(0).toLowerCase()+o.substr(1)},ellipsis:function(q,o,r){if(q&&q.length>o){if(r){var s=q.substr(0,o-2),p=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));if(p!==-1&&p>=(o-15)){return s.substr(0,p)+"..."}}return q.substr(0,o-3)+"..."}return q},escapeRegex:function(o){return o.replace(b,"\\$1")},escape:function(o){return o.replace(m,"\\$1")},toggle:function(p,q,o){return p===q?o:q},leftPad:function(p,q,r){var o=String(p);r=r||" ";while(o.length<q){o=r+o}return o},format:function(p){var o=Ext.Array.toArray(arguments,1);return p.replace(h,function(q,r){return o[r]})},repeat:function(s,r,p){if(r<1){r=0}for(var o=[],q=r;q--;){o.push(s)}return o.join(p||"")},splitWords:function(o){if(o&&typeof o=="string"){return o.replace(n,"").split(j)}return o||[]}}}());Ext.String.resetCharacterEntities();Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;
Rbeuque74/cdnjs
ajax/libs/extjs/4.2.1/src/lang/String.min.js
JavaScript
mit
2,810
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/event-base-ie/event-base-ie.js']) { __coverage__['build/event-base-ie/event-base-ie.js'] = {"path":"build/event-base-ie/event-base-ie.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0,0],"10":[0,0,0,0],"11":[0,0,0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0,0],"16":[0,0],"17":[0,0,0],"18":[0,0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0,0],"31":[0,0],"32":[0,0],"33":[0,0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":12}}},"2":{"name":"(anonymous_2)","line":12,"loc":{"start":{"line":12,"column":26},"end":{"line":12,"column":37}}},"3":{"name":"(anonymous_3)","line":21,"loc":{"start":{"line":21,"column":30},"end":{"line":21,"column":41}}},"4":{"name":"(anonymous_4)","line":29,"loc":{"start":{"line":29,"column":38},"end":{"line":29,"column":49}}},"5":{"name":"(anonymous_5)","line":41,"loc":{"start":{"line":41,"column":25},"end":{"line":41,"column":44}}},"6":{"name":"IEEventFacade","line":50,"loc":{"start":{"line":50,"column":0},"end":{"line":50,"column":25}}},"7":{"name":"IELazyFacade","line":61,"loc":{"start":{"line":61,"column":0},"end":{"line":61,"column":25}}},"8":{"name":"(anonymous_8)","line":66,"loc":{"start":{"line":66,"column":27},"end":{"line":66,"column":39}}},"9":{"name":"(anonymous_9)","line":96,"loc":{"start":{"line":96,"column":14},"end":{"line":96,"column":25}}},"10":{"name":"(anonymous_10)","line":138,"loc":{"start":{"line":138,"column":25},"end":{"line":138,"column":36}}},"11":{"name":"(anonymous_11)","line":144,"loc":{"start":{"line":144,"column":34},"end":{"line":144,"column":45}}},"12":{"name":"(anonymous_12)","line":150,"loc":{"start":{"line":150,"column":24},"end":{"line":150,"column":46}}},"13":{"name":"(anonymous_13)","line":160,"loc":{"start":{"line":160,"column":30},"end":{"line":160,"column":42}}},"14":{"name":"(anonymous_14)","line":191,"loc":{"start":{"line":191,"column":12},"end":{"line":191,"column":24}}},"15":{"name":"(anonymous_15)","line":194,"loc":{"start":{"line":194,"column":19},"end":{"line":194,"column":31}}},"16":{"name":"(anonymous_16)","line":203,"loc":{"start":{"line":203,"column":19},"end":{"line":203,"column":31}}},"17":{"name":"(anonymous_17)","line":207,"loc":{"start":{"line":207,"column":16},"end":{"line":207,"column":28}}},"18":{"name":"(anonymous_18)","line":218,"loc":{"start":{"line":218,"column":11},"end":{"line":218,"column":23}}},"19":{"name":"(anonymous_19)","line":233,"loc":{"start":{"line":233,"column":11},"end":{"line":233,"column":23}}},"20":{"name":"(anonymous_20)","line":270,"loc":{"start":{"line":270,"column":23},"end":{"line":270,"column":51}}},"21":{"name":"val","line":271,"loc":{"start":{"line":271,"column":4},"end":{"line":271,"column":20}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":40,"column":5}},"2":{"start":{"line":3,"column":0},"end":{"line":9,"column":45}},"3":{"start":{"line":11,"column":0},"end":{"line":38,"column":1}},"4":{"start":{"line":12,"column":4},"end":{"line":14,"column":6}},"5":{"start":{"line":13,"column":8},"end":{"line":13,"column":28}},"6":{"start":{"line":20,"column":4},"end":{"line":37,"column":5}},"7":{"start":{"line":21,"column":8},"end":{"line":26,"column":10}},"8":{"start":{"line":22,"column":12},"end":{"line":25,"column":13}},"9":{"start":{"line":23,"column":16},"end":{"line":23,"column":72}},"10":{"start":{"line":24,"column":16},"end":{"line":24,"column":37}},"11":{"start":{"line":27,"column":8},"end":{"line":27,"column":61}},"12":{"start":{"line":29,"column":8},"end":{"line":36,"column":25}},"13":{"start":{"line":30,"column":12},"end":{"line":35,"column":37}},"14":{"start":{"line":31,"column":16},"end":{"line":31,"column":44}},"15":{"start":{"line":32,"column":16},"end":{"line":32,"column":47}},"16":{"start":{"line":33,"column":16},"end":{"line":33,"column":39}},"17":{"start":{"line":34,"column":16},"end":{"line":34,"column":38}},"18":{"start":{"line":41,"column":0},"end":{"line":303,"column":42}},"19":{"start":{"line":50,"column":0},"end":{"line":53,"column":1}},"20":{"start":{"line":52,"column":4},"end":{"line":52,"column":45}},"21":{"start":{"line":61,"column":0},"end":{"line":77,"column":1}},"22":{"start":{"line":62,"column":4},"end":{"line":63,"column":39}},"23":{"start":{"line":66,"column":4},"end":{"line":66,"column":56}},"24":{"start":{"line":66,"column":41},"end":{"line":66,"column":53}},"25":{"start":{"line":68,"column":4},"end":{"line":68,"column":28}},"26":{"start":{"line":69,"column":4},"end":{"line":69,"column":28}},"27":{"start":{"line":70,"column":4},"end":{"line":70,"column":58}},"28":{"start":{"line":71,"column":4},"end":{"line":71,"column":59}},"29":{"start":{"line":72,"column":4},"end":{"line":72,"column":68}},"30":{"start":{"line":74,"column":4},"end":{"line":74,"column":46}},"31":{"start":{"line":76,"column":4},"end":{"line":76,"column":17}},"32":{"start":{"line":80,"column":0},"end":{"line":155,"column":6}},"33":{"start":{"line":98,"column":12},"end":{"line":98,"column":65}},"34":{"start":{"line":100,"column":12},"end":{"line":101,"column":34}},"35":{"start":{"line":103,"column":12},"end":{"line":103,"column":48}},"36":{"start":{"line":105,"column":12},"end":{"line":118,"column":13}},"37":{"start":{"line":106,"column":16},"end":{"line":106,"column":30}},"38":{"start":{"line":107,"column":16},"end":{"line":107,"column":30}},"39":{"start":{"line":109,"column":16},"end":{"line":109,"column":33}},"40":{"start":{"line":110,"column":16},"end":{"line":110,"column":27}},"41":{"start":{"line":111,"column":16},"end":{"line":111,"column":39}},"42":{"start":{"line":113,"column":16},"end":{"line":113,"column":65}},"43":{"start":{"line":114,"column":16},"end":{"line":114,"column":65}},"44":{"start":{"line":116,"column":16},"end":{"line":116,"column":31}},"45":{"start":{"line":117,"column":16},"end":{"line":117,"column":31}},"46":{"start":{"line":120,"column":12},"end":{"line":124,"column":13}},"47":{"start":{"line":121,"column":16},"end":{"line":121,"column":32}},"48":{"start":{"line":122,"column":19},"end":{"line":124,"column":13}},"49":{"start":{"line":123,"column":16},"end":{"line":123,"column":34}},"50":{"start":{"line":129,"column":12},"end":{"line":129,"column":63}},"51":{"start":{"line":134,"column":12},"end":{"line":135,"column":71}},"52":{"start":{"line":139,"column":12},"end":{"line":139,"column":44}},"53":{"start":{"line":140,"column":12},"end":{"line":140,"column":38}},"54":{"start":{"line":141,"column":12},"end":{"line":141,"column":29}},"55":{"start":{"line":145,"column":12},"end":{"line":145,"column":35}},"56":{"start":{"line":146,"column":12},"end":{"line":146,"column":38}},"57":{"start":{"line":147,"column":12},"end":{"line":147,"column":29}},"58":{"start":{"line":151,"column":12},"end":{"line":151,"column":59}},"59":{"start":{"line":152,"column":12},"end":{"line":152,"column":40}},"60":{"start":{"line":153,"column":12},"end":{"line":153,"column":31}},"61":{"start":{"line":157,"column":0},"end":{"line":157,"column":50}},"62":{"start":{"line":159,"column":0},"end":{"line":159,"column":49}},"63":{"start":{"line":160,"column":0},"end":{"line":188,"column":2}},"64":{"start":{"line":161,"column":4},"end":{"line":165,"column":13}},"65":{"start":{"line":167,"column":4},"end":{"line":167,"column":29}},"66":{"start":{"line":168,"column":4},"end":{"line":168,"column":30}},"67":{"start":{"line":169,"column":4},"end":{"line":169,"column":30}},"68":{"start":{"line":170,"column":4},"end":{"line":170,"column":31}},"69":{"start":{"line":171,"column":4},"end":{"line":171,"column":60}},"70":{"start":{"line":172,"column":4},"end":{"line":172,"column":30}},"71":{"start":{"line":173,"column":4},"end":{"line":173,"column":30}},"72":{"start":{"line":174,"column":4},"end":{"line":175,"column":30}},"73":{"start":{"line":176,"column":4},"end":{"line":177,"column":65}},"74":{"start":{"line":179,"column":4},"end":{"line":183,"column":5}},"75":{"start":{"line":180,"column":8},"end":{"line":182,"column":9}},"76":{"start":{"line":181,"column":12},"end":{"line":181,"column":53}},"77":{"start":{"line":185,"column":4},"end":{"line":187,"column":5}},"78":{"start":{"line":186,"column":8},"end":{"line":186,"column":59}},"79":{"start":{"line":190,"column":0},"end":{"line":248,"column":2}},"80":{"start":{"line":192,"column":8},"end":{"line":192,"column":47}},"81":{"start":{"line":195,"column":8},"end":{"line":196,"column":69}},"82":{"start":{"line":201,"column":8},"end":{"line":201,"column":57}},"83":{"start":{"line":204,"column":8},"end":{"line":204,"column":44}},"84":{"start":{"line":208,"column":8},"end":{"line":208,"column":28}},"85":{"start":{"line":210,"column":8},"end":{"line":215,"column":9}},"86":{"start":{"line":211,"column":12},"end":{"line":214,"column":79}},"87":{"start":{"line":219,"column":8},"end":{"line":221,"column":39}},"88":{"start":{"line":223,"column":8},"end":{"line":229,"column":9}},"89":{"start":{"line":224,"column":12},"end":{"line":224,"column":31}},"90":{"start":{"line":225,"column":12},"end":{"line":225,"column":57}},"91":{"start":{"line":226,"column":12},"end":{"line":226,"column":55}},"92":{"start":{"line":228,"column":12},"end":{"line":228,"column":61}},"93":{"start":{"line":231,"column":8},"end":{"line":231,"column":19}},"94":{"start":{"line":234,"column":8},"end":{"line":236,"column":39}},"95":{"start":{"line":238,"column":8},"end":{"line":244,"column":9}},"96":{"start":{"line":239,"column":12},"end":{"line":239,"column":31}},"97":{"start":{"line":240,"column":12},"end":{"line":240,"column":56}},"98":{"start":{"line":241,"column":12},"end":{"line":241,"column":54}},"99":{"start":{"line":243,"column":12},"end":{"line":243,"column":61}},"100":{"start":{"line":246,"column":8},"end":{"line":246,"column":19}},"101":{"start":{"line":270,"column":0},"end":{"line":287,"column":2}},"102":{"start":{"line":271,"column":4},"end":{"line":281,"column":5}},"103":{"start":{"line":272,"column":8},"end":{"line":272,"column":62}},"104":{"start":{"line":274,"column":8},"end":{"line":274,"column":23}},"105":{"start":{"line":275,"column":8},"end":{"line":279,"column":11}},"106":{"start":{"line":280,"column":8},"end":{"line":280,"column":19}},"107":{"start":{"line":282,"column":4},"end":{"line":286,"column":7}},"108":{"start":{"line":289,"column":0},"end":{"line":300,"column":1}},"109":{"start":{"line":290,"column":4},"end":{"line":297,"column":5}},"110":{"start":{"line":292,"column":8},"end":{"line":296,"column":9}},"111":{"start":{"line":293,"column":12},"end":{"line":293,"column":77}},"112":{"start":{"line":295,"column":12},"end":{"line":295,"column":34}},"113":{"start":{"line":299,"column":4},"end":{"line":299,"column":70}}},"branchMap":{"1":{"line":7,"type":"binary-expr","locations":[{"start":{"line":7,"column":19},"end":{"line":7,"column":22}},{"start":{"line":7,"column":26},"end":{"line":7,"column":45}}]},"2":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":19},"end":{"line":9,"column":38}},{"start":{"line":9,"column":42},"end":{"line":9,"column":44}}]},"3":{"line":11,"type":"if","locations":[{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},{"start":{"line":11,"column":0},"end":{"line":11,"column":0}}]},"4":{"line":11,"type":"binary-expr","locations":[{"start":{"line":11,"column":4},"end":{"line":11,"column":23}},{"start":{"line":11,"column":27},"end":{"line":11,"column":47}}]},"5":{"line":20,"type":"if","locations":[{"start":{"line":20,"column":4},"end":{"line":20,"column":4}},{"start":{"line":20,"column":4},"end":{"line":20,"column":4}}]},"6":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":12},"end":{"line":22,"column":12}},{"start":{"line":22,"column":12},"end":{"line":22,"column":12}}]},"7":{"line":80,"type":"binary-expr","locations":[{"start":{"line":80,"column":10},"end":{"line":80,"column":22}},{"start":{"line":80,"column":26},"end":{"line":80,"column":53}}]},"8":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":12},"end":{"line":105,"column":12}},{"start":{"line":105,"column":12},"end":{"line":105,"column":12}}]},"9":{"line":105,"type":"binary-expr","locations":[{"start":{"line":105,"column":17},"end":{"line":105,"column":31}},{"start":{"line":105,"column":37},"end":{"line":105,"column":39}},{"start":{"line":105,"column":45},"end":{"line":105,"column":52}}]},"10":{"line":113,"type":"binary-expr","locations":[{"start":{"line":113,"column":22},"end":{"line":113,"column":35}},{"start":{"line":113,"column":40},"end":{"line":113,"column":41}},{"start":{"line":113,"column":45},"end":{"line":113,"column":57}},{"start":{"line":113,"column":62},"end":{"line":113,"column":63}}]},"11":{"line":114,"type":"binary-expr","locations":[{"start":{"line":114,"column":22},"end":{"line":114,"column":34}},{"start":{"line":114,"column":40},"end":{"line":114,"column":41}},{"start":{"line":114,"column":45},"end":{"line":114,"column":56}},{"start":{"line":114,"column":62},"end":{"line":114,"column":63}}]},"12":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":12},"end":{"line":120,"column":12}},{"start":{"line":120,"column":12},"end":{"line":120,"column":12}}]},"13":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":19},"end":{"line":122,"column":19}},{"start":{"line":122,"column":19},"end":{"line":122,"column":19}}]},"14":{"line":129,"type":"binary-expr","locations":[{"start":{"line":129,"column":41},"end":{"line":129,"column":42}},{"start":{"line":129,"column":46},"end":{"line":129,"column":61}}]},"15":{"line":135,"type":"binary-expr","locations":[{"start":{"line":135,"column":26},"end":{"line":135,"column":35}},{"start":{"line":135,"column":39},"end":{"line":135,"column":58}},{"start":{"line":135,"column":62},"end":{"line":135,"column":70}}]},"16":{"line":151,"type":"binary-expr","locations":[{"start":{"line":151,"column":38},"end":{"line":151,"column":49}},{"start":{"line":151,"column":53},"end":{"line":151,"column":58}}]},"17":{"line":171,"type":"binary-expr","locations":[{"start":{"line":171,"column":21},"end":{"line":171,"column":30}},{"start":{"line":171,"column":34},"end":{"line":171,"column":48}},{"start":{"line":171,"column":53},"end":{"line":171,"column":59}}]},"18":{"line":177,"type":"binary-expr","locations":[{"start":{"line":177,"column":20},"end":{"line":177,"column":29}},{"start":{"line":177,"column":33},"end":{"line":177,"column":52}},{"start":{"line":177,"column":56},"end":{"line":177,"column":64}}]},"19":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":8},"end":{"line":180,"column":8}},{"start":{"line":180,"column":8},"end":{"line":180,"column":8}}]},"20":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":4},"end":{"line":185,"column":4}},{"start":{"line":185,"column":4},"end":{"line":185,"column":4}}]},"21":{"line":196,"type":"binary-expr","locations":[{"start":{"line":196,"column":25},"end":{"line":196,"column":49}},{"start":{"line":196,"column":53},"end":{"line":196,"column":68}}]},"22":{"line":201,"type":"binary-expr","locations":[{"start":{"line":201,"column":23},"end":{"line":201,"column":36}},{"start":{"line":201,"column":40},"end":{"line":201,"column":55}}]},"23":{"line":210,"type":"if","locations":[{"start":{"line":210,"column":8},"end":{"line":210,"column":8}},{"start":{"line":210,"column":8},"end":{"line":210,"column":8}}]},"24":{"line":210,"type":"binary-expr","locations":[{"start":{"line":210,"column":12},"end":{"line":210,"column":35}},{"start":{"line":210,"column":39},"end":{"line":210,"column":66}}]},"25":{"line":211,"type":"cond-expr","locations":[{"start":{"line":212,"column":17},"end":{"line":212,"column":30}},{"start":{"line":214,"column":16},"end":{"line":214,"column":78}}]},"26":{"line":214,"type":"binary-expr","locations":[{"start":{"line":214,"column":16},"end":{"line":214,"column":45}},{"start":{"line":214,"column":50},"end":{"line":214,"column":77}}]},"27":{"line":214,"type":"cond-expr","locations":[{"start":{"line":214,"column":71},"end":{"line":214,"column":73}},{"start":{"line":214,"column":76},"end":{"line":214,"column":77}}]},"28":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":8},"end":{"line":223,"column":8}},{"start":{"line":223,"column":8},"end":{"line":223,"column":8}}]},"29":{"line":225,"type":"binary-expr","locations":[{"start":{"line":225,"column":25},"end":{"line":225,"column":33}},{"start":{"line":225,"column":37},"end":{"line":225,"column":56}}]},"30":{"line":228,"type":"binary-expr","locations":[{"start":{"line":228,"column":31},"end":{"line":228,"column":40}},{"start":{"line":228,"column":44},"end":{"line":228,"column":54}},{"start":{"line":228,"column":58},"end":{"line":228,"column":59}}]},"31":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]},"32":{"line":240,"type":"binary-expr","locations":[{"start":{"line":240,"column":25},"end":{"line":240,"column":33}},{"start":{"line":240,"column":37},"end":{"line":240,"column":55}}]},"33":{"line":243,"type":"binary-expr","locations":[{"start":{"line":243,"column":31},"end":{"line":243,"column":40}},{"start":{"line":243,"column":44},"end":{"line":243,"column":54}},{"start":{"line":243,"column":58},"end":{"line":243,"column":59}}]},"34":{"line":272,"type":"cond-expr","locations":[{"start":{"line":272,"column":39},"end":{"line":272,"column":40}},{"start":{"line":272,"column":43},"end":{"line":272,"column":61}}]},"35":{"line":289,"type":"if","locations":[{"start":{"line":289,"column":0},"end":{"line":289,"column":0}},{"start":{"line":289,"column":0},"end":{"line":289,"column":0}}]},"36":{"line":289,"type":"binary-expr","locations":[{"start":{"line":289,"column":4},"end":{"line":289,"column":7}},{"start":{"line":289,"column":12},"end":{"line":289,"column":44}}]},"37":{"line":290,"type":"if","locations":[{"start":{"line":290,"column":4},"end":{"line":290,"column":4}},{"start":{"line":290,"column":4},"end":{"line":290,"column":4}}]},"38":{"line":299,"type":"cond-expr","locations":[{"start":{"line":299,"column":41},"end":{"line":299,"column":53}},{"start":{"line":299,"column":56},"end":{"line":299,"column":69}}]}},"code":["(function () { (function() {","","var stateChangeListener,"," GLOBAL_ENV = YUI.Env,"," config = YUI.config,"," doc = config.doc,"," docElement = doc && doc.documentElement,"," EVENT_NAME = 'onreadystatechange',"," pollInterval = config.pollInterval || 40;","","if (docElement.doScroll && !GLOBAL_ENV._ieready) {"," GLOBAL_ENV._ieready = function() {"," GLOBAL_ENV._ready();"," };","","/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */","// Internet Explorer: use the doScroll() method on the root element.","// This isolates what appears to be a safe moment to manipulate the","// DOM prior to when the document's readyState suggests it is safe to do so."," if (self !== self.top) {"," stateChangeListener = function() {"," if (doc.readyState == 'complete') {"," GLOBAL_ENV.remove(doc, EVENT_NAME, stateChangeListener);"," GLOBAL_ENV.ieready();"," }"," };"," GLOBAL_ENV.add(doc, EVENT_NAME, stateChangeListener);"," } else {"," GLOBAL_ENV._dri = setInterval(function() {"," try {"," docElement.doScroll('left');"," clearInterval(GLOBAL_ENV._dri);"," GLOBAL_ENV._dri = null;"," GLOBAL_ENV._ieready();"," } catch (domNotReady) { }"," }, pollInterval);"," }","}","","})();","YUI.add('event-base-ie', function (Y, NAME) {","","/*"," * Custom event engine, DOM event listener abstraction layer, synthetic DOM"," * events."," * @module event"," * @submodule event-base"," */","","function IEEventFacade() {"," // IEEventFacade.superclass.constructor.apply(this, arguments);"," Y.DOM2EventFacade.apply(this, arguments);","}","","/*"," * (intentially left out of API docs)"," * Alternate Facade implementation that is based on Object.defineProperty, which"," * is partially supported in IE8. Properties that involve setup work are"," * deferred to temporary getters using the static _define method."," */","function IELazyFacade(e) {"," var proxy = Y.config.doc.createEventObject(e),"," proto = IELazyFacade.prototype;",""," // TODO: necessary?"," proxy.hasOwnProperty = function () { return true; };",""," proxy.init = proto.init;"," proxy.halt = proto.halt;"," proxy.preventDefault = proto.preventDefault;"," proxy.stopPropagation = proto.stopPropagation;"," proxy.stopImmediatePropagation = proto.stopImmediatePropagation;",""," Y.DOM2EventFacade.apply(proxy, arguments);",""," return proxy;","}","","","var imp = Y.config.doc && Y.config.doc.implementation,"," useLazyFacade = Y.config.lazyEventFacade,",""," buttonMap = {"," 0: 1, // left click"," 4: 2, // middle click"," 2: 3 // right click"," },"," relatedTargetMap = {"," mouseout: 'toElement',"," mouseover: 'fromElement'"," },",""," resolve = Y.DOM2EventFacade.resolve,",""," proto = {"," init: function() {",""," IEEventFacade.superclass.init.apply(this, arguments);",""," var e = this._event,"," x, y, d, b, de, t;",""," this.target = resolve(e.srcElement);",""," if (('clientX' in e) && (!x) && (0 !== x)) {"," x = e.clientX;"," y = e.clientY;",""," d = Y.config.doc;"," b = d.body;"," de = d.documentElement;",""," x += (de.scrollLeft || (b && b.scrollLeft) || 0);"," y += (de.scrollTop || (b && b.scrollTop) || 0);",""," this.pageX = x;"," this.pageY = y;"," }",""," if (e.type == \"mouseout\") {"," t = e.toElement;"," } else if (e.type == \"mouseover\") {"," t = e.fromElement;"," }",""," // fallback to t.relatedTarget to support simulated events."," // IE doesn't support setting toElement or fromElement on generic"," // events, so Y.Event.simulate sets relatedTarget instead."," this.relatedTarget = resolve(t || e.relatedTarget);",""," // which should contain the unicode key code if this is a key event."," // For click events, which is normalized for which mouse button was"," // clicked."," this.which = // chained assignment"," this.button = e.keyCode || buttonMap[e.button] || e.button;"," },",""," stopPropagation: function() {"," this._event.cancelBubble = true;"," this._wrapper.stopped = 1;"," this.stopped = 1;"," },",""," stopImmediatePropagation: function() {"," this.stopPropagation();"," this._wrapper.stopped = 2;"," this.stopped = 2;"," },",""," preventDefault: function(returnValue) {"," this._event.returnValue = returnValue || false;"," this._wrapper.prevented = 1;"," this.prevented = 1;"," }"," };","","Y.extend(IEEventFacade, Y.DOM2EventFacade, proto);","","Y.extend(IELazyFacade, Y.DOM2EventFacade, proto);","IELazyFacade.prototype.init = function () {"," var e = this._event,"," overrides = this._wrapper.overrides,"," define = IELazyFacade._define,"," lazyProperties = IELazyFacade._lazyProperties,"," prop;",""," this.altKey = e.altKey;"," this.ctrlKey = e.ctrlKey;"," this.metaKey = e.metaKey;"," this.shiftKey = e.shiftKey;"," this.type = (overrides && overrides.type) || e.type;"," this.clientX = e.clientX;"," this.clientY = e.clientY;"," this.keyCode = // chained assignment"," this.charCode = e.keyCode;"," this.which = // chained assignment"," this.button = e.keyCode || buttonMap[e.button] || e.button;",""," for (prop in lazyProperties) {"," if (lazyProperties.hasOwnProperty(prop)) {"," define(this, prop, lazyProperties[prop]);"," }"," }",""," if (this._touch) {"," this._touch(e, this._currentTarget, this._wrapper);"," }","};","","IELazyFacade._lazyProperties = {"," target: function () {"," return resolve(this._event.srcElement);"," },"," relatedTarget: function () {"," var e = this._event,"," targetProp = relatedTargetMap[e.type] || 'relatedTarget';",""," // fallback to t.relatedTarget to support simulated events."," // IE doesn't support setting toElement or fromElement on generic"," // events, so Y.Event.simulate sets relatedTarget instead."," return resolve(e[targetProp] || e.relatedTarget);"," },"," currentTarget: function () {"," return resolve(this._currentTarget);"," },",""," wheelDelta: function () {"," var e = this._event;",""," if (e.type === \"mousewheel\" || e.type === \"DOMMouseScroll\") {"," return (e.detail) ?"," (e.detail * -1) :"," // wheelDelta between -80 and 80 result in -1 or 1"," Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1);"," }"," },",""," pageX: function () {"," var e = this._event,"," val = e.pageX,"," doc, bodyScroll, docScroll;",""," if (val === undefined) {"," doc = Y.config.doc;"," bodyScroll = doc.body && doc.body.scrollLeft;"," docScroll = doc.documentElement.scrollLeft;",""," val = e.clientX + (docScroll || bodyScroll || 0);"," }",""," return val;"," },"," pageY: function () {"," var e = this._event,"," val = e.pageY,"," doc, bodyScroll, docScroll;",""," if (val === undefined) {"," doc = Y.config.doc;"," bodyScroll = doc.body && doc.body.scrollTop;"," docScroll = doc.documentElement.scrollTop;",""," val = e.clientY + (docScroll || bodyScroll || 0);"," }",""," return val;"," }","};","","","/**"," * Wrapper function for Object.defineProperty that creates a property whose"," * value will be calulated only when asked for. After calculating the value,"," * the getter wll be removed, so it will behave as a normal property beyond that"," * point. A setter is also assigned so assigning to the property will clear"," * the getter, so foo.prop = 'a'; foo.prop; won't trigger the getter,"," * overwriting value 'a'."," *"," * Used only by the DOMEventFacades used by IE8 when the YUI configuration"," * <code>lazyEventFacade</code> is set to true."," *"," * @method _define"," * @param o {DOMObject} A DOM object to add the property to"," * @param prop {String} The name of the new property"," * @param valueFn {Function} The function that will return the initial, default"," * value for the property."," * @static"," * @private"," */","IELazyFacade._define = function (o, prop, valueFn) {"," function val(v) {"," var ret = (arguments.length) ? v : valueFn.call(this);",""," delete o[prop];"," Object.defineProperty(o, prop, {"," value: ret,"," configurable: true,"," writable: true"," });"," return ret;"," }"," Object.defineProperty(o, prop, {"," get: val,"," set: val,"," configurable: true"," });","};","","if (imp && (!imp.hasFeature('Events', '2.0'))) {"," if (useLazyFacade) {"," // Make sure we can use the lazy facade logic"," try {"," Object.defineProperty(Y.config.doc.createEventObject(), 'z', {});"," } catch (e) {"," useLazyFacade = false;"," }"," }",""," Y.DOMEventFacade = (useLazyFacade) ? IELazyFacade : IEEventFacade;","}","","","}, '3.15.0', {\"requires\": [\"node-base\"]});","","}());"]}; } var __cov__p7gLH_Q__z9XCzezdNntg = __coverage__['build/event-base-ie/event-base-ie.js']; __cov__p7gLH_Q__z9XCzezdNntg.s['1']++;(function(){__cov__p7gLH_Q__z9XCzezdNntg.f['1']++;__cov__p7gLH_Q__z9XCzezdNntg.s['2']++;var stateChangeListener,GLOBAL_ENV=YUI.Env,config=YUI.config,doc=config.doc,docElement=(__cov__p7gLH_Q__z9XCzezdNntg.b['1'][0]++,doc)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['1'][1]++,doc.documentElement),EVENT_NAME='onreadystatechange',pollInterval=(__cov__p7gLH_Q__z9XCzezdNntg.b['2'][0]++,config.pollInterval)||(__cov__p7gLH_Q__z9XCzezdNntg.b['2'][1]++,40);__cov__p7gLH_Q__z9XCzezdNntg.s['3']++;if((__cov__p7gLH_Q__z9XCzezdNntg.b['4'][0]++,docElement.doScroll)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['4'][1]++,!GLOBAL_ENV._ieready)){__cov__p7gLH_Q__z9XCzezdNntg.b['3'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['4']++;GLOBAL_ENV._ieready=function(){__cov__p7gLH_Q__z9XCzezdNntg.f['2']++;__cov__p7gLH_Q__z9XCzezdNntg.s['5']++;GLOBAL_ENV._ready();};__cov__p7gLH_Q__z9XCzezdNntg.s['6']++;if(self!==self.top){__cov__p7gLH_Q__z9XCzezdNntg.b['5'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['7']++;stateChangeListener=function(){__cov__p7gLH_Q__z9XCzezdNntg.f['3']++;__cov__p7gLH_Q__z9XCzezdNntg.s['8']++;if(doc.readyState=='complete'){__cov__p7gLH_Q__z9XCzezdNntg.b['6'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['9']++;GLOBAL_ENV.remove(doc,EVENT_NAME,stateChangeListener);__cov__p7gLH_Q__z9XCzezdNntg.s['10']++;GLOBAL_ENV.ieready();}else{__cov__p7gLH_Q__z9XCzezdNntg.b['6'][1]++;}};__cov__p7gLH_Q__z9XCzezdNntg.s['11']++;GLOBAL_ENV.add(doc,EVENT_NAME,stateChangeListener);}else{__cov__p7gLH_Q__z9XCzezdNntg.b['5'][1]++;__cov__p7gLH_Q__z9XCzezdNntg.s['12']++;GLOBAL_ENV._dri=setInterval(function(){__cov__p7gLH_Q__z9XCzezdNntg.f['4']++;__cov__p7gLH_Q__z9XCzezdNntg.s['13']++;try{__cov__p7gLH_Q__z9XCzezdNntg.s['14']++;docElement.doScroll('left');__cov__p7gLH_Q__z9XCzezdNntg.s['15']++;clearInterval(GLOBAL_ENV._dri);__cov__p7gLH_Q__z9XCzezdNntg.s['16']++;GLOBAL_ENV._dri=null;__cov__p7gLH_Q__z9XCzezdNntg.s['17']++;GLOBAL_ENV._ieready();}catch(domNotReady){}},pollInterval);}}else{__cov__p7gLH_Q__z9XCzezdNntg.b['3'][1]++;}}());__cov__p7gLH_Q__z9XCzezdNntg.s['18']++;YUI.add('event-base-ie',function(Y,NAME){__cov__p7gLH_Q__z9XCzezdNntg.f['5']++;__cov__p7gLH_Q__z9XCzezdNntg.s['19']++;function IEEventFacade(){__cov__p7gLH_Q__z9XCzezdNntg.f['6']++;__cov__p7gLH_Q__z9XCzezdNntg.s['20']++;Y.DOM2EventFacade.apply(this,arguments);}__cov__p7gLH_Q__z9XCzezdNntg.s['21']++;function IELazyFacade(e){__cov__p7gLH_Q__z9XCzezdNntg.f['7']++;__cov__p7gLH_Q__z9XCzezdNntg.s['22']++;var proxy=Y.config.doc.createEventObject(e),proto=IELazyFacade.prototype;__cov__p7gLH_Q__z9XCzezdNntg.s['23']++;proxy.hasOwnProperty=function(){__cov__p7gLH_Q__z9XCzezdNntg.f['8']++;__cov__p7gLH_Q__z9XCzezdNntg.s['24']++;return true;};__cov__p7gLH_Q__z9XCzezdNntg.s['25']++;proxy.init=proto.init;__cov__p7gLH_Q__z9XCzezdNntg.s['26']++;proxy.halt=proto.halt;__cov__p7gLH_Q__z9XCzezdNntg.s['27']++;proxy.preventDefault=proto.preventDefault;__cov__p7gLH_Q__z9XCzezdNntg.s['28']++;proxy.stopPropagation=proto.stopPropagation;__cov__p7gLH_Q__z9XCzezdNntg.s['29']++;proxy.stopImmediatePropagation=proto.stopImmediatePropagation;__cov__p7gLH_Q__z9XCzezdNntg.s['30']++;Y.DOM2EventFacade.apply(proxy,arguments);__cov__p7gLH_Q__z9XCzezdNntg.s['31']++;return proxy;}__cov__p7gLH_Q__z9XCzezdNntg.s['32']++;var imp=(__cov__p7gLH_Q__z9XCzezdNntg.b['7'][0]++,Y.config.doc)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['7'][1]++,Y.config.doc.implementation),useLazyFacade=Y.config.lazyEventFacade,buttonMap={0:1,4:2,2:3},relatedTargetMap={mouseout:'toElement',mouseover:'fromElement'},resolve=Y.DOM2EventFacade.resolve,proto={init:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['9']++;__cov__p7gLH_Q__z9XCzezdNntg.s['33']++;IEEventFacade.superclass.init.apply(this,arguments);__cov__p7gLH_Q__z9XCzezdNntg.s['34']++;var e=this._event,x,y,d,b,de,t;__cov__p7gLH_Q__z9XCzezdNntg.s['35']++;this.target=resolve(e.srcElement);__cov__p7gLH_Q__z9XCzezdNntg.s['36']++;if((__cov__p7gLH_Q__z9XCzezdNntg.b['9'][0]++,'clientX'in e)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['9'][1]++,!x)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['9'][2]++,0!==x)){__cov__p7gLH_Q__z9XCzezdNntg.b['8'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['37']++;x=e.clientX;__cov__p7gLH_Q__z9XCzezdNntg.s['38']++;y=e.clientY;__cov__p7gLH_Q__z9XCzezdNntg.s['39']++;d=Y.config.doc;__cov__p7gLH_Q__z9XCzezdNntg.s['40']++;b=d.body;__cov__p7gLH_Q__z9XCzezdNntg.s['41']++;de=d.documentElement;__cov__p7gLH_Q__z9XCzezdNntg.s['42']++;x+=(__cov__p7gLH_Q__z9XCzezdNntg.b['10'][0]++,de.scrollLeft)||(__cov__p7gLH_Q__z9XCzezdNntg.b['10'][1]++,b)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['10'][2]++,b.scrollLeft)||(__cov__p7gLH_Q__z9XCzezdNntg.b['10'][3]++,0);__cov__p7gLH_Q__z9XCzezdNntg.s['43']++;y+=(__cov__p7gLH_Q__z9XCzezdNntg.b['11'][0]++,de.scrollTop)||(__cov__p7gLH_Q__z9XCzezdNntg.b['11'][1]++,b)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['11'][2]++,b.scrollTop)||(__cov__p7gLH_Q__z9XCzezdNntg.b['11'][3]++,0);__cov__p7gLH_Q__z9XCzezdNntg.s['44']++;this.pageX=x;__cov__p7gLH_Q__z9XCzezdNntg.s['45']++;this.pageY=y;}else{__cov__p7gLH_Q__z9XCzezdNntg.b['8'][1]++;}__cov__p7gLH_Q__z9XCzezdNntg.s['46']++;if(e.type=='mouseout'){__cov__p7gLH_Q__z9XCzezdNntg.b['12'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['47']++;t=e.toElement;}else{__cov__p7gLH_Q__z9XCzezdNntg.b['12'][1]++;__cov__p7gLH_Q__z9XCzezdNntg.s['48']++;if(e.type=='mouseover'){__cov__p7gLH_Q__z9XCzezdNntg.b['13'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['49']++;t=e.fromElement;}else{__cov__p7gLH_Q__z9XCzezdNntg.b['13'][1]++;}}__cov__p7gLH_Q__z9XCzezdNntg.s['50']++;this.relatedTarget=resolve((__cov__p7gLH_Q__z9XCzezdNntg.b['14'][0]++,t)||(__cov__p7gLH_Q__z9XCzezdNntg.b['14'][1]++,e.relatedTarget));__cov__p7gLH_Q__z9XCzezdNntg.s['51']++;this.which=this.button=(__cov__p7gLH_Q__z9XCzezdNntg.b['15'][0]++,e.keyCode)||(__cov__p7gLH_Q__z9XCzezdNntg.b['15'][1]++,buttonMap[e.button])||(__cov__p7gLH_Q__z9XCzezdNntg.b['15'][2]++,e.button);},stopPropagation:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['10']++;__cov__p7gLH_Q__z9XCzezdNntg.s['52']++;this._event.cancelBubble=true;__cov__p7gLH_Q__z9XCzezdNntg.s['53']++;this._wrapper.stopped=1;__cov__p7gLH_Q__z9XCzezdNntg.s['54']++;this.stopped=1;},stopImmediatePropagation:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['11']++;__cov__p7gLH_Q__z9XCzezdNntg.s['55']++;this.stopPropagation();__cov__p7gLH_Q__z9XCzezdNntg.s['56']++;this._wrapper.stopped=2;__cov__p7gLH_Q__z9XCzezdNntg.s['57']++;this.stopped=2;},preventDefault:function(returnValue){__cov__p7gLH_Q__z9XCzezdNntg.f['12']++;__cov__p7gLH_Q__z9XCzezdNntg.s['58']++;this._event.returnValue=(__cov__p7gLH_Q__z9XCzezdNntg.b['16'][0]++,returnValue)||(__cov__p7gLH_Q__z9XCzezdNntg.b['16'][1]++,false);__cov__p7gLH_Q__z9XCzezdNntg.s['59']++;this._wrapper.prevented=1;__cov__p7gLH_Q__z9XCzezdNntg.s['60']++;this.prevented=1;}};__cov__p7gLH_Q__z9XCzezdNntg.s['61']++;Y.extend(IEEventFacade,Y.DOM2EventFacade,proto);__cov__p7gLH_Q__z9XCzezdNntg.s['62']++;Y.extend(IELazyFacade,Y.DOM2EventFacade,proto);__cov__p7gLH_Q__z9XCzezdNntg.s['63']++;IELazyFacade.prototype.init=function(){__cov__p7gLH_Q__z9XCzezdNntg.f['13']++;__cov__p7gLH_Q__z9XCzezdNntg.s['64']++;var e=this._event,overrides=this._wrapper.overrides,define=IELazyFacade._define,lazyProperties=IELazyFacade._lazyProperties,prop;__cov__p7gLH_Q__z9XCzezdNntg.s['65']++;this.altKey=e.altKey;__cov__p7gLH_Q__z9XCzezdNntg.s['66']++;this.ctrlKey=e.ctrlKey;__cov__p7gLH_Q__z9XCzezdNntg.s['67']++;this.metaKey=e.metaKey;__cov__p7gLH_Q__z9XCzezdNntg.s['68']++;this.shiftKey=e.shiftKey;__cov__p7gLH_Q__z9XCzezdNntg.s['69']++;this.type=(__cov__p7gLH_Q__z9XCzezdNntg.b['17'][0]++,overrides)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['17'][1]++,overrides.type)||(__cov__p7gLH_Q__z9XCzezdNntg.b['17'][2]++,e.type);__cov__p7gLH_Q__z9XCzezdNntg.s['70']++;this.clientX=e.clientX;__cov__p7gLH_Q__z9XCzezdNntg.s['71']++;this.clientY=e.clientY;__cov__p7gLH_Q__z9XCzezdNntg.s['72']++;this.keyCode=this.charCode=e.keyCode;__cov__p7gLH_Q__z9XCzezdNntg.s['73']++;this.which=this.button=(__cov__p7gLH_Q__z9XCzezdNntg.b['18'][0]++,e.keyCode)||(__cov__p7gLH_Q__z9XCzezdNntg.b['18'][1]++,buttonMap[e.button])||(__cov__p7gLH_Q__z9XCzezdNntg.b['18'][2]++,e.button);__cov__p7gLH_Q__z9XCzezdNntg.s['74']++;for(prop in lazyProperties){__cov__p7gLH_Q__z9XCzezdNntg.s['75']++;if(lazyProperties.hasOwnProperty(prop)){__cov__p7gLH_Q__z9XCzezdNntg.b['19'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['76']++;define(this,prop,lazyProperties[prop]);}else{__cov__p7gLH_Q__z9XCzezdNntg.b['19'][1]++;}}__cov__p7gLH_Q__z9XCzezdNntg.s['77']++;if(this._touch){__cov__p7gLH_Q__z9XCzezdNntg.b['20'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['78']++;this._touch(e,this._currentTarget,this._wrapper);}else{__cov__p7gLH_Q__z9XCzezdNntg.b['20'][1]++;}};__cov__p7gLH_Q__z9XCzezdNntg.s['79']++;IELazyFacade._lazyProperties={target:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['14']++;__cov__p7gLH_Q__z9XCzezdNntg.s['80']++;return resolve(this._event.srcElement);},relatedTarget:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['15']++;__cov__p7gLH_Q__z9XCzezdNntg.s['81']++;var e=this._event,targetProp=(__cov__p7gLH_Q__z9XCzezdNntg.b['21'][0]++,relatedTargetMap[e.type])||(__cov__p7gLH_Q__z9XCzezdNntg.b['21'][1]++,'relatedTarget');__cov__p7gLH_Q__z9XCzezdNntg.s['82']++;return resolve((__cov__p7gLH_Q__z9XCzezdNntg.b['22'][0]++,e[targetProp])||(__cov__p7gLH_Q__z9XCzezdNntg.b['22'][1]++,e.relatedTarget));},currentTarget:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['16']++;__cov__p7gLH_Q__z9XCzezdNntg.s['83']++;return resolve(this._currentTarget);},wheelDelta:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['17']++;__cov__p7gLH_Q__z9XCzezdNntg.s['84']++;var e=this._event;__cov__p7gLH_Q__z9XCzezdNntg.s['85']++;if((__cov__p7gLH_Q__z9XCzezdNntg.b['24'][0]++,e.type==='mousewheel')||(__cov__p7gLH_Q__z9XCzezdNntg.b['24'][1]++,e.type==='DOMMouseScroll')){__cov__p7gLH_Q__z9XCzezdNntg.b['23'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['86']++;return e.detail?(__cov__p7gLH_Q__z9XCzezdNntg.b['25'][0]++,e.detail*-1):(__cov__p7gLH_Q__z9XCzezdNntg.b['25'][1]++,(__cov__p7gLH_Q__z9XCzezdNntg.b['26'][0]++,Math.round(e.wheelDelta/80))||(__cov__p7gLH_Q__z9XCzezdNntg.b['26'][1]++,e.wheelDelta<0?(__cov__p7gLH_Q__z9XCzezdNntg.b['27'][0]++,-1):(__cov__p7gLH_Q__z9XCzezdNntg.b['27'][1]++,1)));}else{__cov__p7gLH_Q__z9XCzezdNntg.b['23'][1]++;}},pageX:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['18']++;__cov__p7gLH_Q__z9XCzezdNntg.s['87']++;var e=this._event,val=e.pageX,doc,bodyScroll,docScroll;__cov__p7gLH_Q__z9XCzezdNntg.s['88']++;if(val===undefined){__cov__p7gLH_Q__z9XCzezdNntg.b['28'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['89']++;doc=Y.config.doc;__cov__p7gLH_Q__z9XCzezdNntg.s['90']++;bodyScroll=(__cov__p7gLH_Q__z9XCzezdNntg.b['29'][0]++,doc.body)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['29'][1]++,doc.body.scrollLeft);__cov__p7gLH_Q__z9XCzezdNntg.s['91']++;docScroll=doc.documentElement.scrollLeft;__cov__p7gLH_Q__z9XCzezdNntg.s['92']++;val=e.clientX+((__cov__p7gLH_Q__z9XCzezdNntg.b['30'][0]++,docScroll)||(__cov__p7gLH_Q__z9XCzezdNntg.b['30'][1]++,bodyScroll)||(__cov__p7gLH_Q__z9XCzezdNntg.b['30'][2]++,0));}else{__cov__p7gLH_Q__z9XCzezdNntg.b['28'][1]++;}__cov__p7gLH_Q__z9XCzezdNntg.s['93']++;return val;},pageY:function(){__cov__p7gLH_Q__z9XCzezdNntg.f['19']++;__cov__p7gLH_Q__z9XCzezdNntg.s['94']++;var e=this._event,val=e.pageY,doc,bodyScroll,docScroll;__cov__p7gLH_Q__z9XCzezdNntg.s['95']++;if(val===undefined){__cov__p7gLH_Q__z9XCzezdNntg.b['31'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['96']++;doc=Y.config.doc;__cov__p7gLH_Q__z9XCzezdNntg.s['97']++;bodyScroll=(__cov__p7gLH_Q__z9XCzezdNntg.b['32'][0]++,doc.body)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['32'][1]++,doc.body.scrollTop);__cov__p7gLH_Q__z9XCzezdNntg.s['98']++;docScroll=doc.documentElement.scrollTop;__cov__p7gLH_Q__z9XCzezdNntg.s['99']++;val=e.clientY+((__cov__p7gLH_Q__z9XCzezdNntg.b['33'][0]++,docScroll)||(__cov__p7gLH_Q__z9XCzezdNntg.b['33'][1]++,bodyScroll)||(__cov__p7gLH_Q__z9XCzezdNntg.b['33'][2]++,0));}else{__cov__p7gLH_Q__z9XCzezdNntg.b['31'][1]++;}__cov__p7gLH_Q__z9XCzezdNntg.s['100']++;return val;}};__cov__p7gLH_Q__z9XCzezdNntg.s['101']++;IELazyFacade._define=function(o,prop,valueFn){__cov__p7gLH_Q__z9XCzezdNntg.f['20']++;__cov__p7gLH_Q__z9XCzezdNntg.s['102']++;function val(v){__cov__p7gLH_Q__z9XCzezdNntg.f['21']++;__cov__p7gLH_Q__z9XCzezdNntg.s['103']++;var ret=arguments.length?(__cov__p7gLH_Q__z9XCzezdNntg.b['34'][0]++,v):(__cov__p7gLH_Q__z9XCzezdNntg.b['34'][1]++,valueFn.call(this));__cov__p7gLH_Q__z9XCzezdNntg.s['104']++;delete o[prop];__cov__p7gLH_Q__z9XCzezdNntg.s['105']++;Object.defineProperty(o,prop,{value:ret,configurable:true,writable:true});__cov__p7gLH_Q__z9XCzezdNntg.s['106']++;return ret;}__cov__p7gLH_Q__z9XCzezdNntg.s['107']++;Object.defineProperty(o,prop,{get:val,set:val,configurable:true});};__cov__p7gLH_Q__z9XCzezdNntg.s['108']++;if((__cov__p7gLH_Q__z9XCzezdNntg.b['36'][0]++,imp)&&(__cov__p7gLH_Q__z9XCzezdNntg.b['36'][1]++,!imp.hasFeature('Events','2.0'))){__cov__p7gLH_Q__z9XCzezdNntg.b['35'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['109']++;if(useLazyFacade){__cov__p7gLH_Q__z9XCzezdNntg.b['37'][0]++;__cov__p7gLH_Q__z9XCzezdNntg.s['110']++;try{__cov__p7gLH_Q__z9XCzezdNntg.s['111']++;Object.defineProperty(Y.config.doc.createEventObject(),'z',{});}catch(e){__cov__p7gLH_Q__z9XCzezdNntg.s['112']++;useLazyFacade=false;}}else{__cov__p7gLH_Q__z9XCzezdNntg.b['37'][1]++;}__cov__p7gLH_Q__z9XCzezdNntg.s['113']++;Y.DOMEventFacade=useLazyFacade?(__cov__p7gLH_Q__z9XCzezdNntg.b['38'][0]++,IELazyFacade):(__cov__p7gLH_Q__z9XCzezdNntg.b['38'][1]++,IEEventFacade);}else{__cov__p7gLH_Q__z9XCzezdNntg.b['35'][1]++;}},'3.15.0',{'requires':['node-base']});
iamJoeTaylor/cdnjs
ajax/libs/yui/3.15.0/event-base-ie/event-base-ie-coverage.js
JavaScript
mit
42,941
/** * Copyright <%= year %> Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define([],e)}(function(){return function(e){var t=e.kendo||(e.kendo={cultures:{}});t.cultures["kok-IN"]={name:"kok-IN",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3,2],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3,2],symbol:"%"},currency:{pattern:["$ -n","$ n"],decimals:2,",":",",".":".",groupSize:[3,2],symbol:"रु"}},calendars:{standard:{days:{names:["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],namesAbbr:["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],namesShort:["आ","स","म","ब","ब","स","श"]},months:{names:["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""],namesAbbr:["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""]},AM:["म.पू.","म.पू.","म.पू."],PM:["म.नं.","म.नं.","म.नं."],patterns:{d:"dd-MM-yyyy",D:"dd MMMM yyyy",F:"dd MMMM yyyy HH:mm:ss",g:"dd-MM-yyyy HH:mm",G:"dd-MM-yyyy HH:mm:ss",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"-",":":":",firstDay:1}}}}(this),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
djavaui/cdnjs
ajax/libs/kendo-ui-core/2014.1.416/js/cultures/kendo.culture.kok-IN.min.js
JavaScript
mit
2,365
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/graphics-vml/graphics-vml.js']) { __coverage__['build/graphics-vml/graphics-vml.js'] = {"path":"build/graphics-vml/graphics-vml.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0,"296":0,"297":0,"298":0,"299":0,"300":0,"301":0,"302":0,"303":0,"304":0,"305":0,"306":0,"307":0,"308":0,"309":0,"310":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"318":0,"319":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"341":0,"342":0,"343":0,"344":0,"345":0,"346":0,"347":0,"348":0,"349":0,"350":0,"351":0,"352":0,"353":0,"354":0,"355":0,"356":0,"357":0,"358":0,"359":0,"360":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"367":0,"368":0,"369":0,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"382":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":0,"417":0,"418":0,"419":0,"420":0,"421":0,"422":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"430":0,"431":0,"432":0,"433":0,"434":0,"435":0,"436":0,"437":0,"438":0,"439":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"471":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":0,"498":0,"499":0,"500":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"511":0,"512":0,"513":0,"514":0,"515":0,"516":0,"517":0,"518":0,"519":0,"520":0,"521":0,"522":0,"523":0,"524":0,"525":0,"526":0,"527":0,"528":0,"529":0,"530":0,"531":0,"532":0,"533":0,"534":0,"535":0,"536":0,"537":0,"538":0,"539":0,"540":0,"541":0,"542":0,"543":0,"544":0,"545":0,"546":0,"547":0,"548":0,"549":0,"550":0,"551":0,"552":0,"553":0,"554":0,"555":0,"556":0,"557":0,"558":0,"559":0,"560":0,"561":0,"562":0,"563":0,"564":0,"565":0,"566":0,"567":0,"568":0,"569":0,"570":0,"571":0,"572":0,"573":0,"574":0,"575":0,"576":0,"577":0,"578":0,"579":0,"580":0,"581":0,"582":0,"583":0,"584":0,"585":0,"586":0,"587":0,"588":0,"589":0,"590":0,"591":0,"592":0,"593":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"600":0,"601":0,"602":0,"603":0,"604":0,"605":0,"606":0,"607":0,"608":0,"609":0,"610":0,"611":0,"612":0,"613":0,"614":0,"615":0,"616":0,"617":0,"618":0,"619":0,"620":0,"621":0,"622":0,"623":0,"624":0,"625":0,"626":0,"627":0,"628":0,"629":0,"630":0,"631":0,"632":0,"633":0,"634":0,"635":0,"636":0,"637":0,"638":0,"639":0,"640":0,"641":0,"642":0,"643":0,"644":0,"645":0,"646":0,"647":0,"648":0,"649":0,"650":0,"651":0,"652":0,"653":0,"654":0,"655":0,"656":0,"657":0,"658":0,"659":0,"660":0,"661":0,"662":0,"663":0,"664":0,"665":0,"666":0,"667":0,"668":0,"669":0,"670":0,"671":0,"672":0,"673":0,"674":0,"675":0,"676":0,"677":0,"678":0,"679":0,"680":0,"681":0,"682":0,"683":0,"684":0,"685":0,"686":0,"687":0,"688":0,"689":0,"690":0,"691":0,"692":0,"693":0,"694":0,"695":0,"696":0,"697":0,"698":0,"699":0,"700":0,"701":0,"702":0,"703":0,"704":0,"705":0,"706":0,"707":0,"708":0,"709":0,"710":0,"711":0,"712":0,"713":0,"714":0,"715":0,"716":0,"717":0,"718":0,"719":0,"720":0,"721":0,"722":0,"723":0,"724":0,"725":0,"726":0,"727":0,"728":0,"729":0,"730":0,"731":0,"732":0,"733":0,"734":0,"735":0,"736":0,"737":0,"738":0,"739":0,"740":0,"741":0,"742":0,"743":0,"744":0,"745":0,"746":0,"747":0,"748":0,"749":0,"750":0,"751":0,"752":0,"753":0,"754":0,"755":0,"756":0,"757":0,"758":0,"759":0,"760":0,"761":0,"762":0,"763":0,"764":0,"765":0,"766":0,"767":0,"768":0,"769":0,"770":0,"771":0,"772":0,"773":0,"774":0,"775":0,"776":0,"777":0,"778":0,"779":0,"780":0,"781":0,"782":0,"783":0,"784":0,"785":0,"786":0,"787":0,"788":0,"789":0,"790":0,"791":0,"792":0,"793":0,"794":0,"795":0,"796":0,"797":0,"798":0,"799":0,"800":0,"801":0,"802":0,"803":0,"804":0,"805":0,"806":0,"807":0,"808":0,"809":0,"810":0,"811":0,"812":0,"813":0,"814":0,"815":0,"816":0,"817":0,"818":0,"819":0,"820":0,"821":0,"822":0,"823":0,"824":0,"825":0,"826":0,"827":0,"828":0,"829":0,"830":0,"831":0,"832":0,"833":0,"834":0,"835":0,"836":0,"837":0,"838":0,"839":0,"840":0,"841":0,"842":0,"843":0,"844":0,"845":0,"846":0,"847":0,"848":0,"849":0,"850":0,"851":0,"852":0,"853":0,"854":0,"855":0,"856":0,"857":0,"858":0,"859":0,"860":0,"861":0,"862":0,"863":0,"864":0,"865":0,"866":0,"867":0,"868":0,"869":0,"870":0,"871":0,"872":0,"873":0,"874":0,"875":0,"876":0,"877":0,"878":0,"879":0,"880":0,"881":0,"882":0,"883":0,"884":0,"885":0,"886":0,"887":0,"888":0,"889":0,"890":0,"891":0,"892":0,"893":0,"894":0,"895":0,"896":0,"897":0,"898":0,"899":0,"900":0,"901":0,"902":0,"903":0,"904":0,"905":0,"906":0,"907":0,"908":0,"909":0,"910":0,"911":0,"912":0,"913":0,"914":0,"915":0,"916":0,"917":0,"918":0,"919":0,"920":0,"921":0,"922":0,"923":0,"924":0,"925":0,"926":0,"927":0,"928":0,"929":0,"930":0,"931":0,"932":0,"933":0,"934":0,"935":0,"936":0,"937":0,"938":0,"939":0,"940":0,"941":0,"942":0,"943":0,"944":0,"945":0,"946":0,"947":0,"948":0,"949":0,"950":0,"951":0,"952":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0],"85":[0,0],"86":[0,0],"87":[0,0],"88":[0,0],"89":[0,0],"90":[0,0],"91":[0,0],"92":[0,0],"93":[0,0],"94":[0,0],"95":[0,0],"96":[0,0],"97":[0,0],"98":[0,0],"99":[0,0],"100":[0,0],"101":[0,0],"102":[0,0],"103":[0,0],"104":[0,0],"105":[0,0],"106":[0,0],"107":[0,0],"108":[0,0],"109":[0,0],"110":[0,0],"111":[0,0],"112":[0,0],"113":[0,0],"114":[0,0],"115":[0,0],"116":[0,0],"117":[0,0],"118":[0,0],"119":[0,0],"120":[0,0],"121":[0,0],"122":[0,0],"123":[0,0],"124":[0,0],"125":[0,0],"126":[0,0],"127":[0,0],"128":[0,0],"129":[0,0],"130":[0,0],"131":[0,0],"132":[0,0],"133":[0,0],"134":[0,0],"135":[0,0],"136":[0,0],"137":[0,0],"138":[0,0],"139":[0,0],"140":[0,0],"141":[0,0],"142":[0,0],"143":[0,0],"144":[0,0],"145":[0,0],"146":[0,0],"147":[0,0],"148":[0,0],"149":[0,0],"150":[0,0],"151":[0,0],"152":[0,0],"153":[0,0],"154":[0,0],"155":[0,0],"156":[0,0],"157":[0,0],"158":[0,0],"159":[0,0],"160":[0,0],"161":[0,0],"162":[0,0],"163":[0,0],"164":[0,0],"165":[0,0],"166":[0,0],"167":[0,0],"168":[0,0],"169":[0,0],"170":[0,0],"171":[0,0],"172":[0,0],"173":[0,0],"174":[0,0],"175":[0,0],"176":[0,0],"177":[0,0],"178":[0,0],"179":[0,0],"180":[0,0],"181":[0,0],"182":[0,0],"183":[0,0],"184":[0,0],"185":[0,0],"186":[0,0],"187":[0,0],"188":[0,0],"189":[0,0],"190":[0,0],"191":[0,0],"192":[0,0],"193":[0,0],"194":[0,0],"195":[0,0],"196":[0,0],"197":[0,0],"198":[0,0],"199":[0,0],"200":[0,0],"201":[0,0],"202":[0,0],"203":[0,0],"204":[0,0],"205":[0,0],"206":[0,0],"207":[0,0],"208":[0,0],"209":[0,0],"210":[0,0],"211":[0,0],"212":[0,0],"213":[0,0],"214":[0,0],"215":[0,0],"216":[0,0],"217":[0,0],"218":[0,0],"219":[0,0],"220":[0,0],"221":[0,0,0],"222":[0,0],"223":[0,0],"224":[0,0],"225":[0,0],"226":[0,0],"227":[0,0],"228":[0,0],"229":[0,0],"230":[0,0],"231":[0,0],"232":[0,0],"233":[0,0],"234":[0,0],"235":[0,0],"236":[0,0],"237":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"VMLDrawing","line":23,"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":22}}},"3":{"name":"(anonymous_3)","line":73,"loc":{"start":{"line":73,"column":11},"end":{"line":74,"column":4}}},"4":{"name":"(anonymous_4)","line":85,"loc":{"start":{"line":85,"column":16},"end":{"line":86,"column":4}}},"5":{"name":"(anonymous_5)","line":126,"loc":{"start":{"line":126,"column":13},"end":{"line":126,"column":24}}},"6":{"name":"(anonymous_6)","line":143,"loc":{"start":{"line":143,"column":21},"end":{"line":143,"column":32}}},"7":{"name":"(anonymous_7)","line":156,"loc":{"start":{"line":156,"column":14},"end":{"line":156,"column":39}}},"8":{"name":"(anonymous_8)","line":232,"loc":{"start":{"line":232,"column":22},"end":{"line":232,"column":33}}},"9":{"name":"(anonymous_9)","line":247,"loc":{"start":{"line":247,"column":30},"end":{"line":247,"column":41}}},"10":{"name":"(anonymous_10)","line":260,"loc":{"start":{"line":260,"column":23},"end":{"line":260,"column":48}}},"11":{"name":"(anonymous_11)","line":306,"loc":{"start":{"line":306,"column":14},"end":{"line":306,"column":35}}},"12":{"name":"(anonymous_12)","line":329,"loc":{"start":{"line":329,"column":19},"end":{"line":329,"column":48}}},"13":{"name":"(anonymous_13)","line":352,"loc":{"start":{"line":352,"column":13},"end":{"line":352,"column":36}}},"14":{"name":"(anonymous_14)","line":389,"loc":{"start":{"line":389,"column":14},"end":{"line":389,"column":35}}},"15":{"name":"(anonymous_15)","line":428,"loc":{"start":{"line":428,"column":17},"end":{"line":429,"column":4}}},"16":{"name":"(anonymous_16)","line":453,"loc":{"start":{"line":453,"column":15},"end":{"line":454,"column":4}}},"17":{"name":"(anonymous_17)","line":493,"loc":{"start":{"line":493,"column":12},"end":{"line":494,"column":4}}},"18":{"name":"(anonymous_18)","line":507,"loc":{"start":{"line":507,"column":20},"end":{"line":508,"column":4}}},"19":{"name":"(anonymous_19)","line":521,"loc":{"start":{"line":521,"column":13},"end":{"line":521,"column":38}}},"20":{"name":"(anonymous_20)","line":569,"loc":{"start":{"line":569,"column":12},"end":{"line":570,"column":4}}},"21":{"name":"(anonymous_21)","line":583,"loc":{"start":{"line":583,"column":20},"end":{"line":584,"column":4}}},"22":{"name":"(anonymous_22)","line":597,"loc":{"start":{"line":597,"column":13},"end":{"line":597,"column":38}}},"23":{"name":"(anonymous_23)","line":617,"loc":{"start":{"line":617,"column":16},"end":{"line":618,"column":4}}},"24":{"name":"(anonymous_24)","line":663,"loc":{"start":{"line":663,"column":9},"end":{"line":664,"column":4}}},"25":{"name":"(anonymous_25)","line":675,"loc":{"start":{"line":675,"column":15},"end":{"line":676,"column":4}}},"26":{"name":"(anonymous_26)","line":687,"loc":{"start":{"line":687,"column":11},"end":{"line":688,"column":4}}},"27":{"name":"(anonymous_27)","line":709,"loc":{"start":{"line":709,"column":19},"end":{"line":709,"column":39}}},"28":{"name":"(anonymous_28)","line":737,"loc":{"start":{"line":737,"column":26},"end":{"line":738,"column":4}}},"29":{"name":"(anonymous_29)","line":771,"loc":{"start":{"line":771,"column":16},"end":{"line":771,"column":31}}},"30":{"name":"(anonymous_30)","line":815,"loc":{"start":{"line":815,"column":11},"end":{"line":816,"column":0}}},"31":{"name":"(anonymous_31)","line":842,"loc":{"start":{"line":842,"column":7},"end":{"line":843,"column":1}}},"32":{"name":"(anonymous_32)","line":853,"loc":{"start":{"line":853,"column":14},"end":{"line":854,"column":1}}},"33":{"name":"(anonymous_33)","line":879,"loc":{"start":{"line":879,"column":17},"end":{"line":880,"column":4}}},"34":{"name":"(anonymous_34)","line":903,"loc":{"start":{"line":903,"column":26},"end":{"line":904,"column":4}}},"35":{"name":"(anonymous_35)","line":922,"loc":{"start":{"line":922,"column":13},"end":{"line":923,"column":1}}},"36":{"name":"(anonymous_36)","line":1047,"loc":{"start":{"line":1047,"column":11},"end":{"line":1048,"column":1}}},"37":{"name":"(anonymous_37)","line":1059,"loc":{"start":{"line":1059,"column":14},"end":{"line":1060,"column":1}}},"38":{"name":"(anonymous_38)","line":1071,"loc":{"start":{"line":1071,"column":8},"end":{"line":1072,"column":1}}},"39":{"name":"(anonymous_39)","line":1087,"loc":{"start":{"line":1087,"column":8},"end":{"line":1088,"column":1}}},"40":{"name":"(anonymous_40)","line":1102,"loc":{"start":{"line":1102,"column":11},"end":{"line":1103,"column":1}}},"41":{"name":"(anonymous_41)","line":1115,"loc":{"start":{"line":1115,"column":12},"end":{"line":1115,"column":30}}},"42":{"name":"(anonymous_42)","line":1127,"loc":{"start":{"line":1127,"column":7},"end":{"line":1128,"column":1}}},"43":{"name":"(anonymous_43)","line":1140,"loc":{"start":{"line":1140,"column":21},"end":{"line":1141,"column":4}}},"44":{"name":"(anonymous_44)","line":1205,"loc":{"start":{"line":1205,"column":23},"end":{"line":1206,"column":1}}},"45":{"name":"(anonymous_45)","line":1289,"loc":{"start":{"line":1289,"column":16},"end":{"line":1290,"column":1}}},"46":{"name":"(anonymous_46)","line":1349,"loc":{"start":{"line":1349,"column":21},"end":{"line":1350,"column":1}}},"47":{"name":"(anonymous_47)","line":1442,"loc":{"start":{"line":1442,"column":21},"end":{"line":1443,"column":1}}},"48":{"name":"(anonymous_48)","line":1459,"loc":{"start":{"line":1459,"column":19},"end":{"line":1460,"column":1}}},"49":{"name":"(anonymous_49)","line":1542,"loc":{"start":{"line":1542,"column":16},"end":{"line":1543,"column":1}}},"50":{"name":"(anonymous_50)","line":1560,"loc":{"start":{"line":1560,"column":19},"end":{"line":1561,"column":1}}},"51":{"name":"(anonymous_51)","line":1647,"loc":{"start":{"line":1647,"column":25},"end":{"line":1648,"column":4}}},"52":{"name":"(anonymous_52)","line":1689,"loc":{"start":{"line":1689,"column":12},"end":{"line":1690,"column":1}}},"53":{"name":"(anonymous_53)","line":1703,"loc":{"start":{"line":1703,"column":13},"end":{"line":1704,"column":4}}},"54":{"name":"(anonymous_54)","line":1716,"loc":{"start":{"line":1716,"column":13},"end":{"line":1717,"column":4}}},"55":{"name":"(anonymous_55)","line":1729,"loc":{"start":{"line":1729,"column":10},"end":{"line":1730,"column":4}}},"56":{"name":"(anonymous_56)","line":1740,"loc":{"start":{"line":1740,"column":12},"end":{"line":1741,"column":5}}},"57":{"name":"(anonymous_57)","line":1751,"loc":{"start":{"line":1751,"column":12},"end":{"line":1752,"column":5}}},"58":{"name":"(anonymous_58)","line":1762,"loc":{"start":{"line":1762,"column":13},"end":{"line":1763,"column":5}}},"59":{"name":"(anonymous_59)","line":1773,"loc":{"start":{"line":1773,"column":11},"end":{"line":1774,"column":4}}},"60":{"name":"(anonymous_60)","line":1787,"loc":{"start":{"line":1787,"column":5},"end":{"line":1788,"column":1}}},"61":{"name":"(anonymous_61)","line":1802,"loc":{"start":{"line":1802,"column":8},"end":{"line":1803,"column":1}}},"62":{"name":"(anonymous_62)","line":1812,"loc":{"start":{"line":1812,"column":17},"end":{"line":1813,"column":1}}},"63":{"name":"(anonymous_63)","line":1832,"loc":{"start":{"line":1832,"column":21},"end":{"line":1833,"column":1}}},"64":{"name":"(anonymous_64)","line":1851,"loc":{"start":{"line":1851,"column":18},"end":{"line":1851,"column":29}}},"65":{"name":"(anonymous_65)","line":1870,"loc":{"start":{"line":1870,"column":20},"end":{"line":1871,"column":1}}},"66":{"name":"(anonymous_66)","line":1889,"loc":{"start":{"line":1889,"column":6},"end":{"line":1890,"column":1}}},"67":{"name":"(anonymous_67)","line":1908,"loc":{"start":{"line":1908,"column":12},"end":{"line":1909,"column":1}}},"68":{"name":"(anonymous_68)","line":1935,"loc":{"start":{"line":1935,"column":21},"end":{"line":1936,"column":4}}},"69":{"name":"(anonymous_69)","line":1978,"loc":{"start":{"line":1978,"column":13},"end":{"line":1979,"column":4}}},"70":{"name":"(anonymous_70)","line":1992,"loc":{"start":{"line":1992,"column":12},"end":{"line":1993,"column":4}}},"71":{"name":"(anonymous_71)","line":2008,"loc":{"start":{"line":2008,"column":20},"end":{"line":2009,"column":4}}},"72":{"name":"(anonymous_72)","line":2049,"loc":{"start":{"line":2049,"column":13},"end":{"line":2050,"column":4}}},"73":{"name":"(anonymous_73)","line":2068,"loc":{"start":{"line":2068,"column":14},"end":{"line":2069,"column":4}}},"74":{"name":"(anonymous_74)","line":2101,"loc":{"start":{"line":2101,"column":11},"end":{"line":2102,"column":2}}},"75":{"name":"(anonymous_75)","line":2138,"loc":{"start":{"line":2138,"column":10},"end":{"line":2139,"column":2}}},"76":{"name":"(anonymous_76)","line":2155,"loc":{"start":{"line":2155,"column":16},"end":{"line":2156,"column":8}}},"77":{"name":"(anonymous_77)","line":2188,"loc":{"start":{"line":2188,"column":11},"end":{"line":2189,"column":2}}},"78":{"name":"(anonymous_78)","line":2193,"loc":{"start":{"line":2193,"column":10},"end":{"line":2194,"column":2}}},"79":{"name":"(anonymous_79)","line":2229,"loc":{"start":{"line":2229,"column":10},"end":{"line":2229,"column":23}}},"80":{"name":"(anonymous_80)","line":2292,"loc":{"start":{"line":2292,"column":10},"end":{"line":2293,"column":2}}},"81":{"name":"(anonymous_81)","line":2365,"loc":{"start":{"line":2365,"column":10},"end":{"line":2366,"column":2}}},"82":{"name":"(anonymous_82)","line":2425,"loc":{"start":{"line":2425,"column":10},"end":{"line":2426,"column":2}}},"83":{"name":"(anonymous_83)","line":2441,"loc":{"start":{"line":2441,"column":16},"end":{"line":2442,"column":8}}},"84":{"name":"(anonymous_84)","line":2460,"loc":{"start":{"line":2460,"column":10},"end":{"line":2461,"column":2}}},"85":{"name":"(anonymous_85)","line":2477,"loc":{"start":{"line":2477,"column":10},"end":{"line":2478,"column":0}}},"86":{"name":"(anonymous_86)","line":2492,"loc":{"start":{"line":2492,"column":10},"end":{"line":2493,"column":2}}},"87":{"name":"(anonymous_87)","line":2506,"loc":{"start":{"line":2506,"column":10},"end":{"line":2507,"column":2}}},"88":{"name":"(anonymous_88)","line":2522,"loc":{"start":{"line":2522,"column":10},"end":{"line":2523,"column":2}}},"89":{"name":"(anonymous_89)","line":2539,"loc":{"start":{"line":2539,"column":10},"end":{"line":2540,"column":0}}},"90":{"name":"(anonymous_90)","line":2566,"loc":{"start":{"line":2566,"column":13},"end":{"line":2567,"column":0}}},"91":{"name":"(anonymous_91)","line":2593,"loc":{"start":{"line":2593,"column":10},"end":{"line":2594,"column":2}}},"92":{"name":"(anonymous_92)","line":2600,"loc":{"start":{"line":2600,"column":10},"end":{"line":2601,"column":2}}},"93":{"name":"(anonymous_93)","line":2618,"loc":{"start":{"line":2618,"column":10},"end":{"line":2619,"column":2}}},"94":{"name":"(anonymous_94)","line":2625,"loc":{"start":{"line":2625,"column":10},"end":{"line":2626,"column":2}}},"95":{"name":"(anonymous_95)","line":2644,"loc":{"start":{"line":2644,"column":12},"end":{"line":2645,"column":0}}},"96":{"name":"(anonymous_96)","line":2682,"loc":{"start":{"line":2682,"column":16},"end":{"line":2683,"column":8}}},"97":{"name":"(anonymous_97)","line":2688,"loc":{"start":{"line":2688,"column":10},"end":{"line":2689,"column":2}}},"98":{"name":"(anonymous_98)","line":2703,"loc":{"start":{"line":2703,"column":16},"end":{"line":2704,"column":8}}},"99":{"name":"(anonymous_99)","line":2709,"loc":{"start":{"line":2709,"column":10},"end":{"line":2710,"column":2}}},"100":{"name":"(anonymous_100)","line":2725,"loc":{"start":{"line":2725,"column":14},"end":{"line":2726,"column":0}}},"101":{"name":"(anonymous_101)","line":2746,"loc":{"start":{"line":2746,"column":8},"end":{"line":2747,"column":1}}},"102":{"name":"(anonymous_102)","line":2807,"loc":{"start":{"line":2807,"column":13},"end":{"line":2807,"column":24}}},"103":{"name":"(anonymous_103)","line":2830,"loc":{"start":{"line":2830,"column":11},"end":{"line":2831,"column":2}}},"104":{"name":"(anonymous_104)","line":2835,"loc":{"start":{"line":2835,"column":10},"end":{"line":2836,"column":2}}},"105":{"name":"(anonymous_105)","line":2856,"loc":{"start":{"line":2856,"column":16},"end":{"line":2857,"column":8}}},"106":{"name":"(anonymous_106)","line":2871,"loc":{"start":{"line":2871,"column":16},"end":{"line":2872,"column":8}}},"107":{"name":"(anonymous_107)","line":2886,"loc":{"start":{"line":2886,"column":16},"end":{"line":2887,"column":8}}},"108":{"name":"(anonymous_108)","line":2899,"loc":{"start":{"line":2899,"column":16},"end":{"line":2900,"column":8}}},"109":{"name":"(anonymous_109)","line":2916,"loc":{"start":{"line":2916,"column":16},"end":{"line":2917,"column":8}}},"110":{"name":"(anonymous_110)","line":2993,"loc":{"start":{"line":2993,"column":16},"end":{"line":2994,"column":8}}},"111":{"name":"(anonymous_111)","line":2998,"loc":{"start":{"line":2998,"column":16},"end":{"line":2999,"column":8}}},"112":{"name":"(anonymous_112)","line":3016,"loc":{"start":{"line":3016,"column":16},"end":{"line":3017,"column":8}}},"113":{"name":"(anonymous_113)","line":3021,"loc":{"start":{"line":3021,"column":16},"end":{"line":3022,"column":8}}},"114":{"name":"(anonymous_114)","line":3048,"loc":{"start":{"line":3048,"column":16},"end":{"line":3049,"column":8}}},"115":{"name":"(anonymous_115)","line":3066,"loc":{"start":{"line":3066,"column":6},"end":{"line":3067,"column":1}}},"116":{"name":"(anonymous_116)","line":3127,"loc":{"start":{"line":3127,"column":11},"end":{"line":3128,"column":4}}},"117":{"name":"(anonymous_117)","line":3152,"loc":{"start":{"line":3152,"column":17},"end":{"line":3152,"column":28}}},"118":{"name":"(anonymous_118)","line":3179,"loc":{"start":{"line":3179,"column":12},"end":{"line":3179,"column":29}}},"119":{"name":"(anonymous_119)","line":3206,"loc":{"start":{"line":3206,"column":13},"end":{"line":3207,"column":4}}},"120":{"name":"(anonymous_120)","line":3227,"loc":{"start":{"line":3227,"column":14},"end":{"line":3228,"column":4}}},"121":{"name":"(anonymous_121)","line":3248,"loc":{"start":{"line":3248,"column":18},"end":{"line":3249,"column":4}}},"122":{"name":"(anonymous_122)","line":3268,"loc":{"start":{"line":3268,"column":17},"end":{"line":3269,"column":4}}},"123":{"name":"(anonymous_123)","line":3294,"loc":{"start":{"line":3294,"column":21},"end":{"line":3295,"column":4}}},"124":{"name":"(anonymous_124)","line":3315,"loc":{"start":{"line":3315,"column":21},"end":{"line":3316,"column":4}}},"125":{"name":"(anonymous_125)","line":3334,"loc":{"start":{"line":3334,"column":11},"end":{"line":3334,"column":22}}},"126":{"name":"(anonymous_126)","line":3346,"loc":{"start":{"line":3346,"column":20},"end":{"line":3347,"column":4}}},"127":{"name":"(anonymous_127)","line":3378,"loc":{"start":{"line":3378,"column":13},"end":{"line":3378,"column":28}}},"128":{"name":"(anonymous_128)","line":3392,"loc":{"start":{"line":3392,"column":17},"end":{"line":3393,"column":4}}},"129":{"name":"(anonymous_129)","line":3406,"loc":{"start":{"line":3406,"column":20},"end":{"line":3406,"column":31}}},"130":{"name":"(anonymous_130)","line":3424,"loc":{"start":{"line":3424,"column":24},"end":{"line":3425,"column":4}}},"131":{"name":"(anonymous_131)","line":3443,"loc":{"start":{"line":3443,"column":18},"end":{"line":3444,"column":4}}},"132":{"name":"(anonymous_132)","line":3456,"loc":{"start":{"line":3456,"column":20},"end":{"line":3457,"column":4}}},"133":{"name":"(anonymous_133)","line":3487,"loc":{"start":{"line":3487,"column":11},"end":{"line":3488,"column":4}}},"134":{"name":"(anonymous_134)","line":3502,"loc":{"start":{"line":3502,"column":17},"end":{"line":3503,"column":4}}},"135":{"name":"(anonymous_135)","line":3518,"loc":{"start":{"line":3518,"column":22},"end":{"line":3519,"column":4}}},"136":{"name":"(anonymous_136)","line":3547,"loc":{"start":{"line":3547,"column":13},"end":{"line":3548,"column":4}}},"137":{"name":"(anonymous_137)","line":3648,"loc":{"start":{"line":3648,"column":27},"end":{"line":3649,"column":4}}},"138":{"name":"(anonymous_138)","line":3673,"loc":{"start":{"line":3673,"column":30},"end":{"line":3674,"column":4}}},"139":{"name":"(anonymous_139)","line":3707,"loc":{"start":{"line":3707,"column":14},"end":{"line":3708,"column":4}}},"140":{"name":"(anonymous_140)","line":3727,"loc":{"start":{"line":3727,"column":13},"end":{"line":3728,"column":4}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3753,"column":41}},"2":{"start":{"line":3,"column":0},"end":{"line":21,"column":52}},"3":{"start":{"line":23,"column":0},"end":{"line":23,"column":24}},"4":{"start":{"line":35,"column":0},"end":{"line":802,"column":2}},"5":{"start":{"line":75,"column":8},"end":{"line":75,"column":60}},"6":{"start":{"line":87,"column":8},"end":{"line":87,"column":38}},"7":{"start":{"line":88,"column":8},"end":{"line":92,"column":9}},"8":{"start":{"line":90,"column":12},"end":{"line":90,"column":41}},"9":{"start":{"line":91,"column":12},"end":{"line":91,"column":34}},"10":{"start":{"line":93,"column":8},"end":{"line":93,"column":26}},"11":{"start":{"line":127,"column":8},"end":{"line":127,"column":63}},"12":{"start":{"line":128,"column":8},"end":{"line":128,"column":20}},"13":{"start":{"line":144,"column":8},"end":{"line":144,"column":62}},"14":{"start":{"line":145,"column":8},"end":{"line":145,"column":20}},"15":{"start":{"line":157,"column":8},"end":{"line":175,"column":66}},"16":{"start":{"line":176,"column":8},"end":{"line":176,"column":30}},"17":{"start":{"line":177,"column":8},"end":{"line":177,"column":23}},"18":{"start":{"line":178,"column":8},"end":{"line":218,"column":9}},"19":{"start":{"line":180,"column":12},"end":{"line":180,"column":39}},"20":{"start":{"line":181,"column":12},"end":{"line":181,"column":43}},"21":{"start":{"line":182,"column":12},"end":{"line":182,"column":43}},"22":{"start":{"line":183,"column":12},"end":{"line":183,"column":43}},"23":{"start":{"line":184,"column":12},"end":{"line":184,"column":40}},"24":{"start":{"line":185,"column":12},"end":{"line":185,"column":40}},"25":{"start":{"line":186,"column":12},"end":{"line":189,"column":13}},"26":{"start":{"line":188,"column":16},"end":{"line":188,"column":35}},"27":{"start":{"line":190,"column":12},"end":{"line":201,"column":35}},"28":{"start":{"line":202,"column":12},"end":{"line":202,"column":36}},"29":{"start":{"line":203,"column":12},"end":{"line":203,"column":36}},"30":{"start":{"line":204,"column":12},"end":{"line":204,"column":36}},"31":{"start":{"line":205,"column":12},"end":{"line":205,"column":36}},"32":{"start":{"line":206,"column":12},"end":{"line":206,"column":30}},"33":{"start":{"line":207,"column":12},"end":{"line":207,"column":30}},"34":{"start":{"line":208,"column":12},"end":{"line":208,"column":54}},"35":{"start":{"line":209,"column":12},"end":{"line":209,"column":55}},"36":{"start":{"line":210,"column":12},"end":{"line":210,"column":53}},"37":{"start":{"line":211,"column":12},"end":{"line":211,"column":52}},"38":{"start":{"line":212,"column":12},"end":{"line":212,"column":39}},"39":{"start":{"line":213,"column":12},"end":{"line":213,"column":39}},"40":{"start":{"line":214,"column":12},"end":{"line":214,"column":90}},"41":{"start":{"line":215,"column":12},"end":{"line":215,"column":49}},"42":{"start":{"line":216,"column":12},"end":{"line":216,"column":31}},"43":{"start":{"line":217,"column":12},"end":{"line":217,"column":31}},"44":{"start":{"line":219,"column":8},"end":{"line":219,"column":30}},"45":{"start":{"line":233,"column":8},"end":{"line":233,"column":72}},"46":{"start":{"line":234,"column":8},"end":{"line":234,"column":20}},"47":{"start":{"line":248,"column":8},"end":{"line":248,"column":71}},"48":{"start":{"line":249,"column":8},"end":{"line":249,"column":20}},"49":{"start":{"line":261,"column":8},"end":{"line":275,"column":66}},"50":{"start":{"line":276,"column":8},"end":{"line":292,"column":9}},"51":{"start":{"line":278,"column":12},"end":{"line":278,"column":50}},"52":{"start":{"line":279,"column":12},"end":{"line":279,"column":54}},"53":{"start":{"line":280,"column":12},"end":{"line":280,"column":52}},"54":{"start":{"line":281,"column":12},"end":{"line":281,"column":52}},"55":{"start":{"line":282,"column":12},"end":{"line":282,"column":52}},"56":{"start":{"line":283,"column":12},"end":{"line":283,"column":52}},"57":{"start":{"line":284,"column":12},"end":{"line":284,"column":48}},"58":{"start":{"line":285,"column":12},"end":{"line":285,"column":48}},"59":{"start":{"line":286,"column":12},"end":{"line":286,"column":34}},"60":{"start":{"line":287,"column":12},"end":{"line":287,"column":34}},"61":{"start":{"line":288,"column":12},"end":{"line":288,"column":34}},"62":{"start":{"line":289,"column":12},"end":{"line":289,"column":34}},"63":{"start":{"line":290,"column":12},"end":{"line":290,"column":31}},"64":{"start":{"line":291,"column":12},"end":{"line":291,"column":31}},"65":{"start":{"line":293,"column":8},"end":{"line":293,"column":55}},"66":{"start":{"line":307,"column":8},"end":{"line":307,"column":26}},"67":{"start":{"line":308,"column":8},"end":{"line":308,"column":30}},"68":{"start":{"line":309,"column":8},"end":{"line":309,"column":34}},"69":{"start":{"line":310,"column":8},"end":{"line":310,"column":30}},"70":{"start":{"line":311,"column":8},"end":{"line":311,"column":26}},"71":{"start":{"line":312,"column":8},"end":{"line":312,"column":27}},"72":{"start":{"line":313,"column":8},"end":{"line":313,"column":27}},"73":{"start":{"line":314,"column":8},"end":{"line":314,"column":20}},"74":{"start":{"line":330,"column":8},"end":{"line":330,"column":31}},"75":{"start":{"line":331,"column":8},"end":{"line":331,"column":35}},"76":{"start":{"line":332,"column":8},"end":{"line":332,"column":55}},"77":{"start":{"line":333,"column":8},"end":{"line":333,"column":39}},"78":{"start":{"line":334,"column":8},"end":{"line":334,"column":63}},"79":{"start":{"line":335,"column":8},"end":{"line":335,"column":35}},"80":{"start":{"line":336,"column":8},"end":{"line":336,"column":55}},"81":{"start":{"line":337,"column":8},"end":{"line":337,"column":31}},"82":{"start":{"line":338,"column":8},"end":{"line":338,"column":47}},"83":{"start":{"line":339,"column":8},"end":{"line":339,"column":20}},"84":{"start":{"line":353,"column":8},"end":{"line":355,"column":32}},"85":{"start":{"line":357,"column":8},"end":{"line":357,"column":26}},"86":{"start":{"line":358,"column":8},"end":{"line":358,"column":38}},"87":{"start":{"line":359,"column":8},"end":{"line":359,"column":48}},"88":{"start":{"line":360,"column":8},"end":{"line":360,"column":48}},"89":{"start":{"line":361,"column":8},"end":{"line":374,"column":10}},"90":{"start":{"line":375,"column":8},"end":{"line":375,"column":20}},"91":{"start":{"line":390,"column":8},"end":{"line":393,"column":30}},"92":{"start":{"line":394,"column":8},"end":{"line":394,"column":26}},"93":{"start":{"line":395,"column":8},"end":{"line":395,"column":38}},"94":{"start":{"line":396,"column":8},"end":{"line":396,"column":38}},"95":{"start":{"line":397,"column":8},"end":{"line":397,"column":44}},"96":{"start":{"line":398,"column":8},"end":{"line":413,"column":10}},"97":{"start":{"line":414,"column":8},"end":{"line":414,"column":20}},"98":{"start":{"line":430,"column":8},"end":{"line":431,"column":37}},"99":{"start":{"line":432,"column":8},"end":{"line":432,"column":37}},"100":{"start":{"line":433,"column":8},"end":{"line":433,"column":46}},"101":{"start":{"line":434,"column":8},"end":{"line":434,"column":46}},"102":{"start":{"line":435,"column":8},"end":{"line":435,"column":38}},"103":{"start":{"line":436,"column":8},"end":{"line":436,"column":37}},"104":{"start":{"line":437,"column":8},"end":{"line":437,"column":20}},"105":{"start":{"line":455,"column":8},"end":{"line":455,"column":34}},"106":{"start":{"line":456,"column":8},"end":{"line":459,"column":9}},"107":{"start":{"line":458,"column":12},"end":{"line":458,"column":22}},"108":{"start":{"line":460,"column":8},"end":{"line":460,"column":27}},"109":{"start":{"line":461,"column":8},"end":{"line":461,"column":27}},"110":{"start":{"line":462,"column":8},"end":{"line":462,"column":29}},"111":{"start":{"line":463,"column":8},"end":{"line":463,"column":21}},"112":{"start":{"line":464,"column":8},"end":{"line":464,"column":44}},"113":{"start":{"line":465,"column":8},"end":{"line":465,"column":30}},"114":{"start":{"line":466,"column":8},"end":{"line":466,"column":26}},"115":{"start":{"line":467,"column":8},"end":{"line":480,"column":10}},"116":{"start":{"line":481,"column":8},"end":{"line":481,"column":44}},"117":{"start":{"line":482,"column":8},"end":{"line":482,"column":20}},"118":{"start":{"line":495,"column":8},"end":{"line":495,"column":62}},"119":{"start":{"line":496,"column":8},"end":{"line":496,"column":20}},"120":{"start":{"line":509,"column":8},"end":{"line":509,"column":61}},"121":{"start":{"line":510,"column":8},"end":{"line":510,"column":20}},"122":{"start":{"line":522,"column":8},"end":{"line":529,"column":66}},"123":{"start":{"line":530,"column":8},"end":{"line":556,"column":9}},"124":{"start":{"line":531,"column":12},"end":{"line":531,"column":34}},"125":{"start":{"line":532,"column":12},"end":{"line":541,"column":13}},"126":{"start":{"line":533,"column":16},"end":{"line":533,"column":40}},"127":{"start":{"line":534,"column":16},"end":{"line":534,"column":44}},"128":{"start":{"line":535,"column":16},"end":{"line":535,"column":69}},"129":{"start":{"line":536,"column":16},"end":{"line":536,"column":34}},"130":{"start":{"line":537,"column":16},"end":{"line":537,"column":34}},"131":{"start":{"line":538,"column":16},"end":{"line":538,"column":35}},"132":{"start":{"line":539,"column":16},"end":{"line":539,"column":35}},"133":{"start":{"line":540,"column":16},"end":{"line":540,"column":52}},"134":{"start":{"line":545,"column":12},"end":{"line":545,"column":30}},"135":{"start":{"line":546,"column":12},"end":{"line":555,"column":13}},"136":{"start":{"line":547,"column":16},"end":{"line":547,"column":43}},"137":{"start":{"line":548,"column":16},"end":{"line":548,"column":43}},"138":{"start":{"line":549,"column":16},"end":{"line":549,"column":69}},"139":{"start":{"line":550,"column":16},"end":{"line":550,"column":34}},"140":{"start":{"line":551,"column":16},"end":{"line":551,"column":34}},"141":{"start":{"line":552,"column":16},"end":{"line":552,"column":35}},"142":{"start":{"line":553,"column":16},"end":{"line":553,"column":35}},"143":{"start":{"line":554,"column":16},"end":{"line":554,"column":52}},"144":{"start":{"line":557,"column":8},"end":{"line":557,"column":30}},"145":{"start":{"line":558,"column":8},"end":{"line":558,"column":20}},"146":{"start":{"line":571,"column":8},"end":{"line":571,"column":62}},"147":{"start":{"line":572,"column":8},"end":{"line":572,"column":20}},"148":{"start":{"line":585,"column":8},"end":{"line":585,"column":61}},"149":{"start":{"line":586,"column":8},"end":{"line":586,"column":20}},"150":{"start":{"line":598,"column":8},"end":{"line":602,"column":66}},"151":{"start":{"line":603,"column":8},"end":{"line":603,"column":74}},"152":{"start":{"line":604,"column":8},"end":{"line":604,"column":26}},"153":{"start":{"line":605,"column":8},"end":{"line":605,"column":26}},"154":{"start":{"line":606,"column":8},"end":{"line":606,"column":30}},"155":{"start":{"line":607,"column":8},"end":{"line":607,"column":27}},"156":{"start":{"line":608,"column":8},"end":{"line":608,"column":27}},"157":{"start":{"line":619,"column":8},"end":{"line":626,"column":52}},"158":{"start":{"line":627,"column":8},"end":{"line":627,"column":34}},"159":{"start":{"line":628,"column":8},"end":{"line":628,"column":36}},"160":{"start":{"line":629,"column":8},"end":{"line":639,"column":9}},"161":{"start":{"line":631,"column":12},"end":{"line":634,"column":13}},"162":{"start":{"line":633,"column":16},"end":{"line":633,"column":32}},"163":{"start":{"line":635,"column":12},"end":{"line":638,"column":13}},"164":{"start":{"line":637,"column":16},"end":{"line":637,"column":32}},"165":{"start":{"line":640,"column":8},"end":{"line":643,"column":9}},"166":{"start":{"line":642,"column":12},"end":{"line":642,"column":39}},"167":{"start":{"line":644,"column":8},"end":{"line":651,"column":9}},"168":{"start":{"line":646,"column":12},"end":{"line":646,"column":61}},"169":{"start":{"line":647,"column":12},"end":{"line":647,"column":72}},"170":{"start":{"line":648,"column":12},"end":{"line":648,"column":45}},"171":{"start":{"line":649,"column":12},"end":{"line":649,"column":41}},"172":{"start":{"line":650,"column":12},"end":{"line":650,"column":42}},"173":{"start":{"line":652,"column":8},"end":{"line":652,"column":26}},"174":{"start":{"line":653,"column":8},"end":{"line":653,"column":30}},"175":{"start":{"line":654,"column":8},"end":{"line":654,"column":32}},"176":{"start":{"line":665,"column":8},"end":{"line":665,"column":26}},"177":{"start":{"line":666,"column":8},"end":{"line":666,"column":20}},"178":{"start":{"line":677,"column":8},"end":{"line":677,"column":32}},"179":{"start":{"line":678,"column":8},"end":{"line":678,"column":20}},"180":{"start":{"line":689,"column":2},"end":{"line":689,"column":18}},"181":{"start":{"line":690,"column":8},"end":{"line":690,"column":25}},"182":{"start":{"line":691,"column":8},"end":{"line":691,"column":24}},"183":{"start":{"line":692,"column":8},"end":{"line":692,"column":25}},"184":{"start":{"line":693,"column":8},"end":{"line":693,"column":23}},"185":{"start":{"line":694,"column":8},"end":{"line":694,"column":22}},"186":{"start":{"line":695,"column":8},"end":{"line":695,"column":24}},"187":{"start":{"line":696,"column":8},"end":{"line":696,"column":30}},"188":{"start":{"line":697,"column":8},"end":{"line":697,"column":20}},"189":{"start":{"line":710,"column":8},"end":{"line":713,"column":14}},"190":{"start":{"line":715,"column":8},"end":{"line":717,"column":9}},"191":{"start":{"line":716,"column":12},"end":{"line":716,"column":50}},"192":{"start":{"line":719,"column":8},"end":{"line":724,"column":9}},"193":{"start":{"line":720,"column":12},"end":{"line":723,"column":13}},"194":{"start":{"line":721,"column":16},"end":{"line":721,"column":82}},"195":{"start":{"line":722,"column":16},"end":{"line":722,"column":82}},"196":{"start":{"line":725,"column":8},"end":{"line":725,"column":40}},"197":{"start":{"line":739,"column":8},"end":{"line":746,"column":15}},"198":{"start":{"line":747,"column":8},"end":{"line":754,"column":9}},"199":{"start":{"line":749,"column":12},"end":{"line":749,"column":48}},"200":{"start":{"line":750,"column":12},"end":{"line":750,"column":63}},"201":{"start":{"line":751,"column":12},"end":{"line":751,"column":66}},"202":{"start":{"line":752,"column":12},"end":{"line":752,"column":60}},"203":{"start":{"line":753,"column":12},"end":{"line":753,"column":69}},"204":{"start":{"line":755,"column":8},"end":{"line":755,"column":40}},"205":{"start":{"line":756,"column":8},"end":{"line":756,"column":42}},"206":{"start":{"line":757,"column":8},"end":{"line":757,"column":38}},"207":{"start":{"line":758,"column":8},"end":{"line":758,"column":44}},"208":{"start":{"line":759,"column":8},"end":{"line":759,"column":39}},"209":{"start":{"line":760,"column":8},"end":{"line":760,"column":35}},"210":{"start":{"line":772,"column":8},"end":{"line":774,"column":9}},"211":{"start":{"line":773,"column":12},"end":{"line":773,"column":28}},"212":{"start":{"line":775,"column":8},"end":{"line":778,"column":9}},"213":{"start":{"line":777,"column":12},"end":{"line":777,"column":27}},"214":{"start":{"line":779,"column":8},"end":{"line":782,"column":9}},"215":{"start":{"line":781,"column":12},"end":{"line":781,"column":26}},"216":{"start":{"line":783,"column":8},"end":{"line":786,"column":9}},"217":{"start":{"line":785,"column":12},"end":{"line":785,"column":29}},"218":{"start":{"line":787,"column":8},"end":{"line":787,"column":47}},"219":{"start":{"line":788,"column":8},"end":{"line":788,"column":48}},"220":{"start":{"line":803,"column":0},"end":{"line":803,"column":26}},"221":{"start":{"line":815,"column":0},"end":{"line":821,"column":2}},"222":{"start":{"line":817,"column":4},"end":{"line":817,"column":26}},"223":{"start":{"line":818,"column":4},"end":{"line":818,"column":33}},"224":{"start":{"line":819,"column":4},"end":{"line":819,"column":44}},"225":{"start":{"line":820,"column":4},"end":{"line":820,"column":59}},"226":{"start":{"line":823,"column":0},"end":{"line":823,"column":24}},"227":{"start":{"line":825,"column":0},"end":{"line":2090,"column":28}},"228":{"start":{"line":844,"column":2},"end":{"line":844,"column":42}},"229":{"start":{"line":855,"column":2},"end":{"line":857,"column":36}},"230":{"start":{"line":858,"column":2},"end":{"line":858,"column":20}},"231":{"start":{"line":859,"column":8},"end":{"line":862,"column":9}},"232":{"start":{"line":861,"column":12},"end":{"line":861,"column":38}},"233":{"start":{"line":863,"column":8},"end":{"line":866,"column":9}},"234":{"start":{"line":865,"column":12},"end":{"line":865,"column":38}},"235":{"start":{"line":867,"column":8},"end":{"line":867,"column":30}},"236":{"start":{"line":881,"column":8},"end":{"line":881,"column":20}},"237":{"start":{"line":882,"column":8},"end":{"line":894,"column":9}},"238":{"start":{"line":884,"column":12},"end":{"line":884,"column":35}},"239":{"start":{"line":888,"column":12},"end":{"line":890,"column":15}},"240":{"start":{"line":891,"column":12},"end":{"line":891,"column":39}},"241":{"start":{"line":892,"column":12},"end":{"line":892,"column":36}},"242":{"start":{"line":893,"column":12},"end":{"line":893,"column":40}},"243":{"start":{"line":905,"column":8},"end":{"line":908,"column":9}},"244":{"start":{"line":907,"column":12},"end":{"line":907,"column":52}},"245":{"start":{"line":909,"column":8},"end":{"line":912,"column":9}},"246":{"start":{"line":911,"column":12},"end":{"line":911,"column":50}},"247":{"start":{"line":924,"column":8},"end":{"line":944,"column":14}},"248":{"start":{"line":945,"column":3},"end":{"line":945,"column":23}},"249":{"start":{"line":946,"column":2},"end":{"line":946,"column":54}},"250":{"start":{"line":947,"column":8},"end":{"line":956,"column":25}},"251":{"start":{"line":957,"column":8},"end":{"line":957,"column":40}},"252":{"start":{"line":958,"column":8},"end":{"line":958,"column":36}},"253":{"start":{"line":960,"column":2},"end":{"line":976,"column":28}},"254":{"start":{"line":978,"column":8},"end":{"line":1015,"column":9}},"255":{"start":{"line":980,"column":12},"end":{"line":980,"column":35}},"256":{"start":{"line":981,"column":12},"end":{"line":981,"column":49}},"257":{"start":{"line":982,"column":12},"end":{"line":982,"column":41}},"258":{"start":{"line":983,"column":12},"end":{"line":983,"column":43}},"259":{"start":{"line":984,"column":12},"end":{"line":984,"column":41}},"260":{"start":{"line":985,"column":12},"end":{"line":985,"column":115}},"261":{"start":{"line":987,"column":12},"end":{"line":991,"column":57}},"262":{"start":{"line":992,"column":12},"end":{"line":995,"column":13}},"263":{"start":{"line":994,"column":16},"end":{"line":994,"column":59}},"264":{"start":{"line":996,"column":12},"end":{"line":999,"column":13}},"265":{"start":{"line":998,"column":16},"end":{"line":998,"column":65}},"266":{"start":{"line":1000,"column":12},"end":{"line":1003,"column":13}},"267":{"start":{"line":1002,"column":16},"end":{"line":1002,"column":67}},"268":{"start":{"line":1004,"column":12},"end":{"line":1007,"column":13}},"269":{"start":{"line":1006,"column":16},"end":{"line":1006,"column":65}},"270":{"start":{"line":1008,"column":12},"end":{"line":1008,"column":41}},"271":{"start":{"line":1009,"column":12},"end":{"line":1009,"column":68}},"272":{"start":{"line":1010,"column":12},"end":{"line":1010,"column":41}},"273":{"start":{"line":1014,"column":12},"end":{"line":1014,"column":41}},"274":{"start":{"line":1016,"column":8},"end":{"line":1028,"column":9}},"275":{"start":{"line":1018,"column":12},"end":{"line":1022,"column":13}},"276":{"start":{"line":1020,"column":16},"end":{"line":1020,"column":39}},"277":{"start":{"line":1021,"column":16},"end":{"line":1021,"column":68}},"278":{"start":{"line":1023,"column":12},"end":{"line":1026,"column":13}},"279":{"start":{"line":1025,"column":16},"end":{"line":1025,"column":64}},"280":{"start":{"line":1027,"column":12},"end":{"line":1027,"column":58}},"281":{"start":{"line":1031,"column":8},"end":{"line":1031,"column":26}},"282":{"start":{"line":1032,"column":8},"end":{"line":1032,"column":40}},"283":{"start":{"line":1034,"column":8},"end":{"line":1034,"column":50}},"284":{"start":{"line":1036,"column":8},"end":{"line":1036,"column":25}},"285":{"start":{"line":1037,"column":8},"end":{"line":1037,"column":33}},"286":{"start":{"line":1038,"column":8},"end":{"line":1038,"column":31}},"287":{"start":{"line":1049,"column":8},"end":{"line":1049,"column":29}},"288":{"start":{"line":1050,"column":2},"end":{"line":1050,"column":34}},"289":{"start":{"line":1061,"column":8},"end":{"line":1061,"column":29}},"290":{"start":{"line":1062,"column":2},"end":{"line":1062,"column":37}},"291":{"start":{"line":1073,"column":2},"end":{"line":1076,"column":21}},"292":{"start":{"line":1077,"column":2},"end":{"line":1077,"column":44}},"293":{"start":{"line":1089,"column":2},"end":{"line":1090,"column":30}},"294":{"start":{"line":1091,"column":2},"end":{"line":1091,"column":37}},"295":{"start":{"line":1092,"column":2},"end":{"line":1092,"column":37}},"296":{"start":{"line":1104,"column":2},"end":{"line":1104,"column":62}},"297":{"start":{"line":1105,"column":8},"end":{"line":1105,"column":34}},"298":{"start":{"line":1116,"column":8},"end":{"line":1116,"column":29}},"299":{"start":{"line":1117,"column":2},"end":{"line":1117,"column":26}},"300":{"start":{"line":1129,"column":2},"end":{"line":1129,"column":46}},"301":{"start":{"line":1142,"column":2},"end":{"line":1151,"column":12}},"302":{"start":{"line":1152,"column":8},"end":{"line":1195,"column":9}},"303":{"start":{"line":1154,"column":3},"end":{"line":1154,"column":14}},"304":{"start":{"line":1155,"column":3},"end":{"line":1155,"column":38}},"305":{"start":{"line":1156,"column":3},"end":{"line":1156,"column":41}},"306":{"start":{"line":1157,"column":12},"end":{"line":1160,"column":13}},"307":{"start":{"line":1159,"column":16},"end":{"line":1159,"column":33}},"308":{"start":{"line":1161,"column":3},"end":{"line":1161,"column":46}},"309":{"start":{"line":1162,"column":3},"end":{"line":1162,"column":42}},"310":{"start":{"line":1163,"column":3},"end":{"line":1163,"column":44}},"311":{"start":{"line":1164,"column":3},"end":{"line":1164,"column":38}},"312":{"start":{"line":1165,"column":3},"end":{"line":1165,"column":62}},"313":{"start":{"line":1166,"column":3},"end":{"line":1166,"column":24}},"314":{"start":{"line":1167,"column":3},"end":{"line":1167,"column":30}},"315":{"start":{"line":1168,"column":3},"end":{"line":1168,"column":32}},"316":{"start":{"line":1169,"column":3},"end":{"line":1169,"column":26}},"317":{"start":{"line":1170,"column":3},"end":{"line":1170,"column":34}},"318":{"start":{"line":1171,"column":3},"end":{"line":1180,"column":4}},"319":{"start":{"line":1173,"column":4},"end":{"line":1173,"column":14}},"320":{"start":{"line":1174,"column":4},"end":{"line":1174,"column":27}},"321":{"start":{"line":1175,"column":4},"end":{"line":1179,"column":5}},"322":{"start":{"line":1177,"column":5},"end":{"line":1177,"column":24}},"323":{"start":{"line":1178,"column":5},"end":{"line":1178,"column":35}},"324":{"start":{"line":1181,"column":3},"end":{"line":1193,"column":4}},"325":{"start":{"line":1183,"column":4},"end":{"line":1183,"column":31}},"326":{"start":{"line":1187,"column":4},"end":{"line":1187,"column":38}},"327":{"start":{"line":1188,"column":4},"end":{"line":1192,"column":5}},"328":{"start":{"line":1190,"column":5},"end":{"line":1190,"column":46}},"329":{"start":{"line":1191,"column":5},"end":{"line":1191,"column":31}},"330":{"start":{"line":1194,"column":3},"end":{"line":1194,"column":26}},"331":{"start":{"line":1196,"column":8},"end":{"line":1196,"column":21}},"332":{"start":{"line":1207,"column":8},"end":{"line":1210,"column":9}},"333":{"start":{"line":1209,"column":12},"end":{"line":1209,"column":19}},"334":{"start":{"line":1211,"column":8},"end":{"line":1220,"column":12}},"335":{"start":{"line":1221,"column":2},"end":{"line":1277,"column":3}},"336":{"start":{"line":1223,"column":3},"end":{"line":1223,"column":38}},"337":{"start":{"line":1224,"column":3},"end":{"line":1224,"column":41}},"338":{"start":{"line":1225,"column":3},"end":{"line":1228,"column":4}},"339":{"start":{"line":1227,"column":4},"end":{"line":1227,"column":21}},"340":{"start":{"line":1229,"column":3},"end":{"line":1229,"column":46}},"341":{"start":{"line":1230,"column":3},"end":{"line":1230,"column":42}},"342":{"start":{"line":1231,"column":3},"end":{"line":1231,"column":44}},"343":{"start":{"line":1232,"column":3},"end":{"line":1232,"column":38}},"344":{"start":{"line":1233,"column":3},"end":{"line":1233,"column":62}},"345":{"start":{"line":1234,"column":3},"end":{"line":1234,"column":23}},"346":{"start":{"line":1235,"column":3},"end":{"line":1235,"column":35}},"347":{"start":{"line":1236,"column":3},"end":{"line":1236,"column":44}},"348":{"start":{"line":1237,"column":3},"end":{"line":1241,"column":4}},"349":{"start":{"line":1239,"column":4},"end":{"line":1239,"column":57}},"350":{"start":{"line":1240,"column":4},"end":{"line":1240,"column":39}},"351":{"start":{"line":1242,"column":3},"end":{"line":1242,"column":37}},"352":{"start":{"line":1243,"column":3},"end":{"line":1243,"column":45}},"353":{"start":{"line":1244,"column":3},"end":{"line":1253,"column":4}},"354":{"start":{"line":1246,"column":4},"end":{"line":1246,"column":14}},"355":{"start":{"line":1247,"column":4},"end":{"line":1247,"column":27}},"356":{"start":{"line":1248,"column":4},"end":{"line":1252,"column":5}},"357":{"start":{"line":1250,"column":5},"end":{"line":1250,"column":24}},"358":{"start":{"line":1251,"column":5},"end":{"line":1251,"column":35}},"359":{"start":{"line":1254,"column":3},"end":{"line":1266,"column":4}},"360":{"start":{"line":1256,"column":4},"end":{"line":1256,"column":42}},"361":{"start":{"line":1260,"column":4},"end":{"line":1260,"column":38}},"362":{"start":{"line":1261,"column":4},"end":{"line":1265,"column":5}},"363":{"start":{"line":1263,"column":5},"end":{"line":1263,"column":57}},"364":{"start":{"line":1264,"column":5},"end":{"line":1264,"column":42}},"365":{"start":{"line":1267,"column":3},"end":{"line":1267,"column":37}},"366":{"start":{"line":1268,"column":12},"end":{"line":1268,"column":39}},"367":{"start":{"line":1272,"column":12},"end":{"line":1275,"column":13}},"368":{"start":{"line":1274,"column":16},"end":{"line":1274,"column":44}},"369":{"start":{"line":1276,"column":3},"end":{"line":1276,"column":24}},"370":{"start":{"line":1278,"column":8},"end":{"line":1278,"column":33}},"371":{"start":{"line":1291,"column":2},"end":{"line":1297,"column":18}},"372":{"start":{"line":1298,"column":2},"end":{"line":1339,"column":3}},"373":{"start":{"line":1300,"column":3},"end":{"line":1300,"column":14}},"374":{"start":{"line":1302,"column":3},"end":{"line":1337,"column":4}},"375":{"start":{"line":1304,"column":4},"end":{"line":1304,"column":43}},"376":{"start":{"line":1305,"column":4},"end":{"line":1305,"column":56}},"377":{"start":{"line":1306,"column":4},"end":{"line":1306,"column":18}},"378":{"start":{"line":1307,"column":4},"end":{"line":1307,"column":43}},"379":{"start":{"line":1308,"column":4},"end":{"line":1310,"column":61}},"380":{"start":{"line":1311,"column":4},"end":{"line":1317,"column":5}},"381":{"start":{"line":1313,"column":5},"end":{"line":1316,"column":6}},"382":{"start":{"line":1315,"column":6},"end":{"line":1315,"column":55}},"383":{"start":{"line":1318,"column":4},"end":{"line":1318,"column":24}},"384":{"start":{"line":1319,"column":4},"end":{"line":1319,"column":28}},"385":{"start":{"line":1321,"column":8},"end":{"line":1337,"column":4}},"386":{"start":{"line":1323,"column":4},"end":{"line":1323,"column":43}},"387":{"start":{"line":1324,"column":4},"end":{"line":1324,"column":18}},"388":{"start":{"line":1325,"column":16},"end":{"line":1325,"column":41}},"389":{"start":{"line":1326,"column":4},"end":{"line":1336,"column":17}},"390":{"start":{"line":1328,"column":5},"end":{"line":1328,"column":57}},"391":{"start":{"line":1329,"column":20},"end":{"line":1329,"column":48}},"392":{"start":{"line":1330,"column":20},"end":{"line":1335,"column":21}},"393":{"start":{"line":1332,"column":24},"end":{"line":1334,"column":72}},"394":{"start":{"line":1338,"column":3},"end":{"line":1338,"column":25}},"395":{"start":{"line":1340,"column":2},"end":{"line":1340,"column":15}},"396":{"start":{"line":1351,"column":8},"end":{"line":1354,"column":9}},"397":{"start":{"line":1353,"column":12},"end":{"line":1353,"column":19}},"398":{"start":{"line":1355,"column":2},"end":{"line":1361,"column":21}},"399":{"start":{"line":1362,"column":2},"end":{"line":1436,"column":3}},"400":{"start":{"line":1364,"column":3},"end":{"line":1435,"column":4}},"401":{"start":{"line":1366,"column":4},"end":{"line":1366,"column":18}},"402":{"start":{"line":1367,"column":4},"end":{"line":1367,"column":43}},"403":{"start":{"line":1368,"column":16},"end":{"line":1400,"column":17}},"404":{"start":{"line":1370,"column":20},"end":{"line":1383,"column":21}},"405":{"start":{"line":1372,"column":24},"end":{"line":1382,"column":25}},"406":{"start":{"line":1374,"column":28},"end":{"line":1381,"column":29}},"407":{"start":{"line":1376,"column":32},"end":{"line":1376,"column":74}},"408":{"start":{"line":1380,"column":32},"end":{"line":1380,"column":64}},"409":{"start":{"line":1387,"column":20},"end":{"line":1389,"column":92}},"410":{"start":{"line":1390,"column":20},"end":{"line":1396,"column":21}},"411":{"start":{"line":1392,"column":24},"end":{"line":1395,"column":25}},"412":{"start":{"line":1394,"column":28},"end":{"line":1394,"column":77}},"413":{"start":{"line":1397,"column":20},"end":{"line":1397,"column":40}},"414":{"start":{"line":1398,"column":20},"end":{"line":1398,"column":72}},"415":{"start":{"line":1399,"column":20},"end":{"line":1399,"column":53}},"416":{"start":{"line":1402,"column":8},"end":{"line":1435,"column":4}},"417":{"start":{"line":1404,"column":16},"end":{"line":1404,"column":44}},"418":{"start":{"line":1405,"column":4},"end":{"line":1405,"column":43}},"419":{"start":{"line":1406,"column":4},"end":{"line":1406,"column":18}},"420":{"start":{"line":1407,"column":4},"end":{"line":1434,"column":5}},"421":{"start":{"line":1409,"column":5},"end":{"line":1409,"column":32}},"422":{"start":{"line":1410,"column":20},"end":{"line":1428,"column":6}},"423":{"start":{"line":1412,"column":24},"end":{"line":1415,"column":25}},"424":{"start":{"line":1414,"column":28},"end":{"line":1414,"column":58}},"425":{"start":{"line":1416,"column":6},"end":{"line":1416,"column":43}},"426":{"start":{"line":1420,"column":24},"end":{"line":1425,"column":29}},"427":{"start":{"line":1426,"column":24},"end":{"line":1426,"column":76}},"428":{"start":{"line":1427,"column":24},"end":{"line":1427,"column":57}},"429":{"start":{"line":1430,"column":9},"end":{"line":1434,"column":5}},"430":{"start":{"line":1432,"column":20},"end":{"line":1432,"column":47}},"431":{"start":{"line":1433,"column":20},"end":{"line":1433,"column":50}},"432":{"start":{"line":1437,"column":2},"end":{"line":1437,"column":23}},"433":{"start":{"line":1438,"column":8},"end":{"line":1438,"column":31}},"434":{"start":{"line":1444,"column":2},"end":{"line":1448,"column":3}},"435":{"start":{"line":1446,"column":3},"end":{"line":1446,"column":52}},"436":{"start":{"line":1447,"column":3},"end":{"line":1447,"column":36}},"437":{"start":{"line":1461,"column":2},"end":{"line":1482,"column":33}},"438":{"start":{"line":1483,"column":2},"end":{"line":1513,"column":3}},"439":{"start":{"line":1485,"column":12},"end":{"line":1496,"column":13}},"440":{"start":{"line":1487,"column":16},"end":{"line":1487,"column":52}},"441":{"start":{"line":1489,"column":8},"end":{"line":1496,"column":13}},"442":{"start":{"line":1491,"column":16},"end":{"line":1491,"column":50}},"443":{"start":{"line":1495,"column":16},"end":{"line":1495,"column":31}},"444":{"start":{"line":1497,"column":12},"end":{"line":1497,"column":44}},"445":{"start":{"line":1498,"column":3},"end":{"line":1498,"column":34}},"446":{"start":{"line":1500,"column":7},"end":{"line":1513,"column":3}},"447":{"start":{"line":1502,"column":3},"end":{"line":1502,"column":34}},"448":{"start":{"line":1503,"column":3},"end":{"line":1503,"column":35}},"449":{"start":{"line":1504,"column":3},"end":{"line":1504,"column":27}},"450":{"start":{"line":1505,"column":3},"end":{"line":1505,"column":27}},"451":{"start":{"line":1506,"column":3},"end":{"line":1506,"column":12}},"452":{"start":{"line":1507,"column":3},"end":{"line":1507,"column":12}},"453":{"start":{"line":1508,"column":3},"end":{"line":1508,"column":93}},"454":{"start":{"line":1509,"column":3},"end":{"line":1509,"column":36}},"455":{"start":{"line":1510,"column":3},"end":{"line":1510,"column":41}},"456":{"start":{"line":1511,"column":3},"end":{"line":1511,"column":32}},"457":{"start":{"line":1512,"column":3},"end":{"line":1512,"column":90}},"458":{"start":{"line":1514,"column":2},"end":{"line":1525,"column":3}},"459":{"start":{"line":1515,"column":3},"end":{"line":1515,"column":19}},"460":{"start":{"line":1516,"column":3},"end":{"line":1516,"column":22}},"461":{"start":{"line":1517,"column":3},"end":{"line":1517,"column":26}},"462":{"start":{"line":1518,"column":3},"end":{"line":1518,"column":45}},"463":{"start":{"line":1519,"column":3},"end":{"line":1519,"column":34}},"464":{"start":{"line":1520,"column":3},"end":{"line":1520,"column":18}},"465":{"start":{"line":1521,"column":12},"end":{"line":1521,"column":46}},"466":{"start":{"line":1522,"column":12},"end":{"line":1522,"column":36}},"467":{"start":{"line":1523,"column":12},"end":{"line":1523,"column":57}},"468":{"start":{"line":1524,"column":12},"end":{"line":1524,"column":52}},"469":{"start":{"line":1526,"column":2},"end":{"line":1529,"column":3}},"470":{"start":{"line":1528,"column":3},"end":{"line":1528,"column":36}},"471":{"start":{"line":1530,"column":2},"end":{"line":1530,"column":47}},"472":{"start":{"line":1531,"column":2},"end":{"line":1531,"column":23}},"473":{"start":{"line":1544,"column":8},"end":{"line":1544,"column":29}},"474":{"start":{"line":1545,"column":8},"end":{"line":1545,"column":98}},"475":{"start":{"line":1546,"column":8},"end":{"line":1546,"column":27}},"476":{"start":{"line":1547,"column":8},"end":{"line":1547,"column":36}},"477":{"start":{"line":1548,"column":8},"end":{"line":1551,"column":9}},"478":{"start":{"line":1550,"column":12},"end":{"line":1550,"column":36}},"479":{"start":{"line":1562,"column":2},"end":{"line":1574,"column":42}},"480":{"start":{"line":1575,"column":8},"end":{"line":1610,"column":3}},"481":{"start":{"line":1577,"column":12},"end":{"line":1577,"column":58}},"482":{"start":{"line":1579,"column":12},"end":{"line":1582,"column":13}},"483":{"start":{"line":1581,"column":16},"end":{"line":1581,"column":66}},"484":{"start":{"line":1585,"column":12},"end":{"line":1585,"column":42}},"485":{"start":{"line":1586,"column":12},"end":{"line":1586,"column":42}},"486":{"start":{"line":1589,"column":12},"end":{"line":1589,"column":51}},"487":{"start":{"line":1590,"column":12},"end":{"line":1590,"column":51}},"488":{"start":{"line":1591,"column":12},"end":{"line":1599,"column":4}},"489":{"start":{"line":1593,"column":16},"end":{"line":1593,"column":50}},"490":{"start":{"line":1594,"column":16},"end":{"line":1598,"column":17}},"491":{"start":{"line":1596,"column":20},"end":{"line":1596,"column":87}},"492":{"start":{"line":1597,"column":20},"end":{"line":1597,"column":67}},"493":{"start":{"line":1600,"column":12},"end":{"line":1603,"column":13}},"494":{"start":{"line":1602,"column":16},"end":{"line":1602,"column":68}},"495":{"start":{"line":1604,"column":12},"end":{"line":1609,"column":26}},"496":{"start":{"line":1611,"column":8},"end":{"line":1611,"column":45}},"497":{"start":{"line":1612,"column":8},"end":{"line":1629,"column":9}},"498":{"start":{"line":1614,"column":12},"end":{"line":1624,"column":13}},"499":{"start":{"line":1616,"column":16},"end":{"line":1622,"column":18}},"500":{"start":{"line":1623,"column":16},"end":{"line":1623,"column":50}},"501":{"start":{"line":1625,"column":12},"end":{"line":1625,"column":42}},"502":{"start":{"line":1626,"column":12},"end":{"line":1626,"column":33}},"503":{"start":{"line":1628,"column":12},"end":{"line":1628,"column":47}},"504":{"start":{"line":1630,"column":8},"end":{"line":1633,"column":9}},"505":{"start":{"line":1632,"column":12},"end":{"line":1632,"column":34}},"506":{"start":{"line":1635,"column":8},"end":{"line":1635,"column":85}},"507":{"start":{"line":1636,"column":8},"end":{"line":1636,"column":85}},"508":{"start":{"line":1649,"column":8},"end":{"line":1650,"column":35}},"509":{"start":{"line":1651,"column":8},"end":{"line":1651,"column":45}},"510":{"start":{"line":1652,"column":8},"end":{"line":1652,"column":19}},"511":{"start":{"line":1691,"column":2},"end":{"line":1691,"column":24}},"512":{"start":{"line":1692,"column":2},"end":{"line":1692,"column":24}},"513":{"start":{"line":1693,"column":2},"end":{"line":1693,"column":45}},"514":{"start":{"line":1705,"column":8},"end":{"line":1705,"column":30}},"515":{"start":{"line":1706,"column":8},"end":{"line":1706,"column":52}},"516":{"start":{"line":1718,"column":8},"end":{"line":1718,"column":30}},"517":{"start":{"line":1719,"column":8},"end":{"line":1719,"column":52}},"518":{"start":{"line":1731,"column":8},"end":{"line":1731,"column":46}},"519":{"start":{"line":1742,"column":8},"end":{"line":1742,"column":47}},"520":{"start":{"line":1753,"column":8},"end":{"line":1753,"column":47}},"521":{"start":{"line":1764,"column":8},"end":{"line":1764,"column":48}},"522":{"start":{"line":1775,"column":8},"end":{"line":1775,"column":47}},"523":{"start":{"line":1789,"column":2},"end":{"line":1792,"column":3}},"524":{"start":{"line":1791,"column":12},"end":{"line":1791,"column":56}},"525":{"start":{"line":1793,"column":2},"end":{"line":1793,"column":37}},"526":{"start":{"line":1814,"column":2},"end":{"line":1815,"column":29}},"527":{"start":{"line":1816,"column":8},"end":{"line":1816,"column":34}},"528":{"start":{"line":1817,"column":8},"end":{"line":1817,"column":36}},"529":{"start":{"line":1818,"column":8},"end":{"line":1818,"column":52}},"530":{"start":{"line":1819,"column":8},"end":{"line":1819,"column":54}},"531":{"start":{"line":1820,"column":8},"end":{"line":1820,"column":21}},"532":{"start":{"line":1821,"column":2},"end":{"line":1821,"column":26}},"533":{"start":{"line":1834,"column":2},"end":{"line":1834,"column":28}},"534":{"start":{"line":1835,"column":2},"end":{"line":1841,"column":14}},"535":{"start":{"line":1852,"column":2},"end":{"line":1860,"column":4}},"536":{"start":{"line":1872,"column":2},"end":{"line":1877,"column":4}},"537":{"start":{"line":1891,"column":2},"end":{"line":1891,"column":18}},"538":{"start":{"line":1892,"column":2},"end":{"line":1892,"column":53}},"539":{"start":{"line":1893,"column":2},"end":{"line":1896,"column":3}},"540":{"start":{"line":1895,"column":3},"end":{"line":1895,"column":25}},"541":{"start":{"line":1910,"column":2},"end":{"line":1914,"column":30}},"542":{"start":{"line":1915,"column":8},"end":{"line":1921,"column":9}},"543":{"start":{"line":1917,"column":12},"end":{"line":1917,"column":31}},"544":{"start":{"line":1918,"column":12},"end":{"line":1918,"column":30}},"545":{"start":{"line":1919,"column":12},"end":{"line":1919,"column":41}},"546":{"start":{"line":1920,"column":12},"end":{"line":1920,"column":41}},"547":{"start":{"line":1922,"column":8},"end":{"line":1922,"column":48}},"548":{"start":{"line":1937,"column":8},"end":{"line":1947,"column":52}},"549":{"start":{"line":1948,"column":8},"end":{"line":1951,"column":9}},"550":{"start":{"line":1950,"column":12},"end":{"line":1950,"column":52}},"551":{"start":{"line":1952,"column":8},"end":{"line":1952,"column":57}},"552":{"start":{"line":1953,"column":8},"end":{"line":1953,"column":57}},"553":{"start":{"line":1954,"column":8},"end":{"line":1954,"column":49}},"554":{"start":{"line":1955,"column":8},"end":{"line":1963,"column":9}},"555":{"start":{"line":1957,"column":12},"end":{"line":1957,"column":38}},"556":{"start":{"line":1958,"column":12},"end":{"line":1958,"column":36}},"557":{"start":{"line":1959,"column":12},"end":{"line":1962,"column":13}},"558":{"start":{"line":1961,"column":16},"end":{"line":1961,"column":53}},"559":{"start":{"line":1964,"column":8},"end":{"line":1964,"column":51}},"560":{"start":{"line":1965,"column":8},"end":{"line":1968,"column":9}},"561":{"start":{"line":1967,"column":12},"end":{"line":1967,"column":54}},"562":{"start":{"line":1969,"column":8},"end":{"line":1969,"column":56}},"563":{"start":{"line":1970,"column":8},"end":{"line":1970,"column":27}},"564":{"start":{"line":1980,"column":8},"end":{"line":1980,"column":42}},"565":{"start":{"line":1981,"column":8},"end":{"line":1984,"column":9}},"566":{"start":{"line":1983,"column":12},"end":{"line":1983,"column":35}},"567":{"start":{"line":1994,"column":8},"end":{"line":1994,"column":42}},"568":{"start":{"line":1995,"column":8},"end":{"line":1998,"column":9}},"569":{"start":{"line":1997,"column":12},"end":{"line":1997,"column":34}},"570":{"start":{"line":2010,"column":8},"end":{"line":2017,"column":54}},"571":{"start":{"line":2018,"column":8},"end":{"line":2041,"column":9}},"572":{"start":{"line":2020,"column":12},"end":{"line":2020,"column":25}},"573":{"start":{"line":2021,"column":12},"end":{"line":2021,"column":43}},"574":{"start":{"line":2022,"column":12},"end":{"line":2039,"column":13}},"575":{"start":{"line":2024,"column":16},"end":{"line":2024,"column":38}},"576":{"start":{"line":2025,"column":16},"end":{"line":2025,"column":48}},"577":{"start":{"line":2026,"column":16},"end":{"line":2026,"column":61}},"578":{"start":{"line":2027,"column":16},"end":{"line":2027,"column":54}},"579":{"start":{"line":2028,"column":16},"end":{"line":2038,"column":17}},"580":{"start":{"line":2030,"column":20},"end":{"line":2037,"column":21}},"581":{"start":{"line":2032,"column":24},"end":{"line":2032,"column":55}},"582":{"start":{"line":2036,"column":24},"end":{"line":2036,"column":49}},"583":{"start":{"line":2040,"column":12},"end":{"line":2040,"column":23}},"584":{"start":{"line":2051,"column":8},"end":{"line":2051,"column":42}},"585":{"start":{"line":2052,"column":8},"end":{"line":2059,"column":9}},"586":{"start":{"line":2054,"column":12},"end":{"line":2054,"column":38}},"587":{"start":{"line":2058,"column":12},"end":{"line":2058,"column":28}},"588":{"start":{"line":2070,"column":8},"end":{"line":2088,"column":9}},"589":{"start":{"line":2072,"column":12},"end":{"line":2076,"column":13}},"590":{"start":{"line":2074,"column":16},"end":{"line":2074,"column":54}},"591":{"start":{"line":2075,"column":16},"end":{"line":2075,"column":38}},"592":{"start":{"line":2077,"column":12},"end":{"line":2081,"column":13}},"593":{"start":{"line":2079,"column":16},"end":{"line":2079,"column":56}},"594":{"start":{"line":2080,"column":16},"end":{"line":2080,"column":40}},"595":{"start":{"line":2082,"column":12},"end":{"line":2082,"column":50}},"596":{"start":{"line":2083,"column":12},"end":{"line":2086,"column":13}},"597":{"start":{"line":2085,"column":16},"end":{"line":2085,"column":60}},"598":{"start":{"line":2087,"column":12},"end":{"line":2087,"column":29}},"599":{"start":{"line":2092,"column":0},"end":{"line":2465,"column":2}},"600":{"start":{"line":2103,"column":3},"end":{"line":2103,"column":21}},"601":{"start":{"line":2140,"column":12},"end":{"line":2142,"column":26}},"602":{"start":{"line":2143,"column":12},"end":{"line":2143,"column":31}},"603":{"start":{"line":2144,"column":12},"end":{"line":2144,"column":42}},"604":{"start":{"line":2145,"column":12},"end":{"line":2145,"column":66}},"605":{"start":{"line":2146,"column":12},"end":{"line":2146,"column":42}},"606":{"start":{"line":2147,"column":12},"end":{"line":2150,"column":13}},"607":{"start":{"line":2149,"column":16},"end":{"line":2149,"column":48}},"608":{"start":{"line":2151,"column":12},"end":{"line":2151,"column":34}},"609":{"start":{"line":2152,"column":12},"end":{"line":2152,"column":23}},"610":{"start":{"line":2157,"column":12},"end":{"line":2157,"column":35}},"611":{"start":{"line":2190,"column":3},"end":{"line":2190,"column":19}},"612":{"start":{"line":2195,"column":3},"end":{"line":2195,"column":24}},"613":{"start":{"line":2196,"column":3},"end":{"line":2199,"column":4}},"614":{"start":{"line":2198,"column":4},"end":{"line":2198,"column":33}},"615":{"start":{"line":2200,"column":3},"end":{"line":2200,"column":14}},"616":{"start":{"line":2230,"column":3},"end":{"line":2231,"column":44}},"617":{"start":{"line":2232,"column":3},"end":{"line":2235,"column":4}},"618":{"start":{"line":2234,"column":4},"end":{"line":2234,"column":39}},"619":{"start":{"line":2236,"column":3},"end":{"line":2236,"column":14}},"620":{"start":{"line":2294,"column":3},"end":{"line":2296,"column":54}},"621":{"start":{"line":2298,"column":3},"end":{"line":2312,"column":4}},"622":{"start":{"line":2301,"column":4},"end":{"line":2304,"column":5}},"623":{"start":{"line":2303,"column":5},"end":{"line":2303,"column":24}},"624":{"start":{"line":2305,"column":4},"end":{"line":2311,"column":5}},"625":{"start":{"line":2307,"column":5},"end":{"line":2310,"column":6}},"626":{"start":{"line":2309,"column":6},"end":{"line":2309,"column":23}},"627":{"start":{"line":2313,"column":3},"end":{"line":2313,"column":15}},"628":{"start":{"line":2314,"column":3},"end":{"line":2328,"column":4}},"629":{"start":{"line":2316,"column":4},"end":{"line":2327,"column":17}},"630":{"start":{"line":2318,"column":20},"end":{"line":2318,"column":38}},"631":{"start":{"line":2322,"column":20},"end":{"line":2326,"column":21}},"632":{"start":{"line":2324,"column":24},"end":{"line":2324,"column":69}},"633":{"start":{"line":2325,"column":24},"end":{"line":2325,"column":64}},"634":{"start":{"line":2329,"column":3},"end":{"line":2329,"column":25}},"635":{"start":{"line":2330,"column":12},"end":{"line":2330,"column":24}},"636":{"start":{"line":2367,"column":3},"end":{"line":2370,"column":58}},"637":{"start":{"line":2371,"column":3},"end":{"line":2388,"column":4}},"638":{"start":{"line":2373,"column":16},"end":{"line":2380,"column":17}},"639":{"start":{"line":2375,"column":20},"end":{"line":2375,"column":50}},"640":{"start":{"line":2376,"column":20},"end":{"line":2379,"column":21}},"641":{"start":{"line":2378,"column":24},"end":{"line":2378,"column":40}},"642":{"start":{"line":2381,"column":4},"end":{"line":2387,"column":5}},"643":{"start":{"line":2383,"column":5},"end":{"line":2386,"column":6}},"644":{"start":{"line":2385,"column":6},"end":{"line":2385,"column":23}},"645":{"start":{"line":2389,"column":12},"end":{"line":2393,"column":13}},"646":{"start":{"line":2391,"column":15},"end":{"line":2391,"column":60}},"647":{"start":{"line":2392,"column":15},"end":{"line":2392,"column":55}},"648":{"start":{"line":2394,"column":3},"end":{"line":2394,"column":17}},"649":{"start":{"line":2395,"column":12},"end":{"line":2395,"column":36}},"650":{"start":{"line":2396,"column":3},"end":{"line":2396,"column":17}},"651":{"start":{"line":2427,"column":3},"end":{"line":2427,"column":20}},"652":{"start":{"line":2443,"column":12},"end":{"line":2446,"column":13}},"653":{"start":{"line":2445,"column":16},"end":{"line":2445,"column":41}},"654":{"start":{"line":2447,"column":12},"end":{"line":2447,"column":23}},"655":{"start":{"line":2462,"column":3},"end":{"line":2462,"column":24}},"656":{"start":{"line":2466,"column":0},"end":{"line":2466,"column":22}},"657":{"start":{"line":2477,"column":0},"end":{"line":2480,"column":2}},"658":{"start":{"line":2479,"column":1},"end":{"line":2479,"column":55}},"659":{"start":{"line":2482,"column":0},"end":{"line":2482,"column":22}},"660":{"start":{"line":2483,"column":0},"end":{"line":2483,"column":30}},"661":{"start":{"line":2484,"column":0},"end":{"line":2527,"column":3}},"662":{"start":{"line":2494,"column":3},"end":{"line":2494,"column":51}},"663":{"start":{"line":2495,"column":3},"end":{"line":2495,"column":14}},"664":{"start":{"line":2508,"column":3},"end":{"line":2508,"column":48}},"665":{"start":{"line":2524,"column":3},"end":{"line":2524,"column":21}},"666":{"start":{"line":2528,"column":0},"end":{"line":2528,"column":20}},"667":{"start":{"line":2539,"column":0},"end":{"line":2542,"column":2}},"668":{"start":{"line":2541,"column":1},"end":{"line":2541,"column":55}},"669":{"start":{"line":2543,"column":0},"end":{"line":2543,"column":22}},"670":{"start":{"line":2544,"column":0},"end":{"line":2553,"column":3}},"671":{"start":{"line":2554,"column":0},"end":{"line":2554,"column":33}},"672":{"start":{"line":2555,"column":0},"end":{"line":2555,"column":20}},"673":{"start":{"line":2566,"column":0},"end":{"line":2569,"column":2}},"674":{"start":{"line":2568,"column":1},"end":{"line":2568,"column":58}},"675":{"start":{"line":2571,"column":0},"end":{"line":2571,"column":28}},"676":{"start":{"line":2573,"column":0},"end":{"line":2582,"column":3}},"677":{"start":{"line":2583,"column":0},"end":{"line":2632,"column":3}},"678":{"start":{"line":2595,"column":3},"end":{"line":2595,"column":31}},"679":{"start":{"line":2596,"column":3},"end":{"line":2596,"column":39}},"680":{"start":{"line":2597,"column":3},"end":{"line":2597,"column":14}},"681":{"start":{"line":2602,"column":3},"end":{"line":2602,"column":19}},"682":{"start":{"line":2603,"column":3},"end":{"line":2603,"column":24}},"683":{"start":{"line":2604,"column":3},"end":{"line":2604,"column":14}},"684":{"start":{"line":2620,"column":3},"end":{"line":2620,"column":32}},"685":{"start":{"line":2621,"column":3},"end":{"line":2621,"column":39}},"686":{"start":{"line":2622,"column":3},"end":{"line":2622,"column":14}},"687":{"start":{"line":2627,"column":3},"end":{"line":2627,"column":19}},"688":{"start":{"line":2628,"column":3},"end":{"line":2628,"column":25}},"689":{"start":{"line":2629,"column":3},"end":{"line":2629,"column":14}},"690":{"start":{"line":2633,"column":0},"end":{"line":2633,"column":26}},"691":{"start":{"line":2644,"column":0},"end":{"line":2647,"column":2}},"692":{"start":{"line":2646,"column":1},"end":{"line":2646,"column":57}},"693":{"start":{"line":2649,"column":0},"end":{"line":2649,"column":26}},"694":{"start":{"line":2651,"column":0},"end":{"line":2660,"column":3}},"695":{"start":{"line":2662,"column":0},"end":{"line":2716,"column":3}},"696":{"start":{"line":2684,"column":12},"end":{"line":2684,"column":38}},"697":{"start":{"line":2685,"column":12},"end":{"line":2685,"column":23}},"698":{"start":{"line":2690,"column":3},"end":{"line":2691,"column":47}},"699":{"start":{"line":2692,"column":3},"end":{"line":2692,"column":14}},"700":{"start":{"line":2705,"column":12},"end":{"line":2705,"column":38}},"701":{"start":{"line":2706,"column":12},"end":{"line":2706,"column":23}},"702":{"start":{"line":2711,"column":3},"end":{"line":2712,"column":47}},"703":{"start":{"line":2713,"column":3},"end":{"line":2713,"column":14}},"704":{"start":{"line":2717,"column":0},"end":{"line":2717,"column":24}},"705":{"start":{"line":2725,"column":0},"end":{"line":2728,"column":2}},"706":{"start":{"line":2727,"column":1},"end":{"line":2727,"column":59}},"707":{"start":{"line":2729,"column":0},"end":{"line":2729,"column":33}},"708":{"start":{"line":2730,"column":0},"end":{"line":2757,"column":29}},"709":{"start":{"line":2748,"column":8},"end":{"line":2752,"column":40}},"710":{"start":{"line":2753,"column":8},"end":{"line":2753,"column":21}},"711":{"start":{"line":2754,"column":8},"end":{"line":2754,"column":54}},"712":{"start":{"line":2755,"column":2},"end":{"line":2755,"column":13}},"713":{"start":{"line":2758,"column":0},"end":{"line":2795,"column":21}},"714":{"start":{"line":2796,"column":0},"end":{"line":2796,"column":28}},"715":{"start":{"line":2807,"column":0},"end":{"line":2809,"column":2}},"716":{"start":{"line":2808,"column":4},"end":{"line":2808,"column":61}},"717":{"start":{"line":2811,"column":0},"end":{"line":2811,"column":31}},"718":{"start":{"line":2813,"column":0},"end":{"line":3054,"column":2}},"719":{"start":{"line":2832,"column":3},"end":{"line":2832,"column":19}},"720":{"start":{"line":2837,"column":3},"end":{"line":2837,"column":25}},"721":{"start":{"line":2838,"column":3},"end":{"line":2841,"column":4}},"722":{"start":{"line":2840,"column":4},"end":{"line":2840,"column":33}},"723":{"start":{"line":2842,"column":3},"end":{"line":2842,"column":14}},"724":{"start":{"line":2858,"column":12},"end":{"line":2858,"column":32}},"725":{"start":{"line":2873,"column":12},"end":{"line":2873,"column":39}},"726":{"start":{"line":2888,"column":12},"end":{"line":2888,"column":30}},"727":{"start":{"line":2901,"column":12},"end":{"line":2904,"column":13}},"728":{"start":{"line":2903,"column":16},"end":{"line":2903,"column":52}},"729":{"start":{"line":2905,"column":12},"end":{"line":2905,"column":23}},"730":{"start":{"line":2918,"column":12},"end":{"line":2921,"column":13}},"731":{"start":{"line":2920,"column":16},"end":{"line":2920,"column":53}},"732":{"start":{"line":2922,"column":12},"end":{"line":2922,"column":23}},"733":{"start":{"line":2995,"column":12},"end":{"line":2995,"column":27}},"734":{"start":{"line":3000,"column":12},"end":{"line":3000,"column":26}},"735":{"start":{"line":3001,"column":12},"end":{"line":3004,"column":13}},"736":{"start":{"line":3003,"column":16},"end":{"line":3003,"column":51}},"737":{"start":{"line":3005,"column":12},"end":{"line":3005,"column":23}},"738":{"start":{"line":3018,"column":12},"end":{"line":3018,"column":27}},"739":{"start":{"line":3023,"column":12},"end":{"line":3023,"column":26}},"740":{"start":{"line":3024,"column":12},"end":{"line":3027,"column":13}},"741":{"start":{"line":3026,"column":16},"end":{"line":3026,"column":50}},"742":{"start":{"line":3028,"column":12},"end":{"line":3028,"column":23}},"743":{"start":{"line":3050,"column":12},"end":{"line":3050,"column":37}},"744":{"start":{"line":3051,"column":12},"end":{"line":3051,"column":23}},"745":{"start":{"line":3056,"column":0},"end":{"line":3748,"column":3}},"746":{"start":{"line":3068,"column":2},"end":{"line":3077,"column":32}},"747":{"start":{"line":3078,"column":2},"end":{"line":3078,"column":53}},"748":{"start":{"line":3079,"column":8},"end":{"line":3096,"column":9}},"749":{"start":{"line":3081,"column":12},"end":{"line":3095,"column":13}},"750":{"start":{"line":3083,"column":16},"end":{"line":3083,"column":35}},"751":{"start":{"line":3085,"column":17},"end":{"line":3095,"column":13}},"752":{"start":{"line":3087,"column":16},"end":{"line":3094,"column":17}},"753":{"start":{"line":3089,"column":20},"end":{"line":3093,"column":21}},"754":{"start":{"line":3091,"column":24},"end":{"line":3091,"column":43}},"755":{"start":{"line":3092,"column":24},"end":{"line":3092,"column":30}},"756":{"start":{"line":3097,"column":8},"end":{"line":3100,"column":9}},"757":{"start":{"line":3099,"column":12},"end":{"line":3099,"column":27}},"758":{"start":{"line":3129,"column":8},"end":{"line":3132,"column":15}},"759":{"start":{"line":3133,"column":8},"end":{"line":3142,"column":9}},"760":{"start":{"line":3135,"column":12},"end":{"line":3135,"column":35}},"761":{"start":{"line":3136,"column":12},"end":{"line":3136,"column":23}},"762":{"start":{"line":3137,"column":12},"end":{"line":3137,"column":23}},"763":{"start":{"line":3141,"column":12},"end":{"line":3141,"column":46}},"764":{"start":{"line":3143,"column":8},"end":{"line":3143,"column":18}},"765":{"start":{"line":3153,"column":8},"end":{"line":3154,"column":68}},"766":{"start":{"line":3155,"column":8},"end":{"line":3155,"column":26}},"767":{"start":{"line":3156,"column":2},"end":{"line":3161,"column":10}},"768":{"start":{"line":3162,"column":8},"end":{"line":3162,"column":43}},"769":{"start":{"line":3163,"column":8},"end":{"line":3163,"column":53}},"770":{"start":{"line":3164,"column":8},"end":{"line":3164,"column":52}},"771":{"start":{"line":3165,"column":8},"end":{"line":3165,"column":49}},"772":{"start":{"line":3166,"column":8},"end":{"line":3166,"column":54}},"773":{"start":{"line":3167,"column":8},"end":{"line":3170,"column":9}},"774":{"start":{"line":3169,"column":12},"end":{"line":3169,"column":32}},"775":{"start":{"line":3180,"column":8},"end":{"line":3183,"column":14}},"776":{"start":{"line":3184,"column":8},"end":{"line":3191,"column":9}},"777":{"start":{"line":3186,"column":12},"end":{"line":3186,"column":38}},"778":{"start":{"line":3188,"column":13},"end":{"line":3191,"column":9}},"779":{"start":{"line":3190,"column":12},"end":{"line":3190,"column":71}},"780":{"start":{"line":3192,"column":8},"end":{"line":3192,"column":91}},"781":{"start":{"line":3193,"column":8},"end":{"line":3193,"column":93}},"782":{"start":{"line":3194,"column":8},"end":{"line":3194,"column":37}},"783":{"start":{"line":3195,"column":8},"end":{"line":3195,"column":37}},"784":{"start":{"line":3196,"column":8},"end":{"line":3196,"column":29}},"785":{"start":{"line":3197,"column":8},"end":{"line":3197,"column":30}},"786":{"start":{"line":3198,"column":8},"end":{"line":3198,"column":20}},"787":{"start":{"line":3208,"column":8},"end":{"line":3208,"column":31}},"788":{"start":{"line":3209,"column":8},"end":{"line":3217,"column":9}},"789":{"start":{"line":3211,"column":12},"end":{"line":3211,"column":45}},"790":{"start":{"line":3212,"column":12},"end":{"line":3215,"column":13}},"791":{"start":{"line":3214,"column":16},"end":{"line":3214,"column":62}},"792":{"start":{"line":3216,"column":12},"end":{"line":3216,"column":30}},"793":{"start":{"line":3229,"column":8},"end":{"line":3229,"column":27}},"794":{"start":{"line":3230,"column":8},"end":{"line":3233,"column":9}},"795":{"start":{"line":3232,"column":12},"end":{"line":3232,"column":32}},"796":{"start":{"line":3234,"column":8},"end":{"line":3235,"column":40}},"797":{"start":{"line":3236,"column":8},"end":{"line":3236,"column":33}},"798":{"start":{"line":3237,"column":8},"end":{"line":3237,"column":37}},"799":{"start":{"line":3238,"column":8},"end":{"line":3238,"column":21}},"800":{"start":{"line":3250,"column":8},"end":{"line":3251,"column":50}},"801":{"start":{"line":3252,"column":8},"end":{"line":3259,"column":9}},"802":{"start":{"line":3254,"column":12},"end":{"line":3254,"column":41}},"803":{"start":{"line":3258,"column":12},"end":{"line":3258,"column":49}},"804":{"start":{"line":3270,"column":8},"end":{"line":3276,"column":9}},"805":{"start":{"line":3272,"column":12},"end":{"line":3275,"column":13}},"806":{"start":{"line":3274,"column":16},"end":{"line":3274,"column":44}},"807":{"start":{"line":3277,"column":8},"end":{"line":3282,"column":9}},"808":{"start":{"line":3279,"column":12},"end":{"line":3279,"column":29}},"809":{"start":{"line":3280,"column":12},"end":{"line":3280,"column":49}},"810":{"start":{"line":3281,"column":12},"end":{"line":3281,"column":49}},"811":{"start":{"line":3283,"column":8},"end":{"line":3286,"column":9}},"812":{"start":{"line":3285,"column":12},"end":{"line":3285,"column":27}},"813":{"start":{"line":3296,"column":8},"end":{"line":3297,"column":14}},"814":{"start":{"line":3298,"column":8},"end":{"line":3304,"column":9}},"815":{"start":{"line":3300,"column":12},"end":{"line":3303,"column":13}},"816":{"start":{"line":3302,"column":16},"end":{"line":3302,"column":36}},"817":{"start":{"line":3305,"column":8},"end":{"line":3305,"column":26}},"818":{"start":{"line":3317,"column":8},"end":{"line":3326,"column":9}},"819":{"start":{"line":3319,"column":12},"end":{"line":3319,"column":22}},"820":{"start":{"line":3320,"column":12},"end":{"line":3325,"column":13}},"821":{"start":{"line":3322,"column":16},"end":{"line":3322,"column":40}},"822":{"start":{"line":3323,"column":16},"end":{"line":3323,"column":44}},"823":{"start":{"line":3324,"column":16},"end":{"line":3324,"column":40}},"824":{"start":{"line":3335,"column":8},"end":{"line":3335,"column":31}},"825":{"start":{"line":3336,"column":8},"end":{"line":3336,"column":41}},"826":{"start":{"line":3348,"column":8},"end":{"line":3350,"column":52}},"827":{"start":{"line":3351,"column":8},"end":{"line":3360,"column":9}},"828":{"start":{"line":3353,"column":12},"end":{"line":3359,"column":13}},"829":{"start":{"line":3355,"column":16},"end":{"line":3358,"column":17}},"830":{"start":{"line":3357,"column":20},"end":{"line":3357,"column":50}},"831":{"start":{"line":3361,"column":8},"end":{"line":3364,"column":9}},"832":{"start":{"line":3363,"column":12},"end":{"line":3363,"column":53}},"833":{"start":{"line":3365,"column":8},"end":{"line":3368,"column":9}},"834":{"start":{"line":3367,"column":12},"end":{"line":3367,"column":53}},"835":{"start":{"line":3379,"column":8},"end":{"line":3379,"column":26}},"836":{"start":{"line":3380,"column":8},"end":{"line":3380,"column":26}},"837":{"start":{"line":3381,"column":8},"end":{"line":3381,"column":42}},"838":{"start":{"line":3382,"column":8},"end":{"line":3382,"column":43}},"839":{"start":{"line":3394,"column":8},"end":{"line":3394,"column":26}},"840":{"start":{"line":3395,"column":8},"end":{"line":3395,"column":26}},"841":{"start":{"line":3396,"column":8},"end":{"line":3396,"column":41}},"842":{"start":{"line":3397,"column":8},"end":{"line":3397,"column":40}},"843":{"start":{"line":3407,"column":8},"end":{"line":3411,"column":10}},"844":{"start":{"line":3412,"column":8},"end":{"line":3412,"column":21}},"845":{"start":{"line":3426,"column":8},"end":{"line":3432,"column":10}},"846":{"start":{"line":3445,"column":8},"end":{"line":3445,"column":32}},"847":{"start":{"line":3458,"column":8},"end":{"line":3458,"column":42}},"848":{"start":{"line":3459,"column":8},"end":{"line":3462,"column":9}},"849":{"start":{"line":3461,"column":12},"end":{"line":3461,"column":25}},"850":{"start":{"line":3463,"column":8},"end":{"line":3463,"column":19}},"851":{"start":{"line":3489,"column":8},"end":{"line":3489,"column":44}},"852":{"start":{"line":3490,"column":8},"end":{"line":3490,"column":36}},"853":{"start":{"line":3491,"column":8},"end":{"line":3491,"column":23}},"854":{"start":{"line":3492,"column":8},"end":{"line":3492,"column":39}},"855":{"start":{"line":3504,"column":8},"end":{"line":3507,"column":9}},"856":{"start":{"line":3506,"column":12},"end":{"line":3506,"column":59}},"857":{"start":{"line":3508,"column":8},"end":{"line":3508,"column":26}},"858":{"start":{"line":3520,"column":8},"end":{"line":3521,"column":16}},"859":{"start":{"line":3522,"column":8},"end":{"line":3522,"column":46}},"860":{"start":{"line":3523,"column":8},"end":{"line":3534,"column":9}},"861":{"start":{"line":3525,"column":12},"end":{"line":3525,"column":41}},"862":{"start":{"line":3526,"column":12},"end":{"line":3526,"column":38}},"863":{"start":{"line":3527,"column":12},"end":{"line":3527,"column":75}},"864":{"start":{"line":3528,"column":12},"end":{"line":3528,"column":70}},"865":{"start":{"line":3529,"column":12},"end":{"line":3529,"column":80}},"866":{"start":{"line":3530,"column":12},"end":{"line":3530,"column":85}},"867":{"start":{"line":3531,"column":12},"end":{"line":3531,"column":45}},"868":{"start":{"line":3532,"column":12},"end":{"line":3532,"column":46}},"869":{"start":{"line":3533,"column":12},"end":{"line":3533,"column":38}},"870":{"start":{"line":3535,"column":8},"end":{"line":3538,"column":9}},"871":{"start":{"line":3537,"column":12},"end":{"line":3537,"column":27}},"872":{"start":{"line":3549,"column":8},"end":{"line":3568,"column":42}},"873":{"start":{"line":3569,"column":8},"end":{"line":3569,"column":47}},"874":{"start":{"line":3570,"column":8},"end":{"line":3626,"column":9}},"875":{"start":{"line":3572,"column":12},"end":{"line":3618,"column":13}},"876":{"start":{"line":3574,"column":16},"end":{"line":3574,"column":70}},"877":{"start":{"line":3575,"column":16},"end":{"line":3604,"column":17}},"878":{"start":{"line":3577,"column":20},"end":{"line":3577,"column":40}},"879":{"start":{"line":3578,"column":20},"end":{"line":3578,"column":39}},"880":{"start":{"line":3579,"column":20},"end":{"line":3579,"column":46}},"881":{"start":{"line":3580,"column":20},"end":{"line":3580,"column":47}},"882":{"start":{"line":3584,"column":20},"end":{"line":3603,"column":21}},"883":{"start":{"line":3586,"column":24},"end":{"line":3586,"column":59}},"884":{"start":{"line":3587,"column":24},"end":{"line":3587,"column":50}},"885":{"start":{"line":3588,"column":24},"end":{"line":3588,"column":64}},"886":{"start":{"line":3589,"column":24},"end":{"line":3589,"column":108}},"887":{"start":{"line":3590,"column":24},"end":{"line":3590,"column":136}},"888":{"start":{"line":3591,"column":24},"end":{"line":3591,"column":58}},"889":{"start":{"line":3592,"column":24},"end":{"line":3592,"column":44}},"890":{"start":{"line":3596,"column":24},"end":{"line":3596,"column":59}},"891":{"start":{"line":3597,"column":24},"end":{"line":3597,"column":65}},"892":{"start":{"line":3598,"column":24},"end":{"line":3598,"column":51}},"893":{"start":{"line":3599,"column":24},"end":{"line":3599,"column":107}},"894":{"start":{"line":3600,"column":24},"end":{"line":3600,"column":138}},"895":{"start":{"line":3601,"column":24},"end":{"line":3601,"column":59}},"896":{"start":{"line":3602,"column":24},"end":{"line":3602,"column":43}},"897":{"start":{"line":3605,"column":16},"end":{"line":3605,"column":58}},"898":{"start":{"line":3606,"column":16},"end":{"line":3606,"column":60}},"899":{"start":{"line":3607,"column":16},"end":{"line":3607,"column":76}},"900":{"start":{"line":3611,"column":16},"end":{"line":3611,"column":42}},"901":{"start":{"line":3612,"column":16},"end":{"line":3612,"column":43}},"902":{"start":{"line":3613,"column":16},"end":{"line":3613,"column":61}},"903":{"start":{"line":3614,"column":16},"end":{"line":3614,"column":63}},"904":{"start":{"line":3615,"column":16},"end":{"line":3615,"column":49}},"905":{"start":{"line":3616,"column":16},"end":{"line":3616,"column":52}},"906":{"start":{"line":3619,"column":12},"end":{"line":3619,"column":66}},"907":{"start":{"line":3623,"column":12},"end":{"line":3623,"column":54}},"908":{"start":{"line":3624,"column":12},"end":{"line":3624,"column":56}},"909":{"start":{"line":3625,"column":12},"end":{"line":3625,"column":65}},"910":{"start":{"line":3627,"column":8},"end":{"line":3631,"column":9}},"911":{"start":{"line":3629,"column":12},"end":{"line":3629,"column":47}},"912":{"start":{"line":3630,"column":12},"end":{"line":3630,"column":30}},"913":{"start":{"line":3632,"column":8},"end":{"line":3635,"column":9}},"914":{"start":{"line":3634,"column":12},"end":{"line":3634,"column":52}},"915":{"start":{"line":3650,"column":8},"end":{"line":3650,"column":18}},"916":{"start":{"line":3651,"column":8},"end":{"line":3662,"column":9}},"917":{"start":{"line":3654,"column":16},"end":{"line":3654,"column":26}},"918":{"start":{"line":3655,"column":12},"end":{"line":3655,"column":18}},"919":{"start":{"line":3657,"column":16},"end":{"line":3657,"column":46}},"920":{"start":{"line":3658,"column":12},"end":{"line":3658,"column":18}},"921":{"start":{"line":3660,"column":16},"end":{"line":3660,"column":44}},"922":{"start":{"line":3661,"column":12},"end":{"line":3661,"column":18}},"923":{"start":{"line":3663,"column":8},"end":{"line":3663,"column":21}},"924":{"start":{"line":3675,"column":8},"end":{"line":3679,"column":21}},"925":{"start":{"line":3680,"column":8},"end":{"line":3691,"column":9}},"926":{"start":{"line":3682,"column":12},"end":{"line":3690,"column":13}},"927":{"start":{"line":3684,"column":16},"end":{"line":3684,"column":33}},"928":{"start":{"line":3685,"column":16},"end":{"line":3685,"column":43}},"929":{"start":{"line":3686,"column":16},"end":{"line":3686,"column":101}},"930":{"start":{"line":3687,"column":16},"end":{"line":3687,"column":96}},"931":{"start":{"line":3688,"column":16},"end":{"line":3688,"column":106}},"932":{"start":{"line":3689,"column":16},"end":{"line":3689,"column":111}},"933":{"start":{"line":3692,"column":8},"end":{"line":3692,"column":60}},"934":{"start":{"line":3693,"column":8},"end":{"line":3693,"column":57}},"935":{"start":{"line":3694,"column":8},"end":{"line":3694,"column":63}},"936":{"start":{"line":3695,"column":8},"end":{"line":3695,"column":66}},"937":{"start":{"line":3696,"column":8},"end":{"line":3696,"column":34}},"938":{"start":{"line":3697,"column":8},"end":{"line":3697,"column":19}},"939":{"start":{"line":3709,"column":8},"end":{"line":3709,"column":37}},"940":{"start":{"line":3710,"column":8},"end":{"line":3713,"column":9}},"941":{"start":{"line":3712,"column":12},"end":{"line":3712,"column":38}},"942":{"start":{"line":3714,"column":8},"end":{"line":3717,"column":9}},"943":{"start":{"line":3716,"column":12},"end":{"line":3716,"column":43}},"944":{"start":{"line":3729,"column":8},"end":{"line":3730,"column":23}},"945":{"start":{"line":3731,"column":8},"end":{"line":3734,"column":9}},"946":{"start":{"line":3733,"column":12},"end":{"line":3733,"column":38}},"947":{"start":{"line":3735,"column":8},"end":{"line":3746,"column":9}},"948":{"start":{"line":3737,"column":12},"end":{"line":3737,"column":48}},"949":{"start":{"line":3738,"column":12},"end":{"line":3745,"column":13}},"950":{"start":{"line":3740,"column":16},"end":{"line":3740,"column":60}},"951":{"start":{"line":3744,"column":16},"end":{"line":3744,"column":47}},"952":{"start":{"line":3749,"column":0},"end":{"line":3749,"column":26}}},"branchMap":{"1":{"line":87,"type":"binary-expr","locations":[{"start":{"line":87,"column":21},"end":{"line":87,"column":31}},{"start":{"line":87,"column":35},"end":{"line":87,"column":37}}]},"2":{"line":88,"type":"if","locations":[{"start":{"line":88,"column":8},"end":{"line":88,"column":8}},{"start":{"line":88,"column":8},"end":{"line":88,"column":8}}]},"3":{"line":173,"type":"cond-expr","locations":[{"start":{"line":173,"column":33},"end":{"line":173,"column":38}},{"start":{"line":173,"column":41},"end":{"line":173,"column":46}}]},"4":{"line":174,"type":"cond-expr","locations":[{"start":{"line":174,"column":35},"end":{"line":174,"column":61}},{"start":{"line":174,"column":64},"end":{"line":174,"column":65}}]},"5":{"line":175,"type":"cond-expr","locations":[{"start":{"line":175,"column":35},"end":{"line":175,"column":61}},{"start":{"line":175,"column":64},"end":{"line":175,"column":65}}]},"6":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":12},"end":{"line":186,"column":12}},{"start":{"line":186,"column":12},"end":{"line":186,"column":12}}]},"7":{"line":274,"type":"cond-expr","locations":[{"start":{"line":274,"column":35},"end":{"line":274,"column":61}},{"start":{"line":274,"column":64},"end":{"line":274,"column":65}}]},"8":{"line":275,"type":"cond-expr","locations":[{"start":{"line":275,"column":35},"end":{"line":275,"column":61}},{"start":{"line":275,"column":64},"end":{"line":275,"column":65}}]},"9":{"line":456,"type":"if","locations":[{"start":{"line":456,"column":8},"end":{"line":456,"column":8}},{"start":{"line":456,"column":8},"end":{"line":456,"column":8}}]},"10":{"line":527,"type":"cond-expr","locations":[{"start":{"line":527,"column":30},"end":{"line":527,"column":35}},{"start":{"line":527,"column":38},"end":{"line":527,"column":43}}]},"11":{"line":528,"type":"cond-expr","locations":[{"start":{"line":528,"column":35},"end":{"line":528,"column":61}},{"start":{"line":528,"column":64},"end":{"line":528,"column":65}}]},"12":{"line":529,"type":"cond-expr","locations":[{"start":{"line":529,"column":35},"end":{"line":529,"column":61}},{"start":{"line":529,"column":64},"end":{"line":529,"column":65}}]},"13":{"line":530,"type":"if","locations":[{"start":{"line":530,"column":8},"end":{"line":530,"column":8}},{"start":{"line":530,"column":8},"end":{"line":530,"column":8}}]},"14":{"line":530,"type":"binary-expr","locations":[{"start":{"line":530,"column":12},"end":{"line":530,"column":38}},{"start":{"line":530,"column":42},"end":{"line":530,"column":68}}]},"15":{"line":600,"type":"cond-expr","locations":[{"start":{"line":600,"column":33},"end":{"line":600,"column":38}},{"start":{"line":600,"column":41},"end":{"line":600,"column":46}}]},"16":{"line":601,"type":"cond-expr","locations":[{"start":{"line":601,"column":35},"end":{"line":601,"column":61}},{"start":{"line":601,"column":64},"end":{"line":601,"column":65}}]},"17":{"line":602,"type":"cond-expr","locations":[{"start":{"line":602,"column":35},"end":{"line":602,"column":61}},{"start":{"line":602,"column":64},"end":{"line":602,"column":65}}]},"18":{"line":629,"type":"if","locations":[{"start":{"line":629,"column":8},"end":{"line":629,"column":8}},{"start":{"line":629,"column":8},"end":{"line":629,"column":8}}]},"19":{"line":631,"type":"if","locations":[{"start":{"line":631,"column":12},"end":{"line":631,"column":12}},{"start":{"line":631,"column":12},"end":{"line":631,"column":12}}]},"20":{"line":631,"type":"binary-expr","locations":[{"start":{"line":631,"column":15},"end":{"line":631,"column":19}},{"start":{"line":631,"column":23},"end":{"line":631,"column":33}}]},"21":{"line":635,"type":"if","locations":[{"start":{"line":635,"column":12},"end":{"line":635,"column":12}},{"start":{"line":635,"column":12},"end":{"line":635,"column":12}}]},"22":{"line":640,"type":"if","locations":[{"start":{"line":640,"column":8},"end":{"line":640,"column":8}},{"start":{"line":640,"column":8},"end":{"line":640,"column":8}}]},"23":{"line":644,"type":"if","locations":[{"start":{"line":644,"column":8},"end":{"line":644,"column":8}},{"start":{"line":644,"column":8},"end":{"line":644,"column":8}}]},"24":{"line":644,"type":"binary-expr","locations":[{"start":{"line":644,"column":11},"end":{"line":644,"column":20}},{"start":{"line":644,"column":24},"end":{"line":644,"column":33}}]},"25":{"line":750,"type":"cond-expr","locations":[{"start":{"line":750,"column":33},"end":{"line":750,"column":38}},{"start":{"line":750,"column":41},"end":{"line":750,"column":62}}]},"26":{"line":751,"type":"cond-expr","locations":[{"start":{"line":751,"column":35},"end":{"line":751,"column":40}},{"start":{"line":751,"column":43},"end":{"line":751,"column":65}}]},"27":{"line":752,"type":"cond-expr","locations":[{"start":{"line":752,"column":31},"end":{"line":752,"column":36}},{"start":{"line":752,"column":39},"end":{"line":752,"column":59}}]},"28":{"line":753,"type":"cond-expr","locations":[{"start":{"line":753,"column":37},"end":{"line":753,"column":42}},{"start":{"line":753,"column":45},"end":{"line":753,"column":68}}]},"29":{"line":772,"type":"if","locations":[{"start":{"line":772,"column":8},"end":{"line":772,"column":8}},{"start":{"line":772,"column":8},"end":{"line":772,"column":8}}]},"30":{"line":775,"type":"if","locations":[{"start":{"line":775,"column":8},"end":{"line":775,"column":8}},{"start":{"line":775,"column":8},"end":{"line":775,"column":8}}]},"31":{"line":779,"type":"if","locations":[{"start":{"line":779,"column":8},"end":{"line":779,"column":8}},{"start":{"line":779,"column":8},"end":{"line":779,"column":8}}]},"32":{"line":783,"type":"if","locations":[{"start":{"line":783,"column":8},"end":{"line":783,"column":8}},{"start":{"line":783,"column":8},"end":{"line":783,"column":8}}]},"33":{"line":859,"type":"if","locations":[{"start":{"line":859,"column":8},"end":{"line":859,"column":8}},{"start":{"line":859,"column":8},"end":{"line":859,"column":8}}]},"34":{"line":863,"type":"if","locations":[{"start":{"line":863,"column":8},"end":{"line":863,"column":8}},{"start":{"line":863,"column":8},"end":{"line":863,"column":8}}]},"35":{"line":882,"type":"if","locations":[{"start":{"line":882,"column":8},"end":{"line":882,"column":8}},{"start":{"line":882,"column":8},"end":{"line":882,"column":8}}]},"36":{"line":905,"type":"if","locations":[{"start":{"line":905,"column":8},"end":{"line":905,"column":8}},{"start":{"line":905,"column":8},"end":{"line":905,"column":8}}]},"37":{"line":909,"type":"if","locations":[{"start":{"line":909,"column":8},"end":{"line":909,"column":8}},{"start":{"line":909,"column":8},"end":{"line":909,"column":8}}]},"38":{"line":934,"type":"cond-expr","locations":[{"start":{"line":934,"column":47},"end":{"line":934,"column":56}},{"start":{"line":934,"column":59},"end":{"line":934,"column":67}}]},"39":{"line":946,"type":"cond-expr","locations":[{"start":{"line":946,"column":33},"end":{"line":946,"column":40}},{"start":{"line":946,"column":43},"end":{"line":946,"column":53}}]},"40":{"line":978,"type":"if","locations":[{"start":{"line":978,"column":8},"end":{"line":978,"column":8}},{"start":{"line":978,"column":8},"end":{"line":978,"column":8}}]},"41":{"line":978,"type":"binary-expr","locations":[{"start":{"line":978,"column":11},"end":{"line":978,"column":17}},{"start":{"line":978,"column":21},"end":{"line":978,"column":34}},{"start":{"line":978,"column":38},"end":{"line":978,"column":55}}]},"42":{"line":992,"type":"if","locations":[{"start":{"line":992,"column":12},"end":{"line":992,"column":12}},{"start":{"line":992,"column":12},"end":{"line":992,"column":12}}]},"43":{"line":996,"type":"if","locations":[{"start":{"line":996,"column":12},"end":{"line":996,"column":12}},{"start":{"line":996,"column":12},"end":{"line":996,"column":12}}]},"44":{"line":1000,"type":"if","locations":[{"start":{"line":1000,"column":12},"end":{"line":1000,"column":12}},{"start":{"line":1000,"column":12},"end":{"line":1000,"column":12}}]},"45":{"line":1004,"type":"if","locations":[{"start":{"line":1004,"column":12},"end":{"line":1004,"column":12}},{"start":{"line":1004,"column":12},"end":{"line":1004,"column":12}}]},"46":{"line":1016,"type":"if","locations":[{"start":{"line":1016,"column":8},"end":{"line":1016,"column":8}},{"start":{"line":1016,"column":8},"end":{"line":1016,"column":8}}]},"47":{"line":1018,"type":"if","locations":[{"start":{"line":1018,"column":12},"end":{"line":1018,"column":12}},{"start":{"line":1018,"column":12},"end":{"line":1018,"column":12}}]},"48":{"line":1023,"type":"if","locations":[{"start":{"line":1023,"column":12},"end":{"line":1023,"column":12}},{"start":{"line":1023,"column":12},"end":{"line":1023,"column":12}}]},"49":{"line":1104,"type":"cond-expr","locations":[{"start":{"line":1104,"column":40},"end":{"line":1104,"column":52}},{"start":{"line":1104,"column":55},"end":{"line":1104,"column":61}}]},"50":{"line":1152,"type":"if","locations":[{"start":{"line":1152,"column":8},"end":{"line":1152,"column":8}},{"start":{"line":1152,"column":8},"end":{"line":1152,"column":8}}]},"51":{"line":1152,"type":"binary-expr","locations":[{"start":{"line":1152,"column":11},"end":{"line":1152,"column":17}},{"start":{"line":1152,"column":21},"end":{"line":1152,"column":34}},{"start":{"line":1152,"column":38},"end":{"line":1152,"column":55}}]},"52":{"line":1155,"type":"binary-expr","locations":[{"start":{"line":1155,"column":13},"end":{"line":1155,"column":27}},{"start":{"line":1155,"column":31},"end":{"line":1155,"column":37}}]},"53":{"line":1156,"type":"binary-expr","locations":[{"start":{"line":1156,"column":14},"end":{"line":1156,"column":29}},{"start":{"line":1156,"column":33},"end":{"line":1156,"column":40}}]},"54":{"line":1157,"type":"if","locations":[{"start":{"line":1157,"column":12},"end":{"line":1157,"column":12}},{"start":{"line":1157,"column":12},"end":{"line":1157,"column":12}}]},"55":{"line":1157,"type":"binary-expr","locations":[{"start":{"line":1157,"column":15},"end":{"line":1157,"column":34}},{"start":{"line":1157,"column":38},"end":{"line":1157,"column":58}}]},"56":{"line":1162,"type":"binary-expr","locations":[{"start":{"line":1162,"column":15},"end":{"line":1162,"column":31}},{"start":{"line":1162,"column":35},"end":{"line":1162,"column":41}}]},"57":{"line":1163,"type":"binary-expr","locations":[{"start":{"line":1163,"column":18},"end":{"line":1163,"column":30}},{"start":{"line":1163,"column":34},"end":{"line":1163,"column":43}}]},"58":{"line":1164,"type":"binary-expr","locations":[{"start":{"line":1164,"column":19},"end":{"line":1164,"column":32}},{"start":{"line":1164,"column":36},"end":{"line":1164,"column":37}}]},"59":{"line":1165,"type":"cond-expr","locations":[{"start":{"line":1165,"column":44},"end":{"line":1165,"column":57}},{"start":{"line":1165,"column":60},"end":{"line":1165,"column":61}}]},"60":{"line":1171,"type":"if","locations":[{"start":{"line":1171,"column":3},"end":{"line":1171,"column":3}},{"start":{"line":1171,"column":3},"end":{"line":1171,"column":3}}]},"61":{"line":1181,"type":"if","locations":[{"start":{"line":1181,"column":3},"end":{"line":1181,"column":3}},{"start":{"line":1181,"column":3},"end":{"line":1181,"column":3}}]},"62":{"line":1181,"type":"binary-expr","locations":[{"start":{"line":1181,"column":6},"end":{"line":1181,"column":26}},{"start":{"line":1181,"column":30},"end":{"line":1181,"column":50}}]},"63":{"line":1188,"type":"if","locations":[{"start":{"line":1188,"column":4},"end":{"line":1188,"column":4}},{"start":{"line":1188,"column":4},"end":{"line":1188,"column":4}}]},"64":{"line":1207,"type":"if","locations":[{"start":{"line":1207,"column":8},"end":{"line":1207,"column":8}},{"start":{"line":1207,"column":8},"end":{"line":1207,"column":8}}]},"65":{"line":1221,"type":"if","locations":[{"start":{"line":1221,"column":2},"end":{"line":1221,"column":2}},{"start":{"line":1221,"column":2},"end":{"line":1221,"column":2}}]},"66":{"line":1221,"type":"binary-expr","locations":[{"start":{"line":1221,"column":5},"end":{"line":1221,"column":11}},{"start":{"line":1221,"column":15},"end":{"line":1221,"column":28}},{"start":{"line":1221,"column":32},"end":{"line":1221,"column":49}}]},"67":{"line":1223,"type":"binary-expr","locations":[{"start":{"line":1223,"column":13},"end":{"line":1223,"column":27}},{"start":{"line":1223,"column":31},"end":{"line":1223,"column":37}}]},"68":{"line":1224,"type":"binary-expr","locations":[{"start":{"line":1224,"column":14},"end":{"line":1224,"column":29}},{"start":{"line":1224,"column":33},"end":{"line":1224,"column":40}}]},"69":{"line":1225,"type":"if","locations":[{"start":{"line":1225,"column":3},"end":{"line":1225,"column":3}},{"start":{"line":1225,"column":3},"end":{"line":1225,"column":3}}]},"70":{"line":1225,"type":"binary-expr","locations":[{"start":{"line":1225,"column":6},"end":{"line":1225,"column":25}},{"start":{"line":1225,"column":29},"end":{"line":1225,"column":49}}]},"71":{"line":1230,"type":"binary-expr","locations":[{"start":{"line":1230,"column":15},"end":{"line":1230,"column":31}},{"start":{"line":1230,"column":35},"end":{"line":1230,"column":41}}]},"72":{"line":1231,"type":"binary-expr","locations":[{"start":{"line":1231,"column":18},"end":{"line":1231,"column":30}},{"start":{"line":1231,"column":34},"end":{"line":1231,"column":43}}]},"73":{"line":1232,"type":"binary-expr","locations":[{"start":{"line":1232,"column":19},"end":{"line":1232,"column":32}},{"start":{"line":1232,"column":36},"end":{"line":1232,"column":37}}]},"74":{"line":1233,"type":"cond-expr","locations":[{"start":{"line":1233,"column":44},"end":{"line":1233,"column":57}},{"start":{"line":1233,"column":60},"end":{"line":1233,"column":61}}]},"75":{"line":1237,"type":"if","locations":[{"start":{"line":1237,"column":3},"end":{"line":1237,"column":3}},{"start":{"line":1237,"column":3},"end":{"line":1237,"column":3}}]},"76":{"line":1244,"type":"if","locations":[{"start":{"line":1244,"column":3},"end":{"line":1244,"column":3}},{"start":{"line":1244,"column":3},"end":{"line":1244,"column":3}}]},"77":{"line":1254,"type":"if","locations":[{"start":{"line":1254,"column":3},"end":{"line":1254,"column":3}},{"start":{"line":1254,"column":3},"end":{"line":1254,"column":3}}]},"78":{"line":1254,"type":"binary-expr","locations":[{"start":{"line":1254,"column":6},"end":{"line":1254,"column":26}},{"start":{"line":1254,"column":30},"end":{"line":1254,"column":50}}]},"79":{"line":1261,"type":"if","locations":[{"start":{"line":1261,"column":4},"end":{"line":1261,"column":4}},{"start":{"line":1261,"column":4},"end":{"line":1261,"column":4}}]},"80":{"line":1272,"type":"if","locations":[{"start":{"line":1272,"column":12},"end":{"line":1272,"column":12}},{"start":{"line":1272,"column":12},"end":{"line":1272,"column":12}}]},"81":{"line":1298,"type":"if","locations":[{"start":{"line":1298,"column":2},"end":{"line":1298,"column":2}},{"start":{"line":1298,"column":2},"end":{"line":1298,"column":2}}]},"82":{"line":1302,"type":"if","locations":[{"start":{"line":1302,"column":3},"end":{"line":1302,"column":3}},{"start":{"line":1302,"column":3},"end":{"line":1302,"column":3}}]},"83":{"line":1302,"type":"binary-expr","locations":[{"start":{"line":1302,"column":6},"end":{"line":1302,"column":28}},{"start":{"line":1302,"column":32},"end":{"line":1302,"column":54}}]},"84":{"line":1305,"type":"cond-expr","locations":[{"start":{"line":1305,"column":40},"end":{"line":1305,"column":51}},{"start":{"line":1305,"column":54},"end":{"line":1305,"column":55}}]},"85":{"line":1313,"type":"if","locations":[{"start":{"line":1313,"column":5},"end":{"line":1313,"column":5}},{"start":{"line":1313,"column":5},"end":{"line":1313,"column":5}}]},"86":{"line":1321,"type":"if","locations":[{"start":{"line":1321,"column":8},"end":{"line":1321,"column":8}},{"start":{"line":1321,"column":8},"end":{"line":1321,"column":8}}]},"87":{"line":1326,"type":"if","locations":[{"start":{"line":1326,"column":4},"end":{"line":1326,"column":4}},{"start":{"line":1326,"column":4},"end":{"line":1326,"column":4}}]},"88":{"line":1330,"type":"if","locations":[{"start":{"line":1330,"column":20},"end":{"line":1330,"column":20}},{"start":{"line":1330,"column":20},"end":{"line":1330,"column":20}}]},"89":{"line":1351,"type":"if","locations":[{"start":{"line":1351,"column":8},"end":{"line":1351,"column":8}},{"start":{"line":1351,"column":8},"end":{"line":1351,"column":8}}]},"90":{"line":1362,"type":"if","locations":[{"start":{"line":1362,"column":2},"end":{"line":1362,"column":2}},{"start":{"line":1362,"column":2},"end":{"line":1362,"column":2}}]},"91":{"line":1364,"type":"if","locations":[{"start":{"line":1364,"column":3},"end":{"line":1364,"column":3}},{"start":{"line":1364,"column":3},"end":{"line":1364,"column":3}}]},"92":{"line":1364,"type":"binary-expr","locations":[{"start":{"line":1364,"column":6},"end":{"line":1364,"column":28}},{"start":{"line":1364,"column":32},"end":{"line":1364,"column":54}}]},"93":{"line":1368,"type":"if","locations":[{"start":{"line":1368,"column":16},"end":{"line":1368,"column":16}},{"start":{"line":1368,"column":16},"end":{"line":1368,"column":16}}]},"94":{"line":1372,"type":"if","locations":[{"start":{"line":1372,"column":24},"end":{"line":1372,"column":24}},{"start":{"line":1372,"column":24},"end":{"line":1372,"column":24}}]},"95":{"line":1374,"type":"if","locations":[{"start":{"line":1374,"column":28},"end":{"line":1374,"column":28}},{"start":{"line":1374,"column":28},"end":{"line":1374,"column":28}}]},"96":{"line":1392,"type":"if","locations":[{"start":{"line":1392,"column":24},"end":{"line":1392,"column":24}},{"start":{"line":1392,"column":24},"end":{"line":1392,"column":24}}]},"97":{"line":1402,"type":"if","locations":[{"start":{"line":1402,"column":8},"end":{"line":1402,"column":8}},{"start":{"line":1402,"column":8},"end":{"line":1402,"column":8}}]},"98":{"line":1407,"type":"if","locations":[{"start":{"line":1407,"column":4},"end":{"line":1407,"column":4}},{"start":{"line":1407,"column":4},"end":{"line":1407,"column":4}}]},"99":{"line":1407,"type":"binary-expr","locations":[{"start":{"line":1407,"column":7},"end":{"line":1407,"column":26}},{"start":{"line":1407,"column":30},"end":{"line":1407,"column":45}}]},"100":{"line":1410,"type":"if","locations":[{"start":{"line":1410,"column":20},"end":{"line":1410,"column":20}},{"start":{"line":1410,"column":20},"end":{"line":1410,"column":20}}]},"101":{"line":1412,"type":"if","locations":[{"start":{"line":1412,"column":24},"end":{"line":1412,"column":24}},{"start":{"line":1412,"column":24},"end":{"line":1412,"column":24}}]},"102":{"line":1430,"type":"if","locations":[{"start":{"line":1430,"column":9},"end":{"line":1430,"column":9}},{"start":{"line":1430,"column":9},"end":{"line":1430,"column":9}}]},"103":{"line":1444,"type":"if","locations":[{"start":{"line":1444,"column":2},"end":{"line":1444,"column":2}},{"start":{"line":1444,"column":2},"end":{"line":1444,"column":2}}]},"104":{"line":1482,"type":"binary-expr","locations":[{"start":{"line":1482,"column":14},"end":{"line":1482,"column":27}},{"start":{"line":1482,"column":31},"end":{"line":1482,"column":32}}]},"105":{"line":1483,"type":"if","locations":[{"start":{"line":1483,"column":2},"end":{"line":1483,"column":2}},{"start":{"line":1483,"column":2},"end":{"line":1483,"column":2}}]},"106":{"line":1485,"type":"if","locations":[{"start":{"line":1485,"column":12},"end":{"line":1485,"column":12}},{"start":{"line":1485,"column":12},"end":{"line":1485,"column":12}}]},"107":{"line":1489,"type":"if","locations":[{"start":{"line":1489,"column":8},"end":{"line":1489,"column":8}},{"start":{"line":1489,"column":8},"end":{"line":1489,"column":8}}]},"108":{"line":1500,"type":"if","locations":[{"start":{"line":1500,"column":7},"end":{"line":1500,"column":7}},{"start":{"line":1500,"column":7},"end":{"line":1500,"column":7}}]},"109":{"line":1518,"type":"cond-expr","locations":[{"start":{"line":1518,"column":33},"end":{"line":1518,"column":40}},{"start":{"line":1518,"column":43},"end":{"line":1518,"column":44}}]},"110":{"line":1519,"type":"binary-expr","locations":[{"start":{"line":1519,"column":9},"end":{"line":1519,"column":20}},{"start":{"line":1519,"column":24},"end":{"line":1519,"column":33}}]},"111":{"line":1522,"type":"cond-expr","locations":[{"start":{"line":1522,"column":25},"end":{"line":1522,"column":30}},{"start":{"line":1522,"column":33},"end":{"line":1522,"column":35}}]},"112":{"line":1526,"type":"if","locations":[{"start":{"line":1526,"column":2},"end":{"line":1526,"column":2}},{"start":{"line":1526,"column":2},"end":{"line":1526,"column":2}}]},"113":{"line":1548,"type":"if","locations":[{"start":{"line":1548,"column":8},"end":{"line":1548,"column":8}},{"start":{"line":1548,"column":8},"end":{"line":1548,"column":8}}]},"114":{"line":1575,"type":"if","locations":[{"start":{"line":1575,"column":8},"end":{"line":1575,"column":8}},{"start":{"line":1575,"column":8},"end":{"line":1575,"column":8}}]},"115":{"line":1575,"type":"binary-expr","locations":[{"start":{"line":1575,"column":11},"end":{"line":1575,"column":27}},{"start":{"line":1575,"column":31},"end":{"line":1575,"column":58}}]},"116":{"line":1579,"type":"if","locations":[{"start":{"line":1579,"column":12},"end":{"line":1579,"column":12}},{"start":{"line":1579,"column":12},"end":{"line":1579,"column":12}}]},"117":{"line":1594,"type":"if","locations":[{"start":{"line":1594,"column":16},"end":{"line":1594,"column":16}},{"start":{"line":1594,"column":16},"end":{"line":1594,"column":16}}]},"118":{"line":1600,"type":"if","locations":[{"start":{"line":1600,"column":12},"end":{"line":1600,"column":12}},{"start":{"line":1600,"column":12},"end":{"line":1600,"column":12}}]},"119":{"line":1612,"type":"if","locations":[{"start":{"line":1612,"column":8},"end":{"line":1612,"column":8}},{"start":{"line":1612,"column":8},"end":{"line":1612,"column":8}}]},"120":{"line":1614,"type":"if","locations":[{"start":{"line":1614,"column":12},"end":{"line":1614,"column":12}},{"start":{"line":1614,"column":12},"end":{"line":1614,"column":12}}]},"121":{"line":1630,"type":"if","locations":[{"start":{"line":1630,"column":8},"end":{"line":1630,"column":8}},{"start":{"line":1630,"column":8},"end":{"line":1630,"column":8}}]},"122":{"line":1789,"type":"if","locations":[{"start":{"line":1789,"column":2},"end":{"line":1789,"column":2}},{"start":{"line":1789,"column":2},"end":{"line":1789,"column":2}}]},"123":{"line":1834,"type":"binary-expr","locations":[{"start":{"line":1834,"column":9},"end":{"line":1834,"column":13}},{"start":{"line":1834,"column":17},"end":{"line":1834,"column":27}}]},"124":{"line":1893,"type":"if","locations":[{"start":{"line":1893,"column":2},"end":{"line":1893,"column":2}},{"start":{"line":1893,"column":2},"end":{"line":1893,"column":2}}]},"125":{"line":1915,"type":"if","locations":[{"start":{"line":1915,"column":8},"end":{"line":1915,"column":8}},{"start":{"line":1915,"column":8},"end":{"line":1915,"column":8}}]},"126":{"line":1948,"type":"if","locations":[{"start":{"line":1948,"column":8},"end":{"line":1948,"column":8}},{"start":{"line":1948,"column":8},"end":{"line":1948,"column":8}}]},"127":{"line":1952,"type":"cond-expr","locations":[{"start":{"line":1952,"column":42},"end":{"line":1952,"column":52}},{"start":{"line":1952,"column":55},"end":{"line":1952,"column":56}}]},"128":{"line":1953,"type":"cond-expr","locations":[{"start":{"line":1953,"column":42},"end":{"line":1953,"column":52}},{"start":{"line":1953,"column":55},"end":{"line":1953,"column":56}}]},"129":{"line":1959,"type":"if","locations":[{"start":{"line":1959,"column":12},"end":{"line":1959,"column":12}},{"start":{"line":1959,"column":12},"end":{"line":1959,"column":12}}]},"130":{"line":1965,"type":"if","locations":[{"start":{"line":1965,"column":8},"end":{"line":1965,"column":8}},{"start":{"line":1965,"column":8},"end":{"line":1965,"column":8}}]},"131":{"line":1981,"type":"if","locations":[{"start":{"line":1981,"column":8},"end":{"line":1981,"column":8}},{"start":{"line":1981,"column":8},"end":{"line":1981,"column":8}}]},"132":{"line":1995,"type":"if","locations":[{"start":{"line":1995,"column":8},"end":{"line":1995,"column":8}},{"start":{"line":1995,"column":8},"end":{"line":1995,"column":8}}]},"133":{"line":2018,"type":"if","locations":[{"start":{"line":2018,"column":8},"end":{"line":2018,"column":8}},{"start":{"line":2018,"column":8},"end":{"line":2018,"column":8}}]},"134":{"line":2021,"type":"binary-expr","locations":[{"start":{"line":2021,"column":18},"end":{"line":2021,"column":37}},{"start":{"line":2021,"column":41},"end":{"line":2021,"column":42}}]},"135":{"line":2028,"type":"if","locations":[{"start":{"line":2028,"column":16},"end":{"line":2028,"column":16}},{"start":{"line":2028,"column":16},"end":{"line":2028,"column":16}}]},"136":{"line":2030,"type":"if","locations":[{"start":{"line":2030,"column":20},"end":{"line":2030,"column":20}},{"start":{"line":2030,"column":20},"end":{"line":2030,"column":20}}]},"137":{"line":2052,"type":"if","locations":[{"start":{"line":2052,"column":8},"end":{"line":2052,"column":8}},{"start":{"line":2052,"column":8},"end":{"line":2052,"column":8}}]},"138":{"line":2070,"type":"if","locations":[{"start":{"line":2070,"column":8},"end":{"line":2070,"column":8}},{"start":{"line":2070,"column":8},"end":{"line":2070,"column":8}}]},"139":{"line":2072,"type":"if","locations":[{"start":{"line":2072,"column":12},"end":{"line":2072,"column":12}},{"start":{"line":2072,"column":12},"end":{"line":2072,"column":12}}]},"140":{"line":2077,"type":"if","locations":[{"start":{"line":2077,"column":12},"end":{"line":2077,"column":12}},{"start":{"line":2077,"column":12},"end":{"line":2077,"column":12}}]},"141":{"line":2083,"type":"if","locations":[{"start":{"line":2083,"column":12},"end":{"line":2083,"column":12}},{"start":{"line":2083,"column":12},"end":{"line":2083,"column":12}}]},"142":{"line":2196,"type":"if","locations":[{"start":{"line":2196,"column":3},"end":{"line":2196,"column":3}},{"start":{"line":2196,"column":3},"end":{"line":2196,"column":3}}]},"143":{"line":2231,"type":"cond-expr","locations":[{"start":{"line":2231,"column":23},"end":{"line":2231,"column":32}},{"start":{"line":2231,"column":35},"end":{"line":2231,"column":43}}]},"144":{"line":2232,"type":"if","locations":[{"start":{"line":2232,"column":3},"end":{"line":2232,"column":3}},{"start":{"line":2232,"column":3},"end":{"line":2232,"column":3}}]},"145":{"line":2296,"type":"binary-expr","locations":[{"start":{"line":2296,"column":11},"end":{"line":2296,"column":27}},{"start":{"line":2296,"column":31},"end":{"line":2296,"column":53}}]},"146":{"line":2298,"type":"if","locations":[{"start":{"line":2298,"column":3},"end":{"line":2298,"column":3}},{"start":{"line":2298,"column":3},"end":{"line":2298,"column":3}}]},"147":{"line":2301,"type":"if","locations":[{"start":{"line":2301,"column":4},"end":{"line":2301,"column":4}},{"start":{"line":2301,"column":4},"end":{"line":2301,"column":4}}]},"148":{"line":2307,"type":"if","locations":[{"start":{"line":2307,"column":5},"end":{"line":2307,"column":5}},{"start":{"line":2307,"column":5},"end":{"line":2307,"column":5}}]},"149":{"line":2314,"type":"if","locations":[{"start":{"line":2314,"column":3},"end":{"line":2314,"column":3}},{"start":{"line":2314,"column":3},"end":{"line":2314,"column":3}}]},"150":{"line":2314,"type":"binary-expr","locations":[{"start":{"line":2314,"column":6},"end":{"line":2314,"column":10}},{"start":{"line":2314,"column":14},"end":{"line":2314,"column":24}}]},"151":{"line":2316,"type":"if","locations":[{"start":{"line":2316,"column":4},"end":{"line":2316,"column":4}},{"start":{"line":2316,"column":4},"end":{"line":2316,"column":4}}]},"152":{"line":2316,"type":"binary-expr","locations":[{"start":{"line":2316,"column":7},"end":{"line":2316,"column":31}},{"start":{"line":2316,"column":35},"end":{"line":2316,"column":56}}]},"153":{"line":2322,"type":"if","locations":[{"start":{"line":2322,"column":20},"end":{"line":2322,"column":20}},{"start":{"line":2322,"column":20},"end":{"line":2322,"column":20}}]},"154":{"line":2370,"type":"binary-expr","locations":[{"start":{"line":2370,"column":11},"end":{"line":2370,"column":29}},{"start":{"line":2370,"column":33},"end":{"line":2370,"column":57}}]},"155":{"line":2371,"type":"if","locations":[{"start":{"line":2371,"column":3},"end":{"line":2371,"column":3}},{"start":{"line":2371,"column":3},"end":{"line":2371,"column":3}}]},"156":{"line":2373,"type":"if","locations":[{"start":{"line":2373,"column":16},"end":{"line":2373,"column":16}},{"start":{"line":2373,"column":16},"end":{"line":2373,"column":16}}]},"157":{"line":2376,"type":"if","locations":[{"start":{"line":2376,"column":20},"end":{"line":2376,"column":20}},{"start":{"line":2376,"column":20},"end":{"line":2376,"column":20}}]},"158":{"line":2383,"type":"if","locations":[{"start":{"line":2383,"column":5},"end":{"line":2383,"column":5}},{"start":{"line":2383,"column":5},"end":{"line":2383,"column":5}}]},"159":{"line":2389,"type":"if","locations":[{"start":{"line":2389,"column":12},"end":{"line":2389,"column":12}},{"start":{"line":2389,"column":12},"end":{"line":2389,"column":12}}]},"160":{"line":2389,"type":"binary-expr","locations":[{"start":{"line":2389,"column":15},"end":{"line":2389,"column":25}},{"start":{"line":2389,"column":29},"end":{"line":2389,"column":74}}]},"161":{"line":2443,"type":"if","locations":[{"start":{"line":2443,"column":12},"end":{"line":2443,"column":12}},{"start":{"line":2443,"column":12},"end":{"line":2443,"column":12}}]},"162":{"line":2691,"type":"cond-expr","locations":[{"start":{"line":2691,"column":32},"end":{"line":2691,"column":42}},{"start":{"line":2691,"column":45},"end":{"line":2691,"column":46}}]},"163":{"line":2691,"type":"binary-expr","locations":[{"start":{"line":2691,"column":9},"end":{"line":2691,"column":15}},{"start":{"line":2691,"column":19},"end":{"line":2691,"column":29}}]},"164":{"line":2712,"type":"cond-expr","locations":[{"start":{"line":2712,"column":32},"end":{"line":2712,"column":42}},{"start":{"line":2712,"column":45},"end":{"line":2712,"column":46}}]},"165":{"line":2712,"type":"binary-expr","locations":[{"start":{"line":2712,"column":9},"end":{"line":2712,"column":15}},{"start":{"line":2712,"column":19},"end":{"line":2712,"column":29}}]},"166":{"line":2838,"type":"if","locations":[{"start":{"line":2838,"column":3},"end":{"line":2838,"column":3}},{"start":{"line":2838,"column":3},"end":{"line":2838,"column":3}}]},"167":{"line":2901,"type":"if","locations":[{"start":{"line":2901,"column":12},"end":{"line":2901,"column":12}},{"start":{"line":2901,"column":12},"end":{"line":2901,"column":12}}]},"168":{"line":2918,"type":"if","locations":[{"start":{"line":2918,"column":12},"end":{"line":2918,"column":12}},{"start":{"line":2918,"column":12},"end":{"line":2918,"column":12}}]},"169":{"line":3001,"type":"if","locations":[{"start":{"line":3001,"column":12},"end":{"line":3001,"column":12}},{"start":{"line":3001,"column":12},"end":{"line":3001,"column":12}}]},"170":{"line":3024,"type":"if","locations":[{"start":{"line":3024,"column":12},"end":{"line":3024,"column":12}},{"start":{"line":3024,"column":12},"end":{"line":3024,"column":12}}]},"171":{"line":3079,"type":"if","locations":[{"start":{"line":3079,"column":8},"end":{"line":3079,"column":8}},{"start":{"line":3079,"column":8},"end":{"line":3079,"column":8}}]},"172":{"line":3079,"type":"binary-expr","locations":[{"start":{"line":3079,"column":11},"end":{"line":3079,"column":40}},{"start":{"line":3079,"column":44},"end":{"line":3079,"column":75}}]},"173":{"line":3081,"type":"if","locations":[{"start":{"line":3081,"column":12},"end":{"line":3081,"column":12}},{"start":{"line":3081,"column":12},"end":{"line":3081,"column":12}}]},"174":{"line":3081,"type":"binary-expr","locations":[{"start":{"line":3081,"column":15},"end":{"line":3081,"column":30}},{"start":{"line":3081,"column":34},"end":{"line":3081,"column":51}}]},"175":{"line":3085,"type":"if","locations":[{"start":{"line":3085,"column":17},"end":{"line":3085,"column":17}},{"start":{"line":3085,"column":17},"end":{"line":3085,"column":17}}]},"176":{"line":3089,"type":"if","locations":[{"start":{"line":3089,"column":20},"end":{"line":3089,"column":20}},{"start":{"line":3089,"column":20},"end":{"line":3089,"column":20}}]},"177":{"line":3089,"type":"binary-expr","locations":[{"start":{"line":3089,"column":23},"end":{"line":3089,"column":54}},{"start":{"line":3089,"column":58},"end":{"line":3089,"column":67}}]},"178":{"line":3097,"type":"if","locations":[{"start":{"line":3097,"column":8},"end":{"line":3097,"column":8}},{"start":{"line":3097,"column":8},"end":{"line":3097,"column":8}}]},"179":{"line":3133,"type":"if","locations":[{"start":{"line":3133,"column":8},"end":{"line":3133,"column":8}},{"start":{"line":3133,"column":8},"end":{"line":3133,"column":8}}]},"180":{"line":3154,"type":"cond-expr","locations":[{"start":{"line":3154,"column":47},"end":{"line":3154,"column":56}},{"start":{"line":3154,"column":59},"end":{"line":3154,"column":67}}]},"181":{"line":3167,"type":"if","locations":[{"start":{"line":3167,"column":8},"end":{"line":3167,"column":8}},{"start":{"line":3167,"column":8},"end":{"line":3167,"column":8}}]},"182":{"line":3180,"type":"binary-expr","locations":[{"start":{"line":3180,"column":25},"end":{"line":3180,"column":31}},{"start":{"line":3180,"column":35},"end":{"line":3180,"column":48}}]},"183":{"line":3184,"type":"if","locations":[{"start":{"line":3184,"column":8},"end":{"line":3184,"column":8}},{"start":{"line":3184,"column":8},"end":{"line":3184,"column":8}}]},"184":{"line":3188,"type":"if","locations":[{"start":{"line":3188,"column":13},"end":{"line":3188,"column":13}},{"start":{"line":3188,"column":13},"end":{"line":3188,"column":13}}]},"185":{"line":3192,"type":"binary-expr","locations":[{"start":{"line":3192,"column":12},"end":{"line":3192,"column":29}},{"start":{"line":3192,"column":33},"end":{"line":3192,"column":90}}]},"186":{"line":3193,"type":"binary-expr","locations":[{"start":{"line":3193,"column":12},"end":{"line":3193,"column":30}},{"start":{"line":3193,"column":34},"end":{"line":3193,"column":92}}]},"187":{"line":3209,"type":"if","locations":[{"start":{"line":3209,"column":8},"end":{"line":3209,"column":8}},{"start":{"line":3209,"column":8},"end":{"line":3209,"column":8}}]},"188":{"line":3212,"type":"if","locations":[{"start":{"line":3212,"column":12},"end":{"line":3212,"column":12}},{"start":{"line":3212,"column":12},"end":{"line":3212,"column":12}}]},"189":{"line":3230,"type":"if","locations":[{"start":{"line":3230,"column":8},"end":{"line":3230,"column":8}},{"start":{"line":3230,"column":8},"end":{"line":3230,"column":8}}]},"190":{"line":3251,"type":"binary-expr","locations":[{"start":{"line":3251,"column":25},"end":{"line":3251,"column":35}},{"start":{"line":3251,"column":39},"end":{"line":3251,"column":49}}]},"191":{"line":3252,"type":"if","locations":[{"start":{"line":3252,"column":8},"end":{"line":3252,"column":8}},{"start":{"line":3252,"column":8},"end":{"line":3252,"column":8}}]},"192":{"line":3252,"type":"binary-expr","locations":[{"start":{"line":3252,"column":11},"end":{"line":3252,"column":31}},{"start":{"line":3252,"column":35},"end":{"line":3252,"column":82}}]},"193":{"line":3270,"type":"if","locations":[{"start":{"line":3270,"column":8},"end":{"line":3270,"column":8}},{"start":{"line":3270,"column":8},"end":{"line":3270,"column":8}}]},"194":{"line":3272,"type":"if","locations":[{"start":{"line":3272,"column":12},"end":{"line":3272,"column":12}},{"start":{"line":3272,"column":12},"end":{"line":3272,"column":12}}]},"195":{"line":3277,"type":"if","locations":[{"start":{"line":3277,"column":8},"end":{"line":3277,"column":8}},{"start":{"line":3277,"column":8},"end":{"line":3277,"column":8}}]},"196":{"line":3277,"type":"binary-expr","locations":[{"start":{"line":3277,"column":11},"end":{"line":3277,"column":16}},{"start":{"line":3277,"column":21},"end":{"line":3277,"column":46}}]},"197":{"line":3283,"type":"if","locations":[{"start":{"line":3283,"column":8},"end":{"line":3283,"column":8}},{"start":{"line":3283,"column":8},"end":{"line":3283,"column":8}}]},"198":{"line":3300,"type":"if","locations":[{"start":{"line":3300,"column":12},"end":{"line":3300,"column":12}},{"start":{"line":3300,"column":12},"end":{"line":3300,"column":12}}]},"199":{"line":3317,"type":"if","locations":[{"start":{"line":3317,"column":8},"end":{"line":3317,"column":8}},{"start":{"line":3317,"column":8},"end":{"line":3317,"column":8}}]},"200":{"line":3350,"type":"cond-expr","locations":[{"start":{"line":3350,"column":31},"end":{"line":3350,"column":40}},{"start":{"line":3350,"column":43},"end":{"line":3350,"column":51}}]},"201":{"line":3351,"type":"if","locations":[{"start":{"line":3351,"column":8},"end":{"line":3351,"column":8}},{"start":{"line":3351,"column":8},"end":{"line":3351,"column":8}}]},"202":{"line":3355,"type":"if","locations":[{"start":{"line":3355,"column":16},"end":{"line":3355,"column":16}},{"start":{"line":3355,"column":16},"end":{"line":3355,"column":16}}]},"203":{"line":3361,"type":"if","locations":[{"start":{"line":3361,"column":8},"end":{"line":3361,"column":8}},{"start":{"line":3361,"column":8},"end":{"line":3361,"column":8}}]},"204":{"line":3365,"type":"if","locations":[{"start":{"line":3365,"column":8},"end":{"line":3365,"column":8}},{"start":{"line":3365,"column":8},"end":{"line":3365,"column":8}}]},"205":{"line":3459,"type":"if","locations":[{"start":{"line":3459,"column":8},"end":{"line":3459,"column":8}},{"start":{"line":3459,"column":8},"end":{"line":3459,"column":8}}]},"206":{"line":3504,"type":"if","locations":[{"start":{"line":3504,"column":8},"end":{"line":3504,"column":8}},{"start":{"line":3504,"column":8},"end":{"line":3504,"column":8}}]},"207":{"line":3523,"type":"if","locations":[{"start":{"line":3523,"column":8},"end":{"line":3523,"column":8}},{"start":{"line":3523,"column":8},"end":{"line":3523,"column":8}}]},"208":{"line":3527,"type":"cond-expr","locations":[{"start":{"line":3527,"column":50},"end":{"line":3527,"column":58}},{"start":{"line":3527,"column":61},"end":{"line":3527,"column":74}}]},"209":{"line":3528,"type":"cond-expr","locations":[{"start":{"line":3528,"column":47},"end":{"line":3528,"column":54}},{"start":{"line":3528,"column":57},"end":{"line":3528,"column":69}}]},"210":{"line":3529,"type":"cond-expr","locations":[{"start":{"line":3529,"column":53},"end":{"line":3529,"column":62}},{"start":{"line":3529,"column":65},"end":{"line":3529,"column":79}}]},"211":{"line":3530,"type":"cond-expr","locations":[{"start":{"line":3530,"column":56},"end":{"line":3530,"column":66}},{"start":{"line":3530,"column":69},"end":{"line":3530,"column":84}}]},"212":{"line":3535,"type":"if","locations":[{"start":{"line":3535,"column":8},"end":{"line":3535,"column":8}},{"start":{"line":3535,"column":8},"end":{"line":3535,"column":8}}]},"213":{"line":3556,"type":"cond-expr","locations":[{"start":{"line":3556,"column":43},"end":{"line":3556,"column":74}},{"start":{"line":3556,"column":77},"end":{"line":3556,"column":96}}]},"214":{"line":3570,"type":"if","locations":[{"start":{"line":3570,"column":8},"end":{"line":3570,"column":8}},{"start":{"line":3570,"column":8},"end":{"line":3570,"column":8}}]},"215":{"line":3572,"type":"if","locations":[{"start":{"line":3572,"column":12},"end":{"line":3572,"column":12}},{"start":{"line":3572,"column":12},"end":{"line":3572,"column":12}}]},"216":{"line":3575,"type":"if","locations":[{"start":{"line":3575,"column":16},"end":{"line":3575,"column":16}},{"start":{"line":3575,"column":16},"end":{"line":3575,"column":16}}]},"217":{"line":3575,"type":"binary-expr","locations":[{"start":{"line":3575,"column":19},"end":{"line":3575,"column":49}},{"start":{"line":3575,"column":53},"end":{"line":3575,"column":104}}]},"218":{"line":3584,"type":"if","locations":[{"start":{"line":3584,"column":20},"end":{"line":3584,"column":20}},{"start":{"line":3584,"column":20},"end":{"line":3584,"column":20}}]},"219":{"line":3627,"type":"if","locations":[{"start":{"line":3627,"column":8},"end":{"line":3627,"column":8}},{"start":{"line":3627,"column":8},"end":{"line":3627,"column":8}}]},"220":{"line":3632,"type":"if","locations":[{"start":{"line":3632,"column":8},"end":{"line":3632,"column":8}},{"start":{"line":3632,"column":8},"end":{"line":3632,"column":8}}]},"221":{"line":3651,"type":"switch","locations":[{"start":{"line":3653,"column":12},"end":{"line":3655,"column":18}},{"start":{"line":3656,"column":12},"end":{"line":3658,"column":18}},{"start":{"line":3659,"column":12},"end":{"line":3661,"column":18}}]},"222":{"line":3682,"type":"if","locations":[{"start":{"line":3682,"column":12},"end":{"line":3682,"column":12}},{"start":{"line":3682,"column":12},"end":{"line":3682,"column":12}}]},"223":{"line":3686,"type":"cond-expr","locations":[{"start":{"line":3686,"column":55},"end":{"line":3686,"column":86}},{"start":{"line":3686,"column":89},"end":{"line":3686,"column":100}}]},"224":{"line":3687,"type":"cond-expr","locations":[{"start":{"line":3687,"column":53},"end":{"line":3687,"column":82}},{"start":{"line":3687,"column":85},"end":{"line":3687,"column":95}}]},"225":{"line":3688,"type":"cond-expr","locations":[{"start":{"line":3688,"column":57},"end":{"line":3688,"column":90}},{"start":{"line":3688,"column":93},"end":{"line":3688,"column":105}}]},"226":{"line":3689,"type":"cond-expr","locations":[{"start":{"line":3689,"column":59},"end":{"line":3689,"column":94}},{"start":{"line":3689,"column":97},"end":{"line":3689,"column":110}}]},"227":{"line":3692,"type":"cond-expr","locations":[{"start":{"line":3692,"column":47},"end":{"line":3692,"column":55}},{"start":{"line":3692,"column":58},"end":{"line":3692,"column":59}}]},"228":{"line":3693,"type":"cond-expr","locations":[{"start":{"line":3693,"column":45},"end":{"line":3693,"column":52}},{"start":{"line":3693,"column":55},"end":{"line":3693,"column":56}}]},"229":{"line":3694,"type":"cond-expr","locations":[{"start":{"line":3694,"column":49},"end":{"line":3694,"column":58}},{"start":{"line":3694,"column":61},"end":{"line":3694,"column":62}}]},"230":{"line":3695,"type":"cond-expr","locations":[{"start":{"line":3695,"column":51},"end":{"line":3695,"column":61}},{"start":{"line":3695,"column":64},"end":{"line":3695,"column":65}}]},"231":{"line":3710,"type":"if","locations":[{"start":{"line":3710,"column":8},"end":{"line":3710,"column":8}},{"start":{"line":3710,"column":8},"end":{"line":3710,"column":8}}]},"232":{"line":3714,"type":"if","locations":[{"start":{"line":3714,"column":8},"end":{"line":3714,"column":8}},{"start":{"line":3714,"column":8},"end":{"line":3714,"column":8}}]},"233":{"line":3714,"type":"binary-expr","locations":[{"start":{"line":3714,"column":11},"end":{"line":3714,"column":22}},{"start":{"line":3714,"column":26},"end":{"line":3714,"column":31}}]},"234":{"line":3731,"type":"if","locations":[{"start":{"line":3731,"column":8},"end":{"line":3731,"column":8}},{"start":{"line":3731,"column":8},"end":{"line":3731,"column":8}}]},"235":{"line":3735,"type":"if","locations":[{"start":{"line":3735,"column":8},"end":{"line":3735,"column":8}},{"start":{"line":3735,"column":8},"end":{"line":3735,"column":8}}]},"236":{"line":3735,"type":"binary-expr","locations":[{"start":{"line":3735,"column":11},"end":{"line":3735,"column":22}},{"start":{"line":3735,"column":26},"end":{"line":3735,"column":31}}]},"237":{"line":3738,"type":"if","locations":[{"start":{"line":3738,"column":12},"end":{"line":3738,"column":12}},{"start":{"line":3738,"column":12},"end":{"line":3738,"column":12}}]}},"code":["(function () { YUI.add('graphics-vml', function (Y, NAME) {","","var IMPLEMENTATION = \"vml\","," SHAPE = \"shape\",","\tSPLITPATHPATTERN = /[a-z][^a-z]*/ig,"," SPLITARGSPATTERN = /[\\-]?[0-9]*[0-9|\\.][0-9]*/g,"," Y_LANG = Y.Lang,"," IS_NUM = Y_LANG.isNumber,"," IS_ARRAY = Y_LANG.isArray,"," Y_DOM = Y.DOM,"," Y_SELECTOR = Y.Selector,"," DOCUMENT = Y.config.doc,"," AttributeLite = Y.AttributeLite,","\tVMLShape,","\tVMLCircle,","\tVMLPath,","\tVMLRect,","\tVMLEllipse,","\tVMLGraphic,"," VMLPieSlice,"," _getClassName = Y.ClassNameManager.getClassName;","","function VMLDrawing() {}","","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Drawing.html\">`Drawing`</a> class."," * `VMLDrawing` is not intended to be used directly. Instead, use the <a href=\"Drawing.html\">`Drawing`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Drawing.html\">`Drawing`</a> class will point to the `VMLDrawing` class."," *"," * @module graphics"," * @class VMLDrawing"," * @constructor"," */","VMLDrawing.prototype = {"," /**"," * Maps path to methods"," *"," * @property _pathSymbolToMethod"," * @type Object"," * @private"," */"," _pathSymbolToMethod: {"," M: \"moveTo\","," m: \"relativeMoveTo\","," L: \"lineTo\","," l: \"relativeLineTo\","," C: \"curveTo\","," c: \"relativeCurveTo\","," Q: \"quadraticCurveTo\","," q: \"relativeQuadraticCurveTo\","," z: \"closePath\","," Z: \"closePath\""," },",""," /**"," * Value for rounding up to coordsize"," *"," * @property _coordSpaceMultiplier"," * @type Number"," * @private"," */"," _coordSpaceMultiplier: 100,",""," /**"," * Rounds dimensions and position values based on the coordinate space."," *"," * @method _round"," * @param {Number} The value for rounding"," * @return Number"," * @private"," */"," _round:function(val)"," {"," return Math.round(val * this._coordSpaceMultiplier);"," },",""," /**"," * Concatanates the path."," *"," * @method _addToPath"," * @param {String} val The value to add to the path string."," * @private"," */"," _addToPath: function(val)"," {"," this._path = this._path || \"\";"," if(this._movePath)"," {"," this._path += this._movePath;"," this._movePath = null;"," }"," this._path += val;"," },",""," /**"," * Current x position of the drawing."," *"," * @property _currentX"," * @type Number"," * @private"," */"," _currentX: 0,",""," /**"," * Current y position of the drqwing."," *"," * @property _currentY"," * @type Number"," * @private"," */"," _currentY: 0,",""," /**"," * Draws a bezier curve."," *"," * @method curveTo"," * @param {Number} cp1x x-coordinate for the first control point."," * @param {Number} cp1y y-coordinate for the first control point."," * @param {Number} cp2x x-coordinate for the second control point."," * @param {Number} cp2y y-coordinate for the second control point."," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," curveTo: function() {"," this._curveTo.apply(this, [Y.Array(arguments), false]);"," return this;"," },",""," /**"," * Draws a bezier curve."," *"," * @method relativeCurveTo"," * @param {Number} cp1x x-coordinate for the first control point."," * @param {Number} cp1y y-coordinate for the first control point."," * @param {Number} cp2x x-coordinate for the second control point."," * @param {Number} cp2y y-coordinate for the second control point."," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," relativeCurveTo: function() {"," this._curveTo.apply(this, [Y.Array(arguments), true]);"," return this;"," },",""," /**"," * Implements curveTo methods."," *"," * @method _curveTo"," * @param {Array} args The arguments to be used."," * @param {Boolean} relative Indicates whether or not to use relative coordinates."," * @private"," */"," _curveTo: function(args, relative) {"," var w,"," h,"," x,"," y,"," cp1x,"," cp1y,"," cp2x,"," cp2y,"," pts,"," right,"," left,"," bottom,"," top,"," i,"," len,"," path,"," command = relative ? \" v \" : \" c \","," relativeX = relative ? parseFloat(this._currentX) : 0,"," relativeY = relative ? parseFloat(this._currentY) : 0;"," len = args.length - 5;"," path = command;"," for(i = 0; i < len; i = i + 6)"," {"," cp1x = parseFloat(args[i]);"," cp1y = parseFloat(args[i + 1]);"," cp2x = parseFloat(args[i + 2]);"," cp2y = parseFloat(args[i + 3]);"," x = parseFloat(args[i + 4]);"," y = parseFloat(args[i + 5]);"," if(i > 0)"," {"," path = path + \", \";"," }"," path = path +"," this._round(cp1x) +"," \", \" +"," this._round(cp1y) +"," \", \" +"," this._round(cp2x) +"," \", \" +"," this._round(cp2y) +"," \", \" +"," this._round(x) +"," \", \" +"," this._round(y);"," cp1x = cp1x + relativeX;"," cp1y = cp1y + relativeY;"," cp2x = cp2x + relativeX;"," cp2y = cp2y + relativeY;"," x = x + relativeX;"," y = y + relativeY;"," right = Math.max(x, Math.max(cp1x, cp2x));"," bottom = Math.max(y, Math.max(cp1y, cp2y));"," left = Math.min(x, Math.min(cp1x, cp2x));"," top = Math.min(y, Math.min(cp1y, cp2y));"," w = Math.abs(right - left);"," h = Math.abs(bottom - top);"," pts = [[this._currentX, this._currentY] , [cp1x, cp1y], [cp2x, cp2y], [x, y]];"," this._setCurveBoundingBox(pts, w, h);"," this._currentX = x;"," this._currentY = y;"," }"," this._addToPath(path);"," },",""," /**"," * Draws a quadratic bezier curve."," *"," * @method quadraticCurveTo"," * @param {Number} cpx x-coordinate for the control point."," * @param {Number} cpy y-coordinate for the control point."," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," quadraticCurveTo: function() {"," this._quadraticCurveTo.apply(this, [Y.Array(arguments), false]);"," return this;"," },",""," /**"," * Draws a quadratic bezier curve relative to the current position."," *"," * @method relativeQuadraticCurveTo"," * @param {Number} cpx x-coordinate for the control point."," * @param {Number} cpy y-coordinate for the control point."," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," relativeQuadraticCurveTo: function() {"," this._quadraticCurveTo.apply(this, [Y.Array(arguments), true]);"," return this;"," },",""," /**"," * Implements quadraticCurveTo methods."," *"," * @method _quadraticCurveTo"," * @param {Array} args The arguments to be used."," * @param {Boolean} relative Indicates whether or not to use relative coordinates."," * @private"," */"," _quadraticCurveTo: function(args, relative) {"," var cpx,"," cpy,"," cp1x,"," cp1y,"," cp2x,"," cp2y,"," x,"," y,"," currentX = this._currentX,"," currentY = this._currentY,"," i,"," len = args.length - 3,"," bezierArgs = [],"," relativeX = relative ? parseFloat(this._currentX) : 0,"," relativeY = relative ? parseFloat(this._currentY) : 0;"," for(i = 0; i < len; i = i + 4)"," {"," cpx = parseFloat(args[i]) + relativeX;"," cpy = parseFloat(args[i + 1]) + relativeY;"," x = parseFloat(args[i + 2]) + relativeX;"," y = parseFloat(args[i + 3]) + relativeY;"," cp1x = currentX + 0.67*(cpx - currentX);"," cp1y = currentY + 0.67*(cpy - currentY);"," cp2x = cp1x + (x - currentX) * 0.34;"," cp2y = cp1y + (y - currentY) * 0.34;"," bezierArgs.push(cp1x);"," bezierArgs.push(cp1y);"," bezierArgs.push(cp2x);"," bezierArgs.push(cp2y);"," bezierArgs.push(x);"," bezierArgs.push(y);"," }"," this._curveTo.apply(this, [bezierArgs, false]);"," },",""," /**"," * Draws a rectangle."," *"," * @method drawRect"," * @param {Number} x x-coordinate"," * @param {Number} y y-coordinate"," * @param {Number} w width"," * @param {Number} h height"," * @chainable"," */"," drawRect: function(x, y, w, h) {"," this.moveTo(x, y);"," this.lineTo(x + w, y);"," this.lineTo(x + w, y + h);"," this.lineTo(x, y + h);"," this.lineTo(x, y);"," this._currentX = x;"," this._currentY = y;"," return this;"," },",""," /**"," * Draws a rectangle with rounded corners."," *"," * @method drawRect"," * @param {Number} x x-coordinate"," * @param {Number} y y-coordinate"," * @param {Number} w width"," * @param {Number} h height"," * @param {Number} ew width of the ellipse used to draw the rounded corners"," * @param {Number} eh height of the ellipse used to draw the rounded corners"," * @chainable"," */"," drawRoundRect: function(x, y, w, h, ew, eh) {"," this.moveTo(x, y + eh);"," this.lineTo(x, y + h - eh);"," this.quadraticCurveTo(x, y + h, x + ew, y + h);"," this.lineTo(x + w - ew, y + h);"," this.quadraticCurveTo(x + w, y + h, x + w, y + h - eh);"," this.lineTo(x + w, y + eh);"," this.quadraticCurveTo(x + w, y, x + w - ew, y);"," this.lineTo(x + ew, y);"," this.quadraticCurveTo(x, y, x, y + eh);"," return this;"," },",""," /**"," * Draws a circle. Used internally by `CanvasCircle` class."," *"," * @method drawCircle"," * @param {Number} x y-coordinate"," * @param {Number} y x-coordinate"," * @param {Number} r radius"," * @chainable"," * @protected"," */","\tdrawCircle: function(x, y, radius) {"," var startAngle = 0,"," endAngle = 360,"," circum = radius * 2;",""," endAngle *= 65535;"," this._drawingComplete = false;"," this._trackSize(x + circum, y + circum);"," this.moveTo((x + circum), (y + radius));"," this._addToPath("," \" ae \" +"," this._round(x + radius) +"," \", \" +"," this._round(y + radius) +"," \", \" +"," this._round(radius) +"," \", \" +"," this._round(radius) +"," \", \" +"," startAngle +"," \", \" +"," endAngle"," );"," return this;"," },",""," /**"," * Draws an ellipse."," *"," * @method drawEllipse"," * @param {Number} x x-coordinate"," * @param {Number} y y-coordinate"," * @param {Number} w width"," * @param {Number} h height"," * @chainable"," * @protected"," */","\tdrawEllipse: function(x, y, w, h) {"," var startAngle = 0,"," endAngle = 360,"," radius = w * 0.5,"," yRadius = h * 0.5;"," endAngle *= 65535;"," this._drawingComplete = false;"," this._trackSize(x + w, y + h);"," this.moveTo((x + w), (y + yRadius));"," this._addToPath("," \" ae \" +"," this._round(x + radius) +"," \", \" +"," this._round(x + radius) +"," \", \" +"," this._round(y + yRadius) +"," \", \" +"," this._round(radius) +"," \", \" +"," this._round(yRadius) +"," \", \" +"," startAngle +"," \", \" +"," endAngle"," );"," return this;"," },",""," /**"," * Draws a diamond."," *"," * @method drawDiamond"," * @param {Number} x y-coordinate"," * @param {Number} y x-coordinate"," * @param {Number} width width"," * @param {Number} height height"," * @chainable"," * @protected"," */"," drawDiamond: function(x, y, width, height)"," {"," var midWidth = width * 0.5,"," midHeight = height * 0.5;"," this.moveTo(x + midWidth, y);"," this.lineTo(x + width, y + midHeight);"," this.lineTo(x + midWidth, y + height);"," this.lineTo(x, y + midHeight);"," this.lineTo(x + midWidth, y);"," return this;"," },",""," /**"," * Draws a wedge."," *"," * @method drawWedge"," * @param {Number} x x-coordinate of the wedge's center point"," * @param {Number} y y-coordinate of the wedge's center point"," * @param {Number} startAngle starting angle in degrees"," * @param {Number} arc sweep of the wedge. Negative values draw clockwise."," * @param {Number} radius radius of wedge. If [optional] yRadius is defined, then radius is the x radius."," * @param {Number} yRadius [optional] y radius for wedge."," * @chainable"," * @private"," */"," drawWedge: function(x, y, startAngle, arc, radius)"," {"," var diameter = radius * 2;"," if(Math.abs(arc) > 360)"," {"," arc = 360;"," }"," this._currentX = x;"," this._currentY = y;"," startAngle *= -65535;"," arc *= 65536;"," startAngle = Math.round(startAngle);"," arc = Math.round(arc);"," this.moveTo(x, y);"," this._addToPath("," \" ae \" +"," this._round(x) +"," \", \" +"," this._round(y) +"," \", \" +"," this._round(radius) +"," \" \" +"," this._round(radius) +"," \", \" +"," startAngle +"," \", \" +"," arc"," );"," this._trackSize(diameter, diameter);"," return this;"," },",""," /**"," * Draws a line segment from the current drawing position to the specified x and y coordinates."," *"," * @method lineTo"," * @param {Number} point1 x-coordinate for the end point."," * @param {Number} point2 y-coordinate for the end point."," * @chainable"," */"," lineTo: function()"," {"," this._lineTo.apply(this, [Y.Array(arguments), false]);"," return this;"," },",""," /**"," * Draws a line segment using the current line style from the current drawing position to the relative x and y coordinates."," *"," * @method relativeLineTo"," * @param {Number} point1 x-coordinate for the end point."," * @param {Number} point2 y-coordinate for the end point."," * @chainable"," */"," relativeLineTo: function()"," {"," this._lineTo.apply(this, [Y.Array(arguments), true]);"," return this;"," },",""," /**"," * Implements lineTo methods."," *"," * @method _lineTo"," * @param {Array} args The arguments to be used."," * @param {Boolean} relative Indicates whether or not to use relative coordinates."," * @private"," */"," _lineTo: function(args, relative) {"," var point1 = args[0],"," i,"," len,"," x,"," y,"," path = relative ? \" r \" : \" l \","," relativeX = relative ? parseFloat(this._currentX) : 0,"," relativeY = relative ? parseFloat(this._currentY) : 0;"," if (typeof point1 === \"string\" || typeof point1 === \"number\") {"," len = args.length - 1;"," for (i = 0; i < len; i = i + 2) {"," x = parseFloat(args[i]);"," y = parseFloat(args[i + 1]);"," path += ' ' + this._round(x) + ', ' + this._round(y);"," x = x + relativeX;"," y = y + relativeY;"," this._currentX = x;"," this._currentY = y;"," this._trackSize.apply(this, [x, y]);"," }"," }"," else"," {"," len = args.length;"," for (i = 0; i < len; i = i + 1) {"," x = parseFloat(args[i][0]);"," y = parseFloat(args[i][1]);"," path += ' ' + this._round(x) + ', ' + this._round(y);"," x = x + relativeX;"," y = y + relativeY;"," this._currentX = x;"," this._currentY = y;"," this._trackSize.apply(this, [x, y]);"," }"," }"," this._addToPath(path);"," return this;"," },",""," /**"," * Moves the current drawing position to specified x and y coordinates."," *"," * @method moveTo"," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," moveTo: function()"," {"," this._moveTo.apply(this, [Y.Array(arguments), false]);"," return this;"," },",""," /**"," * Moves the current drawing position relative to specified x and y coordinates."," *"," * @method relativeMoveTo"," * @param {Number} x x-coordinate for the end point."," * @param {Number} y y-coordinate for the end point."," * @chainable"," */"," relativeMoveTo: function()"," {"," this._moveTo.apply(this, [Y.Array(arguments), true]);"," return this;"," },",""," /**"," * Implements moveTo methods."," *"," * @method _moveTo"," * @param {Array} args The arguments to be used."," * @param {Boolean} relative Indicates whether or not to use relative coordinates."," * @private"," */"," _moveTo: function(args, relative) {"," var x = parseFloat(args[0]),"," y = parseFloat(args[1]),"," command = relative ? \" t \" : \" m \","," relativeX = relative ? parseFloat(this._currentX) : 0,"," relativeY = relative ? parseFloat(this._currentY) : 0;"," this._movePath = command + this._round(x) + \", \" + this._round(y);"," x = x + relativeX;"," y = y + relativeY;"," this._trackSize(x, y);"," this._currentX = x;"," this._currentY = y;"," },",""," /**"," * Draws the graphic."," *"," * @method _draw"," * @private"," */"," _closePath: function()"," {"," var fill = this.get(\"fill\"),"," stroke = this.get(\"stroke\"),"," node = this.node,"," w = this.get(\"width\"),"," h = this.get(\"height\"),"," path = this._path,"," pathEnd = \"\","," multiplier = this._coordSpaceMultiplier;"," this._fillChangeHandler();"," this._strokeChangeHandler();"," if(path)"," {"," if(fill && fill.color)"," {"," pathEnd += ' x';"," }"," if(stroke)"," {"," pathEnd += ' e';"," }"," }"," if(path)"," {"," node.path = path + pathEnd;"," }"," if(!isNaN(w) && !isNaN(h))"," {"," node.coordOrigin = this._left + \", \" + this._top;"," node.coordSize = (w * multiplier) + \", \" + (h * multiplier);"," node.style.position = \"absolute\";"," node.style.width = w + \"px\";"," node.style.height = h + \"px\";"," }"," this._path = path;"," this._movePath = null;"," this._updateTransform();"," },",""," /**"," * Completes a drawing operation."," *"," * @method end"," * @chainable"," */"," end: function()"," {"," this._closePath();"," return this;"," },",""," /**"," * Ends a fill and stroke"," *"," * @method closePath"," * @chainable"," */"," closePath: function()"," {"," this._addToPath(\" x e\");"," return this;"," },",""," /**"," * Clears the path."," *"," * @method clear"," * @chainable"," */"," clear: function()"," {","\t\tthis._right = 0;"," this._bottom = 0;"," this._width = 0;"," this._height = 0;"," this._left = 0;"," this._top = 0;"," this._path = \"\";"," this._movePath = null;"," return this;"," },",""," /**"," * Returns the points on a curve"," *"," * @method getBezierData"," * @param Array points Array containing the begin, end and control points of a curve."," * @param Number t The value for incrementing the next set of points."," * @return Array"," * @private"," */"," getBezierData: function(points, t) {"," var n = points.length,"," tmp = [],"," i,"," j;",""," for (i = 0; i < n; ++i){"," tmp[i] = [points[i][0], points[i][1]]; // save input"," }",""," for (j = 1; j < n; ++j) {"," for (i = 0; i < n - j; ++i) {"," tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];"," tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1];"," }"," }"," return [ tmp[0][0], tmp[0][1] ];"," },",""," /**"," * Calculates the bounding box for a curve"," *"," * @method _setCurveBoundingBox"," * @param Array pts Array containing points for start, end and control points of a curve."," * @param Number w Width used to calculate the number of points to describe the curve."," * @param Number h Height used to calculate the number of points to describe the curve."," * @private"," */"," _setCurveBoundingBox: function(pts, w, h)"," {"," var i,"," left = this._currentX,"," right = left,"," top = this._currentY,"," bottom = top,"," len = Math.round(Math.sqrt((w * w) + (h * h))),"," t = 1/len,"," xy;"," for(i = 0; i < len; ++i)"," {"," xy = this.getBezierData(pts, t * i);"," left = isNaN(left) ? xy[0] : Math.min(xy[0], left);"," right = isNaN(right) ? xy[0] : Math.max(xy[0], right);"," top = isNaN(top) ? xy[1] : Math.min(xy[1], top);"," bottom = isNaN(bottom) ? xy[1] : Math.max(xy[1], bottom);"," }"," left = Math.round(left * 10)/10;"," right = Math.round(right * 10)/10;"," top = Math.round(top * 10)/10;"," bottom = Math.round(bottom * 10)/10;"," this._trackSize(right, bottom);"," this._trackSize(left, top);"," },",""," /**"," * Updates the size of the graphics object"," *"," * @method _trackSize"," * @param {Number} w width"," * @param {Number} h height"," * @private"," */"," _trackSize: function(w, h) {"," if (w > this._right) {"," this._right = w;"," }"," if(w < this._left)"," {"," this._left = w;"," }"," if (h < this._top)"," {"," this._top = h;"," }"," if (h > this._bottom)"," {"," this._bottom = h;"," }"," this._width = this._right - this._left;"," this._height = this._bottom - this._top;"," },",""," _left: 0,",""," _right: 0,",""," _top: 0,",""," _bottom: 0,",""," _width: 0,",""," _height: 0","};","Y.VMLDrawing = VMLDrawing;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Shape.html\">`Shape`</a> class."," * `VMLShape` is not intended to be used directly. Instead, use the <a href=\"Shape.html\">`Shape`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Shape.html\">`Shape`</a> class will point to the `VMLShape` class."," *"," * @module graphics"," * @class VMLShape"," * @constructor"," * @param {Object} cfg (optional) Attribute configs"," */","VMLShape = function()","{"," this._transforms = [];"," this.matrix = new Y.Matrix();"," this._normalizedMatrix = new Y.Matrix();"," VMLShape.superclass.constructor.apply(this, arguments);","};","","VMLShape.NAME = \"shape\";","","Y.extend(VMLShape, Y.GraphicBase, Y.mix({","\t/**","\t * Indicates the type of shape","\t *","\t * @property _type","\t * @type String"," * @private","\t */","\t_type: \"shape\",",""," /**"," * Init method, invoked during construction."," * Calls `initializer` method."," *"," * @method init"," * @protected"," */","\tinit: function()","\t{","\t\tthis.initializer.apply(this, arguments);","\t},","","\t/**","\t * Initializes the shape","\t *","\t * @private","\t * @method _initialize","\t */","\tinitializer: function(cfg)","\t{","\t\tvar host = this,"," graphic = cfg.graphic,"," data = this.get(\"data\");","\t\thost.createNode();"," if(graphic)"," {"," this._setGraphic(graphic);"," }"," if(data)"," {"," host._parsePathData(data);"," }"," this._updateHandler();","\t},",""," /**"," * Set the Graphic instance for the shape."," *"," * @method _setGraphic"," * @param {Graphic | Node | HTMLElement | String} render This param is used to determine the graphic instance. If it is a"," * `Graphic` instance, it will be assigned to the `graphic` attribute. Otherwise, a new Graphic instance will be created"," * and rendered into the dom element that the render represents."," * @private"," */"," _setGraphic: function(render)"," {"," var graphic;"," if(render instanceof Y.VMLGraphic)"," {"," this._graphic = render;"," }"," else"," {"," graphic = new Y.VMLGraphic({"," render: render"," });"," graphic._appendShape(this);"," this._graphic = graphic;"," this._appendStrokeAndFill();"," }"," },",""," /**"," * Appends fill and stroke nodes to the shape."," *"," * @method _appendStrokeAndFill"," * @private"," */"," _appendStrokeAndFill: function()"," {"," if(this._strokeNode)"," {"," this.node.appendChild(this._strokeNode);"," }"," if(this._fillNode)"," {"," this.node.appendChild(this._fillNode);"," }"," },","","\t/**","\t * Creates the dom node for the shape.","\t *"," * @method createNode","\t * @return HTMLElement","\t * @private","\t */","\tcreateNode: function()","\t{"," var node,"," concat = this._camelCaseConcat,","\t\t\tx = this.get(\"x\"),","\t\t\ty = this.get(\"y\"),"," w = this.get(\"width\"),"," h = this.get(\"height\"),","\t\t\tid,","\t\t\ttype,","\t\t\tname = this.name,"," nodestring,"," visibility = this.get(\"visible\") ? \"visible\" : \"hidden\",","\t\t\tstrokestring,","\t\t\tclassString,","\t\t\tstroke,","\t\t\tendcap,","\t\t\topacity,","\t\t\tjoinstyle,","\t\t\tmiterlimit,","\t\t\tdashstyle,","\t\t\tfill,","\t\t\tfillstring;","\t\t\tid = this.get(\"id\");","\t\ttype = this._type === \"path\" ? \"shape\" : this._type;"," classString = _getClassName(SHAPE) +"," \" \" +"," _getClassName(concat(IMPLEMENTATION, SHAPE)) +"," \" \" +"," _getClassName(name) +"," \" \" +"," _getClassName(concat(IMPLEMENTATION, name)) +"," \" \" +"," IMPLEMENTATION +"," type;"," stroke = this._getStrokeProps();"," fill = this._getFillProps();","","\t\tnodestring = '<' +"," type +"," ' xmlns=\"urn:schemas-microsft.com:vml\" id=\"' +"," id +"," '\" class=\"' +"," classString +"," '\" style=\"behavior:url(#default#VML);display:inline-block;position:absolute;left:' +"," x +"," 'px;top:' +"," y +"," 'px;width:' +"," w +"," 'px;height:' +"," h +"," 'px;visibility:' +"," visibility +"," '\"';",""," if(stroke && stroke.weight && stroke.weight > 0)"," {"," endcap = stroke.endcap;"," opacity = parseFloat(stroke.opacity);"," joinstyle = stroke.joinstyle;"," miterlimit = stroke.miterlimit;"," dashstyle = stroke.dashstyle;"," nodestring += ' stroked=\"t\" strokecolor=\"' + stroke.color + '\" strokeWeight=\"' + stroke.weight + 'px\"';",""," strokestring = '<stroke class=\"vmlstroke\"' +"," ' xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' on=\"t\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;\"' +"," ' opacity=\"' + opacity + '\"';"," if(endcap)"," {"," strokestring += ' endcap=\"' + endcap + '\"';"," }"," if(joinstyle)"," {"," strokestring += ' joinstyle=\"' + joinstyle + '\"';"," }"," if(miterlimit)"," {"," strokestring += ' miterlimit=\"' + miterlimit + '\"';"," }"," if(dashstyle)"," {"," strokestring += ' dashstyle=\"' + dashstyle + '\"';"," }"," strokestring += '></stroke>';"," this._strokeNode = DOCUMENT.createElement(strokestring);"," nodestring += ' stroked=\"t\"';"," }"," else"," {"," nodestring += ' stroked=\"f\"';"," }"," if(fill)"," {"," if(fill.node)"," {"," fillstring = fill.node;"," this._fillNode = DOCUMENT.createElement(fillstring);"," }"," if(fill.color)"," {"," nodestring += ' fillcolor=\"' + fill.color + '\"';"," }"," nodestring += ' filled=\"' + fill.filled + '\"';"," }","",""," nodestring += '>';"," nodestring += '</' + type + '>';",""," node = DOCUMENT.createElement(nodestring);",""," this.node = node;"," this._strokeFlag = false;"," this._fillFlag = false;","\t},","","\t/**","\t * Add a class name to each node.","\t *","\t * @method addClass","\t * @param {String} className the class name to add to the node's class attribute","\t */","\taddClass: function(className)","\t{"," var node = this.node;","\t\tY_DOM.addClass(node, className);","\t},","","\t/**","\t * Removes a class name from each node.","\t *","\t * @method removeClass","\t * @param {String} className the class name to remove from the node's class attribute","\t */","\tremoveClass: function(className)","\t{"," var node = this.node;","\t\tY_DOM.removeClass(node, className);","\t},","","\t/**","\t * Gets the current position of the node in page coordinates.","\t *","\t * @method getXY","\t * @return Array The XY position of the shape.","\t */","\tgetXY: function()","\t{","\t\tvar graphic = this._graphic,","\t\t\tparentXY = graphic.getXY(),","\t\t\tx = this.get(\"x\"),","\t\t\ty = this.get(\"y\");","\t\treturn [parentXY[0] + x, parentXY[1] + y];","\t},","","\t/**","\t * Set the position of the shape in page coordinates, regardless of how the node is positioned.","\t *","\t * @method setXY","\t * @param {Array} Contains x & y values for new position (coordinates are page-based)"," *","\t */","\tsetXY: function(xy)","\t{","\t\tvar graphic = this._graphic,","\t\t\tparentXY = graphic.getXY();","\t\tthis.set(\"x\", xy[0] - parentXY[0]);","\t\tthis.set(\"y\", xy[1] - parentXY[1]);","\t},","","\t/**","\t * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy.","\t *","\t * @method contains","\t * @param {VMLShape | HTMLElement} needle The possible node or descendent","\t * @return Boolean Whether or not this shape is the needle or its ancestor.","\t */","\tcontains: function(needle)","\t{","\t\tvar node = needle instanceof Y.Node ? needle._node : needle;"," return node === this.node;","\t},","","\t/**","\t * Compares nodes to determine if they match.","\t * Node instances can be compared to each other and/or HTMLElements.","\t * @method compareTo","\t * @param {HTMLElement | Node} refNode The reference node to compare to the node.","\t * @return {Boolean} True if the nodes match, false if they do not.","\t */","\tcompareTo: function(refNode) {"," var node = this.node;","\t\treturn node === refNode;","\t},","","\t/**","\t * Test if the supplied node matches the supplied selector.","\t *","\t * @method test","\t * @param {String} selector The CSS selector to test against.","\t * @return Boolean Wheter or not the shape matches the selector.","\t */","\ttest: function(selector)","\t{","\t\treturn Y_SELECTOR.test(this.node, selector);","\t},","","\t/**"," * Calculates and returns properties for setting an initial stroke."," *"," * @method _getStrokeProps"," * @return Object"," *","\t * @private","\t */"," _getStrokeProps: function()"," {","\t\tvar props,","\t\t\tstroke = this.get(\"stroke\"),","\t\t\tstrokeOpacity,","\t\t\tdashstyle,","\t\t\tdash = \"\",","\t\t\tval,","\t\t\ti = 0,","\t\t\tlen,","\t\t\tlinecap,","\t\t\tlinejoin;"," if(stroke && stroke.weight && stroke.weight > 0)","\t\t{","\t\t\tprops = {};","\t\t\tlinecap = stroke.linecap || \"flat\";","\t\t\tlinejoin = stroke.linejoin || \"round\";"," if(linecap !== \"round\" && linecap !== \"square\")"," {"," linecap = \"flat\";"," }","\t\t\tstrokeOpacity = parseFloat(stroke.opacity);","\t\t\tdashstyle = stroke.dashstyle || \"none\";","\t\t\tstroke.color = stroke.color || \"#000000\";","\t\t\tstroke.weight = stroke.weight || 1;","\t\t\tstroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1;","\t\t\tprops.stroked = true;","\t\t\tprops.color = stroke.color;","\t\t\tprops.weight = stroke.weight;","\t\t\tprops.endcap = linecap;","\t\t\tprops.opacity = stroke.opacity;","\t\t\tif(IS_ARRAY(dashstyle))","\t\t\t{","\t\t\t\tdash = [];","\t\t\t\tlen = dashstyle.length;","\t\t\t\tfor(i = 0; i < len; ++i)","\t\t\t\t{","\t\t\t\t\tval = dashstyle[i];","\t\t\t\t\tdash[i] = val / stroke.weight;","\t\t\t\t}","\t\t\t}","\t\t\tif(linejoin === \"round\" || linejoin === \"bevel\")","\t\t\t{","\t\t\t\tprops.joinstyle = linejoin;","\t\t\t}","\t\t\telse","\t\t\t{","\t\t\t\tlinejoin = parseInt(linejoin, 10);","\t\t\t\tif(IS_NUM(linejoin))","\t\t\t\t{","\t\t\t\t\tprops.miterlimit = Math.max(linejoin, 1);","\t\t\t\t\tprops.joinstyle = \"miter\";","\t\t\t\t}","\t\t\t}","\t\t\tprops.dashstyle = dash;"," }"," return props;"," },","","\t/**","\t * Adds a stroke to the shape node.","\t *","\t * @method _strokeChangeHandler","\t * @private","\t */","\t_strokeChangeHandler: function()","\t{"," if(!this._strokeFlag)"," {"," return;"," }"," var node = this.node,","\t\t\tstroke = this.get(\"stroke\"),","\t\t\tstrokeOpacity,","\t\t\tdashstyle,","\t\t\tdash = \"\",","\t\t\tval,","\t\t\ti = 0,","\t\t\tlen,","\t\t\tlinecap,","\t\t\tlinejoin;","\t\tif(stroke && stroke.weight && stroke.weight > 0)","\t\t{","\t\t\tlinecap = stroke.linecap || \"flat\";","\t\t\tlinejoin = stroke.linejoin || \"round\";","\t\t\tif(linecap !== \"round\" && linecap !== \"square\")","\t\t\t{","\t\t\t\tlinecap = \"flat\";","\t\t\t}","\t\t\tstrokeOpacity = parseFloat(stroke.opacity);","\t\t\tdashstyle = stroke.dashstyle || \"none\";","\t\t\tstroke.color = stroke.color || \"#000000\";","\t\t\tstroke.weight = stroke.weight || 1;","\t\t\tstroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1;","\t\t\tnode.stroked = true;","\t\t\tnode.strokeColor = stroke.color;","\t\t\tnode.strokeWeight = stroke.weight + \"px\";","\t\t\tif(!this._strokeNode)","\t\t\t{","\t\t\t\tthis._strokeNode = this._createGraphicNode(\"stroke\");","\t\t\t\tnode.appendChild(this._strokeNode);","\t\t\t}","\t\t\tthis._strokeNode.endcap = linecap;","\t\t\tthis._strokeNode.opacity = stroke.opacity;","\t\t\tif(IS_ARRAY(dashstyle))","\t\t\t{","\t\t\t\tdash = [];","\t\t\t\tlen = dashstyle.length;","\t\t\t\tfor(i = 0; i < len; ++i)","\t\t\t\t{","\t\t\t\t\tval = dashstyle[i];","\t\t\t\t\tdash[i] = val / stroke.weight;","\t\t\t\t}","\t\t\t}","\t\t\tif(linejoin === \"round\" || linejoin === \"bevel\")","\t\t\t{","\t\t\t\tthis._strokeNode.joinstyle = linejoin;","\t\t\t}","\t\t\telse","\t\t\t{","\t\t\t\tlinejoin = parseInt(linejoin, 10);","\t\t\t\tif(IS_NUM(linejoin))","\t\t\t\t{","\t\t\t\t\tthis._strokeNode.miterlimit = Math.max(linejoin, 1);","\t\t\t\t\tthis._strokeNode.joinstyle = \"miter\";","\t\t\t\t}","\t\t\t}","\t\t\tthis._strokeNode.dashstyle = dash;"," this._strokeNode.on = true;","\t\t}","\t\telse","\t\t{"," if(this._strokeNode)"," {"," this._strokeNode.on = false;"," }","\t\t\tnode.stroked = false;","\t\t}"," this._strokeFlag = false;","\t},","","\t/**"," * Calculates and returns properties for setting an initial fill."," *"," * @method _getFillProps"," * @return Object"," *","\t * @private","\t */","\t_getFillProps: function()","\t{","\t\tvar fill = this.get(\"fill\"),","\t\t\tfillOpacity,","\t\t\tprops,","\t\t\tgradient,","\t\t\ti,","\t\t\tfillstring,","\t\t\tfilled = false;","\t\tif(fill)","\t\t{","\t\t\tprops = {};","","\t\t\tif(fill.type === \"radial\" || fill.type === \"linear\")","\t\t\t{","\t\t\t\tfillOpacity = parseFloat(fill.opacity);","\t\t\t\tfillOpacity = IS_NUM(fillOpacity) ? fillOpacity : 1;","\t\t\t\tfilled = true;","\t\t\t\tgradient = this._getGradientFill(fill);","\t\t\t\tfillstring = '<fill xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' class=\"vmlfill\" style=\"behavior:url(#default#VML);display:inline-block;\"' +"," ' opacity=\"' + fillOpacity + '\"';","\t\t\t\tfor(i in gradient)","\t\t\t\t{","\t\t\t\t\tif(gradient.hasOwnProperty(i))","\t\t\t\t\t{","\t\t\t\t\t\tfillstring += ' ' + i + '=\"' + gradient[i] + '\"';","\t\t\t\t\t}","\t\t\t\t}","\t\t\t\tfillstring += ' />';","\t\t\t\tprops.node = fillstring;","\t\t\t}","\t\t\telse if(fill.color)","\t\t\t{","\t\t\t\tfillOpacity = parseFloat(fill.opacity);","\t\t\t\tfilled = true;"," props.color = fill.color;","\t\t\t\tif(IS_NUM(fillOpacity))","\t\t\t\t{","\t\t\t\t\tfillOpacity = Math.max(Math.min(fillOpacity, 1), 0);"," props.opacity = fillOpacity;"," if(fillOpacity < 1)"," {"," props.node = '<fill xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' class=\"vmlfill\" style=\"behavior:url(#default#VML);display:inline-block;\"' +"," ' type=\"solid\" opacity=\"' + fillOpacity + '\"/>';"," }"," }","\t\t\t}","\t\t\tprops.filled = filled;","\t\t}","\t\treturn props;","\t},","","\t/**","\t * Adds a fill to the shape node.","\t *","\t * @method _fillChangeHandler","\t * @private","\t */","\t_fillChangeHandler: function()","\t{"," if(!this._fillFlag)"," {"," return;"," }","\t\tvar node = this.node,","\t\t\tfill = this.get(\"fill\"),","\t\t\tfillOpacity,","\t\t\tfillstring,","\t\t\tfilled = false,"," i,"," gradient;","\t\tif(fill)","\t\t{","\t\t\tif(fill.type === \"radial\" || fill.type === \"linear\")","\t\t\t{","\t\t\t\tfilled = true;","\t\t\t\tgradient = this._getGradientFill(fill);"," if(this._fillNode)"," {"," for(i in gradient)"," {"," if(gradient.hasOwnProperty(i))"," {"," if(i === \"colors\")"," {"," this._fillNode.colors.value = gradient[i];"," }"," else"," {"," this._fillNode[i] = gradient[i];"," }"," }"," }"," }"," else"," {"," fillstring = '<fill xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' class=\"vmlfill\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;\"';"," for(i in gradient)"," {"," if(gradient.hasOwnProperty(i))"," {"," fillstring += ' ' + i + '=\"' + gradient[i] + '\"';"," }"," }"," fillstring += ' />';"," this._fillNode = DOCUMENT.createElement(fillstring);"," node.appendChild(this._fillNode);"," }","\t\t\t}","\t\t\telse if(fill.color)","\t\t\t{"," node.fillcolor = fill.color;","\t\t\t\tfillOpacity = parseFloat(fill.opacity);","\t\t\t\tfilled = true;","\t\t\t\tif(IS_NUM(fillOpacity) && fillOpacity < 1)","\t\t\t\t{","\t\t\t\t\tfill.opacity = fillOpacity;"," if(this._fillNode)","\t\t\t\t\t{"," if(this._fillNode.getAttribute(\"type\") !== \"solid\")"," {"," this._fillNode.type = \"solid\";"," }","\t\t\t\t\t\tthis._fillNode.opacity = fillOpacity;","\t\t\t\t\t}","\t\t\t\t\telse","\t\t\t\t\t{"," fillstring = '<fill xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' class=\"vmlfill\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;\"' +"," ' type=\"solid\"' +"," ' opacity=\"' + fillOpacity + '\"' +"," '/>';"," this._fillNode = DOCUMENT.createElement(fillstring);"," node.appendChild(this._fillNode);","\t\t\t\t\t}","\t\t\t\t}","\t\t\t\telse if(this._fillNode)"," {"," this._fillNode.opacity = 1;"," this._fillNode.type = \"solid\";","\t\t\t\t}","\t\t\t}","\t\t}","\t\tnode.filled = filled;"," this._fillFlag = false;","\t},","","\t//not used. remove next release."," _updateFillNode: function(node)","\t{","\t\tif(!this._fillNode)","\t\t{","\t\t\tthis._fillNode = this._createGraphicNode(\"fill\");","\t\t\tnode.appendChild(this._fillNode);","\t\t}","\t},",""," /**"," * Calculates and returns an object containing gradient properties for a fill node."," *"," * @method _getGradientFill"," * @param {Object} fill Object containing fill properties."," * @return Object"," * @private"," */","\t_getGradientFill: function(fill)","\t{","\t\tvar gradientProps = {},","\t\t\tgradientBoxWidth,","\t\t\tgradientBoxHeight,","\t\t\ttype = fill.type,","\t\t\tw = this.get(\"width\"),","\t\t\th = this.get(\"height\"),","\t\t\tisNumber = IS_NUM,","\t\t\tstop,","\t\t\tstops = fill.stops,","\t\t\tlen = stops.length,","\t\t\topacity,","\t\t\tcolor,","\t\t\ti,","\t\t\toi,","\t\t\tcolorstring = \"\",","\t\t\tcx = fill.cx,","\t\t\tcy = fill.cy,","\t\t\tfx = fill.fx,","\t\t\tfy = fill.fy,","\t\t\tr = fill.r,"," pct,","\t\t\trotation = fill.rotation || 0;","\t\tif(type === \"linear\")","\t\t{"," if(rotation <= 270)"," {"," rotation = Math.abs(rotation - 270);"," }","\t\t\telse if(rotation < 360)"," {"," rotation = 270 + (360 - rotation);"," }"," else"," {"," rotation = 270;"," }"," gradientProps.type = \"gradient\";//\"gradientunscaled\";","\t\t\tgradientProps.angle = rotation;","\t\t}","\t\telse if(type === \"radial\")","\t\t{","\t\t\tgradientBoxWidth = w * (r * 2);","\t\t\tgradientBoxHeight = h * (r * 2);","\t\t\tfx = r * 2 * (fx - 0.5);","\t\t\tfy = r * 2 * (fy - 0.5);","\t\t\tfx += cx;","\t\t\tfy += cy;","\t\t\tgradientProps.focussize = (gradientBoxWidth/w)/10 + \"% \" + (gradientBoxHeight/h)/10 + \"%\";","\t\t\tgradientProps.alignshape = false;","\t\t\tgradientProps.type = \"gradientradial\";","\t\t\tgradientProps.focus = \"100%\";","\t\t\tgradientProps.focusposition = Math.round(fx * 100) + \"% \" + Math.round(fy * 100) + \"%\";","\t\t}","\t\tfor(i = 0;i < len; ++i) {","\t\t\tstop = stops[i];","\t\t\tcolor = stop.color;","\t\t\topacity = stop.opacity;","\t\t\topacity = isNumber(opacity) ? opacity : 1;","\t\t\tpct = stop.offset || i/(len-1);","\t\t\tpct *= (r * 2);"," pct = Math.round(100 * pct) + \"%\";"," oi = i > 0 ? i + 1 : \"\";"," gradientProps[\"opacity\" + oi] = opacity + \"\";"," colorstring += \", \" + pct + \" \" + color;","\t\t}","\t\tif(parseFloat(pct) < 100)","\t\t{","\t\t\tcolorstring += \", 100% \" + color;","\t\t}","\t\tgradientProps.colors = colorstring.substr(2);","\t\treturn gradientProps;","\t},",""," /**"," * Adds a transform to the shape."," *"," * @method _addTransform"," * @param {String} type The transform being applied."," * @param {Array} args The arguments for the transform.","\t * @private","\t */","\t_addTransform: function(type, args)","\t{"," args = Y.Array(args);"," this._transform = Y_LANG.trim(this._transform + \" \" + type + \"(\" + args.join(\", \") + \")\");"," args.unshift(type);"," this._transforms.push(args);"," if(this.initialized)"," {"," this._updateTransform();"," }","\t},","","\t/**"," * Applies all transforms."," *"," * @method _updateTransform","\t * @private","\t */","\t_updateTransform: function()","\t{","\t\tvar node = this.node,"," key,","\t\t\ttransform,","\t\t\ttransformOrigin,"," x = this.get(\"x\"),"," y = this.get(\"y\"),"," tx,"," ty,"," matrix = this.matrix,"," normalizedMatrix = this._normalizedMatrix,"," isPathShape = this instanceof Y.VMLPath,"," i,"," len = this._transforms.length;"," if(this._transforms && this._transforms.length > 0)","\t\t{"," transformOrigin = this.get(\"transformOrigin\");",""," if(isPathShape)"," {"," normalizedMatrix.translate(this._left, this._top);"," }"," //vml skew matrix transformOrigin ranges from -0.5 to 0.5."," //subtract 0.5 from values"," tx = transformOrigin[0] - 0.5;"," ty = transformOrigin[1] - 0.5;",""," //ensure the values are within the appropriate range to avoid errors"," tx = Math.max(-0.5, Math.min(0.5, tx));"," ty = Math.max(-0.5, Math.min(0.5, ty));"," for(i = 0; i < len; ++i)"," {"," key = this._transforms[i].shift();"," if(key)"," {"," normalizedMatrix[key].apply(normalizedMatrix, this._transforms[i]);"," matrix[key].apply(matrix, this._transforms[i]);"," }","\t\t\t}"," if(isPathShape)"," {"," normalizedMatrix.translate(-this._left, -this._top);"," }"," transform = normalizedMatrix.a + \",\" +"," normalizedMatrix.c + \",\" +"," normalizedMatrix.b + \",\" +"," normalizedMatrix.d + \",\" +"," 0 + \",\" +"," 0;","\t\t}"," this._graphic.addToRedrawQueue(this);"," if(transform)"," {"," if(!this._skew)"," {"," this._skew = DOCUMENT.createElement("," '<skew class=\"vmlskew\"' +"," ' xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' on=\"false\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;\"' +"," '/>'"," );"," this.node.appendChild(this._skew);"," }"," this._skew.matrix = transform;"," this._skew.on = true;"," //this._skew.offset = this._getSkewOffsetValue(normalizedMatrix.dx) + \"px, \" + this._getSkewOffsetValue(normalizedMatrix.dy) + \"px\";"," this._skew.origin = tx + \", \" + ty;"," }"," if(this._type !== \"path\")"," {"," this._transforms = [];"," }"," //add the translate to the x and y coordinates"," node.style.left = (x + this._getSkewOffsetValue(normalizedMatrix.dx)) + \"px\";"," node.style.top = (y + this._getSkewOffsetValue(normalizedMatrix.dy)) + \"px\";"," },",""," /**"," * Normalizes the skew offset values between -32767 and 32767."," *"," * @method _getSkewOffsetValue"," * @param {Number} val The value to normalize"," * @return Number"," * @private"," */"," _getSkewOffsetValue: function(val)"," {"," var sign = Y.MatrixUtil.sign(val),"," absVal = Math.abs(val);"," val = Math.min(absVal, 32767) * sign;"," return val;"," },","","\t/**","\t * Storage for translateX","\t *"," * @property _translateX"," * @type Number","\t * @private","\t */","\t_translateX: 0,","","\t/**","\t * Storage for translateY","\t *"," * @property _translateY"," * @type Number","\t * @private","\t */","\t_translateY: 0,",""," /**"," * Storage for the transform attribute."," *"," * @property _transform"," * @type String"," * @private"," */"," _transform: \"\",",""," /**","\t * Specifies a 2d translation.","\t *","\t * @method translate","\t * @param {Number} x The value to translate on the x-axis.","\t * @param {Number} y The value to translate on the y-axis.","\t */","\ttranslate: function(x, y)","\t{","\t\tthis._translateX += x;","\t\tthis._translateY += y;","\t\tthis._addTransform(\"translate\", arguments);","\t},","","\t/**","\t * Translates the shape along the x-axis. When translating x and y coordinates,","\t * use the `translate` method.","\t *","\t * @method translateX","\t * @param {Number} x The value to translate.","\t */","\ttranslateX: function(x)"," {"," this._translateX += x;"," this._addTransform(\"translateX\", arguments);"," },","","\t/**","\t * Performs a translate on the y-coordinate. When translating x and y coordinates,","\t * use the `translate` method.","\t *","\t * @method translateY","\t * @param {Number} y The value to translate.","\t */","\ttranslateY: function(y)"," {"," this._translateY += y;"," this._addTransform(\"translateY\", arguments);"," },",""," /**"," * Skews the shape around the x-axis and y-axis."," *"," * @method skew"," * @param {Number} x The value to skew on the x-axis."," * @param {Number} y The value to skew on the y-axis."," */"," skew: function()"," {"," this._addTransform(\"skew\", arguments);"," },","","\t/**","\t * Skews the shape around the x-axis.","\t *","\t * @method skewX","\t * @param {Number} x x-coordinate","\t */"," skewX: function()"," {"," this._addTransform(\"skewX\", arguments);"," },","","\t/**","\t * Skews the shape around the y-axis.","\t *","\t * @method skewY","\t * @param {Number} y y-coordinate","\t */"," skewY: function()"," {"," this._addTransform(\"skewY\", arguments);"," },","","\t/**","\t * Rotates the shape clockwise around it transformOrigin.","\t *","\t * @method rotate","\t * @param {Number} deg The degree of the rotation.","\t */"," rotate: function()"," {"," this._addTransform(\"rotate\", arguments);"," },","","\t/**","\t * Specifies a 2d scaling operation.","\t *","\t * @method scale","\t * @param {Number} val","\t */"," scale: function()"," {"," this._addTransform(\"scale\", arguments);"," },","","\t/**"," * Overrides default `on` method. Checks to see if its a dom interaction event. If so,"," * return an event attached to the `node` element. If not, return the normal functionality."," *"," * @method on"," * @param {String} type event type"," * @param {Object} callback function","\t * @private","\t */","\ton: function(type, fn)","\t{","\t\tif(Y.Node.DOM_EVENTS[type])","\t\t{"," return Y.on(type, fn, \"#\" + this.get(\"id\"));","\t\t}","\t\treturn Y.on.apply(this, arguments);","\t},","","\t/**","\t * Draws the shape.","\t *","\t * @method _draw","\t * @private","\t */","\t_draw: function()","\t{","\t},","","\t/**"," * Updates `Shape` based on attribute changes."," *"," * @method _updateHandler","\t * @private","\t */","\t_updateHandler: function()","\t{","\t\tvar host = this,"," node = host.node;"," host._fillChangeHandler();"," host._strokeChangeHandler();"," node.style.width = this.get(\"width\") + \"px\";"," node.style.height = this.get(\"height\") + \"px\";"," this._draw();","\t\thost._updateTransform();","\t},","","\t/**","\t * Creates a graphic node","\t *","\t * @method _createGraphicNode","\t * @param {String} type node type to create","\t * @return HTMLElement","\t * @private","\t */","\t_createGraphicNode: function(type)","\t{","\t\ttype = type || this._type;","\t\treturn DOCUMENT.createElement("," '<' + type +"," ' xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;\"' +"," ' class=\"vml' + type + '\"' +"," '/>'"," );","\t},","","\t/**","\t * Value function for fill attribute","\t *","\t * @private","\t * @method _getDefaultFill","\t * @return Object","\t */","\t_getDefaultFill: function() {","\t\treturn {","\t\t\ttype: \"solid\",","\t\t\topacity: 1,","\t\t\tcx: 0.5,","\t\t\tcy: 0.5,","\t\t\tfx: 0.5,","\t\t\tfy: 0.5,","\t\t\tr: 0.5","\t\t};","\t},","","\t/**","\t * Value function for stroke attribute","\t *","\t * @private","\t * @method _getDefaultStroke","\t * @return Object","\t */","\t_getDefaultStroke: function()","\t{","\t\treturn {","\t\t\tweight: 1,","\t\t\tdashstyle: \"none\",","\t\t\tcolor: \"#000\",","\t\t\topacity: 1.0","\t\t};","\t},",""," /**"," * Sets the value of an attribute."," *"," * @method set"," * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can"," * be passed in to set multiple attributes at once."," * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as"," * the name param."," */","\tset: function()","\t{","\t\tvar host = this;","\t\tAttributeLite.prototype.set.apply(host, arguments);","\t\tif(host.initialized)","\t\t{","\t\t\thost._updateHandler();","\t\t}","\t},","","\t/**","\t * Returns the bounds for a shape.","\t *"," * Calculates the a new bounding box from the original corner coordinates (base on size and position) and the transform matrix."," * The calculated bounding box is used by the graphic instance to calculate its viewBox."," *","\t * @method getBounds","\t * @return Object","\t */","\tgetBounds: function()","\t{","\t\tvar isPathShape = this instanceof Y.VMLPath,","\t\t\tw = this.get(\"width\"),","\t\t\th = this.get(\"height\"),"," x = this.get(\"x\"),"," y = this.get(\"y\");"," if(isPathShape)"," {"," x = x + this._left;"," y = y + this._top;"," w = this._right - this._left;"," h = this._bottom - this._top;"," }"," return this._getContentRect(w, h, x, y);","\t},",""," /**"," * Calculates the bounding box for the shape."," *"," * @method _getContentRect"," * @param {Number} w width of the shape"," * @param {Number} h height of the shape"," * @param {Number} x x-coordinate of the shape"," * @param {Number} y y-coordinate of the shape"," * @private"," */"," _getContentRect: function(w, h, x, y)"," {"," var transformOrigin = this.get(\"transformOrigin\"),"," transformX = transformOrigin[0] * w,"," transformY = transformOrigin[1] * h,"," transforms = this.matrix.getTransformArray(this.get(\"transform\")),"," matrix = new Y.Matrix(),"," i,"," len = transforms.length,"," transform,"," key,"," contentRect,"," isPathShape = this instanceof Y.VMLPath;"," if(isPathShape)"," {"," matrix.translate(this._left, this._top);"," }"," transformX = !isNaN(transformX) ? transformX : 0;"," transformY = !isNaN(transformY) ? transformY : 0;"," matrix.translate(transformX, transformY);"," for(i = 0; i < len; i = i + 1)"," {"," transform = transforms[i];"," key = transform.shift();"," if(key)"," {"," matrix[key].apply(matrix, transform);"," }"," }"," matrix.translate(-transformX, -transformY);"," if(isPathShape)"," {"," matrix.translate(-this._left, -this._top);"," }"," contentRect = matrix.getContentRect(w, h, x, y);"," return contentRect;"," },",""," /**"," * Places the shape above all other shapes."," *"," * @method toFront"," */"," toFront: function()"," {"," var graphic = this.get(\"graphic\");"," if(graphic)"," {"," graphic._toFront(this);"," }"," },",""," /**"," * Places the shape underneath all other shapes."," *"," * @method toFront"," */"," toBack: function()"," {"," var graphic = this.get(\"graphic\");"," if(graphic)"," {"," graphic._toBack(this);"," }"," },",""," /**"," * Parses path data string and call mapped methods."," *"," * @method _parsePathData"," * @param {String} val The path data"," * @private"," */"," _parsePathData: function(val)"," {"," var method,"," methodSymbol,"," args,"," commandArray = Y.Lang.trim(val.match(SPLITPATHPATTERN)),"," i,"," len,"," str,"," symbolToMethod = this._pathSymbolToMethod;"," if(commandArray)"," {"," this.clear();"," len = commandArray.length || 0;"," for(i = 0; i < len; i = i + 1)"," {"," str = commandArray[i];"," methodSymbol = str.substr(0, 1);"," args = str.substr(1).match(SPLITARGSPATTERN);"," method = symbolToMethod[methodSymbol];"," if(method)"," {"," if(args)"," {"," this[method].apply(this, args);"," }"," else"," {"," this[method].apply(this);"," }"," }"," }"," this.end();"," }"," },",""," /**"," * Destroys shape"," *"," * @method destroy"," */"," destroy: function()"," {"," var graphic = this.get(\"graphic\");"," if(graphic)"," {"," graphic.removeShape(this);"," }"," else"," {"," this._destroy();"," }"," },",""," /**"," * Implementation for shape destruction"," *"," * @method destroy"," * @protected"," */"," _destroy: function()"," {"," if(this.node)"," {"," if(this._fillNode)"," {"," this.node.removeChild(this._fillNode);"," this._fillNode = null;"," }"," if(this._strokeNode)"," {"," this.node.removeChild(this._strokeNode);"," this._strokeNode = null;"," }"," Y.Event.purgeElement(this.node, true);"," if(this.node.parentNode)"," {"," this.node.parentNode.removeChild(this.node);"," }"," this.node = null;"," }"," }","}, Y.VMLDrawing.prototype));","","VMLShape.ATTRS = {","\t/**","\t * An array of x, y values which indicates the transformOrigin in which to rotate the shape. Valid values range between 0 and 1 representing a","\t * fraction of the shape's corresponding bounding box dimension. The default value is [0.5, 0.5].","\t *","\t * @config transformOrigin","\t * @type Array","\t */","\ttransformOrigin: {","\t\tvalueFn: function()","\t\t{","\t\t\treturn [0.5, 0.5];","\t\t}","\t},",""," /**"," * <p>A string containing, in order, transform operations applied to the shape instance. The `transform` string can contain the following values:"," *"," * <dl>"," * <dt>rotate</dt><dd>Rotates the shape clockwise around it transformOrigin.</dd>"," * <dt>translate</dt><dd>Specifies a 2d translation.</dd>"," * <dt>skew</dt><dd>Skews the shape around the x-axis and y-axis.</dd>"," * <dt>scale</dt><dd>Specifies a 2d scaling operation.</dd>"," * <dt>translateX</dt><dd>Translates the shape along the x-axis.</dd>"," * <dt>translateY</dt><dd>Translates the shape along the y-axis.</dd>"," * <dt>skewX</dt><dd>Skews the shape around the x-axis.</dd>"," * <dt>skewY</dt><dd>Skews the shape around the y-axis.</dd>"," * <dt>matrix</dt><dd>Specifies a 2D transformation matrix comprised of the specified six values.</dd>"," * </dl>"," * </p>"," * <p>Applying transforms through the transform attribute will reset the transform matrix and apply a new transform. The shape class also contains"," * corresponding methods for each transform that will apply the transform to the current matrix. The below code illustrates how you might use the"," * `transform` attribute to instantiate a recangle with a rotation of 45 degrees.</p>"," var myRect = new Y.Rect({"," type:\"rect\","," width: 50,"," height: 40,"," transform: \"rotate(45)\""," };"," * <p>The code below would apply `translate` and `rotate` to an existing shape.</p>",""," myRect.set(\"transform\", \"translate(40, 50) rotate(45)\");","\t * @config transform"," * @type String","\t */","\ttransform: {","\t\tsetter: function(val)","\t\t{"," var i,"," len,"," transform;"," this.matrix.init();"," this._normalizedMatrix.init();"," this._transforms = this.matrix.getTransformArray(val);"," len = this._transforms.length;"," for(i = 0;i < len; ++i)"," {"," transform = this._transforms[i];"," }"," this._transform = val;"," return val;","\t\t},",""," getter: function()"," {"," return this._transform;"," }","\t},","","\t/**","\t * Indicates the x position of shape.","\t *","\t * @config x","\t * @type Number","\t */","\tx: {","\t\tvalue: 0","\t},","","\t/**","\t * Indicates the y position of shape.","\t *","\t * @config y","\t * @type Number","\t */","\ty: {","\t\tvalue: 0","\t},","","\t/**","\t * Unique id for class instance.","\t *","\t * @config id","\t * @type String","\t */","\tid: {","\t\tvalueFn: function()","\t\t{","\t\t\treturn Y.guid();","\t\t},","","\t\tsetter: function(val)","\t\t{","\t\t\tvar node = this.node;","\t\t\tif(node)","\t\t\t{","\t\t\t\tnode.setAttribute(\"id\", val);","\t\t\t}","\t\t\treturn val;","\t\t}","\t},","","\t/**","\t *","\t * @config width","\t */","\twidth: {","\t\tvalue: 0","\t},","","\t/**","\t *","\t * @config height","\t */","\theight: {","\t\tvalue: 0","\t},","","\t/**","\t * Indicates whether the shape is visible.","\t *","\t * @config visible","\t * @type Boolean","\t */","\tvisible: {","\t\tvalue: true,","","\t\tsetter: function(val){","\t\t\tvar node = this.node,","\t\t\t\tvisibility = val ? \"visible\" : \"hidden\";","\t\t\tif(node)","\t\t\t{","\t\t\t\tnode.style.visibility = visibility;","\t\t\t}","\t\t\treturn val;","\t\t}","\t},","","\t/**","\t * Contains information about the fill of the shape."," * <dl>"," * <dt>color</dt><dd>The color of the fill.</dd>"," * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the fill. The default value is 1.</dd>"," * <dt>type</dt><dd>Type of fill."," * <dl>"," * <dt>solid</dt><dd>Solid single color fill. (default)</dd>"," * <dt>linear</dt><dd>Linear gradient fill.</dd>"," * <dt>radial</dt><dd>Radial gradient fill.</dd>"," * </dl>"," * </dd>"," * </dl>"," * <p>If a `linear` or `radial` is specified as the fill type. The following additional property is used:"," * <dl>"," * <dt>stops</dt><dd>An array of objects containing the following properties:"," * <dl>"," * <dt>color</dt><dd>The color of the stop.</dd>"," * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stop. The default value is 1."," * Note: No effect for IE 6 - 8</dd>"," * <dt>offset</dt><dd>Number between 0 and 1 indicating where the color stop is positioned.</dd>"," * </dl>"," * </dd>"," * <p>Linear gradients also have the following property:</p>"," * <dt>rotation</dt><dd>Linear gradients flow left to right by default. The rotation property allows you to change the"," * flow by rotation. (e.g. A rotation of 180 would make the gradient pain from right to left.)</dd>"," * <p>Radial gradients have the following additional properties:</p>"," * <dt>r</dt><dd>Radius of the gradient circle.</dd>"," * <dt>fx</dt><dd>Focal point x-coordinate of the gradient.</dd>"," * <dt>fy</dt><dd>Focal point y-coordinate of the gradient.</dd>"," * </dl>"," * <p>The corresponding `SVGShape` class implements the following additional properties.</p>"," * <dl>"," * <dt>cx</dt><dd>"," * <p>The x-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.</p>"," * <p><strong>Note: </strong>Currently, this property is not implemented for corresponding `CanvasShape` and"," * `VMLShape` classes which are used on Android or IE 6 - 8.</p>"," * </dd>"," * <dt>cy</dt><dd>"," * <p>The y-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.</p>"," * <p><strong>Note: </strong>Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape`"," * classes which are used on Android or IE 6 - 8.</p>"," * </dd>"," * </dl>"," * <p>These properties are not currently implemented in `CanvasShape` or `VMLShape`.</p>","\t *","\t * @config fill","\t * @type Object","\t */","\tfill: {","\t\tvalueFn: \"_getDefaultFill\",","","\t\tsetter: function(val)","\t\t{","\t\t\tvar i,","\t\t\t\tfill,","\t\t\t\ttmpl = this.get(\"fill\") || this._getDefaultFill();","","\t\t\tif(val)","\t\t\t{","\t\t\t\t//ensure, fill type is solid if color is explicitly passed.","\t\t\t\tif(val.hasOwnProperty(\"color\"))","\t\t\t\t{","\t\t\t\t\tval.type = \"solid\";","\t\t\t\t}","\t\t\t\tfor(i in val)","\t\t\t\t{","\t\t\t\t\tif(val.hasOwnProperty(i))","\t\t\t\t\t{","\t\t\t\t\t\ttmpl[i] = val[i];","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t\tfill = tmpl;","\t\t\tif(fill && fill.color)","\t\t\t{","\t\t\t\tif(fill.color === undefined || fill.color === \"none\")","\t\t\t\t{"," fill.color = null;","\t\t\t\t}"," else"," {"," if(fill.color.toLowerCase().indexOf(\"rgba\") > -1)"," {"," fill.opacity = Y.Color._getAlpha(fill.color);"," fill.color = Y.Color.toHex(fill.color);"," }"," }","\t\t\t}","\t\t\tthis._fillFlag = true;"," return fill;","\t\t}","\t},","","\t/**","\t * Contains information about the stroke of the shape."," * <dl>"," * <dt>color</dt><dd>The color of the stroke.</dd>"," * <dt>weight</dt><dd>Number that indicates the width of the stroke.</dd>"," * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stroke. The default value is 1.</dd>"," * <dt>dashstyle</dt>Indicates whether to draw a dashed stroke. When set to \"none\", a solid stroke is drawn. When set"," * to an array, the first index indicates the length of the dash. The second index indicates the length of gap."," * <dt>linecap</dt><dd>Specifies the linecap for the stroke. The following values can be specified:"," * <dl>"," * <dt>butt (default)</dt><dd>Specifies a butt linecap.</dd>"," * <dt>square</dt><dd>Specifies a sqare linecap.</dd>"," * <dt>round</dt><dd>Specifies a round linecap.</dd>"," * </dl>"," * </dd>"," * <dt>linejoin</dt><dd>Specifies a linejoin for the stroke. The following values can be specified:"," * <dl>"," * <dt>round (default)</dt><dd>Specifies that the linejoin will be round.</dd>"," * <dt>bevel</dt><dd>Specifies a bevel for the linejoin.</dd>"," * <dt>miter limit</dt><dd>An integer specifying the miter limit of a miter linejoin. If you want to specify a linejoin"," * of miter, you simply specify the limit as opposed to having separate miter and miter limit values.</dd>"," * </dl>"," * </dd>"," * </dl>","\t *","\t * @config stroke","\t * @type Object","\t */","\tstroke: {","\t\tvalueFn: \"_getDefaultStroke\",","","\t\tsetter: function(val)","\t\t{","\t\t\tvar i,","\t\t\t\tstroke,"," wt,","\t\t\t\ttmpl = this.get(\"stroke\") || this._getDefaultStroke();","\t\t\tif(val)","\t\t\t{"," if(val.hasOwnProperty(\"weight\"))"," {"," wt = parseInt(val.weight, 10);"," if(!isNaN(wt))"," {"," val.weight = wt;"," }"," }","\t\t\t\tfor(i in val)","\t\t\t\t{","\t\t\t\t\tif(val.hasOwnProperty(i))","\t\t\t\t\t{","\t\t\t\t\t\ttmpl[i] = val[i];","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}"," if(tmpl.color && tmpl.color.toLowerCase().indexOf(\"rgba\") > -1)"," {"," tmpl.opacity = Y.Color._getAlpha(tmpl.color);"," tmpl.color = Y.Color.toHex(tmpl.color);"," }","\t\t\tstroke = tmpl;"," this._strokeFlag = true;","\t\t\treturn stroke;","\t\t}","\t},","","\t//Not used. Remove in future."," autoSize: {","\t\tvalue: false","\t},","","\t// Only implemented in SVG","\t// Determines whether the instance will receive mouse events.","\t//","\t// @config pointerEvents","\t// @type string","\t//","\tpointerEvents: {","\t\tvalue: \"visiblePainted\"","\t},","","\t/**","\t * Dom node for the shape.","\t *","\t * @config node","\t * @type HTMLElement","\t * @readOnly","\t */","\tnode: {","\t\treadOnly: true,","","\t\tgetter: function()","\t\t{","\t\t\treturn this.node;","\t\t}","\t},",""," /**"," * Represents an SVG Path string. This will be parsed and added to shape's API to represent the SVG data across all"," * implementations. Note that when using VML or SVG implementations, part of this content will be added to the DOM using"," * respective VML/SVG attributes. If your content comes from an untrusted source, you will need to ensure that no"," * malicious code is included in that content."," *"," * @config data"," * @type String"," */"," data: {"," setter: function(val)"," {"," if(this.get(\"node\"))"," {"," this._parsePathData(val);"," }"," return val;"," }"," },","","\t/**","\t * Reference to the container Graphic.","\t *","\t * @config graphic","\t * @type Graphic","\t */","\tgraphic: {","\t\treadOnly: true,","","\t\tgetter: function()","\t\t{","\t\t\treturn this._graphic;","\t\t}","\t}","};","Y.VMLShape = VMLShape;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Path.html\">`Path`</a> class."," * `VMLPath` is not intended to be used directly. Instead, use the <a href=\"Path.html\">`Path`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Path.html\">`Path`</a> class will point to the `VMLPath` class."," *"," * @module graphics"," * @class VMLPath"," * @extends VMLShape"," */","VMLPath = function()","{","\tVMLPath.superclass.constructor.apply(this, arguments);","};","","VMLPath.NAME = \"path\";","Y.extend(VMLPath, Y.VMLShape);","VMLPath.ATTRS = Y.merge(Y.VMLShape.ATTRS, {","\t/**","\t * Indicates the width of the shape","\t *","\t * @config width","\t * @type Number","\t */","\twidth: {","\t\tgetter: function()","\t\t{","\t\t\tvar val = Math.max(this._right - this._left, 0);","\t\t\treturn val;","\t\t}","\t},","","\t/**","\t * Indicates the height of the shape","\t *","\t * @config height","\t * @type Number","\t */","\theight: {","\t\tgetter: function()","\t\t{","\t\t\treturn Math.max(this._bottom - this._top, 0);","\t\t}","\t},","","\t/**","\t * Indicates the path used for the node.","\t *","\t * @config path","\t * @type String"," * @readOnly","\t */","\tpath: {","\t\treadOnly: true,","","\t\tgetter: function()","\t\t{","\t\t\treturn this._path;","\t\t}","\t}","});","Y.VMLPath = VMLPath;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Rect.html\">`Rect`</a> class."," * `VMLRect` is not intended to be used directly. Instead, use the <a href=\"Rect.html\">`Rect`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Rect.html\">`Rect`</a> class will point to the `VMLRect` class."," *"," * @module graphics"," * @class VMLRect"," * @constructor"," */","VMLRect = function()","{","\tVMLRect.superclass.constructor.apply(this, arguments);","};","VMLRect.NAME = \"rect\";","Y.extend(VMLRect, Y.VMLShape, {","\t/**","\t * Indicates the type of shape","\t *","\t * @property _type","\t * @type String"," * @private","\t */","\t_type: \"rect\"","});","VMLRect.ATTRS = Y.VMLShape.ATTRS;","Y.VMLRect = VMLRect;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Ellipse.html\">`Ellipse`</a> class."," * `VMLEllipse` is not intended to be used directly. Instead, use the <a href=\"Ellipse.html\">`Ellipse`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Ellipse.html\">`Ellipse`</a> class will point to the `VMLEllipse` class."," *"," * @module graphics"," * @class VMLEllipse"," * @constructor"," */","VMLEllipse = function()","{","\tVMLEllipse.superclass.constructor.apply(this, arguments);","};","","VMLEllipse.NAME = \"ellipse\";","","Y.extend(VMLEllipse, Y.VMLShape, {","\t/**","\t * Indicates the type of shape","\t *","\t * @property _type","\t * @type String"," * @private","\t */","\t_type: \"oval\"","});","VMLEllipse.ATTRS = Y.merge(Y.VMLShape.ATTRS, {","\t/**","\t * Horizontal radius for the ellipse.","\t *","\t * @config xRadius","\t * @type Number","\t */","\txRadius: {","\t\tlazyAdd: false,","","\t\tgetter: function()","\t\t{","\t\t\tvar val = this.get(\"width\");","\t\t\tval = Math.round((val/2) * 100)/100;","\t\t\treturn val;","\t\t},","","\t\tsetter: function(val)","\t\t{","\t\t\tvar w = val * 2;","\t\t\tthis.set(\"width\", w);","\t\t\treturn val;","\t\t}","\t},","","\t/**","\t * Vertical radius for the ellipse.","\t *","\t * @config yRadius","\t * @type Number","\t * @readOnly","\t */","\tyRadius: {","\t\tlazyAdd: false,","","\t\tgetter: function()","\t\t{","\t\t\tvar val = this.get(\"height\");","\t\t\tval = Math.round((val/2) * 100)/100;","\t\t\treturn val;","\t\t},","","\t\tsetter: function(val)","\t\t{","\t\t\tvar h = val * 2;","\t\t\tthis.set(\"height\", h);","\t\t\treturn val;","\t\t}","\t}","});","Y.VMLEllipse = VMLEllipse;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Circle.html\">`Circle`</a> class."," * `VMLCircle` is not intended to be used directly. Instead, use the <a href=\"Circle.html\">`Circle`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Circle.html\">`Circle`</a> class will point to the `VMLCircle` class."," *"," * @module graphics"," * @class VMLCircle"," * @constructor"," */","VMLCircle = function()","{","\tVMLCircle.superclass.constructor.apply(this, arguments);","};","","VMLCircle.NAME = \"circle\";","","Y.extend(VMLCircle, VMLShape, {","\t/**","\t * Indicates the type of shape","\t *","\t * @property _type","\t * @type String"," * @private","\t */","\t_type: \"oval\"","});","","VMLCircle.ATTRS = Y.merge(VMLShape.ATTRS, {","\t/**","\t * Radius for the circle.","\t *","\t * @config radius","\t * @type Number","\t */","\tradius: {","\t\tlazyAdd: false,","","\t\tvalue: 0","\t},","","\t/**","\t * Indicates the width of the shape","\t *","\t * @config width","\t * @type Number","\t */","\twidth: {"," setter: function(val)"," {"," this.set(\"radius\", val/2);"," return val;"," },","","\t\tgetter: function()","\t\t{","\t\t\tvar radius = this.get(\"radius\"),","\t\t\tval = radius && radius > 0 ? radius * 2 : 0;","\t\t\treturn val;","\t\t}","\t},","","\t/**","\t * Indicates the height of the shape","\t *","\t * @config height","\t * @type Number","\t */","\theight: {"," setter: function(val)"," {"," this.set(\"radius\", val/2);"," return val;"," },","","\t\tgetter: function()","\t\t{","\t\t\tvar radius = this.get(\"radius\"),","\t\t\tval = radius && radius > 0 ? radius * 2 : 0;","\t\t\treturn val;","\t\t}","\t}","});","Y.VMLCircle = VMLCircle;","/**"," * Draws pie slices"," *"," * @module graphics"," * @class VMLPieSlice"," * @constructor"," */","VMLPieSlice = function()","{","\tVMLPieSlice.superclass.constructor.apply(this, arguments);","};","VMLPieSlice.NAME = \"vmlPieSlice\";","Y.extend(VMLPieSlice, Y.VMLShape, Y.mix({"," /**"," * Indicates the type of shape"," *"," * @property _type"," * @type String"," * @private"," */"," _type: \"shape\",","","\t/**","\t * Change event listener","\t *","\t * @private","\t * @method _updateHandler","\t */","\t_draw: function()","\t{"," var x = this.get(\"cx\"),"," y = this.get(\"cy\"),"," startAngle = this.get(\"startAngle\"),"," arc = this.get(\"arc\"),"," radius = this.get(\"radius\");"," this.clear();"," this.drawWedge(x, y, startAngle, arc, radius);","\t\tthis.end();","\t}"," }, Y.VMLDrawing.prototype));","VMLPieSlice.ATTRS = Y.mix({"," cx: {"," value: 0"," },",""," cy: {"," value: 0"," },"," /**"," * Starting angle in relation to a circle in which to begin the pie slice drawing."," *"," * @config startAngle"," * @type Number"," */"," startAngle: {"," value: 0"," },",""," /**"," * Arc of the slice."," *"," * @config arc"," * @type Number"," */"," arc: {"," value: 0"," },",""," /**"," * Radius of the circle in which the pie slice is drawn"," *"," * @config radius"," * @type Number"," */"," radius: {"," value: 0"," }","}, Y.VMLShape.ATTRS);","Y.VMLPieSlice = VMLPieSlice;","/**"," * <a href=\"http://www.w3.org/TR/NOTE-VML\">VML</a> implementation of the <a href=\"Graphic.html\">`Graphic`</a> class."," * `VMLGraphic` is not intended to be used directly. Instead, use the <a href=\"Graphic.html\">`Graphic`</a> class."," * If the browser lacks <a href=\"http://www.w3.org/TR/SVG/\">SVG</a> and <a href=\"http://www.w3.org/TR/html5/the-canvas-element.html\">Canvas</a>"," * capabilities, the <a href=\"Graphic.html\">`Graphic`</a> class will point to the `VMLGraphic` class."," *"," * @module graphics"," * @class VMLGraphic"," * @constructor"," */","VMLGraphic = function() {"," VMLGraphic.superclass.constructor.apply(this, arguments);","};","","VMLGraphic.NAME = \"vmlGraphic\";","","VMLGraphic.ATTRS = {"," /**"," * Whether or not to render the `Graphic` automatically after to a specified parent node after init. This can be a Node"," * instance or a CSS selector string."," *"," * @config render"," * @type Node | String"," */"," render: {},",""," /**","\t * Unique id for class instance.","\t *","\t * @config id","\t * @type String","\t */","\tid: {","\t\tvalueFn: function()","\t\t{","\t\t\treturn Y.guid();","\t\t},","","\t\tsetter: function(val)","\t\t{","\t\t\tvar node = this._node;","\t\t\tif(node)","\t\t\t{","\t\t\t\tnode.setAttribute(\"id\", val);","\t\t\t}","\t\t\treturn val;","\t\t}","\t},",""," /**"," * Key value pairs in which a shape instance is associated with its id."," *"," * @config shapes"," * @type Object"," * @readOnly"," */"," shapes: {"," readOnly: true,",""," getter: function()"," {"," return this._shapes;"," }"," },",""," /**"," * Object containing size and coordinate data for the content of a Graphic in relation to the coordSpace node."," *"," * @config contentBounds"," * @type Object"," */"," contentBounds: {"," readOnly: true,",""," getter: function()"," {"," return this._contentBounds;"," }"," },",""," /**"," * The html element that represents to coordinate system of the Graphic instance."," *"," * @config node"," * @type HTMLElement"," */"," node: {"," readOnly: true,",""," getter: function()"," {"," return this._node;"," }"," },","","\t/**","\t * Indicates the width of the `Graphic`.","\t *","\t * @config width","\t * @type Number","\t */"," width: {"," setter: function(val)"," {"," if(this._node)"," {"," this._node.style.width = val + \"px\";"," }"," return val;"," }"," },","","\t/**","\t * Indicates the height of the `Graphic`.","\t *","\t * @config height","\t * @type Number","\t */"," height: {"," setter: function(val)"," {"," if(this._node)"," {"," this._node.style.height = val + \"px\";"," }"," return val;"," }"," },",""," /**"," * Determines the sizing of the Graphic."," *"," * <dl>"," * <dt>sizeContentToGraphic</dt><dd>The Graphic's width and height attributes are, either explicitly set through the"," * <code>width</code> and <code>height</code> attributes or are determined by the dimensions of the parent element. The"," * content contained in the Graphic will be sized to fit with in the Graphic instance's dimensions. When using this"," * setting, the <code>preserveAspectRatio</code> attribute will determine how the contents are sized.</dd>"," * <dt>sizeGraphicToContent</dt><dd>(Also accepts a value of true) The Graphic's width and height are determined by the"," * size and positioning of the content.</dd>"," * <dt>false</dt><dd>The Graphic's width and height attributes are, either explicitly set through the <code>width</code>"," * and <code>height</code> attributes or are determined by the dimensions of the parent element. The contents of the"," * Graphic instance are not affected by this setting.</dd>"," * </dl>"," *"," *"," * @config autoSize"," * @type Boolean | String"," * @default false"," */"," autoSize: {"," value: false"," },",""," /**"," * Determines how content is sized when <code>autoSize</code> is set to <code>sizeContentToGraphic</code>."," *"," * <dl>"," * <dt>none<dt><dd>Do not force uniform scaling. Scale the graphic content of the given element non-uniformly if necessary"," * such that the element's bounding box exactly matches the viewport rectangle.</dd>"," * <dt>xMinYMin</dt><dd>Force uniform scaling position along the top left of the Graphic's node.</dd>"," * <dt>xMidYMin</dt><dd>Force uniform scaling horizontally centered and positioned at the top of the Graphic's node.<dd>"," * <dt>xMaxYMin</dt><dd>Force uniform scaling positioned horizontally from the right and vertically from the top.</dd>"," * <dt>xMinYMid</dt>Force uniform scaling positioned horizontally from the left and vertically centered.</dd>"," * <dt>xMidYMid (the default)</dt><dd>Force uniform scaling with the content centered.</dd>"," * <dt>xMaxYMid</dt><dd>Force uniform scaling positioned horizontally from the right and vertically centered.</dd>"," * <dt>xMinYMax</dt><dd>Force uniform scaling positioned horizontally from the left and vertically from the bottom.</dd>"," * <dt>xMidYMax</dt><dd>Force uniform scaling horizontally centered and position vertically from the bottom.</dd>"," * <dt>xMaxYMax</dt><dd>Force uniform scaling positioned horizontally from the right and vertically from the bottom.</dd>"," * </dl>"," *"," * @config preserveAspectRatio"," * @type String"," * @default xMidYMid"," */"," preserveAspectRatio: {"," value: \"xMidYMid\""," },",""," /**"," * The contentBounds will resize to greater values but not values. (for performance)"," * When resizing the contentBounds down is desirable, set the resizeDown value to true."," *"," * @config resizeDown"," * @type Boolean"," */"," resizeDown: {"," resizeDown: false"," },","","\t/**","\t * Indicates the x-coordinate for the instance.","\t *","\t * @config x","\t * @type Number","\t */"," x: {"," getter: function()"," {"," return this._x;"," },",""," setter: function(val)"," {"," this._x = val;"," if(this._node)"," {"," this._node.style.left = val + \"px\";"," }"," return val;"," }"," },","","\t/**","\t * Indicates the y-coordinate for the instance.","\t *","\t * @config y","\t * @type Number","\t */"," y: {"," getter: function()"," {"," return this._y;"," },",""," setter: function(val)"," {"," this._y = val;"," if(this._node)"," {"," this._node.style.top = val + \"px\";"," }"," return val;"," }"," },",""," /**"," * Indicates whether or not the instance will automatically redraw after a change is made to a shape."," * This property will get set to false when batching operations."," *"," * @config autoDraw"," * @type Boolean"," * @default true"," * @private"," */"," autoDraw: {"," value: true"," },",""," visible: {"," value: true,",""," setter: function(val)"," {"," this._toggleVisible(val);"," return val;"," }"," }","};","","Y.extend(VMLGraphic, Y.GraphicBase, {"," /**"," * Sets the value of an attribute."," *"," * @method set"," * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can"," * be passed in to set multiple attributes at once."," * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as"," * the name param."," */","\tset: function()","\t{","\t\tvar host = this,"," attr = arguments[0],"," redrawAttrs = {"," autoDraw: true,"," autoSize: true,"," preserveAspectRatio: true,"," resizeDown: true"," },"," key,"," forceRedraw = false;","\t\tAttributeLite.prototype.set.apply(host, arguments);"," if(host._state.autoDraw === true && Y.Object.size(this._shapes) > 0)"," {"," if(Y_LANG.isString && redrawAttrs[attr])"," {"," forceRedraw = true;"," }"," else if(Y_LANG.isObject(attr))"," {"," for(key in redrawAttrs)"," {"," if(redrawAttrs.hasOwnProperty(key) && attr[key])"," {"," forceRedraw = true;"," break;"," }"," }"," }"," }"," if(forceRedraw)"," {"," host._redraw();"," }","\t},",""," /**"," * Storage for `x` attribute."," *"," * @property _x"," * @type Number"," * @private"," */"," _x: 0,",""," /**"," * Storage for `y` attribute."," *"," * @property _y"," * @type Number"," * @private"," */"," _y: 0,",""," /**"," * Gets the current position of the graphic instance in page coordinates."," *"," * @method getXY"," * @return Array The XY position of the shape."," */"," getXY: function()"," {"," var node = this.parentNode,"," x = this.get(\"x\"),"," y = this.get(\"y\"),"," xy;"," if(node)"," {"," xy = Y.DOM.getXY(node);"," xy[0] += x;"," xy[1] += y;"," }"," else"," {"," xy = Y.DOM._getOffset(this._node);"," }"," return xy;"," },",""," /**"," * Initializes the class."," *"," * @method initializer"," * @private"," */"," initializer: function() {"," var render = this.get(\"render\"),"," visibility = this.get(\"visible\") ? \"visible\" : \"hidden\";"," this._shapes = {};","\t\tthis._contentBounds = {"," left: 0,"," top: 0,"," right: 0,"," bottom: 0"," };"," this._node = this._createGraphic();"," this._node.style.left = this.get(\"x\") + \"px\";"," this._node.style.top = this.get(\"y\") + \"px\";"," this._node.style.visibility = visibility;"," this._node.setAttribute(\"id\", this.get(\"id\"));"," if(render)"," {"," this.render(render);"," }"," },",""," /**"," * Adds the graphics node to the dom."," *"," * @method render"," * @param {HTMLElement} parentNode node in which to render the graphics node into."," */"," render: function(render) {"," var parentNode = render || DOCUMENT.body,"," node = this._node,"," w,"," h;"," if(render instanceof Y.Node)"," {"," parentNode = render._node;"," }"," else if(Y.Lang.isString(render))"," {"," parentNode = Y.Selector.query(render, DOCUMENT.body, true);"," }"," w = this.get(\"width\") || parseInt(Y.DOM.getComputedStyle(parentNode, \"width\"), 10);"," h = this.get(\"height\") || parseInt(Y.DOM.getComputedStyle(parentNode, \"height\"), 10);"," parentNode.appendChild(node);"," this.parentNode = parentNode;"," this.set(\"width\", w);"," this.set(\"height\", h);"," return this;"," },",""," /**"," * Removes all nodes."," *"," * @method destroy"," */"," destroy: function()"," {"," this.removeAllShapes();"," if(this._node)"," {"," this._removeChildren(this._node);"," if(this._node.parentNode)"," {"," this._node.parentNode.removeChild(this._node);"," }"," this._node = null;"," }"," },",""," /**"," * Generates a shape instance by type."," *"," * @method addShape"," * @param {Object} cfg attributes for the shape"," * @return Shape"," */"," addShape: function(cfg)"," {"," cfg.graphic = this;"," if(!this.get(\"visible\"))"," {"," cfg.visible = false;"," }"," var ShapeClass = this._getShapeClass(cfg.type),"," shape = new ShapeClass(cfg);"," this._appendShape(shape);"," shape._appendStrokeAndFill();"," return shape;"," },",""," /**"," * Adds a shape instance to the graphic instance."," *"," * @method _appendShape"," * @param {Shape} shape The shape instance to be added to the graphic."," * @private"," */"," _appendShape: function(shape)"," {"," var node = shape.node,"," parentNode = this._frag || this._node;"," if(this.get(\"autoDraw\") || this.get(\"autoSize\") === \"sizeContentToGraphic\")"," {"," parentNode.appendChild(node);"," }"," else"," {"," this._getDocFrag().appendChild(node);"," }"," },",""," /**"," * Removes a shape instance from from the graphic instance."," *"," * @method removeShape"," * @param {Shape|String} shape The instance or id of the shape to be removed."," */"," removeShape: function(shape)"," {"," if(!(shape instanceof VMLShape))"," {"," if(Y_LANG.isString(shape))"," {"," shape = this._shapes[shape];"," }"," }"," if(shape && (shape instanceof VMLShape))"," {"," shape._destroy();"," this._shapes[shape.get(\"id\")] = null;"," delete this._shapes[shape.get(\"id\")];"," }"," if(this.get(\"autoDraw\"))"," {"," this._redraw();"," }"," },",""," /**"," * Removes all shape instances from the dom."," *"," * @method removeAllShapes"," */"," removeAllShapes: function()"," {"," var shapes = this._shapes,"," i;"," for(i in shapes)"," {"," if(shapes.hasOwnProperty(i))"," {"," shapes[i].destroy();"," }"," }"," this._shapes = {};"," },",""," /**"," * Removes all child nodes."," *"," * @method _removeChildren"," * @param node"," * @private"," */"," _removeChildren: function(node)"," {"," if(node.hasChildNodes())"," {"," var child;"," while(node.firstChild)"," {"," child = node.firstChild;"," this._removeChildren(child);"," node.removeChild(child);"," }"," }"," },",""," /**"," * Clears the graphics object."," *"," * @method clear"," */"," clear: function() {"," this.removeAllShapes();"," this._removeChildren(this._node);"," },",""," /**"," * Toggles visibility"," *"," * @method _toggleVisible"," * @param {Boolean} val indicates visibilitye"," * @private"," */"," _toggleVisible: function(val)"," {"," var i,"," shapes = this._shapes,"," visibility = val ? \"visible\" : \"hidden\";"," if(shapes)"," {"," for(i in shapes)"," {"," if(shapes.hasOwnProperty(i))"," {"," shapes[i].set(\"visible\", val);"," }"," }"," }"," if(this._node)"," {"," this._node.style.visibility = visibility;"," }"," if(this._node)"," {"," this._node.style.visibility = visibility;"," }"," },",""," /**"," * Sets the size of the graphics object."," *"," * @method setSize"," * @param w {Number} width to set for the instance."," * @param h {Number} height to set for the instance."," */"," setSize: function(w, h) {"," w = Math.round(w);"," h = Math.round(h);"," this._node.style.width = w + 'px';"," this._node.style.height = h + 'px';"," },",""," /**"," * Sets the positon of the graphics object."," *"," * @method setPosition"," * @param {Number} x x-coordinate for the object."," * @param {Number} y y-coordinate for the object."," */"," setPosition: function(x, y)"," {"," x = Math.round(x);"," y = Math.round(y);"," this._node.style.left = x + \"px\";"," this._node.style.top = y + \"px\";"," },",""," /**"," * Creates a group element"," *"," * @method _createGraphic"," * @private"," */"," _createGraphic: function() {"," var group = DOCUMENT.createElement("," '<group xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' style=\"behavior:url(#default#VML);padding:0px 0px 0px 0px;display:block;position:absolute;top:0px;left:0px;zoom:1;\"' +"," '/>'"," );"," return group;"," },",""," /**"," * Creates a graphic node"," *"," * @method _createGraphicNode"," * @param {String} type node type to create"," * @param {String} pe specified pointer-events value"," * @return HTMLElement"," * @private"," */"," _createGraphicNode: function(type)"," {"," return DOCUMENT.createElement("," '<' +"," type +"," ' xmlns=\"urn:schemas-microsft.com:vml\"' +"," ' style=\"behavior:url(#default#VML);display:inline-block;zoom:1;\"' +"," '/>'"," );",""," },",""," /**"," * Returns a shape based on the id of its dom node."," *"," * @method getShapeById"," * @param {String} id Dom id of the shape's node attribute."," * @return Shape"," */"," getShapeById: function(id)"," {"," return this._shapes[id];"," },",""," /**"," * Returns a shape class. Used by `addShape`."," *"," * @method _getShapeClass"," * @param {Shape | String} val Indicates which shape class."," * @return Function"," * @private"," */"," _getShapeClass: function(val)"," {"," var shape = this._shapeClass[val];"," if(shape)"," {"," return shape;"," }"," return val;"," },",""," /**"," * Look up for shape classes. Used by `addShape` to retrieve a class for instantiation."," *"," * @property _shapeClass"," * @type Object"," * @private"," */"," _shapeClass: {"," circle: Y.VMLCircle,"," rect: Y.VMLRect,"," path: Y.VMLPath,"," ellipse: Y.VMLEllipse,"," pieslice: Y.VMLPieSlice"," },","","\t/**","\t * Allows for creating multiple shapes in order to batch appending and redraw operations.","\t *","\t * @method batch","\t * @param {Function} method Method to execute.","\t */"," batch: function(method)"," {"," var autoDraw = this.get(\"autoDraw\");"," this.set(\"autoDraw\", false);"," method.apply();"," this.set(\"autoDraw\", autoDraw);"," },",""," /**"," * Returns a document fragment to for attaching shapes."," *"," * @method _getDocFrag"," * @return DocumentFragment"," * @private"," */"," _getDocFrag: function()"," {"," if(!this._frag)"," {"," this._frag = DOCUMENT.createDocumentFragment();"," }"," return this._frag;"," },",""," /**"," * Adds a shape to the redraw queue and calculates the contentBounds."," *"," * @method addToRedrawQueue"," * @param shape {VMLShape}"," * @protected"," */"," addToRedrawQueue: function(shape)"," {"," var shapeBox,"," box;"," this._shapes[shape.get(\"id\")] = shape;"," if(!this.get(\"resizeDown\"))"," {"," shapeBox = shape.getBounds();"," box = this._contentBounds;"," box.left = box.left < shapeBox.left ? box.left : shapeBox.left;"," box.top = box.top < shapeBox.top ? box.top : shapeBox.top;"," box.right = box.right > shapeBox.right ? box.right : shapeBox.right;"," box.bottom = box.bottom > shapeBox.bottom ? box.bottom : shapeBox.bottom;"," box.width = box.right - box.left;"," box.height = box.bottom - box.top;"," this._contentBounds = box;"," }"," if(this.get(\"autoDraw\"))"," {"," this._redraw();"," }"," },",""," /**"," * Redraws all shapes."," *"," * @method _redraw"," * @private"," */"," _redraw: function()"," {"," var autoSize = this.get(\"autoSize\"),"," preserveAspectRatio,"," node = this.parentNode,"," nodeWidth = parseFloat(Y.DOM.getComputedStyle(node, \"width\")),"," nodeHeight = parseFloat(Y.DOM.getComputedStyle(node, \"height\")),"," xCoordOrigin = 0,"," yCoordOrigin = 0,"," box = this.get(\"resizeDown\") ? this._getUpdatedContentBounds() : this._contentBounds,"," left = box.left,"," right = box.right,"," top = box.top,"," bottom = box.bottom,"," contentWidth = right - left,"," contentHeight = bottom - top,"," aspectRatio,"," xCoordSize,"," yCoordSize,"," scaledWidth,"," scaledHeight,"," visible = this.get(\"visible\");"," this._node.style.visibility = \"hidden\";"," if(autoSize)"," {"," if(autoSize === \"sizeContentToGraphic\")"," {"," preserveAspectRatio = this.get(\"preserveAspectRatio\");"," if(preserveAspectRatio === \"none\" || contentWidth/contentHeight === nodeWidth/nodeHeight)"," {"," xCoordOrigin = left;"," yCoordOrigin = top;"," xCoordSize = contentWidth;"," yCoordSize = contentHeight;"," }"," else"," {"," if(contentWidth * nodeHeight/contentHeight > nodeWidth)"," {"," aspectRatio = nodeHeight/nodeWidth;"," xCoordSize = contentWidth;"," yCoordSize = contentWidth * aspectRatio;"," scaledHeight = (nodeWidth * (contentHeight/contentWidth)) * (yCoordSize/nodeHeight);"," yCoordOrigin = this._calculateCoordOrigin(preserveAspectRatio.slice(5).toLowerCase(), scaledHeight, yCoordSize);"," yCoordOrigin = top + yCoordOrigin;"," xCoordOrigin = left;"," }"," else"," {"," aspectRatio = nodeWidth/nodeHeight;"," xCoordSize = contentHeight * aspectRatio;"," yCoordSize = contentHeight;"," scaledWidth = (nodeHeight * (contentWidth/contentHeight)) * (xCoordSize/nodeWidth);"," xCoordOrigin = this._calculateCoordOrigin(preserveAspectRatio.slice(1, 4).toLowerCase(), scaledWidth, xCoordSize);"," xCoordOrigin = xCoordOrigin + left;"," yCoordOrigin = top;"," }"," }"," this._node.style.width = nodeWidth + \"px\";"," this._node.style.height = nodeHeight + \"px\";"," this._node.coordOrigin = xCoordOrigin + \", \" + yCoordOrigin;"," }"," else"," {"," xCoordSize = contentWidth;"," yCoordSize = contentHeight;"," this._node.style.width = contentWidth + \"px\";"," this._node.style.height = contentHeight + \"px\";"," this._state.width = contentWidth;"," this._state.height = contentHeight;",""," }"," this._node.coordSize = xCoordSize + \", \" + yCoordSize;"," }"," else"," {"," this._node.style.width = nodeWidth + \"px\";"," this._node.style.height = nodeHeight + \"px\";"," this._node.coordSize = nodeWidth + \", \" + nodeHeight;"," }"," if(this._frag)"," {"," this._node.appendChild(this._frag);"," this._frag = null;"," }"," if(visible)"," {"," this._node.style.visibility = \"visible\";"," }"," },",""," /**"," * Determines the value for either an x or y coordinate to be used for the <code>coordOrigin</code> of the Graphic."," *"," * @method _calculateCoordOrigin"," * @param {String} position The position for placement. Possible values are min, mid and max."," * @param {Number} size The total scaled size of the content."," * @param {Number} coordsSize The coordsSize for the Graphic."," * @return Number"," * @private"," */"," _calculateCoordOrigin: function(position, size, coordsSize)"," {"," var coord;"," switch(position)"," {"," case \"min\" :"," coord = 0;"," break;"," case \"mid\" :"," coord = (size - coordsSize)/2;"," break;"," case \"max\" :"," coord = (size - coordsSize);"," break;"," }"," return coord;"," },",""," /**"," * Recalculates and returns the `contentBounds` for the `Graphic` instance."," *"," * @method _getUpdatedContentBounds"," * @return {Object}"," * @private"," */"," _getUpdatedContentBounds: function()"," {"," var bounds,"," i,"," shape,"," queue = this._shapes,"," box = {};"," for(i in queue)"," {"," if(queue.hasOwnProperty(i))"," {"," shape = queue[i];"," bounds = shape.getBounds();"," box.left = Y_LANG.isNumber(box.left) ? Math.min(box.left, bounds.left) : bounds.left;"," box.top = Y_LANG.isNumber(box.top) ? Math.min(box.top, bounds.top) : bounds.top;"," box.right = Y_LANG.isNumber(box.right) ? Math.max(box.right, bounds.right) : bounds.right;"," box.bottom = Y_LANG.isNumber(box.bottom) ? Math.max(box.bottom, bounds.bottom) : bounds.bottom;"," }"," }"," box.left = Y_LANG.isNumber(box.left) ? box.left : 0;"," box.top = Y_LANG.isNumber(box.top) ? box.top : 0;"," box.right = Y_LANG.isNumber(box.right) ? box.right : 0;"," box.bottom = Y_LANG.isNumber(box.bottom) ? box.bottom : 0;"," this._contentBounds = box;"," return box;"," },",""," /**"," * Inserts shape on the top of the tree."," *"," * @method _toFront"," * @param {VMLShape} Shape to add."," * @private"," */"," _toFront: function(shape)"," {"," var contentNode = this._node;"," if(shape instanceof Y.VMLShape)"," {"," shape = shape.get(\"node\");"," }"," if(contentNode && shape)"," {"," contentNode.appendChild(shape);"," }"," },",""," /**"," * Inserts shape as the first child of the content node."," *"," * @method _toBack"," * @param {VMLShape} Shape to add."," * @private"," */"," _toBack: function(shape)"," {"," var contentNode = this._node,"," targetNode;"," if(shape instanceof Y.VMLShape)"," {"," shape = shape.get(\"node\");"," }"," if(contentNode && shape)"," {"," targetNode = contentNode.firstChild;"," if(targetNode)"," {"," contentNode.insertBefore(shape, targetNode);"," }"," else"," {"," contentNode.appendChild(shape);"," }"," }"," }","});","Y.VMLGraphic = VMLGraphic;","","","","}, '3.15.0', {\"requires\": [\"graphics\"]});","","}());"]}; } var __cov_y0VuG5USWjxBMo9w3IDXpA = __coverage__['build/graphics-vml/graphics-vml.js']; __cov_y0VuG5USWjxBMo9w3IDXpA.s['1']++;YUI.add('graphics-vml',function(Y,NAME){__cov_y0VuG5USWjxBMo9w3IDXpA.f['1']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['2']++;var IMPLEMENTATION='vml',SHAPE='shape',SPLITPATHPATTERN=/[a-z][^a-z]*/gi,SPLITARGSPATTERN=/[\-]?[0-9]*[0-9|\.][0-9]*/g,Y_LANG=Y.Lang,IS_NUM=Y_LANG.isNumber,IS_ARRAY=Y_LANG.isArray,Y_DOM=Y.DOM,Y_SELECTOR=Y.Selector,DOCUMENT=Y.config.doc,AttributeLite=Y.AttributeLite,VMLShape,VMLCircle,VMLPath,VMLRect,VMLEllipse,VMLGraphic,VMLPieSlice,_getClassName=Y.ClassNameManager.getClassName;__cov_y0VuG5USWjxBMo9w3IDXpA.s['3']++;function VMLDrawing(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['2']++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['4']++;VMLDrawing.prototype={_pathSymbolToMethod:{M:'moveTo',m:'relativeMoveTo',L:'lineTo',l:'relativeLineTo',C:'curveTo',c:'relativeCurveTo',Q:'quadraticCurveTo',q:'relativeQuadraticCurveTo',z:'closePath',Z:'closePath'},_coordSpaceMultiplier:100,_round:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['3']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['5']++;return Math.round(val*this._coordSpaceMultiplier);},_addToPath:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['4']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['6']++;this._path=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['1'][0]++,this._path)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['1'][1]++,'');__cov_y0VuG5USWjxBMo9w3IDXpA.s['7']++;if(this._movePath){__cov_y0VuG5USWjxBMo9w3IDXpA.b['2'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['8']++;this._path+=this._movePath;__cov_y0VuG5USWjxBMo9w3IDXpA.s['9']++;this._movePath=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['2'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['10']++;this._path+=val;},_currentX:0,_currentY:0,curveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['5']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['11']++;this._curveTo.apply(this,[Y.Array(arguments),false]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['12']++;return this;},relativeCurveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['6']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['13']++;this._curveTo.apply(this,[Y.Array(arguments),true]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['14']++;return this;},_curveTo:function(args,relative){__cov_y0VuG5USWjxBMo9w3IDXpA.f['7']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['15']++;var w,h,x,y,cp1x,cp1y,cp2x,cp2y,pts,right,left,bottom,top,i,len,path,command=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['3'][0]++,' v '):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['3'][1]++,' c '),relativeX=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['4'][0]++,parseFloat(this._currentX)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['4'][1]++,0),relativeY=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['5'][0]++,parseFloat(this._currentY)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['5'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['16']++;len=args.length-5;__cov_y0VuG5USWjxBMo9w3IDXpA.s['17']++;path=command;__cov_y0VuG5USWjxBMo9w3IDXpA.s['18']++;for(i=0;i<len;i=i+6){__cov_y0VuG5USWjxBMo9w3IDXpA.s['19']++;cp1x=parseFloat(args[i]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['20']++;cp1y=parseFloat(args[i+1]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['21']++;cp2x=parseFloat(args[i+2]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['22']++;cp2y=parseFloat(args[i+3]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['23']++;x=parseFloat(args[i+4]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['24']++;y=parseFloat(args[i+5]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['25']++;if(i>0){__cov_y0VuG5USWjxBMo9w3IDXpA.b['6'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['26']++;path=path+', ';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['6'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['27']++;path=path+this._round(cp1x)+', '+this._round(cp1y)+', '+this._round(cp2x)+', '+this._round(cp2y)+', '+this._round(x)+', '+this._round(y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['28']++;cp1x=cp1x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['29']++;cp1y=cp1y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['30']++;cp2x=cp2x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['31']++;cp2y=cp2y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['32']++;x=x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['33']++;y=y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['34']++;right=Math.max(x,Math.max(cp1x,cp2x));__cov_y0VuG5USWjxBMo9w3IDXpA.s['35']++;bottom=Math.max(y,Math.max(cp1y,cp2y));__cov_y0VuG5USWjxBMo9w3IDXpA.s['36']++;left=Math.min(x,Math.min(cp1x,cp2x));__cov_y0VuG5USWjxBMo9w3IDXpA.s['37']++;top=Math.min(y,Math.min(cp1y,cp2y));__cov_y0VuG5USWjxBMo9w3IDXpA.s['38']++;w=Math.abs(right-left);__cov_y0VuG5USWjxBMo9w3IDXpA.s['39']++;h=Math.abs(bottom-top);__cov_y0VuG5USWjxBMo9w3IDXpA.s['40']++;pts=[[this._currentX,this._currentY],[cp1x,cp1y],[cp2x,cp2y],[x,y]];__cov_y0VuG5USWjxBMo9w3IDXpA.s['41']++;this._setCurveBoundingBox(pts,w,h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['42']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['43']++;this._currentY=y;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['44']++;this._addToPath(path);},quadraticCurveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['8']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['45']++;this._quadraticCurveTo.apply(this,[Y.Array(arguments),false]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['46']++;return this;},relativeQuadraticCurveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['9']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['47']++;this._quadraticCurveTo.apply(this,[Y.Array(arguments),true]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['48']++;return this;},_quadraticCurveTo:function(args,relative){__cov_y0VuG5USWjxBMo9w3IDXpA.f['10']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['49']++;var cpx,cpy,cp1x,cp1y,cp2x,cp2y,x,y,currentX=this._currentX,currentY=this._currentY,i,len=args.length-3,bezierArgs=[],relativeX=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['7'][0]++,parseFloat(this._currentX)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['7'][1]++,0),relativeY=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['8'][0]++,parseFloat(this._currentY)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['8'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['50']++;for(i=0;i<len;i=i+4){__cov_y0VuG5USWjxBMo9w3IDXpA.s['51']++;cpx=parseFloat(args[i])+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['52']++;cpy=parseFloat(args[i+1])+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['53']++;x=parseFloat(args[i+2])+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['54']++;y=parseFloat(args[i+3])+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['55']++;cp1x=currentX+0.67*(cpx-currentX);__cov_y0VuG5USWjxBMo9w3IDXpA.s['56']++;cp1y=currentY+0.67*(cpy-currentY);__cov_y0VuG5USWjxBMo9w3IDXpA.s['57']++;cp2x=cp1x+(x-currentX)*0.34;__cov_y0VuG5USWjxBMo9w3IDXpA.s['58']++;cp2y=cp1y+(y-currentY)*0.34;__cov_y0VuG5USWjxBMo9w3IDXpA.s['59']++;bezierArgs.push(cp1x);__cov_y0VuG5USWjxBMo9w3IDXpA.s['60']++;bezierArgs.push(cp1y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['61']++;bezierArgs.push(cp2x);__cov_y0VuG5USWjxBMo9w3IDXpA.s['62']++;bezierArgs.push(cp2y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['63']++;bezierArgs.push(x);__cov_y0VuG5USWjxBMo9w3IDXpA.s['64']++;bezierArgs.push(y);}__cov_y0VuG5USWjxBMo9w3IDXpA.s['65']++;this._curveTo.apply(this,[bezierArgs,false]);},drawRect:function(x,y,w,h){__cov_y0VuG5USWjxBMo9w3IDXpA.f['11']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['66']++;this.moveTo(x,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['67']++;this.lineTo(x+w,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['68']++;this.lineTo(x+w,y+h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['69']++;this.lineTo(x,y+h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['70']++;this.lineTo(x,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['71']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['72']++;this._currentY=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['73']++;return this;},drawRoundRect:function(x,y,w,h,ew,eh){__cov_y0VuG5USWjxBMo9w3IDXpA.f['12']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['74']++;this.moveTo(x,y+eh);__cov_y0VuG5USWjxBMo9w3IDXpA.s['75']++;this.lineTo(x,y+h-eh);__cov_y0VuG5USWjxBMo9w3IDXpA.s['76']++;this.quadraticCurveTo(x,y+h,x+ew,y+h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['77']++;this.lineTo(x+w-ew,y+h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['78']++;this.quadraticCurveTo(x+w,y+h,x+w,y+h-eh);__cov_y0VuG5USWjxBMo9w3IDXpA.s['79']++;this.lineTo(x+w,y+eh);__cov_y0VuG5USWjxBMo9w3IDXpA.s['80']++;this.quadraticCurveTo(x+w,y,x+w-ew,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['81']++;this.lineTo(x+ew,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['82']++;this.quadraticCurveTo(x,y,x,y+eh);__cov_y0VuG5USWjxBMo9w3IDXpA.s['83']++;return this;},drawCircle:function(x,y,radius){__cov_y0VuG5USWjxBMo9w3IDXpA.f['13']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['84']++;var startAngle=0,endAngle=360,circum=radius*2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['85']++;endAngle*=65535;__cov_y0VuG5USWjxBMo9w3IDXpA.s['86']++;this._drawingComplete=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['87']++;this._trackSize(x+circum,y+circum);__cov_y0VuG5USWjxBMo9w3IDXpA.s['88']++;this.moveTo(x+circum,y+radius);__cov_y0VuG5USWjxBMo9w3IDXpA.s['89']++;this._addToPath(' ae '+this._round(x+radius)+', '+this._round(y+radius)+', '+this._round(radius)+', '+this._round(radius)+', '+startAngle+', '+endAngle);__cov_y0VuG5USWjxBMo9w3IDXpA.s['90']++;return this;},drawEllipse:function(x,y,w,h){__cov_y0VuG5USWjxBMo9w3IDXpA.f['14']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['91']++;var startAngle=0,endAngle=360,radius=w*0.5,yRadius=h*0.5;__cov_y0VuG5USWjxBMo9w3IDXpA.s['92']++;endAngle*=65535;__cov_y0VuG5USWjxBMo9w3IDXpA.s['93']++;this._drawingComplete=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['94']++;this._trackSize(x+w,y+h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['95']++;this.moveTo(x+w,y+yRadius);__cov_y0VuG5USWjxBMo9w3IDXpA.s['96']++;this._addToPath(' ae '+this._round(x+radius)+', '+this._round(x+radius)+', '+this._round(y+yRadius)+', '+this._round(radius)+', '+this._round(yRadius)+', '+startAngle+', '+endAngle);__cov_y0VuG5USWjxBMo9w3IDXpA.s['97']++;return this;},drawDiamond:function(x,y,width,height){__cov_y0VuG5USWjxBMo9w3IDXpA.f['15']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['98']++;var midWidth=width*0.5,midHeight=height*0.5;__cov_y0VuG5USWjxBMo9w3IDXpA.s['99']++;this.moveTo(x+midWidth,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['100']++;this.lineTo(x+width,y+midHeight);__cov_y0VuG5USWjxBMo9w3IDXpA.s['101']++;this.lineTo(x+midWidth,y+height);__cov_y0VuG5USWjxBMo9w3IDXpA.s['102']++;this.lineTo(x,y+midHeight);__cov_y0VuG5USWjxBMo9w3IDXpA.s['103']++;this.lineTo(x+midWidth,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['104']++;return this;},drawWedge:function(x,y,startAngle,arc,radius){__cov_y0VuG5USWjxBMo9w3IDXpA.f['16']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['105']++;var diameter=radius*2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['106']++;if(Math.abs(arc)>360){__cov_y0VuG5USWjxBMo9w3IDXpA.b['9'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['107']++;arc=360;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['9'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['108']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['109']++;this._currentY=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['110']++;startAngle*=-65535;__cov_y0VuG5USWjxBMo9w3IDXpA.s['111']++;arc*=65536;__cov_y0VuG5USWjxBMo9w3IDXpA.s['112']++;startAngle=Math.round(startAngle);__cov_y0VuG5USWjxBMo9w3IDXpA.s['113']++;arc=Math.round(arc);__cov_y0VuG5USWjxBMo9w3IDXpA.s['114']++;this.moveTo(x,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['115']++;this._addToPath(' ae '+this._round(x)+', '+this._round(y)+', '+this._round(radius)+' '+this._round(radius)+', '+startAngle+', '+arc);__cov_y0VuG5USWjxBMo9w3IDXpA.s['116']++;this._trackSize(diameter,diameter);__cov_y0VuG5USWjxBMo9w3IDXpA.s['117']++;return this;},lineTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['17']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['118']++;this._lineTo.apply(this,[Y.Array(arguments),false]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['119']++;return this;},relativeLineTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['18']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['120']++;this._lineTo.apply(this,[Y.Array(arguments),true]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['121']++;return this;},_lineTo:function(args,relative){__cov_y0VuG5USWjxBMo9w3IDXpA.f['19']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['122']++;var point1=args[0],i,len,x,y,path=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['10'][0]++,' r '):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['10'][1]++,' l '),relativeX=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['11'][0]++,parseFloat(this._currentX)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['11'][1]++,0),relativeY=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['12'][0]++,parseFloat(this._currentY)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['12'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['123']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['14'][0]++,typeof point1==='string')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['14'][1]++,typeof point1==='number')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['13'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['124']++;len=args.length-1;__cov_y0VuG5USWjxBMo9w3IDXpA.s['125']++;for(i=0;i<len;i=i+2){__cov_y0VuG5USWjxBMo9w3IDXpA.s['126']++;x=parseFloat(args[i]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['127']++;y=parseFloat(args[i+1]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['128']++;path+=' '+this._round(x)+', '+this._round(y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['129']++;x=x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['130']++;y=y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['131']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['132']++;this._currentY=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['133']++;this._trackSize.apply(this,[x,y]);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['13'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['134']++;len=args.length;__cov_y0VuG5USWjxBMo9w3IDXpA.s['135']++;for(i=0;i<len;i=i+1){__cov_y0VuG5USWjxBMo9w3IDXpA.s['136']++;x=parseFloat(args[i][0]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['137']++;y=parseFloat(args[i][1]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['138']++;path+=' '+this._round(x)+', '+this._round(y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['139']++;x=x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['140']++;y=y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['141']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['142']++;this._currentY=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['143']++;this._trackSize.apply(this,[x,y]);}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['144']++;this._addToPath(path);__cov_y0VuG5USWjxBMo9w3IDXpA.s['145']++;return this;},moveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['20']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['146']++;this._moveTo.apply(this,[Y.Array(arguments),false]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['147']++;return this;},relativeMoveTo:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['21']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['148']++;this._moveTo.apply(this,[Y.Array(arguments),true]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['149']++;return this;},_moveTo:function(args,relative){__cov_y0VuG5USWjxBMo9w3IDXpA.f['22']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['150']++;var x=parseFloat(args[0]),y=parseFloat(args[1]),command=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['15'][0]++,' t '):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['15'][1]++,' m '),relativeX=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['16'][0]++,parseFloat(this._currentX)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['16'][1]++,0),relativeY=relative?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['17'][0]++,parseFloat(this._currentY)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['17'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['151']++;this._movePath=command+this._round(x)+', '+this._round(y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['152']++;x=x+relativeX;__cov_y0VuG5USWjxBMo9w3IDXpA.s['153']++;y=y+relativeY;__cov_y0VuG5USWjxBMo9w3IDXpA.s['154']++;this._trackSize(x,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['155']++;this._currentX=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['156']++;this._currentY=y;},_closePath:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['23']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['157']++;var fill=this.get('fill'),stroke=this.get('stroke'),node=this.node,w=this.get('width'),h=this.get('height'),path=this._path,pathEnd='',multiplier=this._coordSpaceMultiplier;__cov_y0VuG5USWjxBMo9w3IDXpA.s['158']++;this._fillChangeHandler();__cov_y0VuG5USWjxBMo9w3IDXpA.s['159']++;this._strokeChangeHandler();__cov_y0VuG5USWjxBMo9w3IDXpA.s['160']++;if(path){__cov_y0VuG5USWjxBMo9w3IDXpA.b['18'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['161']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['20'][0]++,fill)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['20'][1]++,fill.color)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['19'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['162']++;pathEnd+=' x';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['19'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['163']++;if(stroke){__cov_y0VuG5USWjxBMo9w3IDXpA.b['21'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['164']++;pathEnd+=' e';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['21'][1]++;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['18'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['165']++;if(path){__cov_y0VuG5USWjxBMo9w3IDXpA.b['22'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['166']++;node.path=path+pathEnd;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['22'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['167']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['24'][0]++,!isNaN(w))&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['24'][1]++,!isNaN(h))){__cov_y0VuG5USWjxBMo9w3IDXpA.b['23'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['168']++;node.coordOrigin=this._left+', '+this._top;__cov_y0VuG5USWjxBMo9w3IDXpA.s['169']++;node.coordSize=w*multiplier+', '+h*multiplier;__cov_y0VuG5USWjxBMo9w3IDXpA.s['170']++;node.style.position='absolute';__cov_y0VuG5USWjxBMo9w3IDXpA.s['171']++;node.style.width=w+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['172']++;node.style.height=h+'px';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['23'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['173']++;this._path=path;__cov_y0VuG5USWjxBMo9w3IDXpA.s['174']++;this._movePath=null;__cov_y0VuG5USWjxBMo9w3IDXpA.s['175']++;this._updateTransform();},end:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['24']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['176']++;this._closePath();__cov_y0VuG5USWjxBMo9w3IDXpA.s['177']++;return this;},closePath:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['25']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['178']++;this._addToPath(' x e');__cov_y0VuG5USWjxBMo9w3IDXpA.s['179']++;return this;},clear:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['26']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['180']++;this._right=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['181']++;this._bottom=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['182']++;this._width=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['183']++;this._height=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['184']++;this._left=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['185']++;this._top=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['186']++;this._path='';__cov_y0VuG5USWjxBMo9w3IDXpA.s['187']++;this._movePath=null;__cov_y0VuG5USWjxBMo9w3IDXpA.s['188']++;return this;},getBezierData:function(points,t){__cov_y0VuG5USWjxBMo9w3IDXpA.f['27']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['189']++;var n=points.length,tmp=[],i,j;__cov_y0VuG5USWjxBMo9w3IDXpA.s['190']++;for(i=0;i<n;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['191']++;tmp[i]=[points[i][0],points[i][1]];}__cov_y0VuG5USWjxBMo9w3IDXpA.s['192']++;for(j=1;j<n;++j){__cov_y0VuG5USWjxBMo9w3IDXpA.s['193']++;for(i=0;i<n-j;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['194']++;tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];__cov_y0VuG5USWjxBMo9w3IDXpA.s['195']++;tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['196']++;return[tmp[0][0],tmp[0][1]];},_setCurveBoundingBox:function(pts,w,h){__cov_y0VuG5USWjxBMo9w3IDXpA.f['28']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['197']++;var i,left=this._currentX,right=left,top=this._currentY,bottom=top,len=Math.round(Math.sqrt(w*w+h*h)),t=1/len,xy;__cov_y0VuG5USWjxBMo9w3IDXpA.s['198']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['199']++;xy=this.getBezierData(pts,t*i);__cov_y0VuG5USWjxBMo9w3IDXpA.s['200']++;left=isNaN(left)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['25'][0]++,xy[0]):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['25'][1]++,Math.min(xy[0],left));__cov_y0VuG5USWjxBMo9w3IDXpA.s['201']++;right=isNaN(right)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['26'][0]++,xy[0]):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['26'][1]++,Math.max(xy[0],right));__cov_y0VuG5USWjxBMo9w3IDXpA.s['202']++;top=isNaN(top)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['27'][0]++,xy[1]):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['27'][1]++,Math.min(xy[1],top));__cov_y0VuG5USWjxBMo9w3IDXpA.s['203']++;bottom=isNaN(bottom)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['28'][0]++,xy[1]):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['28'][1]++,Math.max(xy[1],bottom));}__cov_y0VuG5USWjxBMo9w3IDXpA.s['204']++;left=Math.round(left*10)/10;__cov_y0VuG5USWjxBMo9w3IDXpA.s['205']++;right=Math.round(right*10)/10;__cov_y0VuG5USWjxBMo9w3IDXpA.s['206']++;top=Math.round(top*10)/10;__cov_y0VuG5USWjxBMo9w3IDXpA.s['207']++;bottom=Math.round(bottom*10)/10;__cov_y0VuG5USWjxBMo9w3IDXpA.s['208']++;this._trackSize(right,bottom);__cov_y0VuG5USWjxBMo9w3IDXpA.s['209']++;this._trackSize(left,top);},_trackSize:function(w,h){__cov_y0VuG5USWjxBMo9w3IDXpA.f['29']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['210']++;if(w>this._right){__cov_y0VuG5USWjxBMo9w3IDXpA.b['29'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['211']++;this._right=w;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['29'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['212']++;if(w<this._left){__cov_y0VuG5USWjxBMo9w3IDXpA.b['30'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['213']++;this._left=w;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['30'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['214']++;if(h<this._top){__cov_y0VuG5USWjxBMo9w3IDXpA.b['31'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['215']++;this._top=h;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['31'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['216']++;if(h>this._bottom){__cov_y0VuG5USWjxBMo9w3IDXpA.b['32'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['217']++;this._bottom=h;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['32'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['218']++;this._width=this._right-this._left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['219']++;this._height=this._bottom-this._top;},_left:0,_right:0,_top:0,_bottom:0,_width:0,_height:0};__cov_y0VuG5USWjxBMo9w3IDXpA.s['220']++;Y.VMLDrawing=VMLDrawing;__cov_y0VuG5USWjxBMo9w3IDXpA.s['221']++;VMLShape=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['30']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['222']++;this._transforms=[];__cov_y0VuG5USWjxBMo9w3IDXpA.s['223']++;this.matrix=new Y.Matrix();__cov_y0VuG5USWjxBMo9w3IDXpA.s['224']++;this._normalizedMatrix=new Y.Matrix();__cov_y0VuG5USWjxBMo9w3IDXpA.s['225']++;VMLShape.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['226']++;VMLShape.NAME='shape';__cov_y0VuG5USWjxBMo9w3IDXpA.s['227']++;Y.extend(VMLShape,Y.GraphicBase,Y.mix({_type:'shape',init:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['31']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['228']++;this.initializer.apply(this,arguments);},initializer:function(cfg){__cov_y0VuG5USWjxBMo9w3IDXpA.f['32']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['229']++;var host=this,graphic=cfg.graphic,data=this.get('data');__cov_y0VuG5USWjxBMo9w3IDXpA.s['230']++;host.createNode();__cov_y0VuG5USWjxBMo9w3IDXpA.s['231']++;if(graphic){__cov_y0VuG5USWjxBMo9w3IDXpA.b['33'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['232']++;this._setGraphic(graphic);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['33'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['233']++;if(data){__cov_y0VuG5USWjxBMo9w3IDXpA.b['34'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['234']++;host._parsePathData(data);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['34'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['235']++;this._updateHandler();},_setGraphic:function(render){__cov_y0VuG5USWjxBMo9w3IDXpA.f['33']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['236']++;var graphic;__cov_y0VuG5USWjxBMo9w3IDXpA.s['237']++;if(render instanceof Y.VMLGraphic){__cov_y0VuG5USWjxBMo9w3IDXpA.b['35'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['238']++;this._graphic=render;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['35'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['239']++;graphic=new Y.VMLGraphic({render:render});__cov_y0VuG5USWjxBMo9w3IDXpA.s['240']++;graphic._appendShape(this);__cov_y0VuG5USWjxBMo9w3IDXpA.s['241']++;this._graphic=graphic;__cov_y0VuG5USWjxBMo9w3IDXpA.s['242']++;this._appendStrokeAndFill();}},_appendStrokeAndFill:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['34']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['243']++;if(this._strokeNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['36'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['244']++;this.node.appendChild(this._strokeNode);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['36'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['245']++;if(this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['37'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['246']++;this.node.appendChild(this._fillNode);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['37'][1]++;}},createNode:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['35']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['247']++;var node,concat=this._camelCaseConcat,x=this.get('x'),y=this.get('y'),w=this.get('width'),h=this.get('height'),id,type,name=this.name,nodestring,visibility=this.get('visible')?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['38'][0]++,'visible'):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['38'][1]++,'hidden'),strokestring,classString,stroke,endcap,opacity,joinstyle,miterlimit,dashstyle,fill,fillstring;__cov_y0VuG5USWjxBMo9w3IDXpA.s['248']++;id=this.get('id');__cov_y0VuG5USWjxBMo9w3IDXpA.s['249']++;type=this._type==='path'?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['39'][0]++,'shape'):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['39'][1]++,this._type);__cov_y0VuG5USWjxBMo9w3IDXpA.s['250']++;classString=_getClassName(SHAPE)+' '+_getClassName(concat(IMPLEMENTATION,SHAPE))+' '+_getClassName(name)+' '+_getClassName(concat(IMPLEMENTATION,name))+' '+IMPLEMENTATION+type;__cov_y0VuG5USWjxBMo9w3IDXpA.s['251']++;stroke=this._getStrokeProps();__cov_y0VuG5USWjxBMo9w3IDXpA.s['252']++;fill=this._getFillProps();__cov_y0VuG5USWjxBMo9w3IDXpA.s['253']++;nodestring='<'+type+' xmlns="urn:schemas-microsft.com:vml" id="'+id+'" class="'+classString+'" style="behavior:url(#default#VML);display:inline-block;position:absolute;left:'+x+'px;top:'+y+'px;width:'+w+'px;height:'+h+'px;visibility:'+visibility+'"';__cov_y0VuG5USWjxBMo9w3IDXpA.s['254']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['41'][0]++,stroke)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['41'][1]++,stroke.weight)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['41'][2]++,stroke.weight>0)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['40'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['255']++;endcap=stroke.endcap;__cov_y0VuG5USWjxBMo9w3IDXpA.s['256']++;opacity=parseFloat(stroke.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['257']++;joinstyle=stroke.joinstyle;__cov_y0VuG5USWjxBMo9w3IDXpA.s['258']++;miterlimit=stroke.miterlimit;__cov_y0VuG5USWjxBMo9w3IDXpA.s['259']++;dashstyle=stroke.dashstyle;__cov_y0VuG5USWjxBMo9w3IDXpA.s['260']++;nodestring+=' stroked="t" strokecolor="'+stroke.color+'" strokeWeight="'+stroke.weight+'px"';__cov_y0VuG5USWjxBMo9w3IDXpA.s['261']++;strokestring='<stroke class="vmlstroke"'+' xmlns="urn:schemas-microsft.com:vml"'+' on="t"'+' style="behavior:url(#default#VML);display:inline-block;"'+' opacity="'+opacity+'"';__cov_y0VuG5USWjxBMo9w3IDXpA.s['262']++;if(endcap){__cov_y0VuG5USWjxBMo9w3IDXpA.b['42'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['263']++;strokestring+=' endcap="'+endcap+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['42'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['264']++;if(joinstyle){__cov_y0VuG5USWjxBMo9w3IDXpA.b['43'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['265']++;strokestring+=' joinstyle="'+joinstyle+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['43'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['266']++;if(miterlimit){__cov_y0VuG5USWjxBMo9w3IDXpA.b['44'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['267']++;strokestring+=' miterlimit="'+miterlimit+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['44'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['268']++;if(dashstyle){__cov_y0VuG5USWjxBMo9w3IDXpA.b['45'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['269']++;strokestring+=' dashstyle="'+dashstyle+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['45'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['270']++;strokestring+='></stroke>';__cov_y0VuG5USWjxBMo9w3IDXpA.s['271']++;this._strokeNode=DOCUMENT.createElement(strokestring);__cov_y0VuG5USWjxBMo9w3IDXpA.s['272']++;nodestring+=' stroked="t"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['40'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['273']++;nodestring+=' stroked="f"';}__cov_y0VuG5USWjxBMo9w3IDXpA.s['274']++;if(fill){__cov_y0VuG5USWjxBMo9w3IDXpA.b['46'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['275']++;if(fill.node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['47'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['276']++;fillstring=fill.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['277']++;this._fillNode=DOCUMENT.createElement(fillstring);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['47'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['278']++;if(fill.color){__cov_y0VuG5USWjxBMo9w3IDXpA.b['48'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['279']++;nodestring+=' fillcolor="'+fill.color+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['48'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['280']++;nodestring+=' filled="'+fill.filled+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['46'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['281']++;nodestring+='>';__cov_y0VuG5USWjxBMo9w3IDXpA.s['282']++;nodestring+='</'+type+'>';__cov_y0VuG5USWjxBMo9w3IDXpA.s['283']++;node=DOCUMENT.createElement(nodestring);__cov_y0VuG5USWjxBMo9w3IDXpA.s['284']++;this.node=node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['285']++;this._strokeFlag=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['286']++;this._fillFlag=false;},addClass:function(className){__cov_y0VuG5USWjxBMo9w3IDXpA.f['36']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['287']++;var node=this.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['288']++;Y_DOM.addClass(node,className);},removeClass:function(className){__cov_y0VuG5USWjxBMo9w3IDXpA.f['37']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['289']++;var node=this.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['290']++;Y_DOM.removeClass(node,className);},getXY:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['38']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['291']++;var graphic=this._graphic,parentXY=graphic.getXY(),x=this.get('x'),y=this.get('y');__cov_y0VuG5USWjxBMo9w3IDXpA.s['292']++;return[parentXY[0]+x,parentXY[1]+y];},setXY:function(xy){__cov_y0VuG5USWjxBMo9w3IDXpA.f['39']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['293']++;var graphic=this._graphic,parentXY=graphic.getXY();__cov_y0VuG5USWjxBMo9w3IDXpA.s['294']++;this.set('x',xy[0]-parentXY[0]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['295']++;this.set('y',xy[1]-parentXY[1]);},contains:function(needle){__cov_y0VuG5USWjxBMo9w3IDXpA.f['40']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['296']++;var node=needle instanceof Y.Node?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['49'][0]++,needle._node):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['49'][1]++,needle);__cov_y0VuG5USWjxBMo9w3IDXpA.s['297']++;return node===this.node;},compareTo:function(refNode){__cov_y0VuG5USWjxBMo9w3IDXpA.f['41']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['298']++;var node=this.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['299']++;return node===refNode;},test:function(selector){__cov_y0VuG5USWjxBMo9w3IDXpA.f['42']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['300']++;return Y_SELECTOR.test(this.node,selector);},_getStrokeProps:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['43']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['301']++;var props,stroke=this.get('stroke'),strokeOpacity,dashstyle,dash='',val,i=0,len,linecap,linejoin;__cov_y0VuG5USWjxBMo9w3IDXpA.s['302']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['51'][0]++,stroke)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['51'][1]++,stroke.weight)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['51'][2]++,stroke.weight>0)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['50'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['303']++;props={};__cov_y0VuG5USWjxBMo9w3IDXpA.s['304']++;linecap=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['52'][0]++,stroke.linecap)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['52'][1]++,'flat');__cov_y0VuG5USWjxBMo9w3IDXpA.s['305']++;linejoin=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['53'][0]++,stroke.linejoin)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['53'][1]++,'round');__cov_y0VuG5USWjxBMo9w3IDXpA.s['306']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['55'][0]++,linecap!=='round')&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['55'][1]++,linecap!=='square')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['54'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['307']++;linecap='flat';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['54'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['308']++;strokeOpacity=parseFloat(stroke.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['309']++;dashstyle=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['56'][0]++,stroke.dashstyle)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['56'][1]++,'none');__cov_y0VuG5USWjxBMo9w3IDXpA.s['310']++;stroke.color=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['57'][0]++,stroke.color)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['57'][1]++,'#000000');__cov_y0VuG5USWjxBMo9w3IDXpA.s['311']++;stroke.weight=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['58'][0]++,stroke.weight)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['58'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['312']++;stroke.opacity=IS_NUM(strokeOpacity)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['59'][0]++,strokeOpacity):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['59'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['313']++;props.stroked=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['314']++;props.color=stroke.color;__cov_y0VuG5USWjxBMo9w3IDXpA.s['315']++;props.weight=stroke.weight;__cov_y0VuG5USWjxBMo9w3IDXpA.s['316']++;props.endcap=linecap;__cov_y0VuG5USWjxBMo9w3IDXpA.s['317']++;props.opacity=stroke.opacity;__cov_y0VuG5USWjxBMo9w3IDXpA.s['318']++;if(IS_ARRAY(dashstyle)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['60'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['319']++;dash=[];__cov_y0VuG5USWjxBMo9w3IDXpA.s['320']++;len=dashstyle.length;__cov_y0VuG5USWjxBMo9w3IDXpA.s['321']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['322']++;val=dashstyle[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['323']++;dash[i]=val/stroke.weight;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['60'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['324']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['62'][0]++,linejoin==='round')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['62'][1]++,linejoin==='bevel')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['61'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['325']++;props.joinstyle=linejoin;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['61'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['326']++;linejoin=parseInt(linejoin,10);__cov_y0VuG5USWjxBMo9w3IDXpA.s['327']++;if(IS_NUM(linejoin)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['63'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['328']++;props.miterlimit=Math.max(linejoin,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['329']++;props.joinstyle='miter';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['63'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['330']++;props.dashstyle=dash;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['50'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['331']++;return props;},_strokeChangeHandler:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['44']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['332']++;if(!this._strokeFlag){__cov_y0VuG5USWjxBMo9w3IDXpA.b['64'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['333']++;return;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['64'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['334']++;var node=this.node,stroke=this.get('stroke'),strokeOpacity,dashstyle,dash='',val,i=0,len,linecap,linejoin;__cov_y0VuG5USWjxBMo9w3IDXpA.s['335']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['66'][0]++,stroke)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['66'][1]++,stroke.weight)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['66'][2]++,stroke.weight>0)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['65'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['336']++;linecap=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['67'][0]++,stroke.linecap)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['67'][1]++,'flat');__cov_y0VuG5USWjxBMo9w3IDXpA.s['337']++;linejoin=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['68'][0]++,stroke.linejoin)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['68'][1]++,'round');__cov_y0VuG5USWjxBMo9w3IDXpA.s['338']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['70'][0]++,linecap!=='round')&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['70'][1]++,linecap!=='square')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['69'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['339']++;linecap='flat';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['69'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['340']++;strokeOpacity=parseFloat(stroke.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['341']++;dashstyle=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['71'][0]++,stroke.dashstyle)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['71'][1]++,'none');__cov_y0VuG5USWjxBMo9w3IDXpA.s['342']++;stroke.color=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['72'][0]++,stroke.color)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['72'][1]++,'#000000');__cov_y0VuG5USWjxBMo9w3IDXpA.s['343']++;stroke.weight=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['73'][0]++,stroke.weight)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['73'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['344']++;stroke.opacity=IS_NUM(strokeOpacity)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['74'][0]++,strokeOpacity):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['74'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['345']++;node.stroked=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['346']++;node.strokeColor=stroke.color;__cov_y0VuG5USWjxBMo9w3IDXpA.s['347']++;node.strokeWeight=stroke.weight+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['348']++;if(!this._strokeNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['75'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['349']++;this._strokeNode=this._createGraphicNode('stroke');__cov_y0VuG5USWjxBMo9w3IDXpA.s['350']++;node.appendChild(this._strokeNode);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['75'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['351']++;this._strokeNode.endcap=linecap;__cov_y0VuG5USWjxBMo9w3IDXpA.s['352']++;this._strokeNode.opacity=stroke.opacity;__cov_y0VuG5USWjxBMo9w3IDXpA.s['353']++;if(IS_ARRAY(dashstyle)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['76'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['354']++;dash=[];__cov_y0VuG5USWjxBMo9w3IDXpA.s['355']++;len=dashstyle.length;__cov_y0VuG5USWjxBMo9w3IDXpA.s['356']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['357']++;val=dashstyle[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['358']++;dash[i]=val/stroke.weight;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['76'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['359']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['78'][0]++,linejoin==='round')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['78'][1]++,linejoin==='bevel')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['77'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['360']++;this._strokeNode.joinstyle=linejoin;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['77'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['361']++;linejoin=parseInt(linejoin,10);__cov_y0VuG5USWjxBMo9w3IDXpA.s['362']++;if(IS_NUM(linejoin)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['79'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['363']++;this._strokeNode.miterlimit=Math.max(linejoin,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['364']++;this._strokeNode.joinstyle='miter';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['79'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['365']++;this._strokeNode.dashstyle=dash;__cov_y0VuG5USWjxBMo9w3IDXpA.s['366']++;this._strokeNode.on=true;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['65'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['367']++;if(this._strokeNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['80'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['368']++;this._strokeNode.on=false;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['80'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['369']++;node.stroked=false;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['370']++;this._strokeFlag=false;},_getFillProps:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['45']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['371']++;var fill=this.get('fill'),fillOpacity,props,gradient,i,fillstring,filled=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['372']++;if(fill){__cov_y0VuG5USWjxBMo9w3IDXpA.b['81'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['373']++;props={};__cov_y0VuG5USWjxBMo9w3IDXpA.s['374']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['83'][0]++,fill.type==='radial')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['83'][1]++,fill.type==='linear')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['82'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['375']++;fillOpacity=parseFloat(fill.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['376']++;fillOpacity=IS_NUM(fillOpacity)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['84'][0]++,fillOpacity):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['84'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['377']++;filled=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['378']++;gradient=this._getGradientFill(fill);__cov_y0VuG5USWjxBMo9w3IDXpA.s['379']++;fillstring='<fill xmlns="urn:schemas-microsft.com:vml"'+' class="vmlfill" style="behavior:url(#default#VML);display:inline-block;"'+' opacity="'+fillOpacity+'"';__cov_y0VuG5USWjxBMo9w3IDXpA.s['380']++;for(i in gradient){__cov_y0VuG5USWjxBMo9w3IDXpA.s['381']++;if(gradient.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['85'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['382']++;fillstring+=' '+i+'="'+gradient[i]+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['85'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['383']++;fillstring+=' />';__cov_y0VuG5USWjxBMo9w3IDXpA.s['384']++;props.node=fillstring;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['82'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['385']++;if(fill.color){__cov_y0VuG5USWjxBMo9w3IDXpA.b['86'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['386']++;fillOpacity=parseFloat(fill.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['387']++;filled=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['388']++;props.color=fill.color;__cov_y0VuG5USWjxBMo9w3IDXpA.s['389']++;if(IS_NUM(fillOpacity)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['87'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['390']++;fillOpacity=Math.max(Math.min(fillOpacity,1),0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['391']++;props.opacity=fillOpacity;__cov_y0VuG5USWjxBMo9w3IDXpA.s['392']++;if(fillOpacity<1){__cov_y0VuG5USWjxBMo9w3IDXpA.b['88'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['393']++;props.node='<fill xmlns="urn:schemas-microsft.com:vml"'+' class="vmlfill" style="behavior:url(#default#VML);display:inline-block;"'+' type="solid" opacity="'+fillOpacity+'"/>';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['88'][1]++;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['87'][1]++;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['86'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['394']++;props.filled=filled;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['81'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['395']++;return props;},_fillChangeHandler:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['46']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['396']++;if(!this._fillFlag){__cov_y0VuG5USWjxBMo9w3IDXpA.b['89'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['397']++;return;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['89'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['398']++;var node=this.node,fill=this.get('fill'),fillOpacity,fillstring,filled=false,i,gradient;__cov_y0VuG5USWjxBMo9w3IDXpA.s['399']++;if(fill){__cov_y0VuG5USWjxBMo9w3IDXpA.b['90'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['400']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['92'][0]++,fill.type==='radial')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['92'][1]++,fill.type==='linear')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['91'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['401']++;filled=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['402']++;gradient=this._getGradientFill(fill);__cov_y0VuG5USWjxBMo9w3IDXpA.s['403']++;if(this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['93'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['404']++;for(i in gradient){__cov_y0VuG5USWjxBMo9w3IDXpA.s['405']++;if(gradient.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['94'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['406']++;if(i==='colors'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['95'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['407']++;this._fillNode.colors.value=gradient[i];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['95'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['408']++;this._fillNode[i]=gradient[i];}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['94'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['93'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['409']++;fillstring='<fill xmlns="urn:schemas-microsft.com:vml"'+' class="vmlfill"'+' style="behavior:url(#default#VML);display:inline-block;"';__cov_y0VuG5USWjxBMo9w3IDXpA.s['410']++;for(i in gradient){__cov_y0VuG5USWjxBMo9w3IDXpA.s['411']++;if(gradient.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['96'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['412']++;fillstring+=' '+i+'="'+gradient[i]+'"';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['96'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['413']++;fillstring+=' />';__cov_y0VuG5USWjxBMo9w3IDXpA.s['414']++;this._fillNode=DOCUMENT.createElement(fillstring);__cov_y0VuG5USWjxBMo9w3IDXpA.s['415']++;node.appendChild(this._fillNode);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['91'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['416']++;if(fill.color){__cov_y0VuG5USWjxBMo9w3IDXpA.b['97'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['417']++;node.fillcolor=fill.color;__cov_y0VuG5USWjxBMo9w3IDXpA.s['418']++;fillOpacity=parseFloat(fill.opacity);__cov_y0VuG5USWjxBMo9w3IDXpA.s['419']++;filled=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['420']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['99'][0]++,IS_NUM(fillOpacity))&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['99'][1]++,fillOpacity<1)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['98'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['421']++;fill.opacity=fillOpacity;__cov_y0VuG5USWjxBMo9w3IDXpA.s['422']++;if(this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['100'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['423']++;if(this._fillNode.getAttribute('type')!=='solid'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['101'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['424']++;this._fillNode.type='solid';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['101'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['425']++;this._fillNode.opacity=fillOpacity;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['100'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['426']++;fillstring='<fill xmlns="urn:schemas-microsft.com:vml"'+' class="vmlfill"'+' style="behavior:url(#default#VML);display:inline-block;"'+' type="solid"'+' opacity="'+fillOpacity+'"'+'/>';__cov_y0VuG5USWjxBMo9w3IDXpA.s['427']++;this._fillNode=DOCUMENT.createElement(fillstring);__cov_y0VuG5USWjxBMo9w3IDXpA.s['428']++;node.appendChild(this._fillNode);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['98'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['429']++;if(this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['102'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['430']++;this._fillNode.opacity=1;__cov_y0VuG5USWjxBMo9w3IDXpA.s['431']++;this._fillNode.type='solid';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['102'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['97'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['90'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['432']++;node.filled=filled;__cov_y0VuG5USWjxBMo9w3IDXpA.s['433']++;this._fillFlag=false;},_updateFillNode:function(node){__cov_y0VuG5USWjxBMo9w3IDXpA.f['47']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['434']++;if(!this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['103'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['435']++;this._fillNode=this._createGraphicNode('fill');__cov_y0VuG5USWjxBMo9w3IDXpA.s['436']++;node.appendChild(this._fillNode);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['103'][1]++;}},_getGradientFill:function(fill){__cov_y0VuG5USWjxBMo9w3IDXpA.f['48']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['437']++;var gradientProps={},gradientBoxWidth,gradientBoxHeight,type=fill.type,w=this.get('width'),h=this.get('height'),isNumber=IS_NUM,stop,stops=fill.stops,len=stops.length,opacity,color,i,oi,colorstring='',cx=fill.cx,cy=fill.cy,fx=fill.fx,fy=fill.fy,r=fill.r,pct,rotation=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['104'][0]++,fill.rotation)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['104'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['438']++;if(type==='linear'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['105'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['439']++;if(rotation<=270){__cov_y0VuG5USWjxBMo9w3IDXpA.b['106'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['440']++;rotation=Math.abs(rotation-270);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['106'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['441']++;if(rotation<360){__cov_y0VuG5USWjxBMo9w3IDXpA.b['107'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['442']++;rotation=270+(360-rotation);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['107'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['443']++;rotation=270;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['444']++;gradientProps.type='gradient';__cov_y0VuG5USWjxBMo9w3IDXpA.s['445']++;gradientProps.angle=rotation;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['105'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['446']++;if(type==='radial'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['108'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['447']++;gradientBoxWidth=w*(r*2);__cov_y0VuG5USWjxBMo9w3IDXpA.s['448']++;gradientBoxHeight=h*(r*2);__cov_y0VuG5USWjxBMo9w3IDXpA.s['449']++;fx=r*2*(fx-0.5);__cov_y0VuG5USWjxBMo9w3IDXpA.s['450']++;fy=r*2*(fy-0.5);__cov_y0VuG5USWjxBMo9w3IDXpA.s['451']++;fx+=cx;__cov_y0VuG5USWjxBMo9w3IDXpA.s['452']++;fy+=cy;__cov_y0VuG5USWjxBMo9w3IDXpA.s['453']++;gradientProps.focussize=gradientBoxWidth/w/10+'% '+gradientBoxHeight/h/10+'%';__cov_y0VuG5USWjxBMo9w3IDXpA.s['454']++;gradientProps.alignshape=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['455']++;gradientProps.type='gradientradial';__cov_y0VuG5USWjxBMo9w3IDXpA.s['456']++;gradientProps.focus='100%';__cov_y0VuG5USWjxBMo9w3IDXpA.s['457']++;gradientProps.focusposition=Math.round(fx*100)+'% '+Math.round(fy*100)+'%';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['108'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['458']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['459']++;stop=stops[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['460']++;color=stop.color;__cov_y0VuG5USWjxBMo9w3IDXpA.s['461']++;opacity=stop.opacity;__cov_y0VuG5USWjxBMo9w3IDXpA.s['462']++;opacity=isNumber(opacity)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['109'][0]++,opacity):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['109'][1]++,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['463']++;pct=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['110'][0]++,stop.offset)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['110'][1]++,i/(len-1));__cov_y0VuG5USWjxBMo9w3IDXpA.s['464']++;pct*=r*2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['465']++;pct=Math.round(100*pct)+'%';__cov_y0VuG5USWjxBMo9w3IDXpA.s['466']++;oi=i>0?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['111'][0]++,i+1):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['111'][1]++,'');__cov_y0VuG5USWjxBMo9w3IDXpA.s['467']++;gradientProps['opacity'+oi]=opacity+'';__cov_y0VuG5USWjxBMo9w3IDXpA.s['468']++;colorstring+=', '+pct+' '+color;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['469']++;if(parseFloat(pct)<100){__cov_y0VuG5USWjxBMo9w3IDXpA.b['112'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['470']++;colorstring+=', 100% '+color;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['112'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['471']++;gradientProps.colors=colorstring.substr(2);__cov_y0VuG5USWjxBMo9w3IDXpA.s['472']++;return gradientProps;},_addTransform:function(type,args){__cov_y0VuG5USWjxBMo9w3IDXpA.f['49']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['473']++;args=Y.Array(args);__cov_y0VuG5USWjxBMo9w3IDXpA.s['474']++;this._transform=Y_LANG.trim(this._transform+' '+type+'('+args.join(', ')+')');__cov_y0VuG5USWjxBMo9w3IDXpA.s['475']++;args.unshift(type);__cov_y0VuG5USWjxBMo9w3IDXpA.s['476']++;this._transforms.push(args);__cov_y0VuG5USWjxBMo9w3IDXpA.s['477']++;if(this.initialized){__cov_y0VuG5USWjxBMo9w3IDXpA.b['113'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['478']++;this._updateTransform();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['113'][1]++;}},_updateTransform:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['50']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['479']++;var node=this.node,key,transform,transformOrigin,x=this.get('x'),y=this.get('y'),tx,ty,matrix=this.matrix,normalizedMatrix=this._normalizedMatrix,isPathShape=this instanceof Y.VMLPath,i,len=this._transforms.length;__cov_y0VuG5USWjxBMo9w3IDXpA.s['480']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['115'][0]++,this._transforms)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['115'][1]++,this._transforms.length>0)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['114'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['481']++;transformOrigin=this.get('transformOrigin');__cov_y0VuG5USWjxBMo9w3IDXpA.s['482']++;if(isPathShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['116'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['483']++;normalizedMatrix.translate(this._left,this._top);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['116'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['484']++;tx=transformOrigin[0]-0.5;__cov_y0VuG5USWjxBMo9w3IDXpA.s['485']++;ty=transformOrigin[1]-0.5;__cov_y0VuG5USWjxBMo9w3IDXpA.s['486']++;tx=Math.max(-0.5,Math.min(0.5,tx));__cov_y0VuG5USWjxBMo9w3IDXpA.s['487']++;ty=Math.max(-0.5,Math.min(0.5,ty));__cov_y0VuG5USWjxBMo9w3IDXpA.s['488']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['489']++;key=this._transforms[i].shift();__cov_y0VuG5USWjxBMo9w3IDXpA.s['490']++;if(key){__cov_y0VuG5USWjxBMo9w3IDXpA.b['117'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['491']++;normalizedMatrix[key].apply(normalizedMatrix,this._transforms[i]);__cov_y0VuG5USWjxBMo9w3IDXpA.s['492']++;matrix[key].apply(matrix,this._transforms[i]);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['117'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['493']++;if(isPathShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['118'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['494']++;normalizedMatrix.translate(-this._left,-this._top);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['118'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['495']++;transform=normalizedMatrix.a+','+normalizedMatrix.c+','+normalizedMatrix.b+','+normalizedMatrix.d+','+0+','+0;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['114'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['496']++;this._graphic.addToRedrawQueue(this);__cov_y0VuG5USWjxBMo9w3IDXpA.s['497']++;if(transform){__cov_y0VuG5USWjxBMo9w3IDXpA.b['119'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['498']++;if(!this._skew){__cov_y0VuG5USWjxBMo9w3IDXpA.b['120'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['499']++;this._skew=DOCUMENT.createElement('<skew class="vmlskew"'+' xmlns="urn:schemas-microsft.com:vml"'+' on="false"'+' style="behavior:url(#default#VML);display:inline-block;"'+'/>');__cov_y0VuG5USWjxBMo9w3IDXpA.s['500']++;this.node.appendChild(this._skew);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['120'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['501']++;this._skew.matrix=transform;__cov_y0VuG5USWjxBMo9w3IDXpA.s['502']++;this._skew.on=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['503']++;this._skew.origin=tx+', '+ty;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['119'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['504']++;if(this._type!=='path'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['121'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['505']++;this._transforms=[];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['121'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['506']++;node.style.left=x+this._getSkewOffsetValue(normalizedMatrix.dx)+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['507']++;node.style.top=y+this._getSkewOffsetValue(normalizedMatrix.dy)+'px';},_getSkewOffsetValue:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['51']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['508']++;var sign=Y.MatrixUtil.sign(val),absVal=Math.abs(val);__cov_y0VuG5USWjxBMo9w3IDXpA.s['509']++;val=Math.min(absVal,32767)*sign;__cov_y0VuG5USWjxBMo9w3IDXpA.s['510']++;return val;},_translateX:0,_translateY:0,_transform:'',translate:function(x,y){__cov_y0VuG5USWjxBMo9w3IDXpA.f['52']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['511']++;this._translateX+=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['512']++;this._translateY+=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['513']++;this._addTransform('translate',arguments);},translateX:function(x){__cov_y0VuG5USWjxBMo9w3IDXpA.f['53']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['514']++;this._translateX+=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['515']++;this._addTransform('translateX',arguments);},translateY:function(y){__cov_y0VuG5USWjxBMo9w3IDXpA.f['54']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['516']++;this._translateY+=y;__cov_y0VuG5USWjxBMo9w3IDXpA.s['517']++;this._addTransform('translateY',arguments);},skew:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['55']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['518']++;this._addTransform('skew',arguments);},skewX:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['56']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['519']++;this._addTransform('skewX',arguments);},skewY:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['57']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['520']++;this._addTransform('skewY',arguments);},rotate:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['58']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['521']++;this._addTransform('rotate',arguments);},scale:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['59']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['522']++;this._addTransform('scale',arguments);},on:function(type,fn){__cov_y0VuG5USWjxBMo9w3IDXpA.f['60']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['523']++;if(Y.Node.DOM_EVENTS[type]){__cov_y0VuG5USWjxBMo9w3IDXpA.b['122'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['524']++;return Y.on(type,fn,'#'+this.get('id'));}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['122'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['525']++;return Y.on.apply(this,arguments);},_draw:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['61']++;},_updateHandler:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['62']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['526']++;var host=this,node=host.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['527']++;host._fillChangeHandler();__cov_y0VuG5USWjxBMo9w3IDXpA.s['528']++;host._strokeChangeHandler();__cov_y0VuG5USWjxBMo9w3IDXpA.s['529']++;node.style.width=this.get('width')+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['530']++;node.style.height=this.get('height')+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['531']++;this._draw();__cov_y0VuG5USWjxBMo9w3IDXpA.s['532']++;host._updateTransform();},_createGraphicNode:function(type){__cov_y0VuG5USWjxBMo9w3IDXpA.f['63']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['533']++;type=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['123'][0]++,type)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['123'][1]++,this._type);__cov_y0VuG5USWjxBMo9w3IDXpA.s['534']++;return DOCUMENT.createElement('<'+type+' xmlns="urn:schemas-microsft.com:vml"'+' style="behavior:url(#default#VML);display:inline-block;"'+' class="vml'+type+'"'+'/>');},_getDefaultFill:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['64']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['535']++;return{type:'solid',opacity:1,cx:0.5,cy:0.5,fx:0.5,fy:0.5,r:0.5};},_getDefaultStroke:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['65']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['536']++;return{weight:1,dashstyle:'none',color:'#000',opacity:1};},set:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['66']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['537']++;var host=this;__cov_y0VuG5USWjxBMo9w3IDXpA.s['538']++;AttributeLite.prototype.set.apply(host,arguments);__cov_y0VuG5USWjxBMo9w3IDXpA.s['539']++;if(host.initialized){__cov_y0VuG5USWjxBMo9w3IDXpA.b['124'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['540']++;host._updateHandler();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['124'][1]++;}},getBounds:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['67']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['541']++;var isPathShape=this instanceof Y.VMLPath,w=this.get('width'),h=this.get('height'),x=this.get('x'),y=this.get('y');__cov_y0VuG5USWjxBMo9w3IDXpA.s['542']++;if(isPathShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['125'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['543']++;x=x+this._left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['544']++;y=y+this._top;__cov_y0VuG5USWjxBMo9w3IDXpA.s['545']++;w=this._right-this._left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['546']++;h=this._bottom-this._top;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['125'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['547']++;return this._getContentRect(w,h,x,y);},_getContentRect:function(w,h,x,y){__cov_y0VuG5USWjxBMo9w3IDXpA.f['68']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['548']++;var transformOrigin=this.get('transformOrigin'),transformX=transformOrigin[0]*w,transformY=transformOrigin[1]*h,transforms=this.matrix.getTransformArray(this.get('transform')),matrix=new Y.Matrix(),i,len=transforms.length,transform,key,contentRect,isPathShape=this instanceof Y.VMLPath;__cov_y0VuG5USWjxBMo9w3IDXpA.s['549']++;if(isPathShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['126'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['550']++;matrix.translate(this._left,this._top);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['126'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['551']++;transformX=!isNaN(transformX)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['127'][0]++,transformX):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['127'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['552']++;transformY=!isNaN(transformY)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['128'][0]++,transformY):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['128'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['553']++;matrix.translate(transformX,transformY);__cov_y0VuG5USWjxBMo9w3IDXpA.s['554']++;for(i=0;i<len;i=i+1){__cov_y0VuG5USWjxBMo9w3IDXpA.s['555']++;transform=transforms[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['556']++;key=transform.shift();__cov_y0VuG5USWjxBMo9w3IDXpA.s['557']++;if(key){__cov_y0VuG5USWjxBMo9w3IDXpA.b['129'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['558']++;matrix[key].apply(matrix,transform);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['129'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['559']++;matrix.translate(-transformX,-transformY);__cov_y0VuG5USWjxBMo9w3IDXpA.s['560']++;if(isPathShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['130'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['561']++;matrix.translate(-this._left,-this._top);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['130'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['562']++;contentRect=matrix.getContentRect(w,h,x,y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['563']++;return contentRect;},toFront:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['69']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['564']++;var graphic=this.get('graphic');__cov_y0VuG5USWjxBMo9w3IDXpA.s['565']++;if(graphic){__cov_y0VuG5USWjxBMo9w3IDXpA.b['131'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['566']++;graphic._toFront(this);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['131'][1]++;}},toBack:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['70']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['567']++;var graphic=this.get('graphic');__cov_y0VuG5USWjxBMo9w3IDXpA.s['568']++;if(graphic){__cov_y0VuG5USWjxBMo9w3IDXpA.b['132'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['569']++;graphic._toBack(this);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['132'][1]++;}},_parsePathData:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['71']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['570']++;var method,methodSymbol,args,commandArray=Y.Lang.trim(val.match(SPLITPATHPATTERN)),i,len,str,symbolToMethod=this._pathSymbolToMethod;__cov_y0VuG5USWjxBMo9w3IDXpA.s['571']++;if(commandArray){__cov_y0VuG5USWjxBMo9w3IDXpA.b['133'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['572']++;this.clear();__cov_y0VuG5USWjxBMo9w3IDXpA.s['573']++;len=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['134'][0]++,commandArray.length)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['134'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['574']++;for(i=0;i<len;i=i+1){__cov_y0VuG5USWjxBMo9w3IDXpA.s['575']++;str=commandArray[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['576']++;methodSymbol=str.substr(0,1);__cov_y0VuG5USWjxBMo9w3IDXpA.s['577']++;args=str.substr(1).match(SPLITARGSPATTERN);__cov_y0VuG5USWjxBMo9w3IDXpA.s['578']++;method=symbolToMethod[methodSymbol];__cov_y0VuG5USWjxBMo9w3IDXpA.s['579']++;if(method){__cov_y0VuG5USWjxBMo9w3IDXpA.b['135'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['580']++;if(args){__cov_y0VuG5USWjxBMo9w3IDXpA.b['136'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['581']++;this[method].apply(this,args);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['136'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['582']++;this[method].apply(this);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['135'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['583']++;this.end();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['133'][1]++;}},destroy:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['72']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['584']++;var graphic=this.get('graphic');__cov_y0VuG5USWjxBMo9w3IDXpA.s['585']++;if(graphic){__cov_y0VuG5USWjxBMo9w3IDXpA.b['137'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['586']++;graphic.removeShape(this);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['137'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['587']++;this._destroy();}},_destroy:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['73']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['588']++;if(this.node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['138'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['589']++;if(this._fillNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['139'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['590']++;this.node.removeChild(this._fillNode);__cov_y0VuG5USWjxBMo9w3IDXpA.s['591']++;this._fillNode=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['139'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['592']++;if(this._strokeNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['140'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['593']++;this.node.removeChild(this._strokeNode);__cov_y0VuG5USWjxBMo9w3IDXpA.s['594']++;this._strokeNode=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['140'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['595']++;Y.Event.purgeElement(this.node,true);__cov_y0VuG5USWjxBMo9w3IDXpA.s['596']++;if(this.node.parentNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['141'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['597']++;this.node.parentNode.removeChild(this.node);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['141'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['598']++;this.node=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['138'][1]++;}}},Y.VMLDrawing.prototype));__cov_y0VuG5USWjxBMo9w3IDXpA.s['599']++;VMLShape.ATTRS={transformOrigin:{valueFn:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['74']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['600']++;return[0.5,0.5];}},transform:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['75']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['601']++;var i,len,transform;__cov_y0VuG5USWjxBMo9w3IDXpA.s['602']++;this.matrix.init();__cov_y0VuG5USWjxBMo9w3IDXpA.s['603']++;this._normalizedMatrix.init();__cov_y0VuG5USWjxBMo9w3IDXpA.s['604']++;this._transforms=this.matrix.getTransformArray(val);__cov_y0VuG5USWjxBMo9w3IDXpA.s['605']++;len=this._transforms.length;__cov_y0VuG5USWjxBMo9w3IDXpA.s['606']++;for(i=0;i<len;++i){__cov_y0VuG5USWjxBMo9w3IDXpA.s['607']++;transform=this._transforms[i];}__cov_y0VuG5USWjxBMo9w3IDXpA.s['608']++;this._transform=val;__cov_y0VuG5USWjxBMo9w3IDXpA.s['609']++;return val;},getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['76']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['610']++;return this._transform;}},x:{value:0},y:{value:0},id:{valueFn:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['77']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['611']++;return Y.guid();},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['78']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['612']++;var node=this.node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['613']++;if(node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['142'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['614']++;node.setAttribute('id',val);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['142'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['615']++;return val;}},width:{value:0},height:{value:0},visible:{value:true,setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['79']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['616']++;var node=this.node,visibility=val?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['143'][0]++,'visible'):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['143'][1]++,'hidden');__cov_y0VuG5USWjxBMo9w3IDXpA.s['617']++;if(node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['144'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['618']++;node.style.visibility=visibility;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['144'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['619']++;return val;}},fill:{valueFn:'_getDefaultFill',setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['80']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['620']++;var i,fill,tmpl=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['145'][0]++,this.get('fill'))||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['145'][1]++,this._getDefaultFill());__cov_y0VuG5USWjxBMo9w3IDXpA.s['621']++;if(val){__cov_y0VuG5USWjxBMo9w3IDXpA.b['146'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['622']++;if(val.hasOwnProperty('color')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['147'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['623']++;val.type='solid';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['147'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['624']++;for(i in val){__cov_y0VuG5USWjxBMo9w3IDXpA.s['625']++;if(val.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['148'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['626']++;tmpl[i]=val[i];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['148'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['146'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['627']++;fill=tmpl;__cov_y0VuG5USWjxBMo9w3IDXpA.s['628']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['150'][0]++,fill)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['150'][1]++,fill.color)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['149'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['629']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['152'][0]++,fill.color===undefined)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['152'][1]++,fill.color==='none')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['151'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['630']++;fill.color=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['151'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['631']++;if(fill.color.toLowerCase().indexOf('rgba')>-1){__cov_y0VuG5USWjxBMo9w3IDXpA.b['153'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['632']++;fill.opacity=Y.Color._getAlpha(fill.color);__cov_y0VuG5USWjxBMo9w3IDXpA.s['633']++;fill.color=Y.Color.toHex(fill.color);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['153'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['149'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['634']++;this._fillFlag=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['635']++;return fill;}},stroke:{valueFn:'_getDefaultStroke',setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['81']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['636']++;var i,stroke,wt,tmpl=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['154'][0]++,this.get('stroke'))||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['154'][1]++,this._getDefaultStroke());__cov_y0VuG5USWjxBMo9w3IDXpA.s['637']++;if(val){__cov_y0VuG5USWjxBMo9w3IDXpA.b['155'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['638']++;if(val.hasOwnProperty('weight')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['156'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['639']++;wt=parseInt(val.weight,10);__cov_y0VuG5USWjxBMo9w3IDXpA.s['640']++;if(!isNaN(wt)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['157'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['641']++;val.weight=wt;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['157'][1]++;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['156'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['642']++;for(i in val){__cov_y0VuG5USWjxBMo9w3IDXpA.s['643']++;if(val.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['158'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['644']++;tmpl[i]=val[i];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['158'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['155'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['645']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['160'][0]++,tmpl.color)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['160'][1]++,tmpl.color.toLowerCase().indexOf('rgba')>-1)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['159'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['646']++;tmpl.opacity=Y.Color._getAlpha(tmpl.color);__cov_y0VuG5USWjxBMo9w3IDXpA.s['647']++;tmpl.color=Y.Color.toHex(tmpl.color);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['159'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['648']++;stroke=tmpl;__cov_y0VuG5USWjxBMo9w3IDXpA.s['649']++;this._strokeFlag=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['650']++;return stroke;}},autoSize:{value:false},pointerEvents:{value:'visiblePainted'},node:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['82']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['651']++;return this.node;}},data:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['83']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['652']++;if(this.get('node')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['161'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['653']++;this._parsePathData(val);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['161'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['654']++;return val;}},graphic:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['84']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['655']++;return this._graphic;}}};__cov_y0VuG5USWjxBMo9w3IDXpA.s['656']++;Y.VMLShape=VMLShape;__cov_y0VuG5USWjxBMo9w3IDXpA.s['657']++;VMLPath=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['85']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['658']++;VMLPath.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['659']++;VMLPath.NAME='path';__cov_y0VuG5USWjxBMo9w3IDXpA.s['660']++;Y.extend(VMLPath,Y.VMLShape);__cov_y0VuG5USWjxBMo9w3IDXpA.s['661']++;VMLPath.ATTRS=Y.merge(Y.VMLShape.ATTRS,{width:{getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['86']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['662']++;var val=Math.max(this._right-this._left,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['663']++;return val;}},height:{getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['87']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['664']++;return Math.max(this._bottom-this._top,0);}},path:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['88']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['665']++;return this._path;}}});__cov_y0VuG5USWjxBMo9w3IDXpA.s['666']++;Y.VMLPath=VMLPath;__cov_y0VuG5USWjxBMo9w3IDXpA.s['667']++;VMLRect=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['89']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['668']++;VMLRect.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['669']++;VMLRect.NAME='rect';__cov_y0VuG5USWjxBMo9w3IDXpA.s['670']++;Y.extend(VMLRect,Y.VMLShape,{_type:'rect'});__cov_y0VuG5USWjxBMo9w3IDXpA.s['671']++;VMLRect.ATTRS=Y.VMLShape.ATTRS;__cov_y0VuG5USWjxBMo9w3IDXpA.s['672']++;Y.VMLRect=VMLRect;__cov_y0VuG5USWjxBMo9w3IDXpA.s['673']++;VMLEllipse=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['90']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['674']++;VMLEllipse.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['675']++;VMLEllipse.NAME='ellipse';__cov_y0VuG5USWjxBMo9w3IDXpA.s['676']++;Y.extend(VMLEllipse,Y.VMLShape,{_type:'oval'});__cov_y0VuG5USWjxBMo9w3IDXpA.s['677']++;VMLEllipse.ATTRS=Y.merge(Y.VMLShape.ATTRS,{xRadius:{lazyAdd:false,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['91']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['678']++;var val=this.get('width');__cov_y0VuG5USWjxBMo9w3IDXpA.s['679']++;val=Math.round(val/2*100)/100;__cov_y0VuG5USWjxBMo9w3IDXpA.s['680']++;return val;},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['92']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['681']++;var w=val*2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['682']++;this.set('width',w);__cov_y0VuG5USWjxBMo9w3IDXpA.s['683']++;return val;}},yRadius:{lazyAdd:false,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['93']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['684']++;var val=this.get('height');__cov_y0VuG5USWjxBMo9w3IDXpA.s['685']++;val=Math.round(val/2*100)/100;__cov_y0VuG5USWjxBMo9w3IDXpA.s['686']++;return val;},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['94']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['687']++;var h=val*2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['688']++;this.set('height',h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['689']++;return val;}}});__cov_y0VuG5USWjxBMo9w3IDXpA.s['690']++;Y.VMLEllipse=VMLEllipse;__cov_y0VuG5USWjxBMo9w3IDXpA.s['691']++;VMLCircle=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['95']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['692']++;VMLCircle.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['693']++;VMLCircle.NAME='circle';__cov_y0VuG5USWjxBMo9w3IDXpA.s['694']++;Y.extend(VMLCircle,VMLShape,{_type:'oval'});__cov_y0VuG5USWjxBMo9w3IDXpA.s['695']++;VMLCircle.ATTRS=Y.merge(VMLShape.ATTRS,{radius:{lazyAdd:false,value:0},width:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['96']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['696']++;this.set('radius',val/2);__cov_y0VuG5USWjxBMo9w3IDXpA.s['697']++;return val;},getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['97']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['698']++;var radius=this.get('radius'),val=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['163'][0]++,radius)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['163'][1]++,radius>0)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['162'][0]++,radius*2):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['162'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['699']++;return val;}},height:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['98']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['700']++;this.set('radius',val/2);__cov_y0VuG5USWjxBMo9w3IDXpA.s['701']++;return val;},getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['99']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['702']++;var radius=this.get('radius'),val=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['165'][0]++,radius)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['165'][1]++,radius>0)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['164'][0]++,radius*2):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['164'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['703']++;return val;}}});__cov_y0VuG5USWjxBMo9w3IDXpA.s['704']++;Y.VMLCircle=VMLCircle;__cov_y0VuG5USWjxBMo9w3IDXpA.s['705']++;VMLPieSlice=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['100']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['706']++;VMLPieSlice.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['707']++;VMLPieSlice.NAME='vmlPieSlice';__cov_y0VuG5USWjxBMo9w3IDXpA.s['708']++;Y.extend(VMLPieSlice,Y.VMLShape,Y.mix({_type:'shape',_draw:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['101']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['709']++;var x=this.get('cx'),y=this.get('cy'),startAngle=this.get('startAngle'),arc=this.get('arc'),radius=this.get('radius');__cov_y0VuG5USWjxBMo9w3IDXpA.s['710']++;this.clear();__cov_y0VuG5USWjxBMo9w3IDXpA.s['711']++;this.drawWedge(x,y,startAngle,arc,radius);__cov_y0VuG5USWjxBMo9w3IDXpA.s['712']++;this.end();}},Y.VMLDrawing.prototype));__cov_y0VuG5USWjxBMo9w3IDXpA.s['713']++;VMLPieSlice.ATTRS=Y.mix({cx:{value:0},cy:{value:0},startAngle:{value:0},arc:{value:0},radius:{value:0}},Y.VMLShape.ATTRS);__cov_y0VuG5USWjxBMo9w3IDXpA.s['714']++;Y.VMLPieSlice=VMLPieSlice;__cov_y0VuG5USWjxBMo9w3IDXpA.s['715']++;VMLGraphic=function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['102']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['716']++;VMLGraphic.superclass.constructor.apply(this,arguments);};__cov_y0VuG5USWjxBMo9w3IDXpA.s['717']++;VMLGraphic.NAME='vmlGraphic';__cov_y0VuG5USWjxBMo9w3IDXpA.s['718']++;VMLGraphic.ATTRS={render:{},id:{valueFn:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['103']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['719']++;return Y.guid();},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['104']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['720']++;var node=this._node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['721']++;if(node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['166'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['722']++;node.setAttribute('id',val);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['166'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['723']++;return val;}},shapes:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['105']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['724']++;return this._shapes;}},contentBounds:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['106']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['725']++;return this._contentBounds;}},node:{readOnly:true,getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['107']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['726']++;return this._node;}},width:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['108']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['727']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['167'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['728']++;this._node.style.width=val+'px';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['167'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['729']++;return val;}},height:{setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['109']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['730']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['168'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['731']++;this._node.style.height=val+'px';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['168'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['732']++;return val;}},autoSize:{value:false},preserveAspectRatio:{value:'xMidYMid'},resizeDown:{resizeDown:false},x:{getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['110']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['733']++;return this._x;},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['111']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['734']++;this._x=val;__cov_y0VuG5USWjxBMo9w3IDXpA.s['735']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['169'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['736']++;this._node.style.left=val+'px';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['169'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['737']++;return val;}},y:{getter:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['112']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['738']++;return this._y;},setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['113']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['739']++;this._y=val;__cov_y0VuG5USWjxBMo9w3IDXpA.s['740']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['170'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['741']++;this._node.style.top=val+'px';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['170'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['742']++;return val;}},autoDraw:{value:true},visible:{value:true,setter:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['114']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['743']++;this._toggleVisible(val);__cov_y0VuG5USWjxBMo9w3IDXpA.s['744']++;return val;}}};__cov_y0VuG5USWjxBMo9w3IDXpA.s['745']++;Y.extend(VMLGraphic,Y.GraphicBase,{set:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['115']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['746']++;var host=this,attr=arguments[0],redrawAttrs={autoDraw:true,autoSize:true,preserveAspectRatio:true,resizeDown:true},key,forceRedraw=false;__cov_y0VuG5USWjxBMo9w3IDXpA.s['747']++;AttributeLite.prototype.set.apply(host,arguments);__cov_y0VuG5USWjxBMo9w3IDXpA.s['748']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['172'][0]++,host._state.autoDraw===true)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['172'][1]++,Y.Object.size(this._shapes)>0)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['171'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['749']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['174'][0]++,Y_LANG.isString)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['174'][1]++,redrawAttrs[attr])){__cov_y0VuG5USWjxBMo9w3IDXpA.b['173'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['750']++;forceRedraw=true;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['173'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['751']++;if(Y_LANG.isObject(attr)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['175'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['752']++;for(key in redrawAttrs){__cov_y0VuG5USWjxBMo9w3IDXpA.s['753']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['177'][0]++,redrawAttrs.hasOwnProperty(key))&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['177'][1]++,attr[key])){__cov_y0VuG5USWjxBMo9w3IDXpA.b['176'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['754']++;forceRedraw=true;__cov_y0VuG5USWjxBMo9w3IDXpA.s['755']++;break;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['176'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['175'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['171'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['756']++;if(forceRedraw){__cov_y0VuG5USWjxBMo9w3IDXpA.b['178'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['757']++;host._redraw();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['178'][1]++;}},_x:0,_y:0,getXY:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['116']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['758']++;var node=this.parentNode,x=this.get('x'),y=this.get('y'),xy;__cov_y0VuG5USWjxBMo9w3IDXpA.s['759']++;if(node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['179'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['760']++;xy=Y.DOM.getXY(node);__cov_y0VuG5USWjxBMo9w3IDXpA.s['761']++;xy[0]+=x;__cov_y0VuG5USWjxBMo9w3IDXpA.s['762']++;xy[1]+=y;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['179'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['763']++;xy=Y.DOM._getOffset(this._node);}__cov_y0VuG5USWjxBMo9w3IDXpA.s['764']++;return xy;},initializer:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['117']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['765']++;var render=this.get('render'),visibility=this.get('visible')?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['180'][0]++,'visible'):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['180'][1]++,'hidden');__cov_y0VuG5USWjxBMo9w3IDXpA.s['766']++;this._shapes={};__cov_y0VuG5USWjxBMo9w3IDXpA.s['767']++;this._contentBounds={left:0,top:0,right:0,bottom:0};__cov_y0VuG5USWjxBMo9w3IDXpA.s['768']++;this._node=this._createGraphic();__cov_y0VuG5USWjxBMo9w3IDXpA.s['769']++;this._node.style.left=this.get('x')+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['770']++;this._node.style.top=this.get('y')+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['771']++;this._node.style.visibility=visibility;__cov_y0VuG5USWjxBMo9w3IDXpA.s['772']++;this._node.setAttribute('id',this.get('id'));__cov_y0VuG5USWjxBMo9w3IDXpA.s['773']++;if(render){__cov_y0VuG5USWjxBMo9w3IDXpA.b['181'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['774']++;this.render(render);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['181'][1]++;}},render:function(render){__cov_y0VuG5USWjxBMo9w3IDXpA.f['118']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['775']++;var parentNode=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['182'][0]++,render)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['182'][1]++,DOCUMENT.body),node=this._node,w,h;__cov_y0VuG5USWjxBMo9w3IDXpA.s['776']++;if(render instanceof Y.Node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['183'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['777']++;parentNode=render._node;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['183'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['778']++;if(Y.Lang.isString(render)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['184'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['779']++;parentNode=Y.Selector.query(render,DOCUMENT.body,true);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['184'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['780']++;w=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['185'][0]++,this.get('width'))||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['185'][1]++,parseInt(Y.DOM.getComputedStyle(parentNode,'width'),10));__cov_y0VuG5USWjxBMo9w3IDXpA.s['781']++;h=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['186'][0]++,this.get('height'))||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['186'][1]++,parseInt(Y.DOM.getComputedStyle(parentNode,'height'),10));__cov_y0VuG5USWjxBMo9w3IDXpA.s['782']++;parentNode.appendChild(node);__cov_y0VuG5USWjxBMo9w3IDXpA.s['783']++;this.parentNode=parentNode;__cov_y0VuG5USWjxBMo9w3IDXpA.s['784']++;this.set('width',w);__cov_y0VuG5USWjxBMo9w3IDXpA.s['785']++;this.set('height',h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['786']++;return this;},destroy:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['119']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['787']++;this.removeAllShapes();__cov_y0VuG5USWjxBMo9w3IDXpA.s['788']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['187'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['789']++;this._removeChildren(this._node);__cov_y0VuG5USWjxBMo9w3IDXpA.s['790']++;if(this._node.parentNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['188'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['791']++;this._node.parentNode.removeChild(this._node);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['188'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['792']++;this._node=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['187'][1]++;}},addShape:function(cfg){__cov_y0VuG5USWjxBMo9w3IDXpA.f['120']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['793']++;cfg.graphic=this;__cov_y0VuG5USWjxBMo9w3IDXpA.s['794']++;if(!this.get('visible')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['189'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['795']++;cfg.visible=false;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['189'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['796']++;var ShapeClass=this._getShapeClass(cfg.type),shape=new ShapeClass(cfg);__cov_y0VuG5USWjxBMo9w3IDXpA.s['797']++;this._appendShape(shape);__cov_y0VuG5USWjxBMo9w3IDXpA.s['798']++;shape._appendStrokeAndFill();__cov_y0VuG5USWjxBMo9w3IDXpA.s['799']++;return shape;},_appendShape:function(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.f['121']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['800']++;var node=shape.node,parentNode=(__cov_y0VuG5USWjxBMo9w3IDXpA.b['190'][0]++,this._frag)||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['190'][1]++,this._node);__cov_y0VuG5USWjxBMo9w3IDXpA.s['801']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['192'][0]++,this.get('autoDraw'))||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['192'][1]++,this.get('autoSize')==='sizeContentToGraphic')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['191'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['802']++;parentNode.appendChild(node);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['191'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['803']++;this._getDocFrag().appendChild(node);}},removeShape:function(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.f['122']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['804']++;if(!(shape instanceof VMLShape)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['193'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['805']++;if(Y_LANG.isString(shape)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['194'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['806']++;shape=this._shapes[shape];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['194'][1]++;}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['193'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['807']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['196'][0]++,shape)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['196'][1]++,shape instanceof VMLShape)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['195'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['808']++;shape._destroy();__cov_y0VuG5USWjxBMo9w3IDXpA.s['809']++;this._shapes[shape.get('id')]=null;__cov_y0VuG5USWjxBMo9w3IDXpA.s['810']++;delete this._shapes[shape.get('id')];}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['195'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['811']++;if(this.get('autoDraw')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['197'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['812']++;this._redraw();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['197'][1]++;}},removeAllShapes:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['123']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['813']++;var shapes=this._shapes,i;__cov_y0VuG5USWjxBMo9w3IDXpA.s['814']++;for(i in shapes){__cov_y0VuG5USWjxBMo9w3IDXpA.s['815']++;if(shapes.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['198'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['816']++;shapes[i].destroy();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['198'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['817']++;this._shapes={};},_removeChildren:function(node){__cov_y0VuG5USWjxBMo9w3IDXpA.f['124']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['818']++;if(node.hasChildNodes()){__cov_y0VuG5USWjxBMo9w3IDXpA.b['199'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['819']++;var child;__cov_y0VuG5USWjxBMo9w3IDXpA.s['820']++;while(node.firstChild){__cov_y0VuG5USWjxBMo9w3IDXpA.s['821']++;child=node.firstChild;__cov_y0VuG5USWjxBMo9w3IDXpA.s['822']++;this._removeChildren(child);__cov_y0VuG5USWjxBMo9w3IDXpA.s['823']++;node.removeChild(child);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['199'][1]++;}},clear:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['125']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['824']++;this.removeAllShapes();__cov_y0VuG5USWjxBMo9w3IDXpA.s['825']++;this._removeChildren(this._node);},_toggleVisible:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['126']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['826']++;var i,shapes=this._shapes,visibility=val?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['200'][0]++,'visible'):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['200'][1]++,'hidden');__cov_y0VuG5USWjxBMo9w3IDXpA.s['827']++;if(shapes){__cov_y0VuG5USWjxBMo9w3IDXpA.b['201'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['828']++;for(i in shapes){__cov_y0VuG5USWjxBMo9w3IDXpA.s['829']++;if(shapes.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['202'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['830']++;shapes[i].set('visible',val);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['202'][1]++;}}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['201'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['831']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['203'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['832']++;this._node.style.visibility=visibility;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['203'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['833']++;if(this._node){__cov_y0VuG5USWjxBMo9w3IDXpA.b['204'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['834']++;this._node.style.visibility=visibility;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['204'][1]++;}},setSize:function(w,h){__cov_y0VuG5USWjxBMo9w3IDXpA.f['127']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['835']++;w=Math.round(w);__cov_y0VuG5USWjxBMo9w3IDXpA.s['836']++;h=Math.round(h);__cov_y0VuG5USWjxBMo9w3IDXpA.s['837']++;this._node.style.width=w+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['838']++;this._node.style.height=h+'px';},setPosition:function(x,y){__cov_y0VuG5USWjxBMo9w3IDXpA.f['128']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['839']++;x=Math.round(x);__cov_y0VuG5USWjxBMo9w3IDXpA.s['840']++;y=Math.round(y);__cov_y0VuG5USWjxBMo9w3IDXpA.s['841']++;this._node.style.left=x+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['842']++;this._node.style.top=y+'px';},_createGraphic:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['129']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['843']++;var group=DOCUMENT.createElement('<group xmlns="urn:schemas-microsft.com:vml"'+' style="behavior:url(#default#VML);padding:0px 0px 0px 0px;display:block;position:absolute;top:0px;left:0px;zoom:1;"'+'/>');__cov_y0VuG5USWjxBMo9w3IDXpA.s['844']++;return group;},_createGraphicNode:function(type){__cov_y0VuG5USWjxBMo9w3IDXpA.f['130']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['845']++;return DOCUMENT.createElement('<'+type+' xmlns="urn:schemas-microsft.com:vml"'+' style="behavior:url(#default#VML);display:inline-block;zoom:1;"'+'/>');},getShapeById:function(id){__cov_y0VuG5USWjxBMo9w3IDXpA.f['131']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['846']++;return this._shapes[id];},_getShapeClass:function(val){__cov_y0VuG5USWjxBMo9w3IDXpA.f['132']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['847']++;var shape=this._shapeClass[val];__cov_y0VuG5USWjxBMo9w3IDXpA.s['848']++;if(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['205'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['849']++;return shape;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['205'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['850']++;return val;},_shapeClass:{circle:Y.VMLCircle,rect:Y.VMLRect,path:Y.VMLPath,ellipse:Y.VMLEllipse,pieslice:Y.VMLPieSlice},batch:function(method){__cov_y0VuG5USWjxBMo9w3IDXpA.f['133']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['851']++;var autoDraw=this.get('autoDraw');__cov_y0VuG5USWjxBMo9w3IDXpA.s['852']++;this.set('autoDraw',false);__cov_y0VuG5USWjxBMo9w3IDXpA.s['853']++;method.apply();__cov_y0VuG5USWjxBMo9w3IDXpA.s['854']++;this.set('autoDraw',autoDraw);},_getDocFrag:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['134']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['855']++;if(!this._frag){__cov_y0VuG5USWjxBMo9w3IDXpA.b['206'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['856']++;this._frag=DOCUMENT.createDocumentFragment();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['206'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['857']++;return this._frag;},addToRedrawQueue:function(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.f['135']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['858']++;var shapeBox,box;__cov_y0VuG5USWjxBMo9w3IDXpA.s['859']++;this._shapes[shape.get('id')]=shape;__cov_y0VuG5USWjxBMo9w3IDXpA.s['860']++;if(!this.get('resizeDown')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['207'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['861']++;shapeBox=shape.getBounds();__cov_y0VuG5USWjxBMo9w3IDXpA.s['862']++;box=this._contentBounds;__cov_y0VuG5USWjxBMo9w3IDXpA.s['863']++;box.left=box.left<shapeBox.left?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['208'][0]++,box.left):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['208'][1]++,shapeBox.left);__cov_y0VuG5USWjxBMo9w3IDXpA.s['864']++;box.top=box.top<shapeBox.top?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['209'][0]++,box.top):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['209'][1]++,shapeBox.top);__cov_y0VuG5USWjxBMo9w3IDXpA.s['865']++;box.right=box.right>shapeBox.right?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['210'][0]++,box.right):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['210'][1]++,shapeBox.right);__cov_y0VuG5USWjxBMo9w3IDXpA.s['866']++;box.bottom=box.bottom>shapeBox.bottom?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['211'][0]++,box.bottom):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['211'][1]++,shapeBox.bottom);__cov_y0VuG5USWjxBMo9w3IDXpA.s['867']++;box.width=box.right-box.left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['868']++;box.height=box.bottom-box.top;__cov_y0VuG5USWjxBMo9w3IDXpA.s['869']++;this._contentBounds=box;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['207'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['870']++;if(this.get('autoDraw')){__cov_y0VuG5USWjxBMo9w3IDXpA.b['212'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['871']++;this._redraw();}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['212'][1]++;}},_redraw:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['136']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['872']++;var autoSize=this.get('autoSize'),preserveAspectRatio,node=this.parentNode,nodeWidth=parseFloat(Y.DOM.getComputedStyle(node,'width')),nodeHeight=parseFloat(Y.DOM.getComputedStyle(node,'height')),xCoordOrigin=0,yCoordOrigin=0,box=this.get('resizeDown')?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['213'][0]++,this._getUpdatedContentBounds()):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['213'][1]++,this._contentBounds),left=box.left,right=box.right,top=box.top,bottom=box.bottom,contentWidth=right-left,contentHeight=bottom-top,aspectRatio,xCoordSize,yCoordSize,scaledWidth,scaledHeight,visible=this.get('visible');__cov_y0VuG5USWjxBMo9w3IDXpA.s['873']++;this._node.style.visibility='hidden';__cov_y0VuG5USWjxBMo9w3IDXpA.s['874']++;if(autoSize){__cov_y0VuG5USWjxBMo9w3IDXpA.b['214'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['875']++;if(autoSize==='sizeContentToGraphic'){__cov_y0VuG5USWjxBMo9w3IDXpA.b['215'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['876']++;preserveAspectRatio=this.get('preserveAspectRatio');__cov_y0VuG5USWjxBMo9w3IDXpA.s['877']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['217'][0]++,preserveAspectRatio==='none')||(__cov_y0VuG5USWjxBMo9w3IDXpA.b['217'][1]++,contentWidth/contentHeight===nodeWidth/nodeHeight)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['216'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['878']++;xCoordOrigin=left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['879']++;yCoordOrigin=top;__cov_y0VuG5USWjxBMo9w3IDXpA.s['880']++;xCoordSize=contentWidth;__cov_y0VuG5USWjxBMo9w3IDXpA.s['881']++;yCoordSize=contentHeight;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['216'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['882']++;if(contentWidth*nodeHeight/contentHeight>nodeWidth){__cov_y0VuG5USWjxBMo9w3IDXpA.b['218'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['883']++;aspectRatio=nodeHeight/nodeWidth;__cov_y0VuG5USWjxBMo9w3IDXpA.s['884']++;xCoordSize=contentWidth;__cov_y0VuG5USWjxBMo9w3IDXpA.s['885']++;yCoordSize=contentWidth*aspectRatio;__cov_y0VuG5USWjxBMo9w3IDXpA.s['886']++;scaledHeight=nodeWidth*(contentHeight/contentWidth)*(yCoordSize/nodeHeight);__cov_y0VuG5USWjxBMo9w3IDXpA.s['887']++;yCoordOrigin=this._calculateCoordOrigin(preserveAspectRatio.slice(5).toLowerCase(),scaledHeight,yCoordSize);__cov_y0VuG5USWjxBMo9w3IDXpA.s['888']++;yCoordOrigin=top+yCoordOrigin;__cov_y0VuG5USWjxBMo9w3IDXpA.s['889']++;xCoordOrigin=left;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['218'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['890']++;aspectRatio=nodeWidth/nodeHeight;__cov_y0VuG5USWjxBMo9w3IDXpA.s['891']++;xCoordSize=contentHeight*aspectRatio;__cov_y0VuG5USWjxBMo9w3IDXpA.s['892']++;yCoordSize=contentHeight;__cov_y0VuG5USWjxBMo9w3IDXpA.s['893']++;scaledWidth=nodeHeight*(contentWidth/contentHeight)*(xCoordSize/nodeWidth);__cov_y0VuG5USWjxBMo9w3IDXpA.s['894']++;xCoordOrigin=this._calculateCoordOrigin(preserveAspectRatio.slice(1,4).toLowerCase(),scaledWidth,xCoordSize);__cov_y0VuG5USWjxBMo9w3IDXpA.s['895']++;xCoordOrigin=xCoordOrigin+left;__cov_y0VuG5USWjxBMo9w3IDXpA.s['896']++;yCoordOrigin=top;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['897']++;this._node.style.width=nodeWidth+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['898']++;this._node.style.height=nodeHeight+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['899']++;this._node.coordOrigin=xCoordOrigin+', '+yCoordOrigin;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['215'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['900']++;xCoordSize=contentWidth;__cov_y0VuG5USWjxBMo9w3IDXpA.s['901']++;yCoordSize=contentHeight;__cov_y0VuG5USWjxBMo9w3IDXpA.s['902']++;this._node.style.width=contentWidth+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['903']++;this._node.style.height=contentHeight+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['904']++;this._state.width=contentWidth;__cov_y0VuG5USWjxBMo9w3IDXpA.s['905']++;this._state.height=contentHeight;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['906']++;this._node.coordSize=xCoordSize+', '+yCoordSize;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['214'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['907']++;this._node.style.width=nodeWidth+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['908']++;this._node.style.height=nodeHeight+'px';__cov_y0VuG5USWjxBMo9w3IDXpA.s['909']++;this._node.coordSize=nodeWidth+', '+nodeHeight;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['910']++;if(this._frag){__cov_y0VuG5USWjxBMo9w3IDXpA.b['219'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['911']++;this._node.appendChild(this._frag);__cov_y0VuG5USWjxBMo9w3IDXpA.s['912']++;this._frag=null;}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['219'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['913']++;if(visible){__cov_y0VuG5USWjxBMo9w3IDXpA.b['220'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['914']++;this._node.style.visibility='visible';}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['220'][1]++;}},_calculateCoordOrigin:function(position,size,coordsSize){__cov_y0VuG5USWjxBMo9w3IDXpA.f['137']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['915']++;var coord;__cov_y0VuG5USWjxBMo9w3IDXpA.s['916']++;switch(position){case'min':__cov_y0VuG5USWjxBMo9w3IDXpA.b['221'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['917']++;coord=0;__cov_y0VuG5USWjxBMo9w3IDXpA.s['918']++;break;case'mid':__cov_y0VuG5USWjxBMo9w3IDXpA.b['221'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['919']++;coord=(size-coordsSize)/2;__cov_y0VuG5USWjxBMo9w3IDXpA.s['920']++;break;case'max':__cov_y0VuG5USWjxBMo9w3IDXpA.b['221'][2]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['921']++;coord=size-coordsSize;__cov_y0VuG5USWjxBMo9w3IDXpA.s['922']++;break;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['923']++;return coord;},_getUpdatedContentBounds:function(){__cov_y0VuG5USWjxBMo9w3IDXpA.f['138']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['924']++;var bounds,i,shape,queue=this._shapes,box={};__cov_y0VuG5USWjxBMo9w3IDXpA.s['925']++;for(i in queue){__cov_y0VuG5USWjxBMo9w3IDXpA.s['926']++;if(queue.hasOwnProperty(i)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['222'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['927']++;shape=queue[i];__cov_y0VuG5USWjxBMo9w3IDXpA.s['928']++;bounds=shape.getBounds();__cov_y0VuG5USWjxBMo9w3IDXpA.s['929']++;box.left=Y_LANG.isNumber(box.left)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['223'][0]++,Math.min(box.left,bounds.left)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['223'][1]++,bounds.left);__cov_y0VuG5USWjxBMo9w3IDXpA.s['930']++;box.top=Y_LANG.isNumber(box.top)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['224'][0]++,Math.min(box.top,bounds.top)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['224'][1]++,bounds.top);__cov_y0VuG5USWjxBMo9w3IDXpA.s['931']++;box.right=Y_LANG.isNumber(box.right)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['225'][0]++,Math.max(box.right,bounds.right)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['225'][1]++,bounds.right);__cov_y0VuG5USWjxBMo9w3IDXpA.s['932']++;box.bottom=Y_LANG.isNumber(box.bottom)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['226'][0]++,Math.max(box.bottom,bounds.bottom)):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['226'][1]++,bounds.bottom);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['222'][1]++;}}__cov_y0VuG5USWjxBMo9w3IDXpA.s['933']++;box.left=Y_LANG.isNumber(box.left)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['227'][0]++,box.left):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['227'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['934']++;box.top=Y_LANG.isNumber(box.top)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['228'][0]++,box.top):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['228'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['935']++;box.right=Y_LANG.isNumber(box.right)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['229'][0]++,box.right):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['229'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['936']++;box.bottom=Y_LANG.isNumber(box.bottom)?(__cov_y0VuG5USWjxBMo9w3IDXpA.b['230'][0]++,box.bottom):(__cov_y0VuG5USWjxBMo9w3IDXpA.b['230'][1]++,0);__cov_y0VuG5USWjxBMo9w3IDXpA.s['937']++;this._contentBounds=box;__cov_y0VuG5USWjxBMo9w3IDXpA.s['938']++;return box;},_toFront:function(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.f['139']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['939']++;var contentNode=this._node;__cov_y0VuG5USWjxBMo9w3IDXpA.s['940']++;if(shape instanceof Y.VMLShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['231'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['941']++;shape=shape.get('node');}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['231'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['942']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['233'][0]++,contentNode)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['233'][1]++,shape)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['232'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['943']++;contentNode.appendChild(shape);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['232'][1]++;}},_toBack:function(shape){__cov_y0VuG5USWjxBMo9w3IDXpA.f['140']++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['944']++;var contentNode=this._node,targetNode;__cov_y0VuG5USWjxBMo9w3IDXpA.s['945']++;if(shape instanceof Y.VMLShape){__cov_y0VuG5USWjxBMo9w3IDXpA.b['234'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['946']++;shape=shape.get('node');}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['234'][1]++;}__cov_y0VuG5USWjxBMo9w3IDXpA.s['947']++;if((__cov_y0VuG5USWjxBMo9w3IDXpA.b['236'][0]++,contentNode)&&(__cov_y0VuG5USWjxBMo9w3IDXpA.b['236'][1]++,shape)){__cov_y0VuG5USWjxBMo9w3IDXpA.b['235'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['948']++;targetNode=contentNode.firstChild;__cov_y0VuG5USWjxBMo9w3IDXpA.s['949']++;if(targetNode){__cov_y0VuG5USWjxBMo9w3IDXpA.b['237'][0]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['950']++;contentNode.insertBefore(shape,targetNode);}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['237'][1]++;__cov_y0VuG5USWjxBMo9w3IDXpA.s['951']++;contentNode.appendChild(shape);}}else{__cov_y0VuG5USWjxBMo9w3IDXpA.b['235'][1]++;}}});__cov_y0VuG5USWjxBMo9w3IDXpA.s['952']++;Y.VMLGraphic=VMLGraphic;},'3.15.0',{'requires':['graphics']});
andersem/cdnjs
ajax/libs/yui/3.15.0/graphics-vml/graphics-vml-coverage.js
JavaScript
mit
353,551
/** * Copyright <%= year %> Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define([],e)}(function(){return function(e){var t=e.kendo||(e.kendo={cultures:{}});t.cultures["tr-TR"]={name:"tr-TR",numberFormat:{pattern:["-n"],decimals:2,",":".",".":",",groupSize:[3],percent:{pattern:["-%n","%n"],decimals:2,",":".",".":",",groupSize:[3],symbol:"%"},currency:{pattern:["-n $","n $"],decimals:2,",":".",".":",",groupSize:[3],symbol:"TL"}},calendars:{standard:{days:{names:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],namesAbbr:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],namesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]},months:{names:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],namesAbbr:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]},AM:[""],PM:[""],patterns:{d:"dd.MM.yyyy",D:"dd MMMM yyyy dddd",F:"dd MMMM yyyy dddd HH:mm:ss",g:"dd.MM.yyyy HH:mm",G:"dd.MM.yyyy HH:mm:ss",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":".",":":":",firstDay:1}}}}(this),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
raszi/cdnjs
ajax/libs/kendo-ui-core/2014.1.416/js/cultures/kendo.culture.tr-TR.min.js
JavaScript
mit
1,806
Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",writeRecordId:true,isWriter:true,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,f=[];for(;d<a;d++){f.push(this.getRecordData(b[d],c))}return this.writeRecords(e,f)},getRecordData:function(d,b){var l=d.phantom===true,a=this.writeAllFields||l,g=d.fields,n=g.items,c={},k=d.clientIdProperty,j,i,m,e,h,o;if(a){o=n.length;for(h=0;h<o;h++){i=n[h];if(i.persist){this.writeValue(c,i,d)}}}else{j=d.getChanges();for(m in j){if(j.hasOwnProperty(m)){i=g.get(m);if(i.persist){this.writeValue(c,i,d)}}}}if(l){if(k&&b&&b.records.length>1){c[k]=d.internalId}}else{if(this.writeRecordId){e=g.get(d.idProperty)[this.nameProperty]||d.idProperty;c[e]=d.getId()}}return c},writeValue:function(e,f,b){var c=f[this.nameProperty],a=this.dateFormat||f.dateWriteFormat||f.dateFormat,d=b.get(f.name);if(c==null){c=f.name}if(f.serialize){e[c]=f.serialize(d,b)}else{if(f.type===Ext.data.Types.DATE&&a&&Ext.isDate(d)){e[c]=Ext.Date.format(d,a)}else{e[c]=d}}}});
rileyjshaw/cdnjs
ajax/libs/extjs/4.2.1/src/data/writer/Writer.min.js
JavaScript
mit
1,152
Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],isTreeView:true,loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,loadMask:false,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading","qtip","qtitle"],treeRowTpl:["{%","this.processRowValues(values);","this.nextTpl.applyOut(values, out, parent);",'delete values.rowAttr["data-qtip"];','delete values.rowAttr["data-qtitle"];',"%}",{priority:10,processRowValues:function(d){var b=d.record,a=d.view,e=b.get("qtip"),c=b.get("qttle");d.rowAttr={};if(e){d.rowAttr["data-qtip"]=e}if(c){d.rowAttr["data-qtitle"]=c}if(b.isExpanded()){d.rowClasses.push(a.expandedCls)}if(b.isLeaf()){d.rowClasses.push(a.leafCls)}if(b.isLoading()){d.rowClasses.push(a.loadingCls)}}}],initComponent:function(){var b=this,c=b.panel.getStore(),a=b.store;if(b.initialConfig.animate===undefined){b.animate=Ext.enableFx}if(!a||a===c){b.store=a=new Ext.data.NodeStore({treeStore:c,recursive:true,rootVisible:b.rootVisible})}if(b.node){b.setRootNode(b.node)}b.animQueue={};b.animWraps={};b.addEvents("afteritemexpand","afteritemcollapse","nodedragover");b.callParent(arguments);b.addRowTpl(Ext.XTemplate.getTpl(b,"treeRowTpl"))},onBeforeFill:function(b,a){this.store.suspendEvents()},onFillComplete:function(e,d,b){var c=this,a=c.store,f=a.indexOf(b[0]);a.resumeEvents();d.triggerUIUpdate();if(!b.length||f===-1){return}c.onAdd(c.store,b,f);c.refreshPartner()},onBeforeSort:function(){this.store.suspendEvents()},onSort:function(a){if(a.isStore){this.store.resumeEvents();this.refresh();this.refreshPartner()}},refreshPartner:function(){var a=this.lockingPartner;if(a){a.refresh()}},getMaskStore:function(){return this.panel.getStore()},afterRender:function(){var a=this;a.callParent(arguments);a.el.on({scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut,click:{delegate:a.checkboxSelector,fn:a.onCheckboxChange,scope:a}})},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(a,b){var f=this,e=f.getNode(a),d,c,g=[];f.renderColumnSizer(g);c=Ext.get(e);d=c.insertSibling({tag:"tr",html:['<td colspan="'+f.panel.headerCt.getColumnCount()+'">','<div class="'+f.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+f.id+"-table "+Ext.baseCSSPrefix+'grid-table" style="border:0" cellspacing="0" cellpadding="0">',g.join(""),"<tbody></tbody></table>","</div>","</td>"].join("")},"after");return{record:a,node:e,el:d,expanding:false,collapsing:false,animating:false,animateEl:d.down("div"),targetEl:d.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(c,g){var h=this,a=h.bufferRender(c,g,true),e=c[0],i=e.parentNode,j=h.all,l,d=h.getAnimWrap(i),k,b,f;if(!d||!d.expanding){return h.callParent(arguments)}i=d.record;k=d.targetEl;b=k.dom.childNodes;f=b.length;l=g-h.indexInStore(i)-1;if(!f||l>=f){k.appendChild(a)}else{Ext.fly(b[l]).insertSibling(a,"before",true)}j.insert(g,a);if(d.isAnimating){h.onExpand(i)}},onRemove:function(f,a,b){var d=this,e,c;if(d.viewReady){e=d.store.getCount()===0;if(e){d.refresh()}else{for(c=b.length-1;c>=0;--c){d.doRemove(a[c],b[c])}}if(d.hasListeners.itemremove){for(c=b.length-1;c>=0;--c){d.fireEvent("itemremove",a[c],b[c])}}}},doRemove:function(a,c){var g=this,d=g.all,b=g.getAnimWrap(a),f=d.item(c),e=f?f.dom:null;if(!e||!b||!b.collapsing){return g.callParent(arguments)}b.targetEl.dom.insertBefore(e,b.targetEl.dom.firstChild);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(e.rendered&&e.all.getCount()&&e.animate){if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}}},onExpand:function(i){var h=this,f=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,e,b,j,d=Ext.isIEQuirks?1:0;if(h.singleExpand){h.ensureSingleExpand(i)}if(g===-1){return}e=h.getAnimWrap(i,false);if(!e){i.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c);h.refreshSize();return}b=e.animateEl;j=e.targetEl;b.stopAnimation();f[a]=true;b.dom.style.height=d+"px";b.animate({from:{height:d},to:{height:j.getHeight()},duration:h.expandDuration,listeners:{afteranimate:function(){var k=j.query(h.itemSelector);if(k.length){e.el.insertSibling(k,"before",true)}e.el.remove();h.refreshSize();delete h.animWraps[e.record.internalId];delete f[a]}},callback:function(){i.isExpandingOrCollapsing=false;h.fireEvent("afteritemexpand",i,g,c)}});e.isAnimating=true},onBeforeCollapse:function(e,b,c,g,d){var f=this,a;if(f.rendered&&f.all.getCount()){if(f.animate){if(Ext.Array.contains(e.stores,f.store)){a=f.getAnimWrap(e);if(!a){a=f.animWraps[e.internalId]=f.createAnimWrap(e,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true;a.callback=g;a.scope=d}}else{f.onCollapseCallback=g;f.onCollapseScope=d}}},onCollapse:function(d){var f=this,a=f.animQueue,h=d.getId(),e=f.getNode(d),c=e?f.indexOf(e):-1,b=f.getAnimWrap(d),g;if(!f.all.getCount()||!Ext.Array.contains(d.stores,f.store)){return}if(!b){d.isExpandingOrCollapsing=false;f.fireEvent("afteritemcollapse",d,c,e);f.refreshSize();Ext.callback(f.onCollapseCallback,f.onCollapseScope);f.onCollapseCallback=f.onCollapseScope=null;return}g=b.animateEl;a[h]=true;g.stopAnimation();g.animate({to:{height:Ext.isIEQuirks?1:0},duration:f.collapseDuration,listeners:{afteranimate:function(){b.el.remove();f.refreshSize();delete f.animWraps[b.record.internalId];delete a[h]}},callback:function(){d.isExpandingOrCollapsing=false;f.fireEvent("afteritemcollapse",d,c,e);Ext.callback(b.callback,b.scope);b.callback=b.scope=null}});b.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},expand:function(d,c,g,e){var f=this,b=!!f.animate,a;if(!b||!d.isExpandingOrCollapsing){if(!d.isLeaf()){d.isExpandingOrCollapsing=b}Ext.suspendLayouts();a=d.expand(c,g,e);Ext.resumeLayouts(true);return a}},collapse:function(c,b,f,d){var e=this,a=!!e.animate;if(!a||!c.isExpandingOrCollapsing){if(!c.isLeaf()){c.isExpandingOrCollapsing=a}return c.collapse(b,f,d)}},toggle:function(b,a,d,c){if(b.isExpanded()){this.collapse(b,a,d,c)}else{this.expand(b,a,d,c)}},onItemDblClick:function(a,e,c){var d=this,b=d.editingPlugin;d.callParent(arguments);if(d.toggleOnDblClick&&a.isExpandable()&&!(b&&b.clicksToEdit===2)){d.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)&&a.isExpandable()){this.toggle(a,d.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getStoreListeners:function(){var b=this,a=b.callParent(arguments);return Ext.apply(a,{beforeexpand:b.onBeforeExpand,expand:b.onExpand,beforecollapse:b.onBeforeCollapse,collapse:b.onCollapse,write:b.onStoreWrite,datachanged:b.onStoreDataChanged})},onBindStore:function(){var a=this,b=a.getTreeStore();a.callParent(arguments);a.mon(b,{scope:a,beforefill:a.onBeforeFill,fillcomplete:a.onFillComplete});if(!b.remoteSort){a.mon(b,{scope:a,beforesort:a.onBeforeSort,sort:a.onSort})}},onUnbindStore:function(){var a=this,b=a.getTreeStore();a.callParent(arguments);a.mun(b,{scope:a,beforefill:a.onBeforeFill,fillcomplete:a.onFillComplete});if(!b.remoteSort){a.mun(b,{scope:a,beforesort:a.onBeforeSort,sort:a.onSort})}},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}},shouldUpdateCell:function(b,e,d){if(d){var c=0,a=d.length;for(;c<a;++c){if(Ext.Array.contains(this.uiFields,d[c])){return true}}}return this.callParent(arguments)},onStoreWrite:function(b,a){var c=this.panel.store;c.fireEvent("write",c,a)},onStoreDataChanged:function(b,a){var c=this.panel.store;c.fireEvent("datachanged",c)}});
ahocevar/cdnjs
ajax/libs/extjs/4.2.1/src/tree/View.min.js
JavaScript
mit
9,493
/** * Copyright <%= year %> Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define([],e)}(function(){return function(e){var t=e.kendo||(e.kendo={cultures:{}});t.cultures["es-PR"]={name:"es-PR",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($ n)","$ n"],decimals:2,",":",",".":".",groupSize:[3,0],symbol:"$"}},calendars:{standard:{days:{names:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],namesAbbr:["dom","lun","mar","mié","jue","vie","sáb"],namesShort:["do","lu","ma","mi","ju","vi","sá"]},months:{names:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],namesAbbr:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]},AM:["a.m.","a.m.","A.M."],PM:["p.m.","p.m.","P.M."],patterns:{d:"dd/MM/yyyy",D:"dddd, dd' de 'MMMM' de 'yyyy",F:"dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",g:"dd/MM/yyyy hh:mm tt",G:"dd/MM/yyyy hh:mm:ss tt",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"hh:mm tt",T:"hh:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM' de 'yyyy",Y:"MMMM' de 'yyyy"},"/":"/",":":":",firstDay:0}}}}(this),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
jimmybyrum/cdnjs
ajax/libs/kendo-ui-core/2014.1.416/js/cultures/kendo.culture.es-PR.min.js
JavaScript
mit
1,897
Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller,b;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.sourceClass?c.sourceClass:"",a=c.sourceMethod?"."+c.sourceMethod+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.deprecated=function(b){if(!b){b=""}function a(){Ext.Error.raise('The method "'+a.$owner.$className+"."+a.$name+'" has been removed. '+b)}return a;return Ext.emptyFn};(function(){var f,e=0,b=Ext.global,d;if(typeof window==="undefined"){return}function a(){var i=Ext.log.counters,h=Ext.supports,g=h&&h.WindowOnError;if(i&&(i.error+i.warn+i.info+i.log)){d=["Logged Errors:",i.error,"Warnings:",i.warn,"Info:",i.info,"Log:",i.log].join(" ");if(e){d="*** Errors: "+e+" - "+d}else{if(i.error){d="*** "+d}}b.status=d}if(!Ext.isDefined(Ext.Error.notify)){Ext.Error.notify=Ext.isIE6||Ext.isIE7}if(Ext.Error.notify&&(g?e:(i&&i.error))){Ext.Error.notify=false;if(f){b.clearInterval(f);f=null}alert("Unhandled error on page: See console or log");c()}}function c(){f=b.setInterval(a,1000)}c()}());
peteygao/cdnjs
ajax/libs/extjs/4.2.1/src/lang/Error.min.js
JavaScript
mit
1,485
/** * Copyright <%= year %> Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define(["./kendo.core.min"],e)}(function(){return function(e){function t(t,n){return t===n||e.contains(t,n)}var n=window.kendo,i=n.ui,r=i.Widget,o=n.support,a=n.getOffset,s=n._activeElement,l="open",u="close",d="deactivate",c="activate",f="center",h="left",p="right",g="top",m="bottom",v="absolute",_="hidden",y="body",b="location",w="position",x="visible",k="effects",C="k-state-active",T="k-state-border",S=/k-state-border-(\w+)/,F=".k-picker-wrap, .k-dropdown-wrap, .k-link",M="down",D=e(window),E=e(document.documentElement),z="resize scroll",O=o.transitions.css,A=O+"transform",P=e.extend,H=".kendoPopup",N=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],I=r.extend({init:function(t,i){var o,a=this;i=i||{},i.isRtl&&(i.origin=i.origin||m+" "+p,i.position=i.position||g+" "+p),r.fn.init.call(a,t,i),t=a.element,i=a.options,a.collisions=i.collision?i.collision.split(" "):[],1===a.collisions.length&&a.collisions.push(a.collisions[0]),o=e(a.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||o[0]||y),a.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:v}).appendTo(i.appendTo).on("mouseenter"+H,function(){a._hovered=!0}).on("mouseleave"+H,function(){a._hovered=!1}),a.wrapper=e(),i.animation===!1&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),P(i.animation.open,{complete:function(){a.wrapper.css({overflow:x}),a.trigger(c)}}),P(i.animation.close,{complete:function(){a.wrapper.hide();var r,o,s=a.wrapper.data(b),l=e(i.anchor);s&&a.wrapper.css(s),i.anchor!=y&&(r=(l[0].className.match(S)||["","down"])[1],o=T+"-"+r,l.removeClass(o).children(F).removeClass(C).removeClass(o),t.removeClass(T+"-"+n.directions[r].reverse)),a._closing=!1,a.trigger(d)}}),a._mousedownProxy=function(e){a._mousedown(e)},a._resizeProxy=function(e){a._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+H,e.proxy(a.toggle,a))},events:[l,c,u,d],options:{name:"Popup",toggleEvent:"click",origin:m+" "+h,position:g+" "+h,anchor:y,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var t,i=this,o=i.options,a=i.element.off(H);r.fn.destroy.call(i),o.toggleTarget&&e(o.toggleTarget).off(H),o.modal||(E.unbind(M,i._mousedownProxy),D.unbind(z,i._resizeProxy)),n.destroy(i.element.children()),a.removeData(),o.appendTo[0]===document.body&&(t=a.parent(".k-animation-container"),t[0]?t.remove():a.remove())},open:function(t,i){var r,a,s,u=this,d={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},c=u.element,f=u.options,h="down",p=e(f.anchor),m=c[0]&&c.hasClass("km-widget");if(!u.visible()){if(f.copyAnchorStyles&&(m&&"font-size"==N[0]&&N.shift(),c.css(n.getComputedStyles(p[0],N))),c.data("animating")||u.trigger(l))return;f.modal||(E.unbind(M,u._mousedownProxy).bind(M,u._mousedownProxy),o.mobileOS.ios||o.mobileOS.android||D.unbind(z,u._resizeProxy).bind(z,u._resizeProxy)),u.wrapper=a=n.wrap(c,f.autosize).css({overflow:_,display:"block",position:v}),o.mobileOS.android&&a.add(p).css(A,"translatez(0)"),a.css(w),e(f.appendTo)[0]==document.body&&a.css(g,"-10000px"),r=P(!0,{},f.animation.open),u.flipped=u._position(d),r.effects=n.parseEffects(r.effects,u.flipped),h=r.effects.slideIn?r.effects.slideIn.direction:h,f.anchor!=y&&(s=T+"-"+h,c.addClass(T+"-"+n.directions[h].reverse),p.addClass(s).children(F).addClass(C).addClass(s)),c.data(k,r.effects).kendoStop(!0).kendoAnimate(r)}},toggle:function(){var e=this;e[e.visible()?u:l]()},visible:function(){return this.element.is(":"+x)},close:function(){var t,i,r,o,a=this,s=a.options;if(a.visible()){if(t=a.wrapper[0]?a.wrapper:n.wrap(a.element).hide(),a._closing||a.trigger(u))return;a.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close()}),E.unbind(M,a._mousedownProxy),D.unbind(z,a._resizeProxy),i=P(!0,{},s.animation.close),r=a.element.data(k),o=i.effects,!o&&!n.size(o)&&r&&n.size(r)&&(i.effects=r,i.reverse=!0),a._closing=!0,a.element.kendoStop(!0),t.css({overflow:_}),a.element.kendoAnimate(i)}},_resize:function(e){var n=this;"resize"===e.type?(clearTimeout(n._resizeTimeout),n._resizeTimeout=setTimeout(function(){n._position(),n._resizeTimeout=null},50)):n._hovered||t(n.element[0],s())||n.close()},_mousedown:function(i){var r=this,o=r.element[0],a=r.options,s=e(a.anchor)[0],l=a.toggleTarget,u=n.eventTarget(i),d=e(u).closest(".k-popup"),c=d.parent().parent(".km-shim").length;d=d[0],(c||!d||d===r.element[0])&&"popover"!==e(i.target).closest("a").data("rel")&&(t(o,u)||t(s,u)||l&&t(e(l)[0],u)||r.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i},_flip:function(e,t,n,i,r,o,a){var s=0;return a=a||t,o!==r&&o!==f&&r!==f&&(e+a>i&&(s+=-(n+t)),0>e+s&&(s+=n+t)),s},_position:function(t){var n,i,r,s,l,u,d,c,f,h=this,p=h.element.css(w,""),g=h.wrapper,m=h.options,_=e(m.viewport),y=_.offset(),x=e(m.anchor),k=m.origin.toLowerCase().split(" "),C=m.position.toLowerCase().split(" "),T=h.collisions,S=o.zoomLevel(),F=10002,M=!!(_[0]==window&&window.innerWidth&&1.02>=S),D=0,E=M?window.innerWidth:_.width(),z=M?window.innerHeight:_.height(),O=x.parents().filter(g.siblings());if(O[0])if(i=+e(O).css("zIndex"))F=i+1;else for(n=x.parentsUntil(O),r=n.length;r>D;D++)i=+e(n[D]).css("zIndex"),i&&i>F&&(F=i+1);return g.css("zIndex",F),t&&t.isFixed?g.css({left:t.x,top:t.y}):g.css(h._align(k,C)),s=a(g,w,x[0]===g.offsetParent()[0]),l=a(g),u=x.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),u.length&&(s=a(g,w,!0),l=a(g)),_[0]===window?(l.top-=window.pageYOffset||document.documentElement.scrollTop||0,l.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(l.top-=y.top,l.left-=y.left),h.wrapper.data(b)||g.data(b,P({},s)),d=P({},l),c=P({},s),"fit"===T[0]&&(c.top+=h._fit(d.top,g.outerHeight(),z/S)),"fit"===T[1]&&(c.left+=h._fit(d.left,g.outerWidth(),E/S)),f=P({},c),"flip"===T[0]&&(c.top+=h._flip(d.top,p.outerHeight(),x.outerHeight(),z/S,k[0],C[0],g.outerHeight())),"flip"===T[1]&&(c.left+=h._flip(d.left,p.outerWidth(),x.outerWidth(),E/S,k[1],C[1],g.outerWidth())),p.css(w,v),g.css(c),c.left!=f.left||c.top!=f.top},_align:function(t,n){var i,r=this,o=r.wrapper,s=e(r.options.anchor),l=t[0],u=t[1],d=n[0],c=n[1],h=a(s),g=e(r.options.appendTo),v=o.outerWidth(),_=o.outerHeight(),y=s.outerWidth(),b=s.outerHeight(),w=h.top,x=h.left,k=Math.round;return g[0]!=document.body&&(i=a(g),w-=i.top,x-=i.left),l===m&&(w+=b),l===f&&(w+=k(b/2)),d===m&&(w-=_),d===f&&(w-=k(_/2)),u===p&&(x+=y),u===f&&(x+=k(y/2)),c===p&&(x-=v),c===f&&(x-=k(v/2)),{top:w,left:x}}});i.plugin(I)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
mikaelbr/cdnjs
ajax/libs/kendo-ui-core/2014.1.416/js/kendo.popup.min.js
JavaScript
mit
7,402
Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,alignRoundingMethod:"round",type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",targetElCls:Ext.baseCSSPrefix+"box-target",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,createsInnerCt:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" class="{targetElCls}">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},_percentageRe:/^\s*(\d+(?:\.\d*)?)\s*[%]\s*$/,getItemSizePolicy:function(n,o){var j=this,h=j.sizePolicy,g=j.align,f=n.flex,l=g,i=j.names,b=n[i.width],m=n[i.height],d=j._percentageRe,c=d.test(b),e=(g=="stretch"),a=(g=="stretchmax"),k=j.constrainAlign;if(!o&&(e||f||c||(k&&!a))){o=j.owner.getSizeModel()}if(e){if(!d.test(m)&&o[i.height].shrinkWrap){l="stretchmax"}}else{if(!a){if(d.test(m)){l="stretch"}else{if(k&&!o[i.height].shrinkWrap){l="stretchmax"}else{l=""}}}}if(f||c){if(!o[i.width].shrinkWrap){h=h.flex}}return h[l]},flexSort:function(l,k){var i=this.names.maxWidth,e=this.names.minWidth,j=Infinity,h=l.target,o=k.target,p=0,c,m,g,d,n,f;g=h[i]||j;d=o[i]||j;c=h[e]||0;m=o[e]||0;n=isFinite(c)||isFinite(m);f=isFinite(g)||isFinite(d);if(n||f){if(f){p=g-d}if(p===0&&n){p=m-c}}return p},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(d){var c=this,a=c.owner,f=a.stretchMaxPartner,b=c.innerCt.dom.style,e=c.names;d.boxNames=e;c.overflowHandler.beginLayout(d);if(typeof f==="string"){f=Ext.getCmp(f)||a.query(f)[0]}d.stretchMaxPartner=f&&d.context.getCmp(f);c.callParent(arguments);d.innerCtContext=d.getEl("innerCt",c);c.scrollParallel=a.scrollFlags[e.x];c.scrollPerpendicular=a.scrollFlags[e.y];if(c.scrollParallel){c.scrollPos=a.getTargetEl().dom[e.scrollLeft]}b.width="";b.height=""},beginLayoutCycle:function(e,a){var d=this,g=d.align,f=e.boxNames,b=d.pack,c=f.heightModel;d.overflowHandler.beginLayoutCycle(e,a);d.callParent(arguments);e.parallelSizeModel=e[f.widthModel];e.perpendicularSizeModel=e[c];e.boxOptions={align:g={stretch:g=="stretch",stretchmax:g=="stretchmax",center:g==f.center,bottom:g==f.afterY},pack:b={center:b=="center",end:b=="end"}};if(g.stretch&&e.perpendicularSizeModel.shrinkWrap){g.stretchmax=true;g.stretch=false}g.nostretch=!(g.stretch||g.stretchmax);if(e.parallelSizeModel.shrinkWrap){b.center=b.end=false}d.cacheFlexes(e);d.targetEl.setWidth(20000)},cacheFlexes:function(j){var t=this,k=j.boxNames,a=k.widthModel,d=k.heightModel,c=j.boxOptions.align.nostretch,n=0,b=j.childItems,p=b.length,r=[],l=0,h=k.minWidth,f=t._percentageRe,q=0,s=0,e,m,o,g;while(p--){m=b[p];e=m.target;if(m[a].calculated){m.flex=o=e.flex;if(o){n+=o;r.push(m);l+=e[h]||0}else{g=f.exec(e[k.width]);m.percentageParallel=parseFloat(g[1])/100;++q}}if(c&&m[d].calculated){g=f.exec(e[k.height]);m.percentagePerpendicular=parseFloat(g[1])/100;++s}}j.flexedItems=r;j.flexedMinSize=l;j.totalFlex=n;j.percentageWidths=q;j.percentageHeights=s;Ext.Array.sort(r,t.flexSortFn)},calculate:function(e){var c=this,b=c.getContainerSize(e),g=e.boxNames,d=e.state,f=d.boxPlan||(d.boxPlan={}),a=e.targetContext;f.targetSize=b;if(!e.parallelSizeModel.shrinkWrap&&!b[g.gotWidth]){c.done=false;return}if(!d.parallelDone){d.parallelDone=c.calculateParallel(e,g,f)}if(!d.perpendicularDone){d.perpendicularDone=c.calculatePerpendicular(e,g,f)}if(d.parallelDone&&d.perpendicularDone){if(c.owner.dock&&(Ext.isIE7m||Ext.isIEQuirks)&&!c.owner.width&&!c.horizontal){f.isIEVerticalDock=true;f.calculatedWidth=f.maxSize+e.getPaddingInfo().width+e.getFrameInfo().width;if(a!==e){f.calculatedWidth+=a.getPaddingInfo().width}}c.publishInnerCtSize(e,c.reserveOffset?c.availableSpaceOffset:0);if(c.done&&(e.childItems.length>1||e.stretchMaxPartner)&&e.boxOptions.align.stretchmax&&!d.stretchMaxDone){c.calculateStretchMax(e,g,f);d.stretchMaxDone=true}c.overflowHandler.calculate(e)}else{c.done=false}},calculateParallel:function(j,m,b){var E=this,y=m.width,a=j.childItems,r=m.beforeX,d=m.afterX,p=m.setWidth,z=a.length,w=j.flexedItems,q=w.length,u=j.boxOptions.pack,l=E.padding,g=b.targetSize[y],A=0,e=l[r],D=e+l[d]+E.scrollOffset+(E.reserveOffset?E.availableSpaceOffset:0),v=Ext.getScrollbarSize()[m.width],t,k,f,x,n,s,C,o,B,c,h;if(v&&E.scrollPerpendicular&&j.parallelSizeModel.shrinkWrap&&!j.boxOptions.align.stretch&&!j.perpendicularSizeModel.shrinkWrap){if(!j.state.perpendicularDone){return false}B=true}for(t=0;t<z;++t){n=a[t];k=n.marginInfo||n.getMarginInfo();A+=k[y];if(!n[m.widthModel].calculated){c=n.getProp(y);D+=c;if(isNaN(D)){return false}}}D+=A;if(j.percentageWidths){h=g-A;if(isNaN(h)){return false}for(t=0;t<z;++t){n=a[t];if(n.percentageParallel){c=Math.ceil(h*n.percentageParallel);c=n.setWidth(c);D+=c}}}if(j.parallelSizeModel.shrinkWrap){b.availableSpace=0;b.tooNarrow=false}else{b.availableSpace=g-D;b.tooNarrow=b.availableSpace<j.flexedMinSize;if(b.tooNarrow&&Ext.getScrollbarSize()[m.height]&&E.scrollParallel&&j.state.perpendicularDone){j.state.perpendicularDone=false;for(t=0;t<z;++t){a[t].invalidate()}}}o=D;f=b.availableSpace;x=j.totalFlex;for(t=0;t<q;t++){n=w[t];s=n.flex;C=E.roundFlex((s/x)*f);C=n[p](C);o+=C;f=Math.max(0,f-C);x-=s}if(u.center){e+=f/2;if(e<0){e=0}}else{if(u.end){e+=f}}for(t=0;t<z;++t){n=a[t];k=n.marginInfo;e+=k[r];n.setProp(m.x,e);e+=k[d]+n.props[y]}o+=j.targetContext.getPaddingInfo()[y];j.state.contentWidth=o;if(B&&(j.peek(m.contentHeight)>b.targetSize[m.height])){o+=v;j[m.hasOverflowY]=true;j.target.componentLayout[m.setWidthInDom]=true;j[m.invalidateScrollY]=Ext.isStrict&&Ext.isIE8}j[m.setContentWidth](o);return true},calculatePerpendicular:function(t,J,y){var s=this,d=t.perpendicularSizeModel.shrinkWrap,b=y.targetSize,h=t.childItems,x=h.length,l=Math.max,k=J.height,m=J.setHeight,g=J.beforeY,r=J.y,G=s.padding,j=G[g],n=b[k]-j-G[J.afterY],D=t.boxOptions.align,o=D.stretch,p=D.stretchmax,M=D.center,L=D.bottom,F=s.constrainAlign,E=0,A=0,C=s.onBeforeConstrainInvalidateChild,z=s.onAfterConstrainInvalidateChild,a=Ext.getScrollbarSize().height,w,H,B,u,v,c,q,e,K,I,f;if(o||((M||L)&&!d)){if(isNaN(n)){return false}}if(s.scrollParallel&&y.tooNarrow){if(d){I=true}else{n-=a;y.targetSize[k]-=a}}if(o){c=n}else{for(H=0;H<x;H++){q=h[H];u=(q.marginInfo||q.getMarginInfo())[k];if(!(f=q.percentagePerpendicular)){B=q.getProp(k)}else{++A;if(d){continue}else{B=f*n-u;B=q[J.setHeight](B)}}if(!d&&F&&q[J.heightModel].shrinkWrap&&B>n){q.invalidate({before:C,after:z,layout:s,childHeight:n,names:J});t.state.parallelDone=false}if(isNaN(E=l(E,B+u,q.target[J.minHeight]||0))){return false}}if(I){E+=a;t[J.hasOverflowX]=true;t.target.componentLayout[J.setHeightInDom]=true;t[J.invalidateScrollX]=Ext.isStrict&&Ext.isIE8}e=t.stretchMaxPartner;if(e){t.setProp("maxChildHeight",E);K=e.childItems;if(K&&K.length){E=l(E,e.getProp("maxChildHeight"));if(isNaN(E)){return false}}}t[J.setContentHeight](E+s.padding[k]+t.targetContext.getPaddingInfo()[k]);if(I){E-=a}y.maxSize=E;if(p){c=E}else{if(M||L||A){if(F){c=d?E:n}else{c=d?E:l(n,E)}c-=t.innerCtContext.getBorderInfo()[k]}}}for(H=0;H<x;H++){q=h[H];u=q.marginInfo||q.getMarginInfo();w=j+u[g];if(o){q[m](c-u[k])}else{f=q.percentagePerpendicular;if(d&&f){u=q.marginInfo||q.getMarginInfo();B=f*c-u[k];B=q.setHeight(B)}if(M){v=c-q.props[k];if(v>0){w=j+Math[s.alignRoundingMethod](v/2)}}else{if(L){w=l(0,c-w-q.props[k])}}}q.setProp(r,w)}return true},onBeforeConstrainInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMin){b[c]=Ext.layout.SizeModel.calculated}},onAfterConstrainInvalidateChild:function(b,a){var c=a.names;b.setProp(c.beforeY,0);if(b[c.heightModel].calculated){b[c.setHeight](a.childHeight)}},calculateStretchMax:function(c,j,l){var k=this,g=j.height,m=j.width,f=c.childItems,a=f.length,o=l.maxSize,n=k.onBeforeStretchMaxInvalidateChild,e=k.onAfterStretchMaxInvalidateChild,p,h,d,b;for(d=0;d<a;++d){p=f[d];h=p.props;b=o-p.getMarginInfo()[g];if(b!=h[g]||p[j.heightModel].constrained){p.invalidate({before:n,after:e,layout:k,childWidth:h[m],childHeight:b,childX:h.x,childY:h.y,names:j})}}},onBeforeStretchMaxInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMax){b[c]=Ext.layout.SizeModel.calculated}},onAfterStretchMaxInvalidateChild:function(d,c){var e=c.names,a=c.childHeight,b=c.childWidth;d.setProp("x",c.childX);d.setProp("y",c.childY);if(d[e.heightModel].calculated){d[e.setHeight](a)}if(d[e.widthModel].calculated){d[e.setWidth](b)}},completeLayout:function(b){var i=this,h=b.boxNames,g=b.invalidateScrollX,f=b.invalidateScrollY,d,a,e,c,j;i.overflowHandler.completeLayout(b);if(g||f){a=i.getTarget();d=a.dom;j=d.style;if(g){e=a.getStyle("overflowX");if(e=="auto"){e=j.overflowX;j.overflowX="scroll"}else{g=false}}if(f){c=a.getStyle("overflowY");if(c=="auto"){c=j.overflowY;j.overflowY="scroll"}else{f=false}}if(g||f){d.scrollWidth;if(g){j.overflowX=e}if(f){j.overflowY=c}}}if(i.scrollParallel){i.owner.getTargetEl().dom[h.scrollLeft]=i.scrollPos}},finishedLayout:function(a){this.overflowHandler.finishedLayout(a);this.callParent(arguments);this.targetEl.setWidth(a.innerCtContext.props.width)},publishInnerCtSize:function(a,d){var h=this,g=a.boxNames,f=g.height,j=g.width,e=a.boxOptions.align,n=h.owner.dock,k=h.padding,i=a.state.boxPlan,c=i.targetSize,m=c[f],o=a.innerCtContext,b=(a.parallelSizeModel.shrinkWrap||(i.tooNarrow&&h.scrollParallel)?a.state.contentWidth-a.targetContext.getPaddingInfo()[j]:c[j])-(d||0),l;if(e.stretch){l=m}else{l=i.maxSize+k[g.beforeY]+k[g.afterY]+o.getBorderInfo()[f];if(!a.perpendicularSizeModel.shrinkWrap&&(e.center||e.bottom)){l=Math.max(m,l)}}o[g.setWidth](b);o[g.setHeight](l);if(isNaN(b+l)){h.done=false}if(i.calculatedWidth&&(n=="left"||n=="right")){a.setWidth(i.calculatedWidth,true,true)}},onRemove:function(a){var b=this;b.callParent(arguments);if(b.overflowHandler){b.overflowHandler.onRemove(a)}if(a.layoutMarginCap==b.id){delete a.layoutMarginCap}},initOverflowHandler:function(){var d=this,c=d.overflowHandler,b,a;if(typeof c=="string"){c={type:c}}b="None";if(c&&c.type!==undefined){b=c.type}a=Ext.layout.container.boxOverflow[b];if(a[d.type]){a=a[d.type]}d.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,d,c)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},calculateChildBox:Ext.deprecated(),calculateChildBoxes:Ext.deprecated(),updateChildBoxes:Ext.deprecated(),destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)},getRenderData:function(){var a=this.callParent();a.targetElCls=this.targetElCls;return a}});
adatapost/cdnjs
ajax/libs/extjs/4.2.1/src/layout/container/Box.min.js
JavaScript
mit
12,021
/** * Copyright <%= year %> Telerik AD * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e,define){define([],e)}(function(){return function(e){var t=e.kendo||(e.kendo={cultures:{}});t.cultures.gd={name:"gd",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["-$n","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"£"}},calendars:{standard:{days:{names:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],namesAbbr:["Dòm","Lua","Mài","Cia","Ard","Hao","Sat"],namesShort:["D","L","M","C","A","H","S"]},months:{names:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd",""],namesAbbr:["Fao","Gea","Màr","Gib","Cèi","Ògm","Iuc","Lùn","Sul","Dàm","Sam","Dùb",""]},AM:["m","m","M"],PM:["f","f","F"],patterns:{d:"dd/MM/yyyy",D:"dd MMMM yyyy",F:"dd MMMM yyyy HH:mm:ss",g:"dd/MM/yyyy HH:mm",G:"dd/MM/yyyy HH:mm:ss",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":"/",":":":",firstDay:1}}}}(this),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});
svvitale/cdnjs
ajax/libs/kendo-ui-core/2014.1.416/js/cultures/kendo.culture.gd.min.js
JavaScript
mit
1,882
Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],mixins:{bindable:"Ext.util.Bindable"},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,f;if(c){d=a.getCount();if(d===0){f=e.emptyMsg}else{f=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(f)}},onLoad:function(){var g=this,d,b,c,a,f,h,e;f=g.store.getCount();h=f===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}Ext.suspendLayouts();e=g.child("#afterTextItem");if(e){e.setText(a)}e=g.getInputItem();if(e){e.setDisabled(h).setValue(b)}g.setChildDisabled("#first",b===1||h);g.setChildDisabled("#prev",b===1||h);g.setChildDisabled("#next",b===c||h);g.setChildDisabled("#last",b===c||h);g.setChildDisabled("#refresh",false);g.updateInfo();Ext.resumeLayouts(true);if(g.rendered){g.fireEvent("change",g,d)}},setChildDisabled:function(a,b){var c=this.child(a);if(c){c.setDisabled(b)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.setChildDisabled("#refresh",false)},getInputItem:function(){return this.child("#inputItem")},readPageFromInput:function(b){var c=this.getInputItem(),d=false,a;if(c){a=c.getValue();d=parseInt(a,10);if(!a||isNaN(d)){c.setValue(b.currentPage);return false}}return d},onPagingFocus:function(){var a=this.getInputItem();if(a){a.select()}},onPagingBlur:function(c){var b=this.getInputItem(),a;if(b){a=this.getPageData().currentPage;b.setValue(a)}},onPagingKeyDown:function(h,g){var d=this,b=g.getKey(),c=d.getPageData(),a=g.shiftKey?10:1,f;if(b==g.RETURN){g.stopEvent();f=d.readPageFromInput(c);if(f!==false){f=Math.min(Math.max(1,f),c.pageCount);if(d.fireEvent("beforechange",d,f)!==false){d.store.loadPage(f)}}}else{if(b==g.HOME||b==g.END){g.stopEvent();f=b==g.HOME?1:c.pageCount;h.setValue(f)}else{if(b==g.UP||b==g.PAGE_UP||b==g.DOWN||b==g.PAGE_DOWN){g.stopEvent();f=d.readPageFromInput(c);if(f){if(b==g.DOWN||b==g.PAGE_DOWN){a*=-1}f+=a;if(f>=1&&f<=c.pageCount){h.setValue(f)}}}}}},beforeLoad:function(){if(this.rendered){this.setChildDisabled("#refresh",true)}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});
FaiblUG/cdnjs
ajax/libs/extjs/4.2.1/src/toolbar/Paging.min.js
JavaScript
mit
5,270
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.oPaginate" ); /* Note that the paging language information only has relevence in full numbers */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "sPaginationType": "full_numbers" } ); var oSettings = oTable.fnSettings(); oTest.fnWaitTest( "oLanguage.oPaginate defaults", null, function () { var bReturn = oSettings.oLanguage.oPaginate.sFirst == "First" && oSettings.oLanguage.oPaginate.sPrevious == "Previous" && oSettings.oLanguage.oPaginate.sNext == "Next" && oSettings.oLanguage.oPaginate.sLast == "Last"; return bReturn; } ); oTest.fnTest( "oLanguage.oPaginate defaults are in the DOM", null, function () { var bReturn = $('#example_paginate .first').html() == "First" && $('#example_paginate .previous').html() == "Previous" && $('#example_paginate .next').html() == "Next" && $('#example_paginate .last').html() == "Last"; return bReturn; } ); oTest.fnWaitTest( "oLanguage.oPaginate can be defined", function () { oSession.fnRestore(); oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/arrays.txt", "sPaginationType": "full_numbers", "oLanguage": { "oPaginate": { "sFirst": "unit1", "sPrevious": "test2", "sNext": "unit3", "sLast": "test4" } } } ); oSettings = oTable.fnSettings(); }, function () { var bReturn = oSettings.oLanguage.oPaginate.sFirst == "unit1" && oSettings.oLanguage.oPaginate.sPrevious == "test2" && oSettings.oLanguage.oPaginate.sNext == "unit3" && oSettings.oLanguage.oPaginate.sLast == "test4"; return bReturn; } ); oTest.fnTest( "oLanguage.oPaginate definitions are in the DOM", null, function () { var bReturn = $('#example_paginate .first').html() == "unit1" && $('#example_paginate .previous').html() == "test2" && $('#example_paginate .next').html() == "unit3" && $('#example_paginate .last').html() == "test4"; return bReturn; } ); oTest.fnComplete(); } );
zarkopopovski/CloudInvoiceManagerLite
media/unit_testing/tests_onhold/3_ajax/oLanguage.oPaginate.js
JavaScript
mit
2,223
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Tests\Formatter; use Symfony\Component\Console\Formatter\OutputFormatterStyleStack; use Symfony\Component\Console\Formatter\OutputFormatterStyle; class OutputFormatterStyleStackTest extends \PHPUnit_Framework_TestCase { public function testPush() { $stack = new OutputFormatterStyleStack(); $stack->push($s1 = new OutputFormatterStyle('white', 'black')); $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); $this->assertEquals($s2, $stack->getCurrent()); $stack->push($s3 = new OutputFormatterStyle('green', 'red')); $this->assertEquals($s3, $stack->getCurrent()); } public function testPop() { $stack = new OutputFormatterStyleStack(); $stack->push($s1 = new OutputFormatterStyle('white', 'black')); $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); $this->assertEquals($s2, $stack->pop()); $this->assertEquals($s1, $stack->pop()); } public function testPopEmpty() { $stack = new OutputFormatterStyleStack(); $style = new OutputFormatterStyle(); $this->assertEquals($style, $stack->pop()); } public function testPopNotLast() { $stack = new OutputFormatterStyleStack(); $stack->push($s1 = new OutputFormatterStyle('white', 'black')); $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); $stack->push($s3 = new OutputFormatterStyle('green', 'red')); $this->assertEquals($s2, $stack->pop($s2)); $this->assertEquals($s1, $stack->pop()); } /** * @expectedException InvalidArgumentException */ public function testInvalidPop() { $stack = new OutputFormatterStyleStack(); $stack->push(new OutputFormatterStyle('white', 'black')); $stack->pop(new OutputFormatterStyle('yellow', 'blue')); } }
irbisadm/deliveryclub
vendor/symfony/symfony/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php
PHP
mit
2,166
/* * /MathJax/jax/output/HTML-CSS/fonts/STIX-Web/Variants/BoldItalic/Main.js * * Copyright (c) 2009-2015 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXMathJax_Variants-bold-italic"]={directory:"Variants/BoldItalic",family:"STIXMathJax_Variants",weight:"bold",style:"italic",testString:"\u00A0\uE247\uE248\uE249\uE24A\uE24B\uE24C\uE24D\uE24E\uE24F\uE250\uE251\uE252\uE253\uE254",32:[0,0,250,0,0],160:[0,0,250,0,0],57927:[711,47,871,38,834],57928:[703,10,755,33,740],57929:[704,12,667,36,669],57930:[696,0,802,30,808],57931:[704,8,609,41,626],57932:[696,0,645,34,738],57933:[704,144,615,43,615],57934:[696,24,849,22,858],57935:[696,0,621,36,623],57936:[695,116,645,36,811],57937:[703,14,856,38,820],57938:[704,8,726,38,688],57939:[705,45,1186,38,1146],57940:[835,39,997,36,1098],57941:[707,10,772,43,782],57942:[696,0,645,36,731],57943:[704,145,778,43,737],57944:[697,13,869,36,831],57945:[705,7,667,36,699],57946:[783,0,547,33,747],57947:[700,14,787,33,936],57948:[711,31,652,36,706],57949:[711,34,956,36,1010],57950:[710,14,720,36,781],57951:[711,144,720,36,773],57952:[702,98,778,36,744],57956:[473,10,600,47,554],57960:[473,0,600,95,450],57964:[473,0,600,54,531],57968:[463,217,600,31,547],57972:[450,217,600,30,564],57976:[450,218,600,25,561],57980:[670,10,600,55,545],57984:[450,217,600,24,582],57988:[670,10,600,41,560],57992:[463,217,600,49,539]};MathJax.Callback.Queue(["initFont",MathJax.OutputJax["HTML-CSS"],"STIXMathJax_Variants-bold-italic"],["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/Variants/BoldItalic/Main.js"]);
GaryChamberlain/cdnjs
ajax/libs/mathjax/2.5.1/jax/output/HTML-CSS/fonts/STIX-Web/Variants/BoldItalic/Main.js
JavaScript
mit
2,159
define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",n="true|false|null|undefined|NaN|Infinity",r="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(e,t,n){"use strict";function l(){this.HighlightRules=r,this.$outdent=new i,this.foldingRules=new s}var r=e("./coffee_highlight_rules").CoffeeHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./folding/coffee").FoldMode,o=e("../range").Range,u=e("./text").Mode,a=e("../worker/worker_client").WorkerClient,f=e("../lib/oop");f.inherits(l,u),function(){var e=/(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.toggleCommentLines=function(e,i,s,u){console.log("toggle");var a=new o(0,0,0,0);for(var f=s;f<=u;++f){var l=i.getLine(f);if(n.test(l))continue;t.test(l)?l=l.replace(t,"$1"):l=l.replace(r,"$&#"),a.end.row=a.start.row=f,a.end.column=l.length+1,i.replace(a,l)}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/coffee"}.call(l.prototype),t.Mode=l})
nareshs435/cdnjs
ajax/libs/ace/1.1.5/mode-coffee.js
JavaScript
mit
7,648
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_precision) { var v = opt_precision; if (undefined === v) { v = Math.min(getDecimals(n), 3); } var base = Math.pow(10, v); var f = ((n * base) | 0) % base; return {v: v, f: f}; } $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "ap.", "ip." ], "DAY": [ "sunnuntaina", "maanantaina", "tiistaina", "keskiviikkona", "torstaina", "perjantaina", "lauantaina" ], "ERANAMES": [ "ennen Kristuksen syntym\u00e4\u00e4", "j\u00e4lkeen Kristuksen syntym\u00e4n" ], "ERAS": [ "eKr.", "jKr." ], "FIRSTDAYOFWEEK": 0, "MONTH": [ "tammikuuta", "helmikuuta", "maaliskuuta", "huhtikuuta", "toukokuuta", "kes\u00e4kuuta", "hein\u00e4kuuta", "elokuuta", "syyskuuta", "lokakuuta", "marraskuuta", "joulukuuta" ], "SHORTDAY": [ "su", "ma", "ti", "ke", "to", "pe", "la" ], "SHORTMONTH": [ "tammikuuta", "helmikuuta", "maaliskuuta", "huhtikuuta", "toukokuuta", "kes\u00e4kuuta", "hein\u00e4kuuta", "elokuuta", "syyskuuta", "lokakuuta", "marraskuuta", "joulukuuta" ], "STANDALONEMONTH": [ "tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kes\u00e4kuu", "hein\u00e4kuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu" ], "WEEKENDRANGE": [ 5, 6 ], "fullDate": "cccc d. MMMM y", "longDate": "d. MMMM y", "medium": "d.M.y H.mm.ss", "mediumDate": "d.M.y", "mediumTime": "H.mm.ss", "short": "d.M.y H.mm", "shortDate": "d.M.y", "shortTime": "H.mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "\u20ac", "DECIMAL_SEP": ",", "GROUP_SEP": "\u00a0", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "-", "negSuf": "\u00a0\u00a4", "posPre": "", "posSuf": "\u00a0\u00a4" } ] }, "id": "fi", "localeID": "fi", "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]);
seogi1004/cdnjs
ajax/libs/angular.js/1.5.0/i18n/angular-locale_fi.js
JavaScript
mit
2,955
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u0635", "\u0645" ], "DAY": [ "\u0627\u0644\u0623\u062d\u062f", "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062e\u0645\u064a\u0633", "\u0627\u0644\u062c\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062a" ], "ERANAMES": [ "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", "\u0645\u064a\u0644\u0627\u062f\u064a" ], "ERAS": [ "\u0642.\u0645", "\u0645" ], "FIRSTDAYOFWEEK": 5, "MONTH": [ "\u064a\u0646\u0627\u064a\u0631", "\u0641\u0628\u0631\u0627\u064a\u0631", "\u0645\u0627\u0631\u0633", "\u0623\u0628\u0631\u064a\u0644", "\u0645\u0627\u064a\u0648", "\u064a\u0648\u0646\u064a\u0648", "\u064a\u0648\u0644\u064a\u0648", "\u0623\u063a\u0633\u0637\u0633", "\u0633\u0628\u062a\u0645\u0628\u0631", "\u0623\u0643\u062a\u0648\u0628\u0631", "\u0646\u0648\u0641\u0645\u0628\u0631", "\u062f\u064a\u0633\u0645\u0628\u0631" ], "SHORTDAY": [ "\u0627\u0644\u0623\u062d\u062f", "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062e\u0645\u064a\u0633", "\u0627\u0644\u062c\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062a" ], "SHORTMONTH": [ "\u064a\u0646\u0627\u064a\u0631", "\u0641\u0628\u0631\u0627\u064a\u0631", "\u0645\u0627\u0631\u0633", "\u0623\u0628\u0631\u064a\u0644", "\u0645\u0627\u064a\u0648", "\u064a\u0648\u0646\u064a\u0648", "\u064a\u0648\u0644\u064a\u0648", "\u0623\u063a\u0633\u0637\u0633", "\u0633\u0628\u062a\u0645\u0628\u0631", "\u0623\u0643\u062a\u0648\u0628\u0631", "\u0646\u0648\u0641\u0645\u0628\u0631", "\u062f\u064a\u0633\u0645\u0628\u0631" ], "STANDALONEMONTH": [ "\u064a\u0646\u0627\u064a\u0631", "\u0641\u0628\u0631\u0627\u064a\u0631", "\u0645\u0627\u0631\u0633", "\u0623\u0628\u0631\u064a\u0644", "\u0645\u0627\u064a\u0648", "\u064a\u0648\u0646\u064a\u0648", "\u064a\u0648\u0644\u064a\u0648", "\u0623\u063a\u0633\u0637\u0633", "\u0633\u0628\u062a\u0645\u0628\u0631", "\u0623\u0643\u062a\u0648\u0628\u0631", "\u0646\u0648\u0641\u0645\u0628\u0631", "\u062f\u064a\u0633\u0645\u0628\u0631" ], "WEEKENDRANGE": [ 4, 5 ], "fullDate": "EEEE\u060c d MMMM\u060c y", "longDate": "d MMMM\u060c y", "medium": "dd\u200f/MM\u200f/y h:mm:ss a", "mediumDate": "dd\u200f/MM\u200f/y", "mediumTime": "h:mm:ss a", "short": "d\u200f/M\u200f/y h:mm a", "shortDate": "d\u200f/M\u200f/y", "shortTime": "h:mm a" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "Rial", "DECIMAL_SEP": "\u066b", "GROUP_SEP": "\u066c", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "-\u00a4\u00a0", "negSuf": "", "posPre": "\u00a4\u00a0", "posSuf": "" } ] }, "id": "ar-qa", "localeID": "ar_QA", "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;} }); }]);
ahocevar/cdnjs
ajax/libs/angular.js/1.4.14/i18n/angular-locale_ar-qa.js
JavaScript
mit
4,161
/* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ if (typeof define !== 'function') { var define = require('amdefine')(module, require); } define(function (require, exports, module) { /** * This is a helper function for getting values from parameter/options * objects. * * @param args The object we are extracting values from * @param name The name of the property we are getting. * @param defaultValue An optional value to return if the property is missing * from the object. If this is not specified and the property is missing, an * error will be thrown. */ function getArg(aArgs, aName, aDefaultValue) { if (aName in aArgs) { return aArgs[aName]; } else if (arguments.length === 3) { return aDefaultValue; } else { throw new Error('"' + aName + '" is a required argument.'); } } exports.getArg = getArg; var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; var dataUrlRegexp = /^data:.+\,.+$/; function urlParse(aUrl) { var match = aUrl.match(urlRegexp); if (!match) { return null; } return { scheme: match[1], auth: match[2], host: match[3], port: match[4], path: match[5] }; } exports.urlParse = urlParse; function urlGenerate(aParsedUrl) { var url = ''; if (aParsedUrl.scheme) { url += aParsedUrl.scheme + ':'; } url += '//'; if (aParsedUrl.auth) { url += aParsedUrl.auth + '@'; } if (aParsedUrl.host) { url += aParsedUrl.host; } if (aParsedUrl.port) { url += ":" + aParsedUrl.port } if (aParsedUrl.path) { url += aParsedUrl.path; } return url; } exports.urlGenerate = urlGenerate; /** * Normalizes a path, or the path portion of a URL: * * - Replaces consequtive slashes with one slash. * - Removes unnecessary '.' parts. * - Removes unnecessary '<dir>/..' parts. * * Based on code in the Node.js 'path' core module. * * @param aPath The path or url to normalize. */ function normalize(aPath) { var path = aPath; var url = urlParse(aPath); if (url) { if (!url.path) { return aPath; } path = url.path; } var isAbsolute = (path.charAt(0) === '/'); var parts = path.split(/\/+/); for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { part = parts[i]; if (part === '.') { parts.splice(i, 1); } else if (part === '..') { up++; } else if (up > 0) { if (part === '') { // The first part is blank if the path is absolute. Trying to go // above the root is a no-op. Therefore we can remove all '..' parts // directly after the root. parts.splice(i + 1, up); up = 0; } else { parts.splice(i, 2); up--; } } } path = parts.join('/'); if (path === '') { path = isAbsolute ? '/' : '.'; } if (url) { url.path = path; return urlGenerate(url); } return path; } exports.normalize = normalize; /** * Joins two paths/URLs. * * @param aRoot The root path or URL. * @param aPath The path or URL to be joined with the root. * * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a * scheme-relative URL: Then the scheme of aRoot, if any, is prepended * first. * - Otherwise aPath is a path. If aRoot is a URL, then its path portion * is updated with the result and aRoot is returned. Otherwise the result * is returned. * - If aPath is absolute, the result is aPath. * - Otherwise the two paths are joined with a slash. * - Joining for example 'http://' and 'www.example.com' is also supported. */ function join(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } if (aPath === "") { aPath = "."; } var aPathUrl = urlParse(aPath); var aRootUrl = urlParse(aRoot); if (aRootUrl) { aRoot = aRootUrl.path || '/'; } // `join(foo, '//www.example.org')` if (aPathUrl && !aPathUrl.scheme) { if (aRootUrl) { aPathUrl.scheme = aRootUrl.scheme; } return urlGenerate(aPathUrl); } if (aPathUrl || aPath.match(dataUrlRegexp)) { return aPath; } // `join('http://', 'www.example.com')` if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { aRootUrl.host = aPath; return urlGenerate(aRootUrl); } var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); if (aRootUrl) { aRootUrl.path = joined; return urlGenerate(aRootUrl); } return joined; } exports.join = join; /** * Make a path relative to a URL or another path. * * @param aRoot The root path or URL. * @param aPath The path or URL to be made relative to aRoot. */ function relative(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } aRoot = aRoot.replace(/\/$/, ''); // It is possible for the path to be above the root. In this case, simply // checking whether the root is a prefix of the path won't work. Instead, we // need to remove components from the root one by one, until either we find // a prefix that fits, or we run out of components to remove. var level = 0; while (aPath.indexOf(aRoot + '/') !== 0) { var index = aRoot.lastIndexOf("/"); if (index < 0) { return aPath; } // If the only part of the root that is left is the scheme (i.e. http://, // file:///, etc.), one or more slashes (/), or simply nothing at all, we // have exhausted all components, so the path is not relative to the root. aRoot = aRoot.slice(0, index); if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { return aPath; } ++level; } // Make sure we add a "../" for each component we removed from the root. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); } exports.relative = relative; /** * Because behavior goes wacky when you set `__proto__` on objects, we * have to prefix all the strings in our set with an arbitrary character. * * See https://github.com/mozilla/source-map/pull/31 and * https://github.com/mozilla/source-map/issues/30 * * @param String aStr */ function toSetString(aStr) { return '$' + aStr; } exports.toSetString = toSetString; function fromSetString(aStr) { return aStr.substr(1); } exports.fromSetString = fromSetString; /** * Comparator between two mappings where the original positions are compared. * * Optionally pass in `true` as `onlyCompareGenerated` to consider two * mappings with the same original source/line/column, but different generated * line and column the same. Useful when searching for a mapping with a * stubbed out mapping. */ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { var cmp = mappingA.source - mappingB.source; if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return mappingA.name - mappingB.name; }; exports.compareByOriginalPositions = compareByOriginalPositions; /** * Comparator between two mappings with deflated source and name indices where * the generated positions are compared. * * Optionally pass in `true` as `onlyCompareGenerated` to consider two * mappings with the same generated line and column, but different * source/name/original line and column the same. Useful when searching for a * mapping with a stubbed out mapping. */ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0 || onlyCompareGenerated) { return cmp; } cmp = mappingA.source - mappingB.source; if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return mappingA.name - mappingB.name; }; exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; function strcmp(aStr1, aStr2) { if (aStr1 === aStr2) { return 0; } if (aStr1 > aStr2) { return 1; } return -1; } /** * Comparator between two mappings with inflated source and name strings where * the generated positions are compared. */ function compareByGeneratedPositionsInflated(mappingA, mappingB) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); }; exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; });
popoAOAOgroan/udemo
demo/node_modules/clean-css/node_modules/source-map/lib/source-map/util.js
JavaScript
mit
10,057
var baseToString = require('../internal/baseToString'), isIterateeCall = require('../internal/isIterateeCall'); /** Used to match words to create compound words. */ var reWords = (function() { var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); }()); /** * Splits `string` into an array of its words. * * @static * @memberOf _ * @category String * @param {string} [string=''] The string to inspect. * @param {RegExp|string} [pattern] The pattern to match words. * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. * @returns {Array} Returns the words of `string`. * @example * * _.words('fred, barney, & pebbles'); * // => ['fred', 'barney', 'pebbles'] * * _.words('fred, barney, & pebbles', /[^, ]+/g); * // => ['fred', 'barney', '&', 'pebbles'] */ function words(string, pattern, guard) { if (guard && isIterateeCall(string, pattern, guard)) { pattern = undefined; } string = baseToString(string); return string.match(pattern || reWords) || []; } module.exports = words;
mlsteele/tokipona-lipunimi
node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/string/words.js
JavaScript
mit
1,188
var createCurry = require('../internal/createCurry'); /** Used to compose bitmasks for wrapper metadata. */ var CURRY_RIGHT_FLAG = 16; /** * This method is like `_.curry` except that arguments are applied to `func` * in the manner of `_.partialRight` instead of `_.partial`. * * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for provided arguments. * * **Note:** This method does not set the "length" property of curried functions. * * @static * @memberOf _ * @category Function * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. * @returns {Function} Returns the new curried function. * @example * * var abc = function(a, b, c) { * return [a, b, c]; * }; * * var curried = _.curryRight(abc); * * curried(3)(2)(1); * // => [1, 2, 3] * * curried(2, 3)(1); * // => [1, 2, 3] * * curried(1, 2, 3); * // => [1, 2, 3] * * // using placeholders * curried(3)(1, _)(2); * // => [1, 2, 3] */ var curryRight = createCurry(CURRY_RIGHT_FLAG); // Assign default placeholders. curryRight.placeholder = {}; module.exports = curryRight;
jeneser/hpuHelper
platforms/android/cordova/node_modules/lodash/function/curryRight.js
JavaScript
mit
1,267
videojs.addLanguage("it",{ "Play": "Play", "Pause": "Pausa", "Current Time": "Orario attuale", "Duration Time": "Durata", "Remaining Time": "Tempo rimanente", "Stream Type": "Tipo del Streaming", "LIVE": "LIVE", "Loaded": "Caricato", "Progress": "Stato", "Fullscreen": "Schermo intero", "Non-Fullscreen": "Chiudi schermo intero", "Mute": "Muto", "Unmuted": "Audio", "Playback Rate": "Tasso di riproduzione", "Subtitles": "Sottotitoli", "subtitles off": "Senza sottotitoli", "Captions": "Sottotitoli non udenti", "captions off": "Senza sottotitoli non udenti", "Chapters": "Capitolo", "You aborted the video playback": "La riproduzione del filmato è stata interrotta.", "A network error caused the video download to fail part-way.": "Il download del filmato è stato interrotto a causa di un problema rete.", "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Il filmato non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.", "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La riproduzione del filmato è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.", "No compatible source was found for this video.": "Non ci sono fonti compatibili per questo filmato." });
Kingside/jsdelivr
files/videojs/4.12.9/lang/it.js
JavaScript
mit
1,455
videojs.addLanguage("es",{ "Play": "Reproducción", "Pause": "Pausa", "Current Time": "Tiempo reproducido", "Duration Time": "Duración total", "Remaining Time": "Tiempo restante", "Stream Type": "Tipo de secuencia", "LIVE": "DIRECTO", "Loaded": "Cargado", "Progress": "Progreso", "Fullscreen": "Pantalla completa", "Non-Fullscreen": "Pantalla no completa", "Mute": "Silenciar", "Unmuted": "No silenciado", "Playback Rate": "Velocidad de reproducción", "Subtitles": "Subtítulos", "subtitles off": "Subtítulos desactivados", "Captions": "Subtítulos especiales", "captions off": "Subtítulos especiales desactivados", "Chapters": "Capítulos", "You aborted the video playback": "Ha interrumpido la reproducción del vídeo.", "A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.", "The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.", "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducción de vídeo se ha interrumpido por un problema de corrupción de datos o porque el vídeo precisa funciones que su navegador no ofrece.", "No compatible source was found for this video.": "No se ha encontrado ninguna fuente compatible con este vídeo." });
osxi/jsdelivr
files/videojs/5.0.0-33/lang/es.js
JavaScript
mit
1,504
videojs.addLanguage("fr",{ "Play": "Lecture", "Pause": "Pause", "Current Time": "Temps actuel", "Duration Time": "Durée", "Remaining Time": "Temps restant", "Stream Type": "Type de flux", "LIVE": "EN DIRECT", "Loaded": "Chargé", "Progress": "Progression", "Fullscreen": "Plein écran", "Non-Fullscreen": "Fenêtré", "Mute": "Sourdine", "Unmuted": "Son activé", "Playback Rate": "Vitesse de lecture", "Subtitles": "Sous-titres", "subtitles off": "Sous-titres désactivés", "Captions": "Sous-titres", "captions off": "Sous-titres désactivés", "Chapters": "Chapitres", "You aborted the video playback": "Vous avez interrompu la lecture de la vidéo.", "A network error caused the video download to fail part-way.": "Une erreur de réseau a interrompu le téléchargement de la vidéo.", "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.", "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.", "No compatible source was found for this video.": "Aucune source compatible n'a été trouvée pour cette vidéo." });
moay/jsdelivr
files/videojs/5.0.0-rc.20/lang/fr.js
JavaScript
mit
1,494
/* All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied, replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the ZingChart End User License Agreement which can be requested by email at support@zingchart.com. Build 2.7.1 */ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('fZ.gg.gy("1s-2h");(ep(){er(!2g.1s.2h){2g.1s.2h={}}er(!2g.1s.9v.2h){2g.1s.9v.2h={}}g0 a={bS:[[23.2s,42.dd],[23.4r,42.aO],[23.cg,42.8c],[23.79,42.aa],[23.81,42.4q],[23.9f,41.99],[23.1M,41.5V],[23.bp,41.cD],[23.Y,41.a8],[23.5w,41.7t],[23.85,41.5M],[23.89,41.fA],[23.2Y,41.7R],[23.5F,41.7Q],[23.aq,41.ax],[24.20,41.aG],[24.9a,41.4X],[24.11,41.4j],[24.a2,41.4i],[24.6u,41.do],[24.9q,41.53],[24.O,41.2c],[24.2O,41.2W],[23.b9,41.7C],[23.bF,41.T],[23.l,41.6x],[23.cy,41.W],[23.8Q,41.2a],[23.cv,41.q],[23.4s,41.10],[23.w,41.1e],[23.D,41.W],[23.es,41.30],[23.3A,41.37],[23.27,41.6y],[23.2b,41.1k],[23.h,41.2B],[23.1m,41.7S],[23.cw,41.8B],[22.4t,41.6o],[22.5k,41.W],[22.2d,41.3Q],[22.4t,41.cx],[22.6f,41.cO],[22.J,41.67],[23.R,41.1r],[22.M,41.6c],[22.92,41.1l],[22.cM,41.86],[22.6a,41.7x],[22.85,41.96],[22.2z,42.4W],[22.k,42.cw],[22.9,42.j],[22.3N,42.9M],[22.3J,42.2Z],[22.9w,42.dx],[23.H,42.p],[23.cr,42.4g],[23.60,42.1P],[23.6i,42.4S],[23.7Y,42.7f],[23.6B,42.8E],[23.r,42.O],[23.7a,42.2N],[23.9B,42.1y],[23.2E,42.1o],[23.55,42.2Z],[23.2K,42.5r],[23.3z,42.ac],[23.68,42.16],[23.72,42.aj],[23.7F,42.e1],[23.1j,42.4Z],[23.2s,42.dd]],cn:[[27.2I,42.8S],[27.ar,42.4O],[27.3Q,42.7g],[27.1F,42.7g],[27.4A,42.8g],[27.7j,42.bN],[27.aG,42.89],[27.bI,42.3Z],[27.1d,42.82],[27.i,42.2H],[27.4u,42.1M],[27.8o,42.cf],[27.1S,42.8h],[27.cg,42.fF],[27.7u,42.4p],[27.1r,42.66],[27.1O,42.7z],[27.1L,42.4i],[27.8v,42.7p],[27.7q,42.fB],[27.48,42.cd],[27.7J,42.cc],[27.7N,42.46],[27.7J,42.7C],[27.7E,42.c9],[27.4z,42.Q],[27.1W,42.4y],[27.L,42.ca],[27.4k,42.r],[27.1U,42.8B],[27.s,42.S],[27.4r,42.8y],[27.1S,42.8L],[27.4x,42.n],[27.dG,42.1o],[27.P,42.O],[27.F,42.dF],[28.R,42.H],[27.4D,41.cb],[27.4C,41.5n],[27.1C,41.M],[27.5t,41.4w],[27.4l,41.96],[27.dH,41.4n],[27.dy,41.5J],[27.4s,41.4t],[27.5O,41.9],[27.ch,41.4t],[27.4v,41.ci],[27.5U,41.5s],[27.5x,42.co],[27.34,42.p],[27.1A,42.Z],[27.d7,42.4V],[27.23,42.7f],[27.bJ,42.1y],[27.1p,42.Z],[27.3y,42.dg],[27.2O,42.5X],[26.aB,42.av],[26.3J,42.d1],[26.bA,42.3o],[26.5J,42.ak],[26.8D,42.2j],[26.3u,42.5H],[26.bx,42.q],[26.5N,42.W],[26.I,42.2a],[26.bt,42.4T],[26.88,42.3C],[26.5Y,42.3x],[26.f3,42.56],[26.5K,42.4Q],[26.9f,42.9r],[26.4J,42.cf],[26.5q,42.5d],[26.1O,42.6c],[26.1g,42.3h],[26.7c,42.1C],[26.4A,42.5N],[26.58,42.4O],[26.1W,42.94],[26.5c,42.8D],[26.s,42.92],[26.3S,42.4w],[26.84,42.7H],[26.cM,42.8S],[26.2o,42.7H],[26.5s,42.3v],[27.2M,42.fn],[27.1P,42.8w],[27.7f,42.3J],[27.8Z,42.2o],[27.16,42.7e],[27.2U,42.98],[27.32,42.J],[27.2I,42.8S]],cj:[[27.I,43.2k],[27.bM,43.94],[27.96,43.3i],[27.4D,43.7v],[28.bb,43.5a],[28.bc,43.bi],[28.13,43.3h],[28.fL,43.8j],[28.bj,43.bp],[28.2n,43.76],[28.B,43.8n],[28.1N,43.2V],[28.3a,43.2V],[28.58,43.5d],[28.8s,43.8r],[28.8v,43.61],[28.bq,43.2T],[28.br,43.bo],[28.fu,43.o],[28.8f,43.7T],[28.2W,43.7X],[28.bn,43.38],[28.7U,43.cs],[28.7S,43.5U],[28.S,43.7T],[28.7Y,43.bk],[28.2X,43.30],[28.2Z,43.8d],[28.p,43.8e],[28.2v,43.2p],[28.2M,43.14],[27.3t,43.B],[27.5i,43.7d],[27.k,43.5x],[27.4L,43.aY],[27.8k,43.37],[27.2C,43.5U],[27.8J,43.X],[27.6v,43.1N],[27.4k,43.6n],[27.1W,43.cc],[27.61,43.1h],[27.7c,43.cK],[27.1H,43.9D],[27.7r,43.7p],[27.6X,43.6W],[27.4T,43.4G],[27.44,43.4N],[27.1e,43.9Q],[27.34,43.z],[27.2n,43.6d],[27.4B,43.8p],[27.26,43.eH],[27.d8,43.9c],[27.6l,43.fy],[27.6S,43.7F],[27.8y,43.3B],[27.aE,43.g],[27.9x,43.am],[27.4o,43.fx],[27.30,43.85],[27.45,43.5C],[27.7J,43.85],[27.a0,43.an],[27.3x,43.5N],[27.6N,43.91],[27.N,43.8g],[27.4z,43.2x],[27.4z,43.2d],[27.1g,43.2k],[27.1W,43.K],[27.8W,43.5n],[27.7m,43.b9],[27.1d,43.ci],[27.7t,43.7y],[27.3g,43.ba],[27.7x,44.R],[27.I,43.2k]],cl:[[24.J,43.2u],[24.F,43.2b],[25.7L,43.3o],[25.p,43.19],[25.5j,43.18],[25.5Q,43.3q],[25.15,43.7V],[25.8L,43.9A],[25.ad,43.a5],[25.1i,43.1o],[25.8a,43.1p],[25.3A,43.fo],[25.aL,43.aP],[25.9Z,43.cI],[25.1e,43.2N],[25.7Z,43.aa],[25.1G,43.1Y],[25.fr,43.7k],[25.z,43.8b],[25.7W,42.4n],[25.1Z,42.8l],[25.fz,42.5L],[25.6V,42.8g],[25.4j,42.fH],[25.fJ,42.fI],[25.2q,42.3X],[25.8p,42.1j],[25.5p,42.75],[25.66,42.4m],[25.1K,42.1U],[25.1Z,42.6G],[25.9y,42.74],[25.1F,42.5I],[25.ae,42.2s],[25.8z,42.6p],[25.2W,42.E],[25.4y,42.a6],[25.6z,42.m],[25.2R,42.6D],[25.a9,42.E],[25.S,42.6p],[25.aN,42.a1],[25.G,42.1U],[25.17,42.5I],[25.6r,42.8H],[25.p,42.m],[25.20,42.m],[25.4e,42.8n],[25.2F,42.2C],[24.M,42.1S],[24.bH,42.5Z],[24.fK,42.a8],[24.7g,42.1w],[24.88,42.3v],[24.cR,42.97],[24.6E,42.aW],[24.bB,43.1T],[24.I,43.j],[24.7e,43.j],[24.2d,43.8c],[24.80,43.12],[24.4w,43.93],[24.J,43.aD],[24.2k,43.9G],[24.J,43.2u]],c7:[[23.r,42.5a],[23.7T,42.bw],[23.3Q,42.d3],[23.1z,42.6Y],[23.bo,42.6a],[23.4K,42.bu],[23.7P,42.84],[23.4j,42.1R],[23.1W,42.1q],[23.C,42.6D],[23.2q,42.5c],[23.6M,42.5q],[23.1G,42.e6],[23.9K,42.e7],[23.2i,42.1L],[23.N,42.1g],[23.e4,42.8t],[23.9O,42.53],[23.7W,42.ab],[23.9F,42.6x],[23.u,42.49],[23.3a,42.az],[23.cd,42.8U],[23.3w,42.8f],[23.9X,42.9E],[23.dZ,42.5m],[23.Q,42.6e],[23.7a,42.1N],[23.7d,42.3C],[23.6o,42.6X],[23.da,42.1h],[23.1f,42.54],[23.2U,42.aC],[23.6s,42.2T],[23.4H,42.8t],[23.17,42.eJ],[23.6U,42.4G],[23.2e,42.2Q],[23.2S,42.8m],[23.fM,42.fN],[23.4E,42.8x],[23.5j,42.ah],[23.aF,42.7],[23.50,42.4k],[23.3y,42.5e],[23.6r,42.7F],[23.9U,42.b7],[23.23,42.6G],[23.e5,42.1q],[23.S,42.1C],[23.cA,42.4x],[23.14,42.3u],[23.r,42.5a]],bV:[[26.B,42.4U],[26.aV,42.17],[26.4v,42.9m],[26.5R,42.8O],[26.ai,42.3m],[26.d2,42.A],[26.dB,42.7o],[26.51,42.H],[26.2P,41.5V],[26.4K,41.5o],[26.8v,41.87],[26.1H,41.1C],[26.T,41.1C],[26.36,41.5S],[26.3E,41.72],[26.1t,41.71],[26.27,41.4J],[26.6Z,41.cy],[26.fE,41.4l],[26.aK,41.1b],[26.p,41.dq],[26.40,41.1L],[26.aO,41.63],[26.du,41.u],[26.2e,41.w],[26.2e,41.2f],[26.4a,41.6n],[26.2t,41.6x],[26.3M,41.5l],[26.6h,41.69],[26.1P,41.3T],[25.3R,41.14],[25.5i,41.2n],[25.80,41.2R],[25.5C,41.39],[25.ef,41.dC],[25.i,41.o],[25.2H,41.5m],[25.1l,41.2E],[25.5K,41.5R],[25.bv,41.8t],[25.5Z,41.6A],[25.5Y,41.C],[25.3S,41.4j],[25.4m,41.1g],[25.68,41.7P],[25.3s,41.1g],[25.90,41.3s],[25.b2,41.4X],[25.cv,41.b7],[25.4s,41.8n],[25.55,41.E],[25.1z,41.bg],[25.T,41.g],[25.3r,41.8A],[25.39,41.1S],[25.2B,41.2C],[25.6b,41.1R],[25.1i,41.k],[25.2B,41.2Y],[25.a7,41.aX],[25.3T,42.4f],[25.2R,42.t],[25.1k,42.4S],[25.43,42.a5],[25.o,42.6u],[25.1z,42.6k],[25.3Y,42.n],[25.2i,42.9W],[25.6M,42.4a],[25.C,42.e9],[25.7z,42.ac],[25.b8,42.1p],[25.68,42.7O],[25.1b,42.e8],[25.dT,42.3m],[25.a1,42.1V],[25.83,42.p],[25.7v,42.60],[25.6f,42.1m],[25.3c,42.1D],[26.A,42.A],[26.dV,42.1E],[26.6h,42.al],[26.2t,42.4g],[26.16,42.3m],[26.3q,42.b5],[26.15,42.d4],[26.dW,42.6U],[26.2A,42.4M],[26.f9,42.5B],[26.aL,42.2e],[26.B,42.4U]],bT:[[25.2B,41.2C],[25.39,41.1S],[25.3r,41.8A],[25.T,41.g],[25.1z,41.bg],[25.55,41.E],[25.4s,41.8n],[25.cv,41.b7],[25.b2,41.4X],[25.90,41.3s],[25.3s,41.1g],[25.68,41.7P],[25.4m,41.1g],[25.3S,41.4j],[25.5Y,41.C],[25.5Z,41.6A],[25.bv,41.8t],[25.5K,41.5R],[25.1l,41.2E],[25.2H,41.5m],[25.i,41.o],[25.ef,41.dC],[25.5C,41.39],[25.80,41.2R],[25.5i,41.2n],[25.4x,41.9e],[25.8C,41.2j],[25.8A,41.d0],[25.5d,41.2L],[25.3z,41.1A],[25.6A,41.2p],[25.N,41.6B],[25.9i,41.6C],[25.6w,41.1i],[25.2w,41.dO],[25.9P,41.25],[25.3d,41.7l],[25.9k,41.27],[25.dY,41.3f],[25.7O,41.32],[25.5r,41.32],[25.16,41.9J],[25.aM,41.cS],[25.2t,41.2a],[25.2G,41.1c],[25.6U,41.D],[25.9R,41.2E],[25.9I,41.3w],[25.60,41.6X],[25.6u,41.a0],[25.1V,41.3w],[25.3K,41.5O],[25.aT,41.6W],[25.1X,41.4A],[25.5A,41.7c],[25.4E,41.cO],[25.1a,41.3z],[25.dK,41.67],[25.1m,41.3n],[25.1o,41.a6],[25.7I,41.1M],[25.1p,41.de],[25.n,41.3I],[25.bl,41.83],[25.2A,41.b6],[25.2b,41.6E],[25.1i,41.k],[25.6b,41.1R],[25.2B,41.2C]],bO:[[22.9i,42.1n],[22.53,42.z],[22.u,42.1L],[22.f8,42.4i],[22.1K,42.cL],[22.3j,42.f5],[22.f2,42.2i],[22.V,42.ab],[22.V,42.5f],[22.E,42.aS],[22.5t,42.a3],[22.3W,42.1e],[22.82,42.ew],[22.ap,42.aI],[22.4C,42.3E],[22.92,42.6H],[22.I,42.2w],[22.b1,42.q],[22.M,42.6y],[23.1T,42.6z],[23.O,42.3V],[23.1,42.4d],[23.4E,42.q],[23.2X,42.2m],[23.2J,42.6I],[23.23,42.2m],[23.8q,42.9C],[23.2j,42.69],[23.9C,42.2p],[23.aQ,42.3d],[23.1Q,42.9L],[23.4o,42.25],[23.2D,42.6S],[23.2B,42.G],[23.8d,42.e0],[23.cX,42.1I],[23.1x,42.3q],[23.5,42.av],[23.2E,42.1o],[23.9B,42.1y],[23.7a,42.2N],[23.r,42.O],[23.6B,42.8E],[23.7Y,42.7f],[23.6i,42.4S],[23.60,42.1P],[23.cr,42.4g],[23.H,42.p],[22.9w,42.dx],[22.3J,42.2Z],[22.3N,42.9M],[22.9,42.j],[22.k,42.cw],[22.2z,42.4W],[22.3l,42.6g],[22.eh,42.3L],[22.cG,42.cI],[22.7z,42.cz],[22.cL,42.5A],[22.1h,42.5Q],[22.ds,42.6i],[22.T,42.cZ],[22.3r,42.6j],[22.6J,42.28],[22.39,42.d0],[22.1c,42.14],[22.6F,42.4d],[22.7E,42.49],[22.dn,42.o],[22.2f,42.ec],[22.cT,42.55],[22.3r,42.7b],[22.70,42.2K],[22.8U,42.90],[22.6F,42.6d],[22.9i,42.1n]],bQ:[[25.93,43.9e],[25.2t,43.dl],[25.2S,43.8q],[25.h,43.4M],[25.7G,43.9G],[25.5j,43.18],[25.p,43.19],[25.7L,43.3o],[24.F,43.2b],[24.J,43.2u],[24.2k,43.9G],[24.J,43.aD],[24.4w,43.93],[24.80,43.12],[24.2d,43.8c],[24.7e,43.j],[24.I,43.j],[24.bB,43.1T],[24.6E,42.aW],[24.cR,42.97],[24.88,42.3v],[24.7g,42.1w],[24.fK,42.a8],[24.bH,42.5Z],[24.M,42.1S],[25.2F,42.2C],[25.4e,42.8n],[25.20,42.m],[25.fc,42.m],[24.K,42.72],[24.8w,42.bf],[24.4x,42.6v],[24.3W,42.E],[24.6c,42.4m],[24.7,42.73],[24.8G,42.1M],[24.2Q,42.g],[24.u,42.g],[24.5b,42.4Y],[24.2E,42.Y],[24.9V,42.8i],[24.41,42.6p],[24.4I,42.s],[24.6B,42.76],[24.3k,42.4r],[24.ej,42.8j],[24.2e,42.l],[24.4a,42.ed],[24.2S,42.cu],[24.7G,42.I],[24.4h,42.7y],[24.2Z,43.4W],[24.O,43.1J],[24.2v,43.7D],[24.9l,43.aU],[23.9s,43.4F],[23.98,43.8E],[23.F,43.ay],[24.6g,43.1p],[24.1P,43.b5],[24.1V,43.h],[24.1V,43.2J],[24.50,43.9k],[24.1D,43.2b],[24.12,43.bj],[24.6i,43.1f],[24.fj,43.6Q],[24.2L,43.fi],[24.au,43.6C],[24.v,43.3f],[24.2l,43.9T],[24.8z,43.8N],[24.2r,43.3p],[24.58,43.1B],[24.6d,43.23],[24.3j,43.fa],[24.cG,43.8q],[24.9g,43.f0],[24.78,43.8a],[24.8C,43.at],[24.k,43.1A],[24.4O,43.4B],[24.5F,43.7S],[24.F,43.aJ],[25.4q,43.35],[25.7w,43.3F],[25.1Y,43.ar],[25.p,43.1e],[25.1D,43.4o],[25.4h,43.1v],[25.93,43.9e]],bX:[[23.5f,43.5h],[23.ch,43.3Z],[23.55,43.bC],[23.2q,43.1l],[23.3s,43.5I],[23.eZ,43.5e],[23.59,43.67],[23.f1,43.b0],[23.N,43.1K],[23.1Z,43.2T],[23.5G,43.5T],[23.z,43.5b],[23.be,43.5R],[23.3a,43.9E],[23.3Y,43.2f],[23.5u,43.1F],[23.3r,43.9V],[23.W,43.6L],[23.1Q,43.X],[23.4c,43.2w],[23.3V,43.1u],[23.2j,43.1t],[23.3A,43.8I],[23.aA,43.27],[23.a3,43.3O],[23.7C,43.26],[23.46,43.2u],[23.43,43.5B],[23.1Q,43.fe],[23.2l,43.9m],[23.3V,43.4U],[23.14,43.13],[23.6T,43.12],[23.6s,43.6k],[23.9h,43.1m],[23.dX,43.9I],[23.5v,43.17],[23.3L,43.G],[22.9b,43.19],[22.bh,43.2A],[22.3g,43.4M],[22.1R,43.3O],[22.ft,43.cF],[22.3B,43.3A],[22.9g,43.38],[22.2s,43.az],[22.1d,43.c9],[22.Y,43.3e],[22.eK,43.7r],[22.3u,43.55],[22.3N,43.eM],[22.7n,43.1n],[22.7n,43.3j],[22.2d,43.9c],[22.3t,43.L],[23.2O,43.7],[23.j,43.V],[23.7w,43.8Y],[23.R,43.fP],[22.J,43.7Q],[22.8l,43.7R],[22.99,43.8F],[23.1T,43.3h],[23.8T,43.l],[23.7K,43.l],[23.5Q,43.5w],[23.G,43.bw],[23.7l,43.5Y],[23.31,43.5h],[23.8d,43.5h],[23.cs,43.86],[23.5f,43.5h]],c4:[[24.dm,42.4Q],[24.a9,42.6A],[24.au,42.el],[24.v,42.cW],[24.5g,42.9t],[24.41,42.7q],[24.1e,42.5],[24.3F,42.47],[24.6z,42.T],[24.X,42.5g],[24.2a,42.6J],[24.4y,42.1u],[24.3H,42.2D],[24.cH,42.1t],[24.2W,42.8M],[24.6P,42.6Z],[24.6F,42.4P],[24.cJ,42.9R],[24.8f,42.9W],[24.45,42.8O],[24.Q,42.6r],[24.7N,42.7s],[24.3H,42.5W],[24.46,41.3R],[24.43,41.9j],[24.6t,41.8o],[24.q,41.3g],[24.9H,41.3Z],[24.32,41.5S],[24.32,41.3S],[24.8e,41.1M],[24.9x,41.4l],[24.6b,41.3U],[24.3b,41.4b],[24.2A,41.m],[24.6K,41.4b],[24.5X,41.1b],[24.1,41.9S],[24.9a,41.4X],[24.20,41.aG],[23.aq,41.ax],[23.5F,41.7Q],[23.2Y,41.7R],[23.89,41.fA],[23.85,41.5M],[23.5w,41.7t],[23.Y,41.a8],[23.bp,41.cD],[23.1M,41.5V],[23.9f,41.99],[23.81,42.4q],[23.79,42.aa],[23.cg,42.8c],[23.4r,42.aO],[23.2s,42.dd],[23.1j,42.4Z],[23.2C,42.1I],[23.2H,42.5E],[23.87,42.3b],[23.9,42.S],[23.b1,42.6j],[23.3c,42.6q],[23.K,42.3f],[23.2o,42.6m],[23.7e,42.1u],[23.3R,42.3V],[24.7L,42.1k],[24.7s,42.8K],[24.7s,42.6e],[24.7A,42.7B],[23.7i,42.Q],[23.I,42.3e],[23.8o,42.9y],[23.5L,42.aC],[23.5V,42.3G],[24.2M,42.e2],[24.fp,42.55],[24.5X,42.N],[24.9h,42.dN],[24.3k,42.dU],[24.dm,42.4Q]],c6:[[22.77,42.4L],[22.1d,42.ct],[22.86,42.2H],[22.7x,42.aH],[22.8w,42.78],[22.a4,42.5z],[22.5s,42.6D],[23.3y,42.5e],[23.50,42.4k],[23.aF,42.7],[23.5j,42.ah],[23.4E,42.8x],[23.fM,42.fN],[23.2S,42.8m],[23.2e,42.2Q],[23.6U,42.4G],[23.17,42.eJ],[23.4H,42.8t],[23.6s,42.2T],[23.2U,42.aC],[23.1f,42.54],[23.da,42.1h],[23.af,42.1x],[23.2U,42.2l],[23.23,42.2m],[23.2J,42.6I],[23.2X,42.2m],[23.4E,42.q],[23.1,42.4d],[23.O,42.3V],[23.1T,42.6z],[22.M,42.6y],[22.b1,42.q],[22.I,42.2w],[22.92,42.6H],[22.4C,42.3E],[22.ap,42.aI],[22.82,42.ew],[22.3W,42.1e],[22.5t,42.a3],[22.E,42.aS],[22.V,42.5f],[22.V,42.ab],[22.f2,42.2i],[22.3j,42.f5],[22.1K,42.cL],[22.f8,42.4i],[22.u,42.1L],[22.53,42.z],[22.9i,42.1n],[22.6F,42.6d],[22.8U,42.90],[22.1N,42.8Q],[22.2c,42.1b],[22.D,42.s],[22.cX,42.1d],[22.cT,42.bD],[22.3x,42.86],[22.58,42.cR],[22.b8,42.6Y],[22.1b,42.ce],[22.8Y,42.i],[22.77,42.4L]],c2:[[24.2r,43.g],[24.6,43.4r],[24.bL,43.E],[24.73,43.8H],[24.U,43.7u],[24.85,43.3U],[24.3N,43.bI],[24.bH,43.s],[25.3K,43.7m],[25.bE,43.V],[25.8O,43.4p],[25.9u,43.5c],[25.2,43.7h],[25.bs,43.8m],[25.2u,43.1n],[25.5E,43.1Z],[25.aN,43.w],[25.5y,43.52],[25.5y,43.1z],[25.2J,43.D],[25.h,43.5u],[25.n,43.70],[25.fv,43.1c],[25.3b,43.70],[25.aR,43.v],[25.26,43.aQ],[25.3O,43.8B],[25.2U,43.9p],[25.2t,43.dl],[25.93,43.9e],[25.4h,43.1v],[25.1D,43.4o],[25.p,43.1e],[25.1Y,43.ar],[25.7w,43.3F],[25.4q,43.35],[24.F,43.aJ],[24.5F,43.7S],[24.4O,43.4B],[24.k,43.1A],[24.8C,43.at],[24.78,43.8a],[24.9g,43.f0],[24.cG,43.8q],[24.3j,43.fa],[24.6d,43.23],[24.58,43.1B],[24.2r,43.3p],[24.8z,43.8N],[24.2l,43.9T],[24.v,43.3f],[24.au,43.6C],[24.2L,43.fi],[24.fj,43.6Q],[24.6i,43.1f],[24.12,43.bj],[24.1D,43.2b],[24.50,43.9k],[24.1Y,43.1B],[23.aW,43.1B],[23.97,43.ez],[23.3t,43.3O],[23.K,43.6T],[23.cb,43.at],[23.5n,43.7U],[24.bd,43.4I],[24.8T,43.41],[24.eI,43.X],[24.bE,43.D],[24.1J,43.o],[24.A,43.cC],[24.3y,43.w],[24.1X,43.4G],[24.4F,43.z],[24.1m,43.2Q],[24.13,43.7P],[24.19,43.62],[24.9u,43.4X],[24.8I,43.8x],[24.2L,43.eU],[24.1v,43.1r],[24.4c,43.4b],[24.4y,43.8J],[24.51,43.78],[24.2r,43.g]],c0:[[24.5b,42.4Y],[24.u,42.g],[24.2Q,42.g],[24.8G,42.1M],[24.7,42.73],[24.6c,42.4m],[24.3W,42.E],[24.4x,42.6v],[24.8w,42.bf],[24.K,42.72],[25.fc,42.m],[25.20,42.m],[25.4g,42.9S],[25.t,42.9Q],[25.1T,42.et],[25.co,42.eq],[25.1J,42.5b],[25.1D,42.9N],[25.3M,42.7Z],[25.19,42.9N],[25.6s,42.7Z],[25.2b,42.D],[25.2,42.7N],[25.21,42.cP],[25.7l,42.7d],[25.3p,42.r],[25.aR,42.10],[25.4a,42.4c],[25.n,42.q],[25.3M,42.2n],[25.2J,42.9T],[25.em,42.S],[25.3o,42.ad],[25.9U,42.6l],[25.5j,42.23],[25.40,42.cU],[25.9A,42.6K],[25.2G,42.n],[25.en,42.15],[25.b4,42.h],[25.cF,42.4U],[25.eo,42.8V],[25.1k,42.4S],[25.2R,42.t],[25.3T,42.4f],[25.a7,41.aX],[25.2B,41.2Y],[25.1i,41.k],[25.2b,41.6E],[25.2A,41.b6],[25.bl,41.83],[25.n,41.3I],[25.1p,41.de],[25.aP,41.8F],[25.7w,41.7t],[24.5P,41.81],[24.a4,41.5K],[24.3c,41.E],[24.7y,41.3U],[24.6f,41.7m],[24.1w,41.7u],[24.5C,41.L],[24.84,41.1O],[24.1l,41.72],[24.bi,41.8J],[24.3h,41.1q],[24.U,41.3S],[24.g,41.aH],[24.3I,41.2z],[24.dp,41.3u],[24.4m,41.i],[24.L,41.k],[24.63,41.9z],[24.57,41.i],[24.2i,41.3i],[24.ai,41.92],[24.8X,41.2x],[24.43,41.9j],[24.46,41.3R],[24.3H,42.5W],[24.7N,42.7s],[24.Q,42.6r],[24.45,42.8O],[24.8f,42.9W],[24.cJ,42.9R],[24.6F,42.4P],[24.6P,42.6Z],[24.2W,42.8M],[24.cH,42.1t],[24.3H,42.2D],[24.4y,42.1u],[24.2a,42.6J],[24.X,42.5g],[24.6z,42.T],[24.3F,42.47],[24.1e,42.5],[24.41,42.7q],[24.5g,42.9t],[24.6L,42.cx],[24.4v,42.7b],[24.3e,42.4s],[24.43,42.63],[24.2I,42.2y],[24.7X,42.71],[24.4I,42.s],[24.41,42.6p],[24.9V,42.8i],[24.2E,42.Y],[24.5b,42.4Y]],cp:[[26.44,43.P],[26.5f,43.aB],[26.3e,43.5o],[26.2i,43.5i],[26.3G,43.8P],[26.br,43.2Y],[26.1L,43.k],[26.1O,43.4C],[26.71,43.aZ],[26.75,43.6a],[26.g,43.5a],[26.3X,43.2z],[26.9d,43.b6],[26.3g,43.1R],[26.3i,43.5M],[26.fG,43.1j],[26.7i,43.3B],[27.9l,43.4J],[27.2F,43.8r],[26.fO,43.b2],[26.97,43.C],[26.8P,43.4Q],[26.9Y,43.1n],[26.4u,43.1n],[26.6E,43.2K],[26.1R,43.7b],[26.81,43.w],[26.8k,43.2r],[26.2z,43.1F],[26.83,43.7r],[26.4Y,43.5],[26.7R,43.9X],[26.s,43.6n],[26.1U,43.6w],[26.Y,43.aS],[26.1l,43.30],[26.1q,43.2w],[26.4b,43.r],[26.3n,43.1k],[26.7h,43.eb],[26.2y,43.a7],[26.C,43.dM],[26.7W,43.2m],[26.w,43.1k],[26.53,43.4o],[26.1x,43.2m],[26.3Q,43.1u],[26.7B,43.6m],[26.1N,43.3d],[26.49,43.6b],[26.q,43.8I],[26.5x,43.ag],[26.9H,43.2j],[26.9J,43.5H],[26.7X,43.2I],[26.X,43.5l],[26.Q,43.5g],[26.46,43.ek],[26.6w,43.3H],[26.4d,43.6e],[26.aY,43.4v],[26.9P,43.3x],[26.9p,43.54],[26.6C,43.1G],[26.b4,43.eu],[26.5B,43.5T],[26.aw,43.b3],[26.aM,43.2P],[26.8V,43.di],[26.a2,43.1Z],[26.cz,43.4z],[26.1y,43.5G],[26.1J,43.3s],[26.9M,43.8m],[26.5r,43.2y],[26.2S,43.eF],[26.eD,43.7j],[26.eE,43.bL],[26.28,43.8p],[26.3,43.64],[26.6I,43.cQ],[26.1c,43.3j],[26.eW,43.65],[26.ff,43.7j],[26.55,43.V],[26.5O,43.m],[26.b3,43.2s],[26.46,43.Y],[26.ca,43.l],[26.q,43.5M],[26.1u,43.3I],[26.2p,43.3I],[26.6q,43.9n],[26.6Q,43.am],[26.6Z,43.1S],[26.fb,43.aZ],[26.4B,43.4L],[26.as,43.k],[26.35,43.3v],[26.B,43.P],[26.44,43.P]],bP:[[26.5l,44.H],[26.r,43.97],[26.B,43.P],[26.35,43.3v],[26.as,43.k],[26.4B,43.4L],[26.fb,43.aZ],[26.6Z,43.1S],[26.6Q,43.am],[26.6q,43.9n],[26.2p,43.3I],[26.1u,43.3I],[26.q,43.5M],[26.ca,43.l],[26.46,43.Y],[26.b3,43.2s],[26.5O,43.m],[26.55,43.V],[26.ff,43.7j],[26.eW,43.65],[26.1c,43.3j],[26.6I,43.cQ],[26.3,43.64],[26.28,43.8p],[26.eE,43.bL],[26.eD,43.7j],[26.2S,43.eF],[26.5r,43.2y],[26.9M,43.8m],[26.1J,43.3s],[26.1y,43.5G],[26.cz,43.4z],[26.a2,43.1Z],[26.8V,43.di],[26.40,43.cV],[26.5v,43.7q],[26.20,43.2c],[26.1E,43.45],[25.5P,43.7a],[25.2k,43.8K],[25.K,43.4c],[26.5W,43.38],[26.3L,43.aI],[26.2F,43.1v],[25.P,43.9Z],[25.7H,43.4I],[25.3i,43.37],[25.84,43.r],[25.3W,43.3F],[25.8i,43.10],[25.3U,43.dL],[25.bK,43.41],[25.1O,43.bk],[25.2Q,43.8K],[25.4A,43.43],[25.bq,43.o],[25.u,43.2f],[25.5T,43.2f],[25.6N,43.9O],[25.1h,43.5G],[25.1F,43.9F],[25.5m,43.2y],[25.1G,43.8x],[25.C,43.L],[25.8W,43.4k],[25.73,43.71],[25.8A,43.2V],[25.eC,43.1j],[25.7v,43.eB],[25.8D,43.8C],[25.8P,43.bF],[25.8R,43.bG],[26.4e,43.bt],[26.8u,43.4D],[26.7G,44.4f],[26.bs,44.bb],[26.1f,44.ey],[26.1A,44.1X],[26.2D,44.t],[26.3T,44.1Y],[26.5l,44.H]],c8:[[27.12,43.dj],[27.7V,43.8h],[27.2X,43.ah],[27.2,43.5p],[27.d8,43.9c],[27.26,43.eH],[27.4B,43.8p],[27.2n,43.6d],[27.34,43.z],[27.1e,43.9Q],[27.44,43.4N],[27.2a,43.dv],[27.ev,43.7p],[27.33,43.9K],[27.5H,43.3Y],[27.dz,43.47],[27.69,43.Q],[27.dA,43.41],[27.1t,43.38],[27.aJ,43.3E],[27.1A,43.ag],[27.aE,43.as],[27.7M,43.3f],[27.8M,43.9L],[27.4B,43.3k],[27.dJ,43.dD],[27.1f,43.aw],[27.dI,43.6K],[27.19,43.7V],[27.G,43.dt],[27.3b,43.7I],[27.1f,43.1V],[27.8y,43.t],[27.4Z,43.4g],[27.aj,43.3L],[27.3m,43.2F],[27.4h,42.3R],[27.1a,42.F],[27.8Z,42.2o],[27.7f,42.3J],[27.1P,42.8w],[27.2M,42.fn],[26.5s,42.3v],[26.2o,42.7H],[26.cM,42.8S],[26.84,42.7H],[26.3S,42.4w],[26.s,42.92],[26.5c,42.8D],[26.1W,42.94],[26.58,42.4O],[26.9t,42.94],[26.2P,42.4n],[26.57,42.db],[26.1K,43.bz],[26.z,43.1J],[26.3P,43.bc],[26.3D,43.40],[26.L,43.6k],[26.3D,43.h],[26.4R,43.G],[26.2V,43.3p],[26.U,43.6l],[26.1q,43.ee],[26.4l,43.ea],[26.74,43.6m],[26.1j,43.6H],[26.1q,43.2w],[26.1l,43.30],[26.Y,43.aS],[26.1U,43.6w],[26.s,43.6n],[26.7R,43.9X],[26.4Y,43.5],[26.83,43.7r],[26.2z,43.1F],[26.8k,43.2r],[26.81,43.w],[26.1R,43.7b],[26.6E,43.2K],[26.4u,43.1n],[26.9Y,43.1n],[26.8P,43.4Q],[26.97,43.C],[26.fO,43.b2],[27.2F,43.8r],[27.9l,43.4J],[27.t,43.8H],[27.9a,43.ax],[27.12,43.dj]],bR:[[27.dc,44.9o],[27.n,44.n],[27.1I,44.eQ],[27.1f,44.eP],[27.7M,44.4S],[27.2L,44.7K],[27.v,44.7L],[27.7B,44.2M],[27.1H,44.7A],[27.be,44.bd],[27.1K,44.7o],[27.eN,43.3c],[27.8W,43.5n],[27.1W,43.K],[27.1g,43.2k],[27.4z,43.2d],[27.4z,43.2x],[27.N,43.8g],[27.6N,43.91],[27.3x,43.5N],[27.a0,43.an],[27.7J,43.85],[27.45,43.5C],[27.30,43.85],[27.4o,43.fx],[27.9x,43.am],[27.aE,43.g],[27.8y,43.3B],[27.6S,43.7F],[27.6l,43.fy],[27.d8,43.9c],[27.2,43.5p],[27.2X,43.ah],[27.7V,43.8h],[27.12,43.dj],[27.9a,43.ax],[27.t,43.8H],[27.9l,43.4J],[26.7i,43.3B],[26.fG,43.1j],[26.3i,43.5M],[26.3g,43.1R],[26.9d,43.b6],[26.3X,43.2z],[26.g,43.5a],[26.75,43.6a],[26.71,43.aZ],[26.1O,43.4C],[26.1L,43.k],[26.br,43.2Y],[26.3G,43.8P],[26.2i,43.5i],[26.3e,43.5o],[26.5f,43.aB],[26.44,43.P],[26.B,43.P],[26.r,43.97],[26.5l,44.H],[26.3T,44.1Y],[26.2D,44.t],[26.1Q,44.1P],[26.8X,44.2N],[26.5,44.O],[26.2K,44.7D],[26.eA,44.9q],[26.bf,44.7I],[26.bg,44.Z],[26.l,44.11],[26.eS,44.7O],[26.bh,44.h],[26.M,44.h],[27.dc,44.9o]],cm:[[26.36,43.j],[26.2I,43.8b],[26.bn,43.3K],[26.5u,43.1E],[26.2c,43.aT],[26.6N,43.7k],[26.55,43.4q],[26.57,42.db],[26.2P,42.4n],[26.9t,42.94],[26.58,42.4O],[26.4A,42.5N],[26.7c,42.1C],[26.1g,42.3h],[26.1O,42.6c],[26.5q,42.5d],[26.3D,42.eL],[26.67,42.8r],[26.3P,42.6V],[26.2q,42.C],[26.4K,42.6M],[26.51,42.u],[26.3H,42.56],[26.42,42.3G],[26.10,42.55],[26.cN,42.1h],[26.1v,42.1x],[26.6T,42.4T],[26.24,42.ex],[26.1B,42.T],[26.6S,42.6t],[26.4H,42.X],[26.1I,42.4],[26.7Y,42.v],[26.6Q,42.B],[26.8N,42.3E],[26.3p,42.8e],[26.4P,42.ao],[26.1I,42.1i],[26.2G,42.24],[26.8Z,42.6j],[26.4h,42.dS],[26.7K,42.25],[26.1X,42.7M],[26.6g,42.1i],[26.R,42.dR],[25.5F,42.14],[25.95,42.3T],[25.9j,42.10],[25.9Y,42.49],[25.89,42.aV],[25.dQ,42.dP],[25.1w,42.ae],[25.i,42.7E],[25.i,42.w],[25.7n,42.2T],[25.9z,42.1g],[25.4C,42.3D],[25.6Y,42.3n],[25.85,42.5e],[25.84,42.7Q],[25.9d,42.3l],[25.bG,42.U],[25.8l,42.8j],[25.9s,42.4Y],[26.A,42.fC],[26.8u,42.5D],[26.8E,42.4u],[26.12,42.1w],[26.fD,42.2d],[26.4H,42.9w],[26.af,42.J],[26.ei,42.8R],[26.3d,43.4q],[26.29,43.A],[26.2D,43.j],[26.36,43.j]],bY:[[24.8X,41.2x],[24.ai,41.92],[24.2i,41.3i],[24.57,41.i],[24.63,41.9z],[24.L,41.k],[24.4m,41.i],[24.dp,41.3u],[24.3I,41.2z],[24.g,41.aH],[24.U,41.3S],[24.3h,41.1q],[24.bi,41.8J],[24.1l,41.72],[24.84,41.1O],[24.5C,41.L],[24.1w,41.7u],[24.6f,41.7m],[24.7y,41.3U],[24.3c,41.E],[24.a4,41.5K],[24.5P,41.81],[25.7w,41.7t],[25.aP,41.8F],[25.1p,41.de],[25.7I,41.1M],[25.1o,41.a6],[25.1m,41.3n],[25.dK,41.67],[25.1a,41.3z],[25.4E,41.cO],[25.5A,41.7c],[25.1X,41.4A],[25.aT,41.6W],[25.3K,41.5O],[25.1V,41.3w],[25.6u,41.a0],[25.60,41.6X],[25.9I,41.3w],[25.9R,41.2E],[25.6U,41.D],[25.2G,41.1c],[25.2t,41.2a],[25.aM,41.cS],[25.16,41.9J],[25.5r,41.32],[25.8u,41.6o],[25.20,41.7U],[24.K,41.aA],[24.dw,41.1Q],[24.d3,41.4d],[24.l,41.v],[24.g,41.2R],[24.6v,41.6y],[24.5p,41.6t],[24.e3,41.1c],[24.u,41.3C],[24.N,41.1H],[24.52,41.cW],[24.o,41.1G],[24.cB,41.d2],[24.v,41.cV],[24.cA,41.cC],[24.6q,41.55],[24.3k,41.55],[24.G,41.2r],[24.11,41.2P],[24.9q,41.53],[24.6u,41.do],[24.a2,41.4i],[24.11,41.4j],[24.9a,41.4X],[24.1,41.9S],[24.5X,41.1b],[24.6K,41.4b],[24.2A,41.m],[24.3b,41.4b],[24.6b,41.3U],[24.9x,41.4l],[24.8e,41.1M],[24.32,41.3S],[24.32,41.5S],[24.9H,41.3Z],[24.q,41.3g],[24.6t,41.8o],[24.43,41.9j],[24.8X,41.2x]],bU:[[23.9h,43.1m],[23.6s,43.6k],[23.6T,43.12],[23.14,43.13],[23.3V,43.4U],[23.2l,43.9m],[23.9B,43.2X],[23.3Y,43.15],[23.48,43.aK],[23.2c,43.1D],[23.9D,43.t],[23.54,43.1E],[23.3G,42.F],[23.eV,43.2O],[23.cE,43.1Y],[23.1b,43.1T],[23.3B,43.2v],[23.8F,43.aU],[23.ap,43.4e],[23.3N,43.4e],[23.97,43.al],[23.9s,43.4F],[24.9l,43.aU],[24.2v,43.7D],[24.O,43.1J],[24.2Z,43.4W],[24.4h,42.7y],[24.7G,42.I],[24.2S,42.cu],[24.4a,42.ed],[24.2e,42.l],[24.ej,42.8j],[24.3k,42.4r],[24.6B,42.76],[24.4I,42.s],[24.7X,42.71],[24.2I,42.2y],[24.43,42.63],[24.3e,42.4s],[24.4v,42.7b],[24.6L,42.cx],[24.5g,42.9t],[24.v,42.cW],[24.au,42.el],[24.a9,42.6A],[24.dm,42.4Q],[24.3k,42.dU],[24.9h,42.dN],[24.5X,42.N],[24.fp,42.55],[24.2M,42.e2],[23.5V,42.3G],[23.5L,42.aC],[23.8o,42.9y],[23.I,42.3e],[23.7i,42.Q],[24.7A,42.7B],[24.7s,42.6e],[24.7s,42.8K],[24.7L,42.1k],[23.3R,42.3V],[23.7e,42.1u],[23.2o,42.6m],[23.K,42.3f],[23.3c,42.6q],[23.b1,42.6j],[23.9,42.S],[23.87,42.3b],[23.2H,42.5E],[23.2C,42.1I],[23.1j,42.4Z],[23.7F,42.e1],[23.72,42.aj],[23.68,42.16],[23.3z,42.ac],[23.2K,42.5r],[23.55,42.2Z],[23.2E,42.1o],[23.5,42.av],[23.1x,42.3q],[23.cX,42.1I],[23.8d,42.e0],[23.2B,42.G],[23.2D,42.6S],[23.4o,42.25],[23.1Q,42.9L],[23.aQ,42.3d],[23.9C,42.2p],[23.2j,42.69],[23.8q,42.9C],[23.23,42.2m],[23.2U,42.2l],[23.af,42.1x],[23.da,42.1h],[23.6o,42.6X],[23.7d,42.3C],[23.7a,42.1N],[23.Q,42.6e],[23.dZ,42.5m],[23.9X,42.9E],[23.3w,42.8f],[23.cd,42.8U],[23.3a,42.az],[23.u,42.49],[23.9F,42.6x],[23.7W,42.ab],[23.9O,42.53],[23.e4,42.8t],[23.N,42.1g],[23.2i,42.1L],[23.9K,42.e7],[23.1G,42.e6],[23.6M,42.5q],[23.2q,42.5c],[23.C,42.6D],[23.1W,42.1q],[23.4j,42.1R],[23.7P,42.84],[23.4K,42.bu],[23.bo,42.6a],[23.1z,42.6Y],[23.3Q,42.d3],[23.7T,42.bw],[23.r,42.5a],[23.14,42.3u],[23.cA,42.4x],[23.S,42.1C],[23.e5,42.1q],[23.23,42.6G],[23.9U,42.b7],[23.6r,42.7F],[23.3y,42.5e],[22.5s,42.6D],[22.a4,42.5z],[22.8w,42.78],[22.7x,42.aH],[22.86,42.2H],[22.1d,42.ct],[22.77,42.4L],[22.8Y,42.i],[22.77,42.2o],[22.bC,42.8R],[22.4u,43.2v],[22.4D,43.1a],[22.9b,43.19],[23.3L,43.G],[23.5v,43.17],[23.dX,43.9I],[23.9h,43.1m]],c5:[[25.9n,42.3l],[25.8k,42.1d],[25.9d,42.3l],[25.84,42.7Q],[25.85,42.5e],[25.6Y,42.3n],[25.4C,42.3D],[25.9z,42.1g],[25.7n,42.2T],[25.i,42.w],[25.i,42.7E],[25.1w,42.ae],[25.dQ,42.dP],[25.89,42.aV],[25.9Y,42.49],[25.9j,42.10],[25.95,42.3T],[25.5F,42.14],[26.R,42.dR],[26.6g,42.1i],[26.1X,42.7M],[26.7K,42.25],[26.4h,42.dS],[26.8Z,42.6j],[26.2G,42.24],[26.2A,42.4M],[26.dW,42.6U],[26.15,42.d4],[26.3q,42.b5],[26.16,42.3m],[26.2t,42.4g],[26.6h,42.al],[26.dV,42.1E],[26.A,42.A],[25.3c,42.1D],[25.6f,42.1m],[25.7v,42.60],[25.83,42.p],[25.a1,42.1V],[25.dT,42.3m],[25.1b,42.e8],[25.68,42.7O],[25.b8,42.1p],[25.7z,42.ac],[25.C,42.e9],[25.6M,42.4a],[25.2i,42.9W],[25.3Y,42.n],[25.1z,42.6k],[25.o,42.6u],[25.43,42.a5],[25.1k,42.4S],[25.eo,42.8V],[25.cF,42.4U],[25.b4,42.h],[25.en,42.15],[25.2G,42.n],[25.9A,42.6K],[25.40,42.cU],[25.5j,42.23],[25.9U,42.6l],[25.3o,42.ad],[25.em,42.S],[25.2J,42.9T],[25.3M,42.2n],[25.n,42.q],[25.4a,42.4c],[25.aR,42.10],[25.3p,42.r],[25.7l,42.7d],[25.21,42.cP],[25.2,42.7N],[25.2b,42.D],[25.6s,42.7Z],[25.19,42.9N],[25.3M,42.7Z],[25.1D,42.9N],[25.1J,42.5b],[25.co,42.eq],[25.1T,42.et],[25.t,42.9Q],[25.4g,42.9S],[25.20,42.m],[25.p,42.m],[25.6r,42.8H],[25.17,42.5I],[25.G,42.1U],[25.aN,42.a1],[25.S,42.6p],[25.a9,42.E],[25.2R,42.6D],[25.6z,42.m],[25.4y,42.a6],[25.2W,42.E],[25.8z,42.6p],[25.ae,42.2s],[25.1F,42.5I],[25.9y,42.74],[25.1Z,42.6G],[25.1K,42.1U],[25.66,42.4m],[25.5p,42.75],[25.4R,42.77],[25.8i,42.5t],[25.9n,42.3l]],cq:[[26.9p,43.54],[26.9P,43.3x],[26.aY,43.4v],[26.4d,43.6e],[26.6w,43.3H],[26.46,43.ek],[26.Q,43.5g],[26.X,43.5l],[26.7X,43.2I],[26.9J,43.5H],[26.9H,43.2j],[26.5x,43.ag],[26.q,43.8I],[26.49,43.6b],[26.1N,43.3d],[26.7B,43.6m],[26.3Q,43.1u],[26.1x,43.2m],[26.53,43.4o],[26.w,43.1k],[26.7W,43.2m],[26.C,43.dM],[26.2y,43.a7],[26.7h,43.eb],[26.3n,43.1k],[26.4b,43.r],[26.1q,43.2w],[26.1j,43.6H],[26.74,43.6m],[26.4l,43.ea],[26.1q,43.ee],[26.U,43.6l],[26.2V,43.3p],[26.4R,43.G],[26.3D,43.h],[26.L,43.6k],[26.3D,43.40],[26.3P,43.bc],[26.z,43.1J],[26.1K,43.bz],[26.57,42.db],[26.55,43.4q],[26.6N,43.7k],[26.2c,43.aT],[26.5u,43.1E],[26.bn,43.3K],[26.2I,43.8b],[26.36,43.j],[26.2D,43.j],[26.29,43.A],[26.3d,43.4q],[26.ei,42.8R],[26.af,42.J],[26.4H,42.9w],[26.aD,42.F],[26.ay,43],[26.3M,43.7A],[26.eR,43.50],[26.aF,43.Z],[26.Z,43.9o],[26.1,43.8L],[26.4E,43.1B],[26.6h,43.24],[26.1y,43.ak],[26.1o,43.ao],[26.1y,43.8a],[26.2F,43.1v],[26.3L,43.aI],[26.5W,43.38],[25.K,43.4c],[25.2k,43.8K],[25.5P,43.7a],[26.1E,43.45],[26.20,43.2c],[26.5v,43.7q],[26.40,43.cV],[26.8V,43.di],[26.aM,43.2P],[26.aw,43.b3],[26.5B,43.5T],[26.b4,43.eu],[26.6C,43.1G],[26.9p,43.54]],c3:[[27.4T,43.4G],[27.6X,43.6W],[27.7r,43.7p],[27.1H,43.9D],[27.7c,43.cK],[27.61,43.1h],[27.1W,43.cc],[27.4k,43.6n],[27.6v,43.1N],[27.8J,43.X],[27.2C,43.5U],[27.8k,43.37],[27.4L,43.aY],[27.k,43.5x],[27.5i,43.7d],[27.3t,43.B],[28.2M,43.14],[28.2v,43.2p],[28.8b,43.2u],[27.2Y,43.2],[27.3J,43.bl],[27.80,43.1a],[27.fq,43.8c],[27.89,43.A],[27.bm,42.M],[27.fs,42.bM],[27.bN,42.ce],[27.i,42.2H],[27.1d,42.82],[27.bI,42.3Z],[27.aG,42.89],[27.7j,42.bN],[27.4A,42.8g],[27.1F,42.7g],[27.3Q,42.7g],[27.ar,42.4O],[27.2I,42.8S],[27.32,42.J],[27.2U,42.98],[27.16,42.7e],[27.8Z,42.2o],[27.1a,42.F],[27.4h,42.3R],[27.3m,43.2F],[27.aj,43.3L],[27.4Z,43.4g],[27.8y,43.t],[27.1f,43.1V],[27.3b,43.7I],[27.G,43.dt],[27.19,43.7V],[27.dI,43.6K],[27.1f,43.aw],[27.dJ,43.dD],[27.4B,43.3k],[27.8M,43.9L],[27.7M,43.3f],[27.aE,43.as],[27.1A,43.ag],[27.aJ,43.3E],[27.1t,43.38],[27.dA,43.41],[27.69,43.Q],[27.dz,43.47],[27.5H,43.3Y],[27.33,43.9K],[27.ev,43.7p],[27.2a,43.dv],[27.44,43.4N],[27.4T,43.4G]],bW:[[25.38,43.64],[25.8z,43.3P],[25.5m,43.2y],[25.1F,43.9F],[25.1h,43.5G],[25.6N,43.9O],[25.5T,43.2f],[25.u,43.2f],[25.bq,43.o],[25.4A,43.43],[25.2Q,43.8K],[25.1O,43.bk],[25.bK,43.41],[25.3U,43.dL],[25.8i,43.10],[25.3W,43.3F],[25.84,43.r],[25.3i,43.37],[25.7H,43.4I],[25.P,43.9Z],[26.2F,43.1v],[26.1y,43.8a],[26.1o,43.ao],[26.1y,43.ak],[26.6h,43.24],[26.4E,43.1B],[26.1,43.8L],[26.Z,43.9o],[26.aF,43.Z],[26.eR,43.50],[26.3M,43.7A],[26.ay,43],[26.aD,42.F],[26.4H,42.9w],[26.fD,42.2d],[26.12,42.1w],[26.8E,42.4u],[26.8u,42.5D],[26.A,42.fC],[25.9s,42.4Y],[25.8l,42.8j],[25.bG,42.U],[25.9d,42.3l],[25.8k,42.1d],[25.9n,42.3l],[25.8i,42.5t],[25.4R,42.77],[25.5p,42.75],[25.8p,42.1j],[25.2q,42.3X],[25.fJ,42.fI],[25.4j,42.fH],[25.6V,42.8g],[25.fz,42.5L],[25.1Z,42.8l],[25.7W,42.4n],[25.z,43.8b],[25.fr,43.7k],[25.1G,43.1Y],[25.7Z,43.aa],[25.1e,43.2N],[25.9Z,43.cI],[25.aL,43.aP],[25.3A,43.fo],[25.8a,43.1p],[25.1i,43.1o],[25.ad,43.a5],[25.8L,43.9A],[25.15,43.7V],[25.5Q,43.3q],[25.5j,43.18],[25.7G,43.9G],[25.h,43.4M],[25.2S,43.8q],[25.2t,43.dl],[25.2U,43.9p],[25.3O,43.8B],[25.26,43.aQ],[25.aR,43.v],[25.3b,43.70],[25.fv,43.1c],[25.n,43.70],[25.h,43.5u],[25.2J,43.D],[25.5y,43.1z],[25.5y,43.52],[25.aN,43.w],[25.5E,43.1Z],[25.2u,43.1n],[25.bs,43.8m],[25.2,43.7h],[25.9u,43.5c],[25.8N,43.4p],[25.8M,43.8G],[25.33,43.8Q],[25.38,43.64]],bZ:[[22.4R,44.4P],[22.eY,44.cZ],[22.U,44.cU],[22.5S,44.2G],[22.3X,44.d1],[22.f4,44.d4],[22.by,44.3q],[22.5k,44.1a],[22.5J,44.11],[22.98,44.4V],[23.H,44.4V],[23.cr,44.Z],[23.4F,44.7D],[23.bz,44.7o],[22.ba,44.5W],[22.bA,44.1E],[22.2x,44.4f],[22.1w,43.5P],[22.bB,43.f6],[22.86,43.3v],[22.3Z,43.5L],[22.f7,43.by],[22.bx,43.5Z],[22.k,43.5D],[22.5o,43.bu],[22.3t,43.eX],[23.3K,43.bv],[23.8T,43.l],[23.1T,43.3h],[22.99,43.8F],[22.8l,43.7R],[22.J,43.7Q],[23.R,43.fP],[23.7w,43.8Y],[23.j,43.V],[23.2O,43.7],[22.3t,43.L],[22.2d,43.9c],[22.7n,43.3j],[22.7n,43.1n],[22.3N,43.eM],[22.3u,43.55],[22.eK,43.7r],[22.Y,43.3e],[22.1d,43.c9],[22.2s,43.az],[22.9g,43.38],[22.7h,43.cN],[22.3z,43.4],[22.4i,43.2l],[22.8s,43.1c],[22.cK,43.3C],[22.d5,43.D],[22.1H,43.o],[22.1z,43.cJ],[22.47,43.eO],[22.6P,43.6W],[22.1x,43.cY],[22.cH,43.6V],[22.6L,43.cQ],[22.cP,43.cE],[22.B,43.7],[22.6J,43.6G],[22.6H,43.U],[22.6I,43.l],[22.3F,43.ct],[22.10,43.cu],[22.cS,43.cD],[22.W,43.4w],[22.41,43.98],[22.cB,44.4W],[22.6P,44.fd],[22.3w,44.fg],[22.3a,44.7k],[22.d5,44.j],[22.fl,44.5v],[22.8s,44.1X],[22.4N,44.2N],[22.z,44.fk],[22.cY,44.5A],[22.9r,44.h],[22.3P,44.4Z],[22.66,44.3o],[22.3n,44.5y],[22.4R,44.4P]],ck:[[23.5k,43.76],[24.4f,43.1U],[24.t,43.m],[24.1a,43.1r],[24.bJ,43.5q],[24.5E,43.8h],[24.fh,43.bK],[24.1t,43.1r],[24.1v,43.1r],[24.2L,43.eU],[24.8I,43.8x],[24.9u,43.4X],[24.19,43.62],[24.13,43.7P],[24.1m,43.2Q],[24.4F,43.z],[24.1X,43.4G],[24.3y,43.w],[24.A,43.cC],[24.1J,43.o],[24.bE,43.D],[24.eI,43.X],[24.8T,43.41],[24.bd,43.4I],[23.5n,43.7U],[23.cb,43.at],[23.K,43.6T],[23.3t,43.3O],[23.97,43.ez],[23.aW,43.1B],[24.1Y,43.1B],[24.50,43.9k],[24.1V,43.2J],[24.1V,43.h],[24.1P,43.b5],[24.6g,43.1p],[23.F,43.ay],[23.98,43.8E],[23.9s,43.4F],[23.97,43.al],[23.3N,43.4e],[23.ap,43.4e],[23.8F,43.aU],[23.3B,43.2v],[23.1b,43.1T],[23.cE,43.1Y],[23.eV,43.2O],[23.3G,42.F],[23.54,43.1E],[23.9D,43.t],[23.2c,43.1D],[23.48,43.aK],[23.3Y,43.15],[23.9B,43.2X],[23.2l,43.9m],[23.1Q,43.fe],[23.43,43.5B],[23.46,43.2u],[23.7C,43.26],[23.a3,43.3O],[23.aA,43.27],[23.3A,43.8I],[23.2j,43.1t],[23.3V,43.1u],[23.4c,43.2w],[23.1Q,43.X],[23.W,43.6L],[23.3r,43.9V],[23.5u,43.1F],[23.3Y,43.2f],[23.3a,43.9E],[23.be,43.5R],[23.z,43.5b],[23.5G,43.5T],[23.1Z,43.2T],[23.N,43.1K],[23.f1,43.b0],[23.59,43.67],[23.eZ,43.5e],[23.3s,43.5I],[23.2q,43.1l],[23.8G,43.bD],[23.4p,43.3X],[23.s,43.5w],[23.g,43.3W],[23.5D,43.Y],[23.bm,43.5z],[23.5k,43.76]],c1:[[26.9f,42.9r],[26.5K,42.4Q],[26.f3,42.56],[26.5Y,42.3x],[26.88,42.3C],[26.bt,42.4T],[26.I,42.2a],[26.5N,42.W],[26.bx,42.q],[26.3u,42.5H],[26.8D,42.2j],[26.5J,42.ak],[26.bA,42.3o],[26.3J,42.d1],[26.aB,42.av],[27.2O,42.5X],[27.3y,42.dg],[27.R,42.j],[26.P,42.H],[26.2x,41.fw],[26.i,41.aq],[26.an,41.98],[26.5z,41.7i],[26.V,41.9b],[26.b0,41.4n],[26.4N,41.aX],[26.4K,41.5o],[26.2P,41.5V],[26.51,42.H],[26.dB,42.7o],[26.d2,42.A],[26.ai,42.3m],[26.5R,42.8O],[26.4v,42.9m],[26.aV,42.17],[26.B,42.4U],[26.aL,42.2e],[26.f9,42.5B],[26.2A,42.4M],[26.2G,42.24],[26.1I,42.1i],[26.4P,42.ao],[26.3p,42.8e],[26.8N,42.3E],[26.6Q,42.B],[26.7Y,42.v],[26.1I,42.4],[26.4H,42.X],[26.6S,42.6t],[26.1B,42.T],[26.24,42.ex],[26.6T,42.4T],[26.1v,42.1x],[26.cN,42.1h],[26.10,42.55],[26.42,42.3G],[26.3H,42.56],[26.51,42.u],[26.4K,42.6M],[26.2q,42.C],[26.3P,42.6V],[26.67,42.8r],[26.3D,42.eL],[26.5q,42.5d],[26.4J,42.cf],[26.9f,42.9r]],dk:[[27.d7,42.4V],[27.23,42.7f],[27.bJ,42.1y],[27.1p,42.Z],[27.3y,42.dg],[27.R,42.j],[26.P,42.H],[26.2x,41.fw],[26.i,41.aq],[26.an,41.98],[26.5z,41.7i],[26.V,41.9b],[26.b0,41.4n],[26.4N,41.aX],[26.4K,41.5o],[26.8v,41.87],[26.1H,41.1C],[26.T,41.1C],[26.36,41.5S],[26.3E,41.72],[26.1t,41.71],[26.27,41.4J],[26.6Z,41.cy],[26.fE,41.4l],[26.aK,41.1b],[26.p,41.dq],[26.40,41.1L],[26.aO,41.63],[26.du,41.u],[26.2e,41.w],[26.2e,41.2f],[26.4a,41.6n],[26.2t,41.6x],[26.3M,41.5l],[26.6h,41.69],[26.1P,41.3T],[25.3R,41.14],[25.5i,41.2n],[25.4x,41.9e],[25.8C,41.2j],[25.8A,41.d0],[25.5d,41.2L],[25.3z,41.1A],[25.6A,41.2p],[25.N,41.6B],[25.9i,41.6C],[25.6w,41.1i],[25.2w,41.dO],[25.9P,41.25],[25.3d,41.7l],[25.9k,41.27],[25.dY,41.3f],[25.7O,41.32],[25.5r,41.32],[25.8u,41.6o],[25.20,41.7U],[24.K,41.aA],[24.dw,41.1Q],[24.d3,41.4d],[24.l,41.v],[24.g,41.2R],[24.6v,41.6y],[24.5p,41.6t],[24.e3,41.1c],[24.u,41.3C],[24.N,41.1H],[24.52,41.cW],[24.o,41.1G],[24.cB,41.d2],[24.v,41.cV],[24.cA,41.cC],[24.6q,41.55],[24.3k,41.55],[24.G,41.2r],[24.11,41.2P],[24.9q,41.53],[24.O,41.2c],[24.2O,41.2W],[23.b9,41.7C],[23.bF,41.T],[23.l,41.6x],[23.cy,41.W],[23.8Q,41.2a],[23.cv,41.q],[23.4s,41.10],[23.w,41.1e],[23.D,41.W],[23.es,41.30],[23.3A,41.37],[23.27,41.6y],[23.2b,41.1k],[23.h,41.2B],[23.1m,41.7S],[23.cw,41.8B],[22.4t,41.6o],[22.5k,41.W],[22.2d,41.3Q],[22.4t,41.cx],[22.6f,41.cO],[22.J,41.67],[23.R,41.1r],[22.M,41.6c],[22.92,41.1l],[22.cM,41.86],[22.6a,41.7x],[22.85,41.96],[22.2z,42.4W],[22.3l,42.6g],[22.eh,42.3L],[22.cG,42.cI],[22.7z,42.cz],[22.cL,42.5A],[22.1h,42.5Q],[22.ds,42.6i],[22.T,42.cZ],[22.3r,42.6j],[22.6J,42.28],[22.39,42.d0],[22.1c,42.14],[22.6F,42.4d],[22.7E,42.49],[22.dn,42.o],[22.2f,42.ec],[22.cT,42.55],[22.3r,42.7b],[22.70,42.2K],[22.8U,42.90],[22.1N,42.8Q],[22.2c,42.1b],[22.D,42.s],[22.cX,42.1d],[22.cT,42.bD],[22.3x,42.86],[22.58,42.cR],[22.b8,42.6Y],[22.1b,42.ce],[22.8Y,42.i],[22.77,42.2o],[22.bC,42.8R],[22.4u,43.2v],[22.4D,43.1a],[22.9b,43.19],[22.bh,43.2A],[22.3g,43.4M],[22.1R,43.3O],[22.ft,43.cF],[22.3B,43.3A],[22.9g,43.38],[22.7h,43.cN],[22.3z,43.4],[22.4i,43.2l],[22.8s,43.1c],[22.cK,43.3C],[22.d5,43.D],[22.1H,43.o],[22.1z,43.cJ],[22.47,43.eO],[22.6P,43.6W],[22.1x,43.cY],[22.cH,43.6V],[22.6L,43.cQ],[22.cP,43.cE],[22.B,43.7],[22.6J,43.6G],[22.6H,43.U],[22.6I,43.l],[22.3F,43.ct],[22.10,43.cu],[22.cS,43.cD],[22.W,43.4w],[22.41,43.98],[22.cB,44.4W],[22.6P,44.fd],[22.3w,44.fg],[22.3a,44.7k],[22.d5,44.j],[22.fl,44.5v],[22.8s,44.1X],[22.4N,44.2N],[22.z,44.fk],[22.cY,44.5A],[22.9r,44.h],[22.3P,44.4Z],[22.66,44.3o],[22.3n,44.5y],[22.4R,44.4P],[22.eY,44.cZ],[22.U,44.cU],[22.5S,44.2G],[22.3X,44.d1],[22.f4,44.d4],[22.by,44.3q],[22.5k,44.1a],[22.5J,44.11],[22.98,44.4V],[23.H,44.4V],[23.cr,44.Z],[23.4F,44.7D],[23.bz,44.7o],[22.ba,44.5W],[22.bA,44.1E],[22.2x,44.4f],[22.1w,43.5P],[22.bB,43.f6],[22.86,43.3v],[22.3Z,43.5L],[22.f7,43.by],[22.bx,43.5Z],[22.k,43.5D],[22.5o,43.bu],[22.3t,43.eX],[23.3K,43.bv],[23.8T,43.l],[23.7K,43.l],[23.5Q,43.5w],[23.G,43.bw],[23.7l,43.5Y],[23.31,43.5h],[23.8d,43.5h],[23.cs,43.86],[23.5f,43.5h],[23.ch,43.3Z],[23.55,43.bC],[23.2q,43.1l],[23.8G,43.bD],[23.4p,43.3X],[23.s,43.5w],[23.g,43.3W],[23.5D,43.Y],[23.bm,43.5z],[23.5k,43.76],[24.4f,43.1U],[24.t,43.m],[24.1a,43.1r],[24.bJ,43.5q],[24.5E,43.8h],[24.fh,43.bK],[24.1t,43.1r],[24.1v,43.1r],[24.4c,43.4b],[24.4y,43.8J],[24.51,43.78],[24.2r,43.g],[24.6,43.4r],[24.bL,43.E],[24.73,43.8H],[24.U,43.7u],[24.85,43.3U],[24.3N,43.bI],[24.bH,43.s],[25.3K,43.7m],[25.bE,43.V],[25.8O,43.4p],[25.9u,43.5c],[25.8N,43.4p],[25.8M,43.8G],[25.33,43.8Q],[25.38,43.64],[25.8z,43.3P],[25.5m,43.2y],[25.1G,43.8x],[25.C,43.L],[25.8W,43.4k],[25.73,43.71],[25.8A,43.2V],[25.eC,43.1j],[25.7v,43.eB],[25.8D,43.8C],[25.8P,43.bF],[25.8R,43.bG],[26.4e,43.bt],[26.8u,43.4D],[26.7G,44.4f],[26.bs,44.bb],[26.1f,44.ey],[26.1A,44.1X],[26.2D,44.t],[26.1Q,44.1P],[26.8X,44.2N],[26.5,44.O],[26.2K,44.7D],[26.eA,44.9q],[26.bf,44.7I],[26.bg,44.Z],[26.l,44.11],[26.eS,44.7O],[26.bh,44.h],[26.M,44.h],[27.dc,44.9o],[27.n,44.n],[27.1I,44.eQ],[27.1f,44.eP],[27.7M,44.4S],[27.2L,44.7K],[27.v,44.7L],[27.7B,44.2M],[27.1H,44.7A],[27.be,44.bd],[27.1K,44.7o],[27.eN,43.3c],[27.8W,43.5n],[27.7m,43.b9],[27.1d,43.ci],[27.7t,43.7y],[27.3g,43.ba],[27.7x,44.R],[27.I,43.2k],[27.bM,43.94],[27.96,43.3i],[27.4D,43.7v],[28.bb,43.5a],[28.bc,43.bi],[28.13,43.3h],[28.fL,43.8j],[28.bj,43.bp],[28.2n,43.76],[28.B,43.8n],[28.1N,43.2V],[28.3a,43.2V],[28.58,43.5d],[28.8s,43.8r],[28.8v,43.61],[28.bq,43.2T],[28.br,43.bo],[28.fu,43.o],[28.8f,43.7T],[28.2W,43.7X],[28.bn,43.38],[28.7U,43.cs],[28.7S,43.5U],[28.S,43.7T],[28.7Y,43.bk],[28.2X,43.30],[28.2Z,43.8d],[28.p,43.8e],[28.2v,43.2p],[28.8b,43.2u],[27.2Y,43.2],[27.3J,43.bl],[27.80,43.1a],[27.fq,43.8c],[27.89,43.A],[27.bm,42.M],[27.fs,42.bM],[27.bN,42.ce],[27.i,42.2H],[27.4u,42.1M],[27.8o,42.cf],[27.1S,42.8h],[27.cg,42.fF],[27.7u,42.4p],[27.1r,42.66],[27.1O,42.7z],[27.1L,42.4i],[27.8v,42.7p],[27.7q,42.fB],[27.48,42.cd],[27.7J,42.cc],[27.7N,42.46],[27.7J,42.7C],[27.7E,42.c9],[27.4z,42.Q],[27.1W,42.4y],[27.L,42.ca],[27.4k,42.r],[27.1U,42.8B],[27.s,42.S],[27.4r,42.8y],[27.1S,42.8L],[27.4x,42.n],[27.dG,42.1o],[27.P,42.O],[27.F,42.dF],[28.R,42.H],[27.4D,41.cb],[27.4C,41.5n],[27.1C,41.M],[27.5t,41.4w],[27.4l,41.96],[27.dH,41.4n],[27.dy,41.5J],[27.4s,41.4t],[27.5O,41.9],[27.ch,41.4t],[27.4v,41.ci],[27.5U,41.5s],[27.5x,42.co],[27.34,42.p],[27.1A,42.Z],[27.d7,42.4V]]};2g.1s.9v.2h={gB:{},dr:2g.1s.dr,dk:{gE:0,f:a.dk,e:{8:"gH"},d:{8:"gw"}},cp:{f:a.cp,e:{8:"gm"},d:{8:"cp",x:"26.gk",y:"43.eg"}},cq:{f:a.cq,e:{8:"gj"},d:{8:"cq",x:"26.gq",y:"43.gn"}},cn:{f:a.cn,e:{8:"gJ"},d:{8:"cn",x:"27.fV",y:"42.eg"}},cm:{f:a.cm,e:{8:"g7"},d:{8:"cm"}},cj:{f:a.cj,e:{8:"g2"},d:{8:"cj"}},ck:{f:a.ck,e:{8:"gp"},d:{8:"ck"}},cl:{f:a.cl,e:{8:"gd"},d:{8:"cl"}},c8:{f:a.c8,e:{8:"gb"},d:{8:"c8"}},c7:{f:a.c7,e:{8:"g3 fT"},d:{8:"c7"}},bU:{f:a.bU,e:{8:"gh"},d:{8:"bU",x:"23.gv",y:"42.g1"}},bV:{f:a.bV,e:{8:"gr"},d:{8:"bV"}},bW:{f:a.bW,e:{8:"gs gt"},d:{8:"bW"}},bT:{f:a.bT,e:{8:"gu"},d:{8:"bT"}},bS:{f:a.bS,e:{8:"go"},d:{8:"bS"}},bO:{f:a.bO,e:{8:"gi"},d:{8:"bO"}},bP:{f:a.bP,e:{8:"gl"},d:{8:"bP",x:"25.gF",y:"43.gI"}},bQ:{f:a.bQ,e:{8:"gz"},d:{8:"bQ"}},bR:{f:a.bR,e:{8:"gA"},d:{8:"bR"}},bX:{f:a.bX,e:{8:"fY"},d:{8:"bX"}},bY:{f:a.bY,e:{8:"fS"},d:{8:"bY"}},c4:{f:a.c4,e:{8:"fU"},d:{8:"c4"}},c5:{f:a.c5,e:{8:"g4 gc"},d:{8:"c5"}},c6:{f:a.c6,e:{8:"gf"},d:{8:"c6"}},c3:{f:a.c3,e:{8:"ga"},d:{8:"c3"}},c2:{f:a.c2,e:{8:"g5"},d:{8:"c2"}},bZ:{f:a.bZ,e:{8:"ge"},d:{8:"bZ"}},c0:{f:a.c0,e:{8:"fX"},d:{8:"c0"}},c1:{f:a.c1,e:{8:"gC"},d:{8:"c1"}}};2g.1s.gG("2h")})();2g.1s.2h=ep(b,a,c){gx 2g.1s.fW({g6:g8,gD:a||{},d6:((6R(b.d6)=="6O")?0:b.d6),9v:c,dE:b.dE||"2h",x:((6R(b.x)=="6O")?0:b.x),y:((6R(b.y)=="6O")?0:b.y),d9:((6R(b.d9)=="6O")?1:b.d9),df:((6R(b.df)=="6O")?1:b.df),dh:((6R(b.dh)=="6O")?1:b.dh),fQ:b.fQ||[],fm:b.fm||[],eT:b.eT||[],eG:b.eG||g9,fR:2g.1s.9v.2h})};',62,1038,'||||||||text|||||label|tooltip|coords|781|149|881|041|892|808|735|143|472|062|386|377|747|05|585|375|554|||614|037|388|629|457|742|986|193|001|923|971|981|687|983|561|064|959|451|003|267|446|769|708|402|425|785|09|378||||324||||||121|716|431|786|389|256|612|517|275|765|376|803|106|619|096|114|774|712|maps|308|341|328|899|468|07|488|309|226|836|083|01|514|548|509|191|054|618|624|756|441|679|055|403|827|835|025|754|048|643|047|035|581|036||||||||||407|223|479|939|178|504|zingchart|bgr|526|329|968|421|362|315|947|302|623|535|763|164|225|051|381|918|656|837|199|323|789|331|494|027|179|834|367|185|589|313|022|056|009|536|622|346|173|574|233|738|463|155|924|087|401||||||||||529|239|995|284|482|294|861|795|895|648|229|784|095|694|198|231|144|417|635|979|874|937|506|512|039|638|343|759|455|665|365|371|566|464|798|945|016|029|146|913|265|647|461|987|778|344|729|372|799|818|497|844|097|||||||||411|165|727|393|391|04|002|042|099|598|646|711|745|732|973|369|706|014|771|597|944|888|467|941|872|437|593|582|301|877|966|124|058|595|197|382|717|579|867|228|599|929|208|611|719|094|453|162|105|007|664|788|176|049||||||||||833|527|709|713|723|465|414|859|938|107|926|395|489|985|942|677|699|135|997|783|452|044|817|384|215|767|098|214|869|841|213|955|602|351|752|952|792|905|807|886|551|994|127|528|801|562|413|961|017|113|846|856|112|||||||||349|853|281|758|625|456|928|02|102|166|249|108|247|319|471|335|753|273|103|218|419|08|724|435|432|399|392|601|314|285|743|875|478|744|359|353|385|161|448|594|518|undefined|476|251|typeof|219|297|182|632|577|496|862|238|427||||||||||428|568|587|398|951|101|891|672|969|666|021|242|739|921|032|555|523|503|063|823|731|876|026|912|967|641|024|444|436|069|515|725|141|943|089|469|067|028|272|438|136|615|757|776|321|409|363|134|603|357|212|481|932||||||||||317|013|078|366|332|499|901|697|762|782|825|949|644|748|898|652|263|676|567|578|075|569|925|659|234|459|793|333|831|909|088|787|682|728|278|749|418|183|292|246|129|948|669|991|946|045|447|118|684|462|741|128|627|||139|||||||086|962|675|845|299|779|714|142|498|933|216|005|159|796|153|312|072|634|978|543|224|data|953|307|534|887|104|458|352|513|502|639|196|354|157|337|521|264|085|491|549|345|628|186|689|274|168|477|154|474|917|356|493|772|082|408|976|092|726|347|878|296|046|495|152|248|487|235|322|683|508|138|266|03|804|851|303|857|989|397|316|327|338|133|187|736|115|412|373|956|558|147|283|081|695|805|358|336|116|334|158|227|137|071|374|211|422|015|057|426|992|954|364|863|637|958|655|541|257|119|854|722|642|957|996|004|065|018|576|707|761|907|815|255|396|167|889|416|539|766|586|608|202|927|829|811|832|858|885|031|963|884|828|814|077|871|902|964|733|172|702|668|935|894|KY|RS|LV|SI|BL|KZ|SF|KK|VT|MT|SM|VD|PD|YA|PV|VN|PZ|SZ|PN|SG|SH|433|423|984|483|525|866|703|791|516|965|DO|VR|GB|SL|BR|034|RG|TU|053|406|847|879|636|019|546|737|06|295|439|511|908|667|306|691|475|052|505|544|563|893|387|607|415|651|873|379|449|201|533|559|424|613|204|326|169|519|848|156|522|graphid|276|236|width|282|998|043|174|777|height|084|level|537|718|__|287|259|532|573|775|688|_DEFAULTS_|486|111|151|575|903|068|654|361|305|501|434|207|id|038|934|693|217|291|122|404|348|605|258|454|911|298|261|746|621|074|177|079|188|443|181|171|545|631|557|232|671|662|132|194|293|368|507|852|277|855|7lat|734|269|148|445|542|209|222|355|function|572|if|394|591|565|342|383|466|023|245|645|794|819|205|244|673|bbox|663|066|588|838|705|584|681|556|131|125|123|865|ignore|685|609|492|816|755|616|289|583|661|813|849|547|972|843|606|243|262|268|006|011|195|524|008|254|271|237|073|538|items|916|109|059|919|564|904|806|571|189|993|822|701|604|797|552|826|184|163|698|922|868|842|657|931|175|145|658|999|751|groups|map|Smolyan|Sofiya|Pazardzhik|16lon|convert|Plovdiv|Montana|ZC|var|80lat|Dobrich|Grad|Stara|Pleven|loader|Sliven|this|null|Varna|Shumen|Zagora|Gabrovo|Vidin|Pernik|VI|Sofia|Kyustendil|Targovishte|7lon|Ruse|Razgrad|18lat|Blagoevgrad|Vratsa|35lon|Haskovo|Veliko|Tarnovo|Kardzhali|85lon|BGR|return|push|Lovech|Silistra|_GROUPS_|Yambol|loaderdata|sort|8lon|upgrade|BULGARIA|6lat|Burgas'.split('|'),0,{}));
extend1994/cdnjs
ajax/libs/zingchart/2.7.1/modules/zingchart-maps-bgr.min.js
JavaScript
mit
44,261
/* * The MIT License * * Copyright (c) 2013, Luca Milanesio * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.kohsuke.github; import com.infradna.tool.bridge_method_injector.WithBridgeMethods; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.net.URL; import java.util.Arrays; /** * Commit detail inside a {@link GHPullRequest}. * * @author Luca Milanesio * @see GHPullRequest#listCommits() */ @SuppressFBWarnings(value = {"UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD", "URF_UNREAD_FIELD"}, justification = "JSON API") public class GHPullRequestCommitDetail { private GHPullRequest owner; /*package*/ void wrapUp(GHPullRequest owner) { this.owner = owner; } /** * @deprecated Use {@link GitUser} */ public static class Authorship extends GitUser { } public static class Tree { String sha; String url; public String getSha() { return sha; } public URL getUrl() { return GitHub.parseURL(url); } } public static class Commit { Authorship author; Authorship committer; String message; Tree tree; String url; int comment_count; @WithBridgeMethods(value = Authorship.class, castRequired = true) public GitUser getAuthor() { return author; } @WithBridgeMethods(value = Authorship.class, castRequired = true) public GitUser getCommitter() { return committer; } public String getMessage() { return message; } public URL getUrl() { return GitHub.parseURL(url); } public int getComment_count() { return comment_count; } public Tree getTree() { return tree; } } public static class CommitPointer { String sha; String url; String html_url; public URL getUrl() { return GitHub.parseURL(url); } public URL getHtml_url() { return GitHub.parseURL(html_url); } public String getSha() { return sha; } } String sha; Commit commit; String url; String html_url; String comments_url; CommitPointer[] parents; public String getSha() { return sha; } public Commit getCommit() { return commit; } public URL getApiUrl() { return GitHub.parseURL(url); } public URL getUrl() { return GitHub.parseURL(html_url); } public URL getCommentsUrl() { return GitHub.parseURL(comments_url); } public CommitPointer[] getParents() { return Arrays.copyOf(parents, parents.length); } }
PankajHingane-REISysIn/KnowledgeArticleExportImport
src/main/java/org/kohsuke/github/GHPullRequestCommitDetail.java
Java
mit
3,888
var dir_0a4844ac9cb2026bd07faf42b116b549 = [ [ "operators", "dir_0cd2b357ffff5ecfb0310070703d859b.html", "dir_0cd2b357ffff5ecfb0310070703d859b" ], [ "variadic", "dir_3a2d86f21a1d869e2ec4e510547bf681.html", "dir_3a2d86f21a1d869e2ec4e510547bf681" ], [ "algorithm.hpp", "algorithm_8hpp.html", null ], [ "any_of.hpp", "detail_2any__of_8hpp.html", null ], [ "array.hpp", "detail_2array_8hpp.html", null ], [ "canonical_constant.hpp", "canonical__constant_8hpp.html", null ], [ "concepts.hpp", "concepts_8hpp.html", null ], [ "create.hpp", "create_8hpp.html", null ], [ "decay.hpp", "decay_8hpp.html", null ], [ "dispatch_if.hpp", "dispatch__if_8hpp.html", "dispatch__if_8hpp" ], [ "ebo.hpp", "ebo_8hpp.html", null ], [ "fast_and.hpp", "fast__and_8hpp.html", null ], [ "first_unsatisfied_index.hpp", "first__unsatisfied__index_8hpp.html", null ], [ "has_common_embedding.hpp", "has__common__embedding_8hpp.html", "has__common__embedding_8hpp" ], [ "has_duplicates.hpp", "has__duplicates_8hpp.html", null ], [ "hash_table.hpp", "hash__table_8hpp.html", null ], [ "index_if.hpp", "detail_2index__if_8hpp.html", null ], [ "integral_constant.hpp", "detail_2integral__constant_8hpp.html", [ [ "integral_constant_tag", "structboost_1_1hana_1_1integral__constant__tag.html", null ] ] ], [ "intrinsics.hpp", "intrinsics_8hpp.html", null ], [ "nested_by.hpp", "nested__by_8hpp.html", null ], [ "nested_by_fwd.hpp", "nested__by__fwd_8hpp.html", null ], [ "nested_than.hpp", "nested__than_8hpp.html", null ], [ "nested_than_fwd.hpp", "nested__than__fwd_8hpp.html", null ], [ "nested_to.hpp", "nested__to_8hpp.html", null ], [ "nested_to_fwd.hpp", "nested__to__fwd_8hpp.html", null ], [ "preprocessor.hpp", "preprocessor_8hpp.html", "preprocessor_8hpp" ], [ "std_common_type.hpp", "std__common__type_8hpp.html", null ], [ "struct_macros.hpp", "struct__macros_8hpp.html", "struct__macros_8hpp" ], [ "type_at.hpp", "type__at_8hpp.html", null ], [ "type_foldl1.hpp", "type__foldl1_8hpp.html", null ], [ "type_foldr1.hpp", "type__foldr1_8hpp.html", null ], [ "unpack_flatten.hpp", "unpack__flatten_8hpp.html", null ], [ "void_t.hpp", "void__t_8hpp.html", null ], [ "wrong.hpp", "wrong_8hpp.html", [ [ "wrong", "structboost_1_1hana_1_1detail_1_1wrong.html", null ] ] ] ];
PKRoma/poedit
deps/boost/libs/hana/doc/html/dir_0a4844ac9cb2026bd07faf42b116b549.js
JavaScript
mit
2,404
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Cache\Tests\Adapter; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Adapter\MemcachedAdapter; use Symfony\Component\Cache\Exception\CacheException; /** * @group integration */ class MemcachedAdapterTest extends AdapterTestCase { protected $skippedTests = [ 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', 'testClearPrefix' => 'Memcached cannot clear by prefix', ]; protected static $client; public static function setUpBeforeClass(): void { if (!MemcachedAdapter::isSupported()) { throw new SkippedTestSuiteError('Extension memcached >=2.2.0 required.'); } self::$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]); self::$client->get('foo'); $code = self::$client->getResultCode(); if (\Memcached::RES_SUCCESS !== $code && \Memcached::RES_NOTFOUND !== $code) { throw new SkippedTestSuiteError('Memcached error: '.strtolower(self::$client->getResultMessage())); } } public function createCachePool(int $defaultLifetime = 0, string $testMethod = null, string $namespace = null): CacheItemPoolInterface { $client = $defaultLifetime ? AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST')) : self::$client; return new MemcachedAdapter($client, $namespace ?? str_replace('\\', '.', __CLASS__), $defaultLifetime); } public function testOptions() { $client = MemcachedAdapter::createConnection([], [ 'libketama_compatible' => false, 'distribution' => 'modula', 'compression' => true, 'serializer' => 'php', 'hash' => 'md5', ]); $this->assertSame(\Memcached::SERIALIZER_PHP, $client->getOption(\Memcached::OPT_SERIALIZER)); $this->assertSame(\Memcached::HASH_MD5, $client->getOption(\Memcached::OPT_HASH)); $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); $this->assertSame(0, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); $this->assertSame(\Memcached::DISTRIBUTION_MODULA, $client->getOption(\Memcached::OPT_DISTRIBUTION)); } /** * @dataProvider provideBadOptions */ public function testBadOptions($name, $value) { $this->expectException(\Error::class); $this->expectExceptionMessage('Undefined constant Memcached::'); MemcachedAdapter::createConnection([], [$name => $value]); } public function provideBadOptions(): array { return [ ['hash', 'zyx'], ['serializer', 'zyx'], ['distribution', 'zyx'], ]; } public function testDefaultOptions() { $this->assertTrue(MemcachedAdapter::isSupported()); $client = MemcachedAdapter::createConnection([]); $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); $this->assertSame(1, $client->getOption(\Memcached::OPT_BINARY_PROTOCOL)); $this->assertSame(1, $client->getOption(\Memcached::OPT_TCP_NODELAY)); $this->assertSame(1, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); } public function testOptionSerializer() { $this->expectException(CacheException::class); $this->expectExceptionMessage('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); if (!\Memcached::HAVE_JSON) { $this->markTestSkipped('Memcached::HAVE_JSON required'); } new MemcachedAdapter(MemcachedAdapter::createConnection([], ['serializer' => 'json'])); } /** * @dataProvider provideServersSetting */ public function testServersSetting(string $dsn, string $host, int $port) { $client1 = MemcachedAdapter::createConnection($dsn); $client2 = MemcachedAdapter::createConnection([$dsn]); $client3 = MemcachedAdapter::createConnection([[$host, $port]]); $expect = [ 'host' => $host, 'port' => $port, ]; $f = function ($s) { return ['host' => $s['host'], 'port' => $s['port']]; }; $this->assertSame([$expect], array_map($f, $client1->getServerList())); $this->assertSame([$expect], array_map($f, $client2->getServerList())); $this->assertSame([$expect], array_map($f, $client3->getServerList())); } public function provideServersSetting(): iterable { yield [ 'memcached://127.0.0.1/50', '127.0.0.1', 11211, ]; yield [ 'memcached://localhost:11222?weight=25', 'localhost', 11222, ]; if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) { yield [ 'memcached://user:password@127.0.0.1?weight=50', '127.0.0.1', 11211, ]; } yield [ 'memcached:///var/run/memcached.sock?weight=25', '/var/run/memcached.sock', 0, ]; yield [ 'memcached:///var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, ]; if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) { yield [ 'memcached://user:password@/var/local/run/memcached.socket?weight=25', '/var/local/run/memcached.socket', 0, ]; } } /** * @dataProvider provideDsnWithOptions */ public function testDsnWithOptions(string $dsn, array $options, array $expectedOptions) { $client = MemcachedAdapter::createConnection($dsn, $options); foreach ($expectedOptions as $option => $expect) { $this->assertSame($expect, $client->getOption($option)); } } public function provideDsnWithOptions(): iterable { if (!class_exists(\Memcached::class)) { self::markTestSkipped('Extension memcached required.'); } yield [ 'memcached://localhost:11222?retry_timeout=10', [\Memcached::OPT_RETRY_TIMEOUT => 8], [\Memcached::OPT_RETRY_TIMEOUT => 10], ]; yield [ 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2', [\Memcached::OPT_RETRY_TIMEOUT => 8], [\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8], ]; } public function testClear() { $this->assertTrue($this->createCachePool()->clear()); } public function testMultiServerDsn() { $dsn = 'memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3'; $client = MemcachedAdapter::createConnection($dsn); $expected = [ 0 => [ 'host' => 'localhost', 'port' => 11211, 'type' => 'TCP', ], 1 => [ 'host' => 'localhost', 'port' => 12345, 'type' => 'TCP', ], 2 => [ 'host' => '/some/memcached.sock', 'port' => 0, 'type' => 'SOCKET', ], ]; $this->assertSame($expected, $client->getServerList()); $dsn = 'memcached://localhost?host[foo.bar]=3'; $client = MemcachedAdapter::createConnection($dsn); $expected = [ 0 => [ 'host' => 'localhost', 'port' => 11211, 'type' => 'TCP', ], 1 => [ 'host' => 'foo.bar', 'port' => 11211, 'type' => 'TCP', ], ]; $this->assertSame($expected, $client->getServerList()); } public function testKeyEncoding() { $reservedMemcachedCharacters = " \n\r\t\v\f\0"; $namespace = $reservedMemcachedCharacters.random_int(0, \PHP_INT_MAX); $pool = $this->createCachePool(0, null, $namespace); /** * Choose a key that is below {@see \Symfony\Component\Cache\Adapter\MemcachedAdapter::$maxIdLength} so that * {@see \Symfony\Component\Cache\Traits\AbstractTrait::getId()} does not shorten the key but choose special * characters that would be encoded and therefore increase the key length over the Memcached limit. */ // 250 is Memcached’s max key length, 7 bytes for prefix seed $key = str_repeat('%', 250 - 7 - \strlen($reservedMemcachedCharacters) - \strlen($namespace)).$reservedMemcachedCharacters; self::assertFalse($pool->hasItem($key)); $item = $pool->getItem($key); self::assertFalse($item->isHit()); self::assertSame($key, $item->getKey()); self::assertTrue($pool->save($item->set('foobar'))); self::assertTrue($pool->hasItem($key)); $item = $pool->getItem($key); self::assertTrue($item->isHit()); self::assertSame($key, $item->getKey()); self::assertTrue($pool->deleteItem($key)); self::assertFalse($pool->hasItem($key)); } }
Tobion/symfony
src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php
PHP
mit
9,780
<?php /* * This file is part of the puli/repository package. * * (c) Bernhard Schussek <bschussek@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Puli\Repository\Api\Resource; /** * Contains metadata about a resource. * * @since 1.0 * * @author Bernhard Schussek <bschussek@gmail.com> */ class ResourceMetadata { /** * Returns when the resource was created. * * If this information is not available, the method returns 0. * * @return int A UNIX timestamp. */ public function getCreationTime() { return 0; } /** * Returns when the resource was last accessed. * * If this information is not available, the method returns 0. * * @return int A UNIX timestamp. */ public function getAccessTime() { return 0; } /** * Returns when the resource was last modified. * * If this information is not available, the method returns 0. * * @return int A UNIX timestamp. */ public function getModificationTime() { return 0; } /** * Returns the size of the body in bytes. * * If this information is not available, the method returns 0. * * @return int The body size in bytes. */ public function getSize() { return 0; } }
mnapoli/repository
src/Api/Resource/ResourceMetadata.php
PHP
mit
1,442
#region File Description //----------------------------------------------------------------------------- // ServiceContainer.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using System.Collections.Generic; #endregion namespace WinFormsGraphicsDevice { /// <summary> /// Container class implements the IServiceProvider interface. This is used /// to pass shared services between different components, for instance the /// ContentManager uses it to locate the IGraphicsDeviceService implementation. /// </summary> public class ServiceContainer : IServiceProvider { Dictionary<Type, object> services = new Dictionary<Type, object>(); /// <summary> /// Adds a new service to the collection. /// </summary> public void AddService<T>(T service) { services.Add(typeof(T), service); } /// <summary> /// Looks up the specified service. /// </summary> public object GetService(Type serviceType) { object service; services.TryGetValue(serviceType, out service); return service; } } }
pampersrocker/EvoNet
EvoNet/WinFormsGraphicsDevice/ServiceContainer.cs
C#
mit
1,356
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "utlpriorityqueue.h" #include "utlmap.h" #include "isaverestore.h" #include "physics.h" #include "physics_saverestore.h" #include "saverestoretypes.h" #include "gamestringpool.h" #include "datacache/imdlcache.h" #if !defined( CLIENT_DLL ) #include "entitylist.h" #endif // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" //----------------------------------------------------------------------------- static short PHYS_SAVE_RESTORE_VERSION = 5; struct PhysBlockHeader_t { int nSaved; IPhysicsObject *pWorldObject; inline void Clear() { nSaved = 0; pWorldObject = 0; } DECLARE_SIMPLE_DATADESC(); }; BEGIN_SIMPLE_DATADESC( PhysBlockHeader_t ) DEFINE_FIELD( nSaved, FIELD_INTEGER ), // NOTE: We want to save the actual address here for remapping, so use an integer DEFINE_FIELD( pWorldObject, FIELD_INTEGER ), END_DATADESC() #if defined(_STATIC_LINKED) && defined(CLIENT_DLL) const char *g_ppszPhysTypeNames[PIID_NUM_TYPES] = { "Unknown", "IPhysicsObject", "IPhysicsFluidController", "IPhysicsSpring", "IPhysicsConstraintGroup", "IPhysicsConstraint", "IPhysicsShadowController", "IPhysicsPlayerController", "IPhysicsMotionController", "IPhysicsVehicleController", }; #endif //----------------------------------------------------------------------------- struct BBox_t { Vector mins, maxs; }; struct Sphere_t { float radius; }; struct PhysObjectHeader_t { PhysObjectHeader_t() { memset( this, 0, sizeof(*this) ); } PhysInterfaceId_t type; EHANDLE hEntity; string_t fieldName; int nObjects; string_t modelName; BBox_t bbox; Sphere_t sphere; int iCollide; DECLARE_SIMPLE_DATADESC(); }; BEGIN_SIMPLE_DATADESC( PhysObjectHeader_t ) DEFINE_FIELD( type, FIELD_INTEGER ), DEFINE_FIELD( hEntity, FIELD_EHANDLE ), DEFINE_FIELD( fieldName, FIELD_STRING ), DEFINE_FIELD( nObjects, FIELD_INTEGER ), DEFINE_FIELD( modelName, FIELD_STRING ), // Silence, Classcheck! // DEFINE_FIELD( bbox, BBox_t ), // DEFINE_FIELD( sphere, Sphere_t ), DEFINE_FIELD( bbox.mins, FIELD_VECTOR ), DEFINE_FIELD( bbox.maxs, FIELD_VECTOR ), DEFINE_FIELD( sphere.radius, FIELD_FLOAT ), DEFINE_FIELD( iCollide, FIELD_INTEGER ), END_DATADESC() //----------------------------------------------------------------------------- // Purpose: The central manager of physics save/load // class CPhysSaveRestoreBlockHandler : public CDefSaveRestoreBlockHandler, public IPhysSaveRestoreManager #if !defined( CLIENT_DLL ) , public IEntityListener #endif { struct QueuedItem_t; public: CPhysSaveRestoreBlockHandler() { m_QueuedSaves.SetLessFunc( SaveQueueFunc ); SetDefLessFunc( m_QueuedRestores ); SetDefLessFunc( m_PhysObjectModels ); SetDefLessFunc( m_PhysObjectCustomModels ); SetDefLessFunc( m_PhysCollideBBoxModels ); } const char *GetBlockName() { return "Physics"; } //--------------------------------- virtual void PreSave( CSaveRestoreData * ) { m_blockHeader.Clear(); } //--------------------------------- virtual void Save( ISave *pSave ) { m_blockHeader.pWorldObject = g_PhysWorldObject; m_blockHeader.nSaved = m_QueuedSaves.Count(); while ( m_QueuedSaves.Count() ) { const QueuedItem_t &item = m_QueuedSaves.ElementAtHead(); CBaseEntity *pOwner = item.header.hEntity.Get(); if ( pOwner ) { pSave->WriteAll( &item.header ); pSave->StartBlock(); // Need block here in case entity is NULL on load if ( item.header.nObjects ) { for ( int i = 0; i < item.header.nObjects; i++ ) { // Starting a block here allows the implementation of any individual physics // class save/load to change non-trivially while retaining the overall // integrity of the savefile. pSave->StartBlock(); SavePhysicsObject( pSave, pOwner, item.ppPhysObj[i], item.header.type ); pSave->EndBlock(); } } // else, it will simply be recreated on restore pSave->EndBlock(); } m_QueuedSaves.RemoveAtHead(); } } //--------------------------------- virtual void WriteSaveHeaders( ISave *pSave ) { pSave->WriteShort( &PHYS_SAVE_RESTORE_VERSION ); pSave->WriteAll( &m_blockHeader ); } //--------------------------------- virtual void PostSave() { m_QueuedSaves.Purge(); } //--------------------------------- virtual void PreRestore() { #if !defined( CLIENT_DLL ) gEntList.AddListenerEntity( this ); #endif // UNDONE: This never runs!!!! if ( physenv ) { physprerestoreparams_t params; params.recreatedObjectCount = 0; physenv->PreRestore( params ); } } //--------------------------------- virtual void ReadRestoreHeaders( IRestore *pRestore ) { // No reason why any future version shouldn't try to retain backward compatability. The default here is to not do so. short version = pRestore->ReadShort(); m_fDoLoad = ( version == PHYS_SAVE_RESTORE_VERSION ); pRestore->ReadAll( &m_blockHeader ); } //--------------------------------- virtual void Restore( IRestore *pRestore, bool ) { if ( m_fDoLoad ) { if ( physenv ) { physprerestoreparams_t params; params.recreatedObjectCount = 1; params.recreatedObjectList[0].pNewObject = g_PhysWorldObject; params.recreatedObjectList[0].pOldObject = m_blockHeader.pWorldObject; physenv->PreRestore( params ); } PhysObjectHeader_t header; while ( m_blockHeader.nSaved-- ) { pRestore->ReadAll( &header ); pRestore->StartBlock(); if ( header.hEntity != NULL ) { RestoreBlock( pRestore, header ); } pRestore->EndBlock(); } } } //--------------------------------- void RestoreBlock( IRestore *pRestore, const PhysObjectHeader_t &header ) { CBaseEntity * pOwner = header.hEntity.Get(); unsigned short iQueued = m_QueuedRestores.Find( pOwner ); if ( iQueued != m_QueuedRestores.InvalidIndex() ) { MDLCACHE_CRITICAL_SECTION(); if ( pOwner->ShouldSavePhysics() && header.nObjects > 0 ) { QueuedItem_t *pItem = m_QueuedRestores[iQueued]->FindItem( header.fieldName ); if ( pItem ) { int nObjects = min( header.nObjects, pItem->header.nObjects ); if ( pItem->header.type == PIID_IPHYSICSOBJECT && nObjects == 1 ) { RestorePhysicsObjectAndModel( pRestore, header, pItem, nObjects ); } else { void **ppPhysObj = pItem->ppPhysObj; for ( int i = 0; i < nObjects; i++ ) { pRestore->StartBlock(); RestorePhysicsObject( pRestore, header, ppPhysObj + i ); pRestore->EndBlock(); if ( header.type == PIID_IPHYSICSMOTIONCONTROLLER ) { void *pObj = ppPhysObj[i]; IPhysicsMotionController *pController = (IPhysicsMotionController *)pObj; if ( pController ) { // If the entity is the motion callback handler, then automatically set it // NOTE: This is usually the case IMotionEvent *pEvent = dynamic_cast<IMotionEvent *>(pOwner); if ( pEvent ) { pController->SetEventHandler( pEvent ); } } } } } } } else pOwner->CreateVPhysics(); } } //--------------------------------- void RestorePhysicsObjectAndModel( IRestore *pRestore, const PhysObjectHeader_t &header, CPhysSaveRestoreBlockHandler::QueuedItem_t *pItem, int nObjects ) { if ( nObjects == 1 ) { pRestore->StartBlock(); CPhysCollide *pPhysCollide = NULL; int modelIndex = -1; bool fCustomCollide = false; if ( header.modelName != NULL_STRING ) { CBaseEntity *pGlobalEntity = header.hEntity; #if !defined( CLIENT_DLL ) if ( NULL_STRING != pGlobalEntity->m_iGlobalname ) { modelIndex = pGlobalEntity->GetModelIndex(); } else #endif { modelIndex = modelinfo->GetModelIndex( STRING( header.modelName ) ); pGlobalEntity = NULL; } if ( modelIndex != -1 ) { vcollide_t *pCollide = modelinfo->GetVCollide( modelIndex ); if ( pCollide ) { if ( pCollide->solidCount > 0 && pCollide->solids && header.iCollide < pCollide->solidCount ) pPhysCollide = pCollide->solids[header.iCollide]; } } } else if ( header.bbox.mins != vec3_origin || header.bbox.maxs != vec3_origin ) { pPhysCollide = PhysCreateBbox( header.bbox.mins, header.bbox.maxs ); fCustomCollide = true; } else if ( header.sphere.radius != 0 ) { // HACKHACK: Handle spheres here!!! if ( !(*pItem->ppPhysObj) ) { RestorePhysicsObject( pRestore, header, pItem->ppPhysObj, NULL ); } return; } if ( pPhysCollide ) { if ( !(*pItem->ppPhysObj) ) { RestorePhysicsObject( pRestore, header, pItem->ppPhysObj, pPhysCollide ); if ( (*pItem->ppPhysObj) ) { IPhysicsObject *pObject = (IPhysicsObject *)(*pItem->ppPhysObj); if ( !fCustomCollide ) { AssociateModel( pObject, modelIndex ); } else { AssociateModel( pObject, pPhysCollide ); } } else DevMsg( "Failed to restore physics object\n" ); } else DevMsg( "Physics object pointer unexpectedly non-null before restore. Should be creating physics object in CreatePhysics()?\n" ); } else DevMsg( "Failed to reestablish collision model for object\n" ); pRestore->EndBlock(); } else DevMsg( "Don't know how to reconsitite models for physobj array \n" ); } //--------------------------------- virtual void PostRestore() { if ( physenv ) physenv->PostRestore(); unsigned short i = m_QueuedRestores.FirstInorder(); while ( i != m_QueuedRestores.InvalidIndex() ) { delete m_QueuedRestores[i]; i = m_QueuedRestores.NextInorder( i ); } m_QueuedRestores.RemoveAll(); #if !defined( CLIENT_DLL ) gEntList.RemoveListenerEntity( this ); #endif } //--------------------------------- void QueueSave( CBaseEntity *pOwner, typedescription_t *pTypeDesc, void **ppPhysObj, PhysInterfaceId_t type ) { if ( !pOwner ) return; bool fOnlyNotingExistence = !pOwner->ShouldSavePhysics(); QueuedItem_t item; item.ppPhysObj = ppPhysObj; item.header.hEntity = pOwner; item.header.type = type; item.header.nObjects = ( !fOnlyNotingExistence ) ? pTypeDesc->fieldSize : 0; item.header.fieldName = AllocPooledString( pTypeDesc->fieldName ); // A pooled string is used here because there is no way // right now to save a non-string_t string and have it // compressed in the save symbol tables. Furthermore, // the field name would normally be in the string // pool anyway. (toml 12-10-02) item.header.modelName = NULL_STRING; memset( &item.header.bbox, 0, sizeof( item.header.bbox ) ); item.header.sphere.radius = 0; if ( !fOnlyNotingExistence && type == PIID_IPHYSICSOBJECT ) { // Don't doing the box thing for things like wheels on cars IPhysicsObject *pPhysObj = (IPhysicsObject *)(*ppPhysObj); if ( pPhysObj ) { item.header.modelName = GetModelName( pPhysObj ); item.header.iCollide = physcollision->CollideIndex( pPhysObj->GetCollide() ); if ( item.header.modelName == NULL_STRING ) { BBox_t *pBBox = GetBBox( pPhysObj ); if ( pBBox != NULL ) { item.header.bbox = *pBBox; } else { if ( pPhysObj && pPhysObj->GetSphereRadius() != 0 ) { item.header.sphere.radius = pPhysObj->GetSphereRadius(); } else { DevMsg( "Don't know how to save model for physics object (class \"%s\")\n", pOwner->GetClassname() ); } } } } } m_QueuedSaves.Insert( item ); } //--------------------------------- void QueueRestore( CBaseEntity *pOwner, typedescription_t *pTypeDesc, void **ppPhysObj, PhysInterfaceId_t type ) { CEntityRestoreSet *pEntitySet = NULL; unsigned short iEntitySet = m_QueuedRestores.Find( pOwner ); if ( iEntitySet != m_QueuedRestores.InvalidIndex() ) { pEntitySet = m_QueuedRestores[iEntitySet]; } else { pEntitySet = new CEntityRestoreSet; m_QueuedRestores.Insert( pOwner, pEntitySet ); } pEntitySet->Add( pOwner, pTypeDesc, ppPhysObj, type ); memset( ppPhysObj, 0, pTypeDesc->fieldSize * sizeof( void * ) ); } //--------------------------------- void SavePhysicsObject( ISave *pSave, CBaseEntity *pOwner, void *pObject, PhysInterfaceId_t type ) { if ( physenv ) { if ( !pObject ) return; physsaveparams_t params = { pSave, pObject, type }; physenv->Save( params ); } } //--------------------------------- void RestorePhysicsObject( IRestore *pRestore, const PhysObjectHeader_t &header, void **ppObject, const CPhysCollide *pCollide = NULL ) { if ( physenv ) { physrestoreparams_t params = { pRestore, ppObject, header.type, header.hEntity.Get(), STRING(header.modelName), pCollide, physenv, physgametrace }; physenv->Restore( params ); } } #if !defined( CLIENT_DLL ) //----------------------------------------------------- // IEntityListener methods // This object is only a listener during restore virtual void OnEntityCreated( CBaseEntity *pEntity ) { } //--------------------------------- virtual void OnEntityDeleted( CBaseEntity *pEntity ) { unsigned short iEntitySet = m_QueuedRestores.Find( pEntity ); if ( iEntitySet != m_QueuedRestores.InvalidIndex() ) { delete m_QueuedRestores[iEntitySet]; m_QueuedRestores.RemoveAt( iEntitySet ); } } #endif //----------------------------------------------------- // IPhysSaveRestoreManager methods virtual void NoteBBox( const Vector &mins, const Vector &maxs, CPhysCollide *pCollide ) { if ( pCollide && m_PhysCollideBBoxModels.Find( pCollide ) == m_PhysCollideBBoxModels.InvalidIndex() ) { BBox_t box; box.mins = mins; box.maxs = maxs; m_PhysCollideBBoxModels.Insert( pCollide, box ); } } //--------------------------------- virtual void AssociateModel( IPhysicsObject *pObject, int modelIndex ) { Assert( m_PhysObjectModels.Find( pObject ) == m_PhysObjectModels.InvalidIndex() ); m_PhysObjectModels.Insert( pObject, modelIndex ); } //--------------------------------- virtual void AssociateModel( IPhysicsObject *pObject, const CPhysCollide *pModel ) { Assert( m_PhysObjectCustomModels.Find( pObject ) == m_PhysObjectCustomModels.InvalidIndex() ); m_PhysObjectCustomModels.Insert( pObject, pModel ); } //--------------------------------- virtual void ForgetModel( IPhysicsObject *pObject ) { if ( !m_PhysObjectModels.Remove( pObject ) ) m_PhysObjectCustomModels.Remove( pObject ); } //--------------------------------- virtual void ForgetAllModels() { m_PhysObjectModels.RemoveAll(); m_PhysObjectCustomModels.RemoveAll(); m_PhysCollideBBoxModels.RemoveAll(); } //--------------------------------- string_t GetModelName( IPhysicsObject *pObject ) { int i = m_PhysObjectModels.Find( pObject ); if ( i == m_PhysObjectModels.InvalidIndex() ) return NULL_STRING; return AllocPooledString( modelinfo->GetModelName( modelinfo->GetModel( m_PhysObjectModels[i] ) ) ); } //--------------------------------- BBox_t * GetBBox( IPhysicsObject *pObject ) { int i = m_PhysObjectCustomModels.Find( pObject ); if ( i == m_PhysObjectCustomModels.InvalidIndex() ) return NULL; i = m_PhysCollideBBoxModels.Find( m_PhysObjectCustomModels[i] ); if ( i == m_PhysCollideBBoxModels.InvalidIndex() ) return NULL; return &(m_PhysCollideBBoxModels[i]); } //--------------------------------- private: struct QueuedItem_t { PhysObjectHeader_t header; void ** ppPhysObj; }; class CEntityRestoreSet : public CUtlVector<QueuedItem_t> { public: int Add( CBaseEntity *pOwner, typedescription_t *pTypeDesc, void **ppPhysObj, PhysInterfaceId_t type ) { int i = AddToTail(); Assert( ppPhysObj ); Assert( *ppPhysObj == NULL ); // expected field to have been cleared Assert( pOwner ); QueuedItem_t &item = Element( i ); item.ppPhysObj = ppPhysObj; item.header.hEntity = pOwner; item.header.type = type; item.header.nObjects = pTypeDesc->fieldSize; item.header.fieldName = AllocPooledString( pTypeDesc->fieldName ); // See comment in CPhysSaveRestoreBlockHandler::QueueSave() return i; } QueuedItem_t *FindItem( string_t itemFieldName ) { // generally, the set is very small, usually one, so linear search is not too gruesome; for ( int i = 0; i < Count(); i++ ) { string_t testName = Element(i).header.fieldName; Assert( ( testName == itemFieldName && strcmp( STRING( testName ), STRING( itemFieldName ) ) == 0 ) || ( testName != itemFieldName && strcmp( STRING( testName ), STRING( itemFieldName ) ) != 0 ) ); if ( testName == itemFieldName ) return &(Element(i)); } return NULL; } }; //--------------------------------- static bool SaveQueueFunc( const QueuedItem_t &left, const QueuedItem_t &right ) { if ( left.header.type == right.header.type ) return ( left.header.hEntity->entindex() > right.header.hEntity->entindex() ); return ( left.header.type > right.header.type ); } //--------------------------------- CUtlPriorityQueue<QueuedItem_t> m_QueuedSaves; CUtlMap<CBaseEntity *, CEntityRestoreSet *> m_QueuedRestores; bool m_fDoLoad; //--------------------------------- CUtlMap<IPhysicsObject *, int> m_PhysObjectModels; CUtlMap<IPhysicsObject *, const CPhysCollide *> m_PhysObjectCustomModels; CUtlMap<const CPhysCollide *, BBox_t> m_PhysCollideBBoxModels; //--------------------------------- PhysBlockHeader_t m_blockHeader; }; //----------------------------------------------------------------------------- CPhysSaveRestoreBlockHandler g_PhysSaveRestoreBlockHandler; IPhysSaveRestoreManager *g_pPhysSaveRestoreManager = &g_PhysSaveRestoreBlockHandler; //------------------------------------- ISaveRestoreBlockHandler *GetPhysSaveRestoreBlockHandler() { return &g_PhysSaveRestoreBlockHandler; } static bool IsValidEntityPointer( void *ptr ) { #if !defined( CLIENT_DLL ) return gEntList.IsEntityPtr( ptr ); #else // Walk entities looking for pointer int c = ClientEntityList().GetHighestEntityIndex(); for ( int i = 0; i <= c; i++ ) { CBaseEntity *e = ClientEntityList().GetBaseEntity( i ); if ( !e ) continue; if ( e == ptr ) return true; } return false; #endif } //----------------------------------------------------------------------------- // Purpose: Classifies field and queues it up for physics save/restore. // class CPhysObjSaveRestoreOps : public CDefSaveRestoreOps { public: virtual void Save( const SaveRestoreFieldInfo_t &fieldInfo, ISave *pSave ) { CBaseEntity *pOwnerEntity = pSave->GetGameSaveRestoreInfo()->GetCurrentEntityContext(); bool bFoundEntity = true; if ( IsValidEntityPointer(pOwnerEntity) == false ) { bFoundEntity = false; #if defined( CLIENT_DLL ) pOwnerEntity = ClientEntityList().GetBaseEntityFromHandle( pOwnerEntity->GetRefEHandle() ); if ( pOwnerEntity ) { bFoundEntity = true; } #endif } AssertMsg( pOwnerEntity && bFoundEntity == true, "Physics save/load is only suitable for entities" ); if ( m_type == PIID_UNKNOWN ) { AssertMsg( 0, "Unknown physics save/load type"); return; } g_PhysSaveRestoreBlockHandler.QueueSave( pOwnerEntity, fieldInfo.pTypeDesc, (void **)fieldInfo.pField, m_type ); } virtual void Restore( const SaveRestoreFieldInfo_t &fieldInfo, IRestore *pRestore ) { CBaseEntity *pOwnerEntity = pRestore->GetGameSaveRestoreInfo()->GetCurrentEntityContext(); bool bFoundEntity = true; if ( IsValidEntityPointer(pOwnerEntity) == false ) { bFoundEntity = false; #if defined( CLIENT_DLL ) pOwnerEntity = ClientEntityList().GetBaseEntityFromHandle( pOwnerEntity->GetRefEHandle() ); if ( pOwnerEntity ) { bFoundEntity = true; } #endif } AssertMsg( pOwnerEntity && bFoundEntity == true, "Physics save/load is only suitable for entities" ); if ( m_type == PIID_UNKNOWN ) { AssertMsg( 0, "Unknown physics save/load type"); return; } g_PhysSaveRestoreBlockHandler.QueueRestore( pOwnerEntity, fieldInfo.pTypeDesc, (void **)fieldInfo.pField, m_type ); } virtual void MakeEmpty( const SaveRestoreFieldInfo_t &fieldInfo ) { memset( fieldInfo.pField, 0, fieldInfo.pTypeDesc->fieldSize * sizeof( void * ) ); } virtual bool IsEmpty( const SaveRestoreFieldInfo_t &fieldInfo ) { void **ppPhysObj = (void **)fieldInfo.pField; int nObjects = fieldInfo.pTypeDesc->fieldSize; for ( int i = 0; i < nObjects; i++ ) { if ( ppPhysObj[i] != NULL ) return false; } return true; } PhysInterfaceId_t m_type; }; //----------------------------------------------------------------------------- CPhysObjSaveRestoreOps g_PhysObjSaveRestoreOps[PIID_NUM_TYPES]; //------------------------------------- ISaveRestoreOps *GetPhysObjSaveRestoreOps( PhysInterfaceId_t type ) { static bool inited; if ( !inited ) { inited = true; for ( int i = 0; i < PIID_NUM_TYPES; i++ ) { g_PhysObjSaveRestoreOps[i].m_type = (PhysInterfaceId_t)i; } } return &g_PhysObjSaveRestoreOps[type]; } //=============================================================================
sswires/ham-and-jam
game_shared/physics_saverestore.cpp
C++
mit
21,706