diff --git a/build/release/joola.js b/build/release/joola.js index 409ed82..176f134 100644 --- a/build/release/joola.js +++ b/build/release/joola.js @@ -18340,7 +18340,7 @@ var HighchartsAdapter = (function () { }; }()); (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0; + // adding 1 corrects loss of precision from parseFloat (#15100) + return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; }, isPlainObject: function( obj ) { @@ -29676,7 +29674,7 @@ jQuery.extend({ if ( obj == null ) { return obj + ""; } - // Support: Android < 4.0, iOS < 6 (functionish RegExp) + // Support: Android<4.0, iOS<6 (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call(obj) ] || "object" : typeof obj; @@ -29706,6 +29704,7 @@ jQuery.extend({ }, // Convert dashed to camelCase; used by the css and data modules + // Support: IE9-11+ // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); @@ -29921,14 +29920,14 @@ function isArraylike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v1.10.19 + * Sizzle CSS Selector Engine v2.2.0-pre * http://sizzlejs.com/ * - * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * - * Date: 2014-04-18 + * Date: 2014-12-16 */ (function( window ) { @@ -29955,7 +29954,7 @@ var i, contains, // Instance-specific data - expando = "sizzle" + -(new Date()), + expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, @@ -29970,7 +29969,6 @@ var i, }, // General-purpose constants - strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Instance methods @@ -29980,12 +29978,13 @@ var i, push_native = arr.push, push = arr.push, slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { var i = 0, - len = this.length; + len = list.length; for ( ; i < len; i++ ) { - if ( this[i] === elem ) { + if ( list[i] === elem ) { return i; } } @@ -30025,6 +30024,7 @@ var i, ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), @@ -30076,6 +30076,14 @@ var i, String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); }; // Optimize for push.apply( _, NodeList ) @@ -30118,19 +30126,18 @@ function Sizzle( selector, context, results, seed ) { context = context || document; results = results || []; + nodeType = context.nodeType; - if ( !selector || typeof selector !== "string" ) { - return results; - } + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; + return results; } - if ( documentIsHTML && !seed ) { + if ( !seed && documentIsHTML ) { - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { + // Try to shortcut find operations when possible (e.g., not under DocumentFragment) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { @@ -30162,7 +30169,7 @@ function Sizzle( selector, context, results, seed ) { return results; // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + } else if ( (m = match[3]) && support.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } @@ -30172,7 +30179,7 @@ function Sizzle( selector, context, results, seed ) { if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { nid = old = expando; newContext = context; - newSelector = nodeType === 9 && selector; + newSelector = nodeType !== 1 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root @@ -30359,7 +30366,7 @@ function createPositionalPseudo( fn ) { * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; + return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience @@ -30383,9 +30390,8 @@ isXML = Sizzle.isXML = function( elem ) { * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { @@ -30395,9 +30401,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Set our document document = doc; docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); + parent = doc.defaultView; // Support: IE>8 // If iframe document is assigned to "document" variable and if iframe has been reloaded, @@ -30406,21 +30410,22 @@ setDocument = Sizzle.setDocument = function( node ) { if ( parent && parent !== parent.top ) { // IE11 does not have attachEvent, so all must suffer if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); + parent.addEventListener( "unload", unloadHandler, false ); } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); + parent.attachEvent( "onunload", unloadHandler ); } } + /* Support tests + ---------------------------------------------------------------------- */ + documentIsHTML = !isXML( doc ); + /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); @@ -30435,17 +30440,8 @@ setDocument = Sizzle.setDocument = function( node ) { return !div.getElementsByTagName("*").length; }); - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "
"; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); + // Support: IE<9 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name @@ -30459,7 +30455,7 @@ setDocument = Sizzle.setDocument = function( node ) { // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 @@ -30480,7 +30476,7 @@ setDocument = Sizzle.setDocument = function( node ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; @@ -30489,14 +30485,20 @@ setDocument = Sizzle.setDocument = function( node ) { // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); } } : + function( tag, context ) { var elem, tmp = [], i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments @@ -30514,7 +30516,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + if ( documentIsHTML ) { return context.getElementsByClassName( className ); } }; @@ -30543,13 +30545,15 @@ setDocument = Sizzle.setDocument = function( node ) { // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; + docElem.appendChild( div ).innerHTML = "" + + ""; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { + if ( div.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } @@ -30559,12 +30563,24 @@ setDocument = Sizzle.setDocument = function( node ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } + // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } }); assert(function( div ) { @@ -30681,7 +30697,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Maintain original order return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } @@ -30708,7 +30724,7 @@ setDocument = Sizzle.setDocument = function( node ) { aup ? -1 : bup ? 1 : sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check @@ -30771,7 +30787,7 @@ Sizzle.matchesSelector = function( elem, expr ) { elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch(e) {} + } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; @@ -30990,7 +31006,7 @@ Expr = Sizzle.selectors = { return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, @@ -31012,7 +31028,7 @@ Expr = Sizzle.selectors = { operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; @@ -31132,7 +31148,7 @@ Expr = Sizzle.selectors = { matched = fn( seed, argument ), i = matched.length; while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); + idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : @@ -31171,6 +31187,8 @@ Expr = Sizzle.selectors = { function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; return !results.pop(); }; }), @@ -31182,6 +31200,7 @@ Expr = Sizzle.selectors = { }), "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; @@ -31603,7 +31622,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } @@ -31638,13 +31657,16 @@ function matcherFromTokens( tokens ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; + return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; } ]; for ( ; i < len; i++ ) { @@ -31894,7 +31916,7 @@ select = Sizzle.select = function( selector, context, results, seed ) { // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; -// Support: Chrome<14 +// Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; @@ -32103,7 +32125,7 @@ var rootjQuery, if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; - // scripts is true for back-compat + // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[1], @@ -32131,8 +32153,8 @@ var rootjQuery, } else { elem = document.getElementById( match[2] ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 + // Support: Blackberry 4.6 + // gEBID returns nodes no longer in the document (#6963) if ( elem && elem.parentNode ) { // Inject the element directly into the jQuery object this.length = 1; @@ -32185,7 +32207,7 @@ rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set + // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, @@ -32265,8 +32287,7 @@ jQuery.fn.extend({ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); }, - // Determine the position of an element within - // the matched set of elements + // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent @@ -32274,7 +32295,7 @@ jQuery.fn.extend({ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } - // index in selector + // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } @@ -32690,7 +32711,7 @@ jQuery.extend({ progressValues, progressContexts, resolveContexts; - // add listeners to Deferred subordinates; treat others as resolved + // Add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); @@ -32707,7 +32728,7 @@ jQuery.extend({ } } - // if we're not waiting on anything, resolve the master + // If we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } @@ -32786,7 +32807,7 @@ jQuery.ready.promise = function( obj ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one + // We once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready @@ -32880,7 +32901,7 @@ jQuery.acceptData = function( owner ) { function Data() { - // Support: Android < 4, + // Support: Android<4, // Old WebKit does not have Object.preventExtensions/freeze method, // return new empty object instead with no [[set]] accessor Object.defineProperty( this.cache = {}, 0, { @@ -32889,7 +32910,7 @@ function Data() { } }); - this.expando = jQuery.expando + Math.random(); + this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; @@ -32917,7 +32938,7 @@ Data.prototype = { descriptor[ this.expando ] = { value: unlock }; Object.defineProperties( owner, descriptor ); - // Support: Android < 4 + // Support: Android<4 // Fallback to a less secure definition } catch ( e ) { descriptor[ this.expando ] = unlock; @@ -33057,17 +33078,16 @@ var data_user = new Data(); -/* - Implementation Summary - - 1. Enforce API surface and semantic compatibility with 1.9.x branch - 2. Improve the module's maintainability by reducing the storage - paths to a single mechanism. - 3. Use the same single mechanism to support "private" and "user" data. - 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) - 5. Avoid exposing implementation details on user objects (eg. expando properties) - 6. Provide a clear path for implementation upgrade to WeakMap in 2014 -*/ +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /([A-Z])/g; @@ -33272,7 +33292,7 @@ jQuery.extend({ queue.unshift( "inprogress" ); } - // clear up the last queue stop function + // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } @@ -33282,7 +33302,7 @@ jQuery.extend({ } }, - // not intended for public consumption - generates a queueHooks object, or returns the current one + // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return data_priv.get( elem, key ) || data_priv.access( elem, key, { @@ -33312,7 +33332,7 @@ jQuery.fn.extend({ this.each(function() { var queue = jQuery.queue( this, type, data ); - // ensure a hooks for this queue + // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { @@ -33379,21 +33399,22 @@ var rcheckableType = (/^(?:checkbox|radio)$/i); div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); - // #11217 - WebKit loses check when the name is after the checked attribute + // Support: Safari<=5.1 + // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) - // `name` and `type` need .setAttribute for WWA + // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments + // Support: Safari<=5.1, Android<4.2 + // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + // Support: IE<=11+ // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE9-IE11+ div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; })(); @@ -33771,8 +33792,8 @@ jQuery.event = { j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; @@ -33922,7 +33943,7 @@ jQuery.event = { event.target = document; } - // Support: Safari 6.0+, Chrome < 28 + // Support: Safari 6.0+, Chrome<28 // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; @@ -34027,7 +34048,7 @@ jQuery.Event = function( src, props ) { // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && - // Support: Android < 4.0 + // Support: Android<4.0 src.returnValue === false ? returnTrue : returnFalse; @@ -34117,8 +34138,8 @@ jQuery.each({ }; }); -// Create "bubbling" focus and blur events // Support: Firefox, Chrome, Safari +// Create "bubbling" focus and blur events if ( !support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { @@ -34271,7 +34292,7 @@ var // We have to close these tags to support XHTML (#13200) wrapMap = { - // Support: IE 9 + // Support: IE9 option: [ 1, "" ], thead: [ 1, "", "
" ], @@ -34282,7 +34303,7 @@ var _default: [ 0, "", "" ] }; -// Support: IE 9 +// Support: IE9 wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; @@ -34372,7 +34393,7 @@ function getAll( context, tag ) { ret; } -// Support: IE >= 9 +// Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); @@ -34392,8 +34413,7 @@ jQuery.extend({ clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); - // Support: IE >= 9 - // Fix Cloning issues + // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { @@ -34444,8 +34464,8 @@ jQuery.extend({ // Add nodes directly if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws + // Support: QtWebKit, PhantomJS + // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node @@ -34467,15 +34487,14 @@ jQuery.extend({ tmp = tmp.lastChild; } - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws + // Support: QtWebKit, PhantomJS + // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; - // Fixes #12346 - // Support: Webkit, IE + // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } @@ -34837,7 +34856,7 @@ function actualDisplay( name, doc ) { // getDefaultComputedStyle might be reliably used only on attached element display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - // Use of this method is a temporary fix (more like optmization) until something better comes along, + // Use of this method is a temporary fix (more like optimization) until something better comes along, // since it was removed from specification and supported only in FF style.display : jQuery.css( elem[ 0 ], "display" ); @@ -34887,7 +34906,14 @@ var rmargin = (/^margin/); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { - return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + // Support: IE<=11+, Firefox<=30+ (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + if ( elem.ownerDocument.defaultView.opener ) { + return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + } + + return window.getComputedStyle( elem, null ); }; @@ -34899,7 +34925,7 @@ function curCSS( elem, name, computed ) { computed = computed || getStyles( elem ); // Support: IE9 - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + // getPropertyValue is only needed for .css('filter') (#12537) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; } @@ -34945,15 +34971,13 @@ function addGetHookIf( conditionFn, hookFn ) { return { get: function() { if ( conditionFn() ) { - // Hook not needed (or it's not possible to use it due to missing dependency), - // remove it. - // Since there are no other hooks for marginRight, remove the whole object. + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. - return (this.get = hookFn).apply( this, arguments ); } }; @@ -34970,6 +34994,8 @@ function addGetHookIf( conditionFn, hookFn ) { return; } + // Support: IE9-11+ + // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; @@ -35002,6 +35028,7 @@ function addGetHookIf( conditionFn, hookFn ) { if ( window.getComputedStyle ) { jQuery.extend( support, { pixelPosition: function() { + // This test is executed only once but we still do memoizing // since we can use the boxSizingReliable pre-computing. // No need to check if the test was already performed, though. @@ -35015,6 +35042,7 @@ function addGetHookIf( conditionFn, hookFn ) { return boxSizingReliableVal; }, reliableMarginRight: function() { + // Support: Android 2.3 // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. (#3333) @@ -35036,6 +35064,7 @@ function addGetHookIf( conditionFn, hookFn ) { ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); docElem.removeChild( container ); + div.removeChild( marginDiv ); return ret; } @@ -35067,8 +35096,8 @@ jQuery.swap = function( elem, options, callback, args ) { var - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), @@ -35081,15 +35110,15 @@ var cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; -// return a css property mapped to a potentially vendor prefixed property +// Return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { - // shortcut for names that are not vendor prefixed + // Shortcut for names that are not vendor prefixed if ( name in style ) { return name; } - // check for vendor prefixed names + // Check for vendor prefixed names var capName = name[0].toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; @@ -35122,7 +35151,7 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { val = 0; for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it + // Both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } @@ -35133,15 +35162,15 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } - // at this point, extra isn't border nor margin, so remove border + // At this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { - // at this point, extra isn't content, so add padding + // At this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - // at this point, extra isn't content nor padding, so add border + // At this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } @@ -35159,7 +35188,7 @@ function getWidthOrHeight( elem, name, extra ) { styles = getStyles( elem ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - // some non-html elements return undefined for offsetWidth, so check for null/undefined + // Some non-html elements return undefined for offsetWidth, so check for null/undefined // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 if ( val <= 0 || val == null ) { @@ -35174,7 +35203,7 @@ function getWidthOrHeight( elem, name, extra ) { return val; } - // we need the check for style in case a browser which returns unreliable values + // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); @@ -35183,7 +35212,7 @@ function getWidthOrHeight( elem, name, extra ) { val = parseFloat( val ) || 0; } - // use the active box-sizing model to add/subtract irrelevant styles + // Use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, @@ -35247,12 +35276,14 @@ function showHide( elements, show ) { } jQuery.extend({ + // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { + // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; @@ -35280,12 +35311,12 @@ jQuery.extend({ // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { - // normalize float css property "float": "cssFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; @@ -35298,33 +35329,32 @@ jQuery.extend({ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - // gets hook for the prefixed version - // followed by the unprefixed version + // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; - // convert relative number strings (+= or -=) to relative numbers. #7345 + // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } - // Make sure that null and NaN values aren't set. See: #7116 + // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } - // If a number was passed in, add 'px' to the (except for certain CSS properties) + // If a number, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } - // Fixes #8908, it can be done more correctly by specifying setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions + // Support: IE9-11+ + // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } @@ -35352,8 +35382,7 @@ jQuery.extend({ // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - // gets hook for the prefixed version - // followed by the unprefixed version + // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there @@ -35366,12 +35395,12 @@ jQuery.extend({ val = curCSS( elem, name, styles ); } - //convert "normal" to computed value + // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } - // Return, converting to number if forced or a qualifier was provided and val looks numeric + // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; @@ -35384,8 +35413,9 @@ jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); @@ -35413,8 +35443,6 @@ jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, function( elem, computed ) { if ( computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } @@ -35432,7 +35460,7 @@ jQuery.each({ var i = 0, expanded = {}, - // assumes a single number if not a string + // Assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ]; for ( ; i < 4; i++ ) { @@ -35555,17 +35583,18 @@ Tween.propHooks = { return tween.elem[ tween.prop ]; } - // passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { @@ -35579,7 +35608,6 @@ Tween.propHooks = { // Support: IE9 // Panic based approach to setting things on disconnected nodes - Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { @@ -35635,16 +35663,16 @@ var start = +target || 1; do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply start = start / scale; jQuery.style( tween.elem, prop, start + unit ); - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + // Update scale, tolerating zero or NaN from tween.cur(), + // break the loop if scale is unchanged or perfect, or if we've just had enough } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); } @@ -35676,8 +35704,8 @@ function genFx( type, includeWidth ) { i = 0, attrs = { height: type }; - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; @@ -35699,7 +35727,7 @@ function createTween( value, prop, animation ) { for ( ; index < length; index++ ) { if ( (tween = collection[ index ].call( animation, prop, value )) ) { - // we're done with this property + // We're done with this property return tween; } } @@ -35714,7 +35742,7 @@ function defaultPrefilter( elem, props, opts ) { hidden = elem.nodeType && isHidden( elem ), dataShow = data_priv.get( elem, "fxshow" ); - // handle queue: false promises + // Handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { @@ -35729,8 +35757,7 @@ function defaultPrefilter( elem, props, opts ) { hooks.unqueued++; anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes + // Ensure the complete handler is called before this completes anim.always(function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { @@ -35740,7 +35767,7 @@ function defaultPrefilter( elem, props, opts ) { }); } - // height/width overflow pass + // Height/width overflow pass if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE9-10 do not @@ -35802,7 +35829,7 @@ function defaultPrefilter( elem, props, opts ) { dataShow = data_priv.access( elem, "fxshow", {} ); } - // store state if its toggle - enables .stop().toggle() to "reverse" + // Store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } @@ -35862,8 +35889,8 @@ function propFilter( props, specialEasing ) { value = hooks.expand( value ); delete props[ name ]; - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; @@ -35882,7 +35909,7 @@ function Animation( elem, properties, options ) { index = 0, length = animationPrefilters.length, deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector + // Don't match elem in the :animated selector delete tick.elem; }), tick = function() { @@ -35891,7 +35918,8 @@ function Animation( elem, properties, options ) { } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + // Support: Android 2.3 + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, @@ -35927,7 +35955,7 @@ function Animation( elem, properties, options ) { }, stop: function( gotoEnd ) { var index = 0, - // if we are going to the end, we want to run all the tweens + // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { @@ -35938,8 +35966,7 @@ function Animation( elem, properties, options ) { animation.tweens[ index ].run( 1 ); } - // resolve when we played the last frame - // otherwise, reject + // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { @@ -36021,7 +36048,7 @@ jQuery.speed = function( speed, easing, fn ) { opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - // normalize opt.queue - true/undefined/null -> "fx" + // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } @@ -36045,10 +36072,10 @@ jQuery.speed = function( speed, easing, fn ) { jQuery.fn.extend({ fadeTo: function( speed, to, easing, callback ) { - // show any hidden elements after setting opacity to 0 + // Show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() - // animate to the value specified + // Animate to the value specified .end().animate({ opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { @@ -36111,9 +36138,9 @@ jQuery.fn.extend({ } } - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } @@ -36131,17 +36158,17 @@ jQuery.fn.extend({ timers = jQuery.timers, length = queue ? queue.length : 0; - // enable finishing flag on private data + // Enable finishing flag on private data data.finish = true; - // empty the queue first + // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } - // look for any active animations, and finish them + // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); @@ -36149,14 +36176,14 @@ jQuery.fn.extend({ } } - // look for any animations in the old queue and finish them + // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } - // turn off finishing flag + // Turn off finishing flag delete data.finish; }); } @@ -36259,21 +36286,21 @@ jQuery.fn.delay = function( time, type ) { input.type = "checkbox"; - // Support: iOS 5.1, Android 4.x, Android 2.3 - // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) + // Support: iOS<=5.1, Android<=4.2+ + // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; - // Must access the parent to make an option select properly - // Support: IE9, IE10 + // Support: IE<=11+ + // Must access selectedIndex to make default options select support.optSelected = opt.selected; - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) + // Support: Android<=2.3 + // Options inside disabled selects are incorrectly marked as disabled select.disabled = true; support.optDisabled = !opt.disabled; - // Check if an input maintains its value after becoming a radio - // Support: IE9, IE10 + // Support: IE<=11+ + // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; @@ -36370,8 +36397,6 @@ jQuery.extend({ set: function( elem, value ) { if ( !support.radioValue && value === "radio" && jQuery.nodeName( elem, "input" ) ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { @@ -36441,7 +36466,7 @@ jQuery.extend({ var ret, hooks, notxml, nType = elem.nodeType; - // don't get/set properties on text, comment and attribute nodes + // Don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } @@ -36477,8 +36502,6 @@ jQuery.extend({ } }); -// Support: IE9+ -// Selectedness for an option in an optgroup can be inaccurate if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { @@ -36586,7 +36609,7 @@ jQuery.fn.extend({ } } - // only assign if different to avoid unneeded rendering. + // Only assign if different to avoid unneeded rendering. finalValue = value ? jQuery.trim( cur ) : ""; if ( elem.className !== finalValue ) { elem.className = finalValue; @@ -36613,14 +36636,14 @@ jQuery.fn.extend({ return this.each(function() { if ( type === "string" ) { - // toggle individual class names + // Toggle individual class names var className, i = 0, self = jQuery( this ), classNames = value.match( rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list + // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { @@ -36635,7 +36658,7 @@ jQuery.fn.extend({ data_priv.set( this, "__className__", this.className ); } - // If the element has a class name or if we're passed "false", + // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. @@ -36679,9 +36702,9 @@ jQuery.fn.extend({ ret = elem.value; return typeof ret === "string" ? - // handle most common string cases + // Handle most common string cases ret.replace(rreturn, "") : - // handle cases where value is null/undef or number + // Handle cases where value is null/undef or number ret == null ? "" : ret; } @@ -36789,7 +36812,7 @@ jQuery.extend({ } } - // force browsers to behave consistently when non-matching value is set + // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } @@ -36810,8 +36833,6 @@ jQuery.each([ "radio", "checkbox" ], function() { }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; }; } @@ -36893,10 +36914,6 @@ jQuery.parseXML = function( data ) { var - // Document location - ajaxLocParts, - ajaxLocation, - rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, @@ -36925,22 +36942,13 @@ var transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat("*"); + allTypes = "*/".concat( "*" ), -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} + // Document location + ajaxLocation = window.location.href, -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + // Segment location into parts + ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -37419,7 +37427,8 @@ jQuery.extend({ } // We can fire global events as of now if asked to - fireGlobals = s.global; + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { @@ -37492,7 +37501,7 @@ jQuery.extend({ return jqXHR.abort(); } - // aborting is no longer a cancellation + // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds @@ -37604,8 +37613,7 @@ jQuery.extend({ isSuccess = !error; } } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts + // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; @@ -37661,7 +37669,7 @@ jQuery.extend({ jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted + // Shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; @@ -37678,13 +37686,6 @@ jQuery.each( [ "get", "post" ], function( i, method ) { }; }); -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { - jQuery.fn[ type ] = function( fn ) { - return this.on( type, fn ); - }; -}); - jQuery._evalUrl = function( url ) { return jQuery.ajax({ @@ -37902,8 +37903,9 @@ var xhrId = 0, // Support: IE9 // Open requests must be manually aborted on unload (#5280) -if ( window.ActiveXObject ) { - jQuery( window ).on( "unload", function() { +// See https://support.microsoft.com/kb/2856746 for more info +if ( window.attachEvent ) { + window.attachEvent( "onunload", function() { for ( var key in xhrCallbacks ) { xhrCallbacks[ key ](); } @@ -38256,6 +38258,16 @@ jQuery.fn.load = function( url, params, callback ) { +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { + jQuery.fn[ type ] = function( fn ) { + return this.on( type, fn ); + }; +}); + + + + jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; @@ -38292,7 +38304,8 @@ jQuery.offset = { calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; - // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed + // Need to be able to calculate position if either + // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; @@ -38349,8 +38362,8 @@ jQuery.fn.extend({ return box; } + // Support: BlackBerry 5, iOS 3 (original iPhone) // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== strundefined ) { box = elem.getBoundingClientRect(); } @@ -38372,7 +38385,7 @@ jQuery.fn.extend({ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent if ( jQuery.css( elem, "position" ) === "fixed" ) { - // We assume that getBoundingClientRect is available when computed position is fixed + // Assume getBoundingClientRect is there when computed position is fixed offset = elem.getBoundingClientRect(); } else { @@ -38435,16 +38448,18 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( }; }); +// Support: Safari<7+, Chrome<37+ // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 -// getComputedStyle returns percent when specified for top/left/bottom/right -// rather than make the css module depend on the offset module, we just check for it here +// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 +// getComputedStyle returns percent when specified for top/left/bottom/right; +// rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset + // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; @@ -38457,7 +38472,7 @@ jQuery.each( [ "top", "left" ], function( i, prop ) { // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth + // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); @@ -38548,8 +38563,8 @@ jQuery.noConflict = function( deep ) { return jQuery; }; -// Expose jQuery and $ identifiers, even in -// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) +// Expose jQuery and $ identifiers, even in AMD +// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( typeof noGlobal === strundefined ) { window.jQuery = window.$ = jQuery; @@ -38565,7 +38580,7 @@ return jQuery; },{}],41:[function(require,module,exports){ (function (global){ //! moment.js -//! version : 2.8.4 +//! version : 2.9.0 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -38576,9 +38591,9 @@ return jQuery; ************************************/ var moment, - VERSION = '2.8.4', + VERSION = '2.9.0', // the global-scope this is NOT the global object in Node.js - globalScope = typeof global !== 'undefined' ? global : this, + globalScope = (typeof global !== 'undefined' && (typeof window === 'undefined' || window === global.window)) ? global : this, oldGlobalMoment, round = Math.round, hasOwnProperty = Object.prototype.hasOwnProperty, @@ -38655,7 +38670,7 @@ return jQuery; ['HH', /(T| )\d\d/] ], - // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30'] + // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-', '15', '30'] parseTimezoneChunker = /([\+\-]|\d\d)/gi, // getter and setter names @@ -38815,7 +38830,7 @@ return jQuery; return leftZeroFill(this.milliseconds(), 3); }, Z : function () { - var a = -this.zone(), + var a = this.utcOffset(), b = '+'; if (a < 0) { a = -a; @@ -38824,7 +38839,7 @@ return jQuery; return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2); }, ZZ : function () { - var a = -this.zone(), + var a = this.utcOffset(), b = '+'; if (a < 0) { a = -a; @@ -38851,7 +38866,9 @@ return jQuery; deprecations = {}, - lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin']; + lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'], + + updateInProgress = false; // Pick the first defined of two or three arguments. dfl comes from // default. @@ -38920,6 +38937,26 @@ return jQuery; }; } + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + return -(wholeMonthDiff + adjust); + } + while (ordinalizeTokens.length) { i = ordinalizeTokens.pop(); formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i); @@ -38931,6 +38968,31 @@ return jQuery; formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // thie is not supposed to happen + return hour; + } + } + /************************************ Constructors ************************************/ @@ -38945,6 +39007,13 @@ return jQuery; } copyConfig(this, config); this._d = new Date(+config._d); + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + moment.updateOffset(this); + updateInProgress = false; + } } // Duration Constructor @@ -39348,7 +39417,8 @@ return jQuery; return locales[name]; } - // Return a moment from input, that is local/utc/zone equivalent to model. + // Return a moment from input, that is local/utc/utcOffset equivalent to + // model. function makeAs(input, model) { var res, diff; if (model._isUTC) { @@ -39497,6 +39567,7 @@ return jQuery; } }, + _calendar : { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', @@ -39561,6 +39632,14 @@ return jQuery; doy : 6 // The week that contains Jan 1st is the first week of the year. }, + firstDayOfWeek : function () { + return this._week.dow; + }, + + firstDayOfYear : function () { + return this._week.doy; + }, + _invalidDate: 'Invalid date', invalidDate: function () { return this._invalidDate; @@ -39727,14 +39806,14 @@ return jQuery; } } - function timezoneMinutesFromString(string) { + function utcOffsetFromString(string) { string = string || ''; var possibleTzMatches = (string.match(parseTokenTimezone) || []), tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [], parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0], minutes = +(parts[1] * 60) + toInt(parts[2]); - return parts[0] === '+' ? -minutes : minutes; + return parts[0] === '+' ? minutes : -minutes; } // function to convert string input to date @@ -39798,7 +39877,8 @@ return jQuery; // AM / PM case 'a' : // fall through to A case 'A' : - config._isPm = config._locale.isPM(input); + config._meridiem = input; + // config._isPm = config._locale.isPM(input); break; // HOUR case 'h' : // fall through to hh @@ -39838,7 +39918,7 @@ return jQuery; case 'Z' : // fall through to ZZ case 'ZZ' : config._useUTC = true; - config._tzm = timezoneMinutesFromString(input); + config._tzm = utcOffsetFromString(input); break; // WEEKDAY - human case 'dd': @@ -39976,10 +40056,10 @@ return jQuery; } config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); - // Apply timezone offset from input. The actual zone can be changed + // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { - config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { @@ -40075,14 +40155,9 @@ return jQuery; if (config._pf.bigHour === true && config._a[HOUR] <= 12) { config._pf.bigHour = undefined; } - // handle am pm - if (config._isPm && config._a[HOUR] < 12) { - config._a[HOUR] += 12; - } - // if is 12 am, change hours to 0 - if (config._isPm === false && config._a[HOUR] === 12) { - config._a[HOUR] = 0; - } + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], + config._meridiem); dateFromConfig(config); checkOverflow(config); } @@ -40524,6 +40599,8 @@ return jQuery; s: parseIso(match[7]), w: parseIso(match[8]) }; + } else if (duration == null) {// checks for null or undefined + duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(moment(duration.from), moment(duration.to)); @@ -40688,6 +40765,8 @@ return jQuery; return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; + moment.isDate = isDate; + /************************************ Moment Prototype ************************************/ @@ -40700,7 +40779,7 @@ return jQuery; }, valueOf : function () { - return +this._d + ((this._offset || 0) * 60000); + return +this._d - ((this._offset || 0) * 60000); }, unix : function () { @@ -40763,16 +40842,16 @@ return jQuery; }, utc : function (keepLocalTime) { - return this.zone(0, keepLocalTime); + return this.utcOffset(0, keepLocalTime); }, local : function (keepLocalTime) { if (this._isUTC) { - this.zone(0, keepLocalTime); + this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { - this.add(this._dateTzOffset(), 'm'); + this.subtract(this._dateUtcOffset(), 'm'); } } return this; @@ -40789,29 +40868,20 @@ return jQuery; diff : function (input, units, asFloat) { var that = makeAs(input, this), - zoneDiff = (this.zone() - that.zone()) * 6e4, - diff, output, daysAdjust; + zoneDiff = (that.utcOffset() - this.utcOffset()) * 6e4, + anchor, diff, output, daysAdjust; units = normalizeUnits(units); - if (units === 'year' || units === 'month') { - // average number of days in the months in the given dates - diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2 - // difference in months - output = ((this.year() - that.year()) * 12) + (this.month() - that.month()); - // adjust by taking difference in days, average number of days - // and dst in the given months. - daysAdjust = (this - moment(this).startOf('month')) - - (that - moment(that).startOf('month')); - // same as above but with zones, to negate all dst - daysAdjust -= ((this.zone() - moment(this).startOf('month').zone()) - - (that.zone() - moment(that).startOf('month').zone())) * 6e4; - output += daysAdjust / diff; - if (units === 'year') { + if (units === 'year' || units === 'month' || units === 'quarter') { + output = monthDiff(this, that); + if (units === 'quarter') { + output = output / 3; + } else if (units === 'year') { output = output / 12; } } else { - diff = (this - that); + diff = this - that; output = units === 'second' ? diff / 1e3 : // 1000 units === 'minute' ? diff / 6e4 : // 1000 * 60 units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 @@ -40832,7 +40902,8 @@ return jQuery; calendar : function (time) { // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're zone'd or not. + // Getting start-of-today depends on whether we're locat/utc/offset + // or not. var now = time || moment(), sod = makeAs(now, this).startOf('day'), diff = this.diff(sod, 'days', true), @@ -40850,8 +40921,8 @@ return jQuery; }, isDST : function () { - return (this.zone() < this.clone().month(0).zone() || - this.zone() < this.clone().month(5).zone()); + return (this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset()); }, day : function (input) { @@ -40941,6 +41012,10 @@ return jQuery; } }, + isBetween: function (from, to, units) { + return this.isAfter(from, units) && this.isBefore(to, units); + }, + isSame: function (input, units) { var inputMs; units = normalizeUnits(units || 'millisecond'); @@ -40969,9 +41044,27 @@ return jQuery; } ), + zone : deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. ' + + 'https://github.com/moment/moment/issues/1779', + function (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + ), + // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) @@ -40979,38 +41072,51 @@ return jQuery; // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. - zone : function (input, keepLocalTime) { + utcOffset : function (input, keepLocalTime) { var offset = this._offset || 0, localAdjust; if (input != null) { if (typeof input === 'string') { - input = timezoneMinutesFromString(input); + input = utcOffsetFromString(input); } if (Math.abs(input) < 16) { input = input * 60; } if (!this._isUTC && keepLocalTime) { - localAdjust = this._dateTzOffset(); + localAdjust = this._dateUtcOffset(); } this._offset = input; this._isUTC = true; if (localAdjust != null) { - this.subtract(localAdjust, 'm'); + this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addOrSubtractDurationFromMoment(this, - moment.duration(offset - input, 'm'), 1, false); + moment.duration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; moment.updateOffset(this, true); this._changeInProgress = null; } } + + return this; } else { - return this._isUTC ? offset : this._dateTzOffset(); + return this._isUTC ? offset : this._dateUtcOffset(); } - return this; + }, + + isLocal : function () { + return !this._isUTC; + }, + + isUtcOffset : function () { + return this._isUTC; + }, + + isUtc : function () { + return this._isUTC && this._offset === 0; }, zoneAbbr : function () { @@ -41023,9 +41129,9 @@ return jQuery; parseZone : function () { if (this._tzm) { - this.zone(this._tzm); + this.utcOffset(this._tzm); } else if (typeof this._i === 'string') { - this.zone(this._i); + this.utcOffset(utcOffsetFromString(this._i)); } return this; }, @@ -41035,10 +41141,10 @@ return jQuery; input = 0; } else { - input = moment(input).zone(); + input = moment(input).utcOffset(); } - return (this.zone() - input) % 60 === 0; + return (this.utcOffset() - input) % 60 === 0; }, daysInMonth : function () { @@ -41101,9 +41207,17 @@ return jQuery; }, set : function (units, value) { - units = normalizeUnits(units); - if (typeof this[units] === 'function') { - this[units](value); + var unit; + if (typeof units === 'object') { + for (unit in units) { + this.set(unit, units[unit]); + } + } + else { + units = normalizeUnits(units); + if (typeof this[units] === 'function') { + this[units](value); + } } return this; }, @@ -41140,11 +41254,12 @@ return jQuery; return this._locale; }, - _dateTzOffset : function () { + _dateUtcOffset : function () { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 - return Math.round(this._d.getTimezoneOffset() / 15) * 15; + return -Math.round(this._d.getTimezoneOffset() / 15) * 15; } + }); function rawMonthSetter(mom, value) { @@ -41213,6 +41328,9 @@ return jQuery; // add aliased format methods moment.fn.toJSON = moment.fn.toISOString; + // alias isUtc for dev-friendliness + moment.fn.isUTC = moment.fn.isUtc; + /************************************ Duration Prototype ************************************/ @@ -41400,6 +41518,10 @@ return jQuery; localeData : function () { return this._locale; + }, + + toJSON : function () { + return this.toISOString(); } }); @@ -41487,7 +41609,7 @@ return jQuery; if (hasModule) { module.exports = moment; } else if (typeof define === 'function' && define.amd) { - define('moment', function (require, exports, module) { + define(function (require, exports, module) { if (module.config && module.config() && module.config().noGlobal === true) { // release the global variable globalScope.moment = oldGlobalMoment; @@ -41595,7 +41717,7 @@ exports.connect = lookup; exports.Manager = require('./manager'); exports.Socket = require('./socket'); -},{"./manager":44,"./socket":46,"./url":47,"debug":50,"socket.io-parser":84}],44:[function(require,module,exports){ +},{"./manager":44,"./socket":46,"./url":47,"debug":51,"socket.io-parser":87}],44:[function(require,module,exports){ /** * Module dependencies. @@ -41611,6 +41733,7 @@ var bind = require('component-bind'); var object = require('object-component'); var debug = require('debug')('socket.io-client:manager'); var indexOf = require('indexof'); +var Backoff = require('backo2'); /** * Module exports @@ -41642,11 +41765,16 @@ function Manager(uri, opts){ this.reconnectionAttempts(opts.reconnectionAttempts || Infinity); this.reconnectionDelay(opts.reconnectionDelay || 1000); this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000); + this.randomizationFactor(opts.randomizationFactor || 0.5); + this.backoff = new Backoff({ + min: this.reconnectionDelay(), + max: this.reconnectionDelayMax(), + jitter: this.randomizationFactor() + }); this.timeout(null == opts.timeout ? 20000 : opts.timeout); this.readyState = 'closed'; this.uri = uri; this.connected = []; - this.attempts = 0; this.encoding = false; this.packetBuffer = []; this.encoder = new parser.Encoder(); @@ -41668,6 +41796,18 @@ Manager.prototype.emitAll = function() { } }; +/** + * Update `socket.id` of all sockets + * + * @api private + */ + +Manager.prototype.updateSocketIds = function(){ + for (var nsp in this.nsps) { + this.nsps[nsp].id = this.engine.id; + } +}; + /** * Mix in `Emitter`. */ @@ -41713,6 +41853,14 @@ Manager.prototype.reconnectionAttempts = function(v){ Manager.prototype.reconnectionDelay = function(v){ if (!arguments.length) return this._reconnectionDelay; this._reconnectionDelay = v; + this.backoff && this.backoff.setMin(v); + return this; +}; + +Manager.prototype.randomizationFactor = function(v){ + if (!arguments.length) return this._randomizationFactor; + this._randomizationFactor = v; + this.backoff && this.backoff.setJitter(v); return this; }; @@ -41727,6 +41875,7 @@ Manager.prototype.reconnectionDelay = function(v){ Manager.prototype.reconnectionDelayMax = function(v){ if (!arguments.length) return this._reconnectionDelayMax; this._reconnectionDelayMax = v; + this.backoff && this.backoff.setMax(v); return this; }; @@ -41752,9 +41901,8 @@ Manager.prototype.timeout = function(v){ Manager.prototype.maybeReconnectOnOpen = function() { // Only try to reconnect if it's the first time we're connecting - if (!this.openReconnect && !this.reconnecting && this._reconnection && this.attempts === 0) { + if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) { // keeps reconnection from firing twice for the same reconnection loop - this.openReconnect = true; this.reconnect(); } }; @@ -41796,9 +41944,10 @@ Manager.prototype.connect = function(fn){ var err = new Error('Connection error'); err.data = data; fn(err); + } else { + // Only do this if there is no fn to handle the error + self.maybeReconnectOnOpen(); } - - self.maybeReconnectOnOpen(); }); // emit `connect_timeout` @@ -41897,6 +42046,7 @@ Manager.prototype.socket = function(nsp){ this.nsps[nsp] = socket; var self = this; socket.on('connect', function(){ + socket.id = self.engine.id; if (!~indexOf(self.connected, socket)) { self.connected.push(socket); } @@ -41984,6 +42134,7 @@ Manager.prototype.cleanup = function(){ Manager.prototype.close = Manager.prototype.disconnect = function(){ this.skipReconnect = true; + this.backoff.reset(); this.readyState = 'closed'; this.engine && this.engine.close(); }; @@ -41997,6 +42148,7 @@ Manager.prototype.disconnect = function(){ Manager.prototype.onclose = function(reason){ debug('close'); this.cleanup(); + this.backoff.reset(); this.readyState = 'closed'; this.emit('close', reason); if (this._reconnection && !this.skipReconnect) { @@ -42014,15 +42166,14 @@ Manager.prototype.reconnect = function(){ if (this.reconnecting || this.skipReconnect) return this; var self = this; - this.attempts++; - if (this.attempts > this._reconnectionAttempts) { + if (this.backoff.attempts >= this._reconnectionAttempts) { debug('reconnect failed'); + this.backoff.reset(); this.emitAll('reconnect_failed'); this.reconnecting = false; } else { - var delay = this.attempts * this.reconnectionDelay(); - delay = Math.min(delay, this.reconnectionDelayMax()); + var delay = this.backoff.duration(); debug('will wait %dms before reconnect attempt', delay); this.reconnecting = true; @@ -42030,8 +42181,8 @@ Manager.prototype.reconnect = function(){ if (self.skipReconnect) return; debug('attempting reconnect'); - self.emitAll('reconnect_attempt', self.attempts); - self.emitAll('reconnecting', self.attempts); + self.emitAll('reconnect_attempt', self.backoff.attempts); + self.emitAll('reconnecting', self.backoff.attempts); // check again for the case socket closed in above events if (self.skipReconnect) return; @@ -42064,13 +42215,14 @@ Manager.prototype.reconnect = function(){ */ Manager.prototype.onreconnect = function(){ - var attempt = this.attempts; - this.attempts = 0; + var attempt = this.backoff.attempts; this.reconnecting = false; + this.backoff.reset(); + this.updateSocketIds(); this.emitAll('reconnect', attempt); }; -},{"./on":45,"./socket":46,"./url":47,"component-bind":48,"component-emitter":49,"debug":50,"engine.io-client":51,"indexof":80,"object-component":81,"socket.io-parser":84}],45:[function(require,module,exports){ +},{"./on":45,"./socket":46,"./url":47,"backo2":48,"component-bind":49,"component-emitter":50,"debug":51,"engine.io-client":52,"indexof":83,"object-component":84,"socket.io-parser":87}],45:[function(require,module,exports){ /** * Module exports. @@ -42288,6 +42440,7 @@ Socket.prototype.onclose = function(reason){ debug('close (%s)', reason); this.connected = false; this.disconnected = true; + delete this.id; this.emit('disconnect', reason); }; @@ -42482,7 +42635,7 @@ Socket.prototype.disconnect = function(){ return this; }; -},{"./on":45,"component-bind":48,"component-emitter":49,"debug":50,"has-binary":78,"socket.io-parser":84,"to-array":88}],47:[function(require,module,exports){ +},{"./on":45,"component-bind":49,"component-emitter":50,"debug":51,"has-binary":81,"socket.io-parser":87,"to-array":91}],47:[function(require,module,exports){ (function (global){ /** @@ -42512,7 +42665,7 @@ function url(uri, loc){ // default to window.location var loc = loc || global.location; - if (null == uri) uri = loc.protocol + '//' + loc.hostname; + if (null == uri) uri = loc.protocol + '//' + loc.host; // relative path support if ('string' == typeof uri) { @@ -42559,7 +42712,94 @@ function url(uri, loc){ } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"debug":50,"parseuri":82}],48:[function(require,module,exports){ +},{"debug":51,"parseuri":85}],48:[function(require,module,exports){ + +/** + * Expose `Backoff`. + */ + +module.exports = Backoff; + +/** + * Initialize backoff timer with `opts`. + * + * - `min` initial timeout in milliseconds [100] + * - `max` max timeout [10000] + * - `jitter` [0] + * - `factor` [2] + * + * @param {Object} opts + * @api public + */ + +function Backoff(opts) { + opts = opts || {}; + this.ms = opts.min || 100; + this.max = opts.max || 10000; + this.factor = opts.factor || 2; + this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; + this.attempts = 0; +} + +/** + * Return the backoff duration. + * + * @return {Number} + * @api public + */ + +Backoff.prototype.duration = function(){ + var ms = this.ms * Math.pow(this.factor, this.attempts++); + if (this.jitter) { + var rand = Math.random(); + var deviation = Math.floor(rand * this.jitter * ms); + ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; + } + return Math.min(ms, this.max) | 0; +}; + +/** + * Reset the number of attempts. + * + * @api public + */ + +Backoff.prototype.reset = function(){ + this.attempts = 0; +}; + +/** + * Set the minimum duration + * + * @api public + */ + +Backoff.prototype.setMin = function(min){ + this.ms = min; +}; + +/** + * Set the maximum duration + * + * @api public + */ + +Backoff.prototype.setMax = function(max){ + this.max = max; +}; + +/** + * Set the jitter + * + * @api public + */ + +Backoff.prototype.setJitter = function(jitter){ + this.jitter = jitter; +}; + + +},{}],49:[function(require,module,exports){ /** * Slice reference. */ @@ -42584,7 +42824,7 @@ module.exports = function(obj, fn){ } }; -},{}],49:[function(require,module,exports){ +},{}],50:[function(require,module,exports){ /** * Expose `Emitter`. @@ -42750,7 +42990,7 @@ Emitter.prototype.hasListeners = function(event){ return !! this.listeners(event).length; }; -},{}],50:[function(require,module,exports){ +},{}],51:[function(require,module,exports){ /** * Expose `debug()` as the module. @@ -42889,11 +43129,11 @@ try { if (window.localStorage) debug.enable(localStorage.debug); } catch(e){} -},{}],51:[function(require,module,exports){ +},{}],52:[function(require,module,exports){ module.exports = require('./lib/'); -},{"./lib/":52}],52:[function(require,module,exports){ +},{"./lib/":53}],53:[function(require,module,exports){ module.exports = require('./socket'); @@ -42905,7 +43145,7 @@ module.exports = require('./socket'); */ module.exports.parser = require('engine.io-parser'); -},{"./socket":53,"engine.io-parser":65}],53:[function(require,module,exports){ +},{"./socket":54,"engine.io-parser":66}],54:[function(require,module,exports){ (function (global){ /** * Module dependencies. @@ -42966,7 +43206,12 @@ function Socket(uri, opts){ if (opts.host) { var pieces = opts.host.split(':'); opts.hostname = pieces.shift(); - if (pieces.length) opts.port = pieces.pop(); + if (pieces.length) { + opts.port = pieces.pop(); + } else if (!opts.port) { + // if no port is specified manually, use the protocol default + opts.port = this.secure ? '443' : '80'; + } } this.agent = opts.agent || false; @@ -42991,9 +43236,19 @@ function Socket(uri, opts){ this.callbackBuffer = []; this.policyPort = opts.policyPort || 843; this.rememberUpgrade = opts.rememberUpgrade || false; - this.open(); this.binaryType = null; this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades; + + // SSL options for Node.js client + this.pfx = opts.pfx || null; + this.key = opts.key || null; + this.passphrase = opts.passphrase || null; + this.cert = opts.cert || null; + this.ca = opts.ca || null; + this.ciphers = opts.ciphers || null; + this.rejectUnauthorized = opts.rejectUnauthorized || null; + + this.open(); } Socket.priorWebsocketSuccess = false; @@ -43057,7 +43312,14 @@ Socket.prototype.createTransport = function (name) { timestampRequests: this.timestampRequests, timestampParam: this.timestampParam, policyPort: this.policyPort, - socket: this + socket: this, + pfx: this.pfx, + key: this.key, + passphrase: this.passphrase, + cert: this.cert, + ca: this.ca, + ciphers: this.ciphers, + rejectUnauthorized: this.rejectUnauthorized }); return transport; @@ -43592,7 +43854,7 @@ Socket.prototype.filterUpgrades = function (upgrades) { }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./transport":54,"./transports":55,"component-emitter":49,"debug":62,"engine.io-parser":65,"indexof":80,"parsejson":74,"parseqs":75,"parseuri":76}],54:[function(require,module,exports){ +},{"./transport":55,"./transports":56,"component-emitter":50,"debug":63,"engine.io-parser":66,"indexof":83,"parsejson":77,"parseqs":78,"parseuri":79}],55:[function(require,module,exports){ /** * Module dependencies. */ @@ -43625,6 +43887,15 @@ function Transport (opts) { this.agent = opts.agent || false; this.socket = opts.socket; this.enablesXDR = opts.enablesXDR; + + // SSL options for Node.js client + this.pfx = opts.pfx; + this.key = opts.key; + this.passphrase = opts.passphrase; + this.cert = opts.cert; + this.ca = opts.ca; + this.ciphers = opts.ciphers; + this.rejectUnauthorized = opts.rejectUnauthorized; } /** @@ -43744,7 +44015,7 @@ Transport.prototype.onClose = function () { this.emit('close'); }; -},{"component-emitter":49,"engine.io-parser":65}],55:[function(require,module,exports){ +},{"component-emitter":50,"engine.io-parser":66}],56:[function(require,module,exports){ (function (global){ /** * Module dependencies @@ -43801,7 +44072,7 @@ function polling(opts){ } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./polling-jsonp":56,"./polling-xhr":57,"./websocket":59,"xmlhttprequest":60}],56:[function(require,module,exports){ +},{"./polling-jsonp":57,"./polling-xhr":58,"./websocket":60,"xmlhttprequest":61}],57:[function(require,module,exports){ (function (global){ /** @@ -44038,7 +44309,7 @@ JSONPPolling.prototype.doWrite = function (data, fn) { }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./polling":58,"component-inherit":61}],57:[function(require,module,exports){ +},{"./polling":59,"component-inherit":62}],58:[function(require,module,exports){ (function (global){ /** * Module requirements. @@ -44115,6 +44386,16 @@ XHR.prototype.request = function(opts){ opts.agent = this.agent || false; opts.supportsBinary = this.supportsBinary; opts.enablesXDR = this.enablesXDR; + + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + return new Request(opts); }; @@ -44174,6 +44455,16 @@ function Request(opts){ this.isBinary = opts.isBinary; this.supportsBinary = opts.supportsBinary; this.enablesXDR = opts.enablesXDR; + + // SSL options for Node.js client + this.pfx = opts.pfx; + this.key = opts.key; + this.passphrase = opts.passphrase; + this.cert = opts.cert; + this.ca = opts.ca; + this.ciphers = opts.ciphers; + this.rejectUnauthorized = opts.rejectUnauthorized; + this.create(); } @@ -44190,7 +44481,18 @@ Emitter(Request.prototype); */ Request.prototype.create = function(){ - var xhr = this.xhr = new XMLHttpRequest({ agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR }); + var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR }; + + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + + var xhr = this.xhr = new XMLHttpRequest(opts); var self = this; try { @@ -44287,7 +44589,7 @@ Request.prototype.onData = function(data){ Request.prototype.onError = function(err){ this.emit('error', err); - this.cleanup(); + this.cleanup(true); }; /** @@ -44296,7 +44598,7 @@ Request.prototype.onError = function(err){ * @api private */ -Request.prototype.cleanup = function(){ +Request.prototype.cleanup = function(fromError){ if ('undefined' == typeof this.xhr || null === this.xhr) { return; } @@ -44307,9 +44609,11 @@ Request.prototype.cleanup = function(){ this.xhr.onreadystatechange = empty; } - try { - this.xhr.abort(); - } catch(e) {} + if (fromError) { + try { + this.xhr.abort(); + } catch(e) {} + } if (global.document) { delete Request.requests[this.index]; @@ -44393,7 +44697,7 @@ function unloadHandler() { } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./polling":58,"component-emitter":49,"component-inherit":61,"debug":62,"xmlhttprequest":60}],58:[function(require,module,exports){ +},{"./polling":59,"component-emitter":50,"component-inherit":62,"debug":63,"xmlhttprequest":61}],59:[function(require,module,exports){ /** * Module dependencies. */ @@ -44640,7 +44944,7 @@ Polling.prototype.uri = function(){ return schema + '://' + this.hostname + port + this.path + query; }; -},{"../transport":54,"component-inherit":61,"debug":62,"engine.io-parser":65,"parseqs":75,"xmlhttprequest":60}],59:[function(require,module,exports){ +},{"../transport":55,"component-inherit":62,"debug":63,"engine.io-parser":66,"parseqs":78,"xmlhttprequest":61}],60:[function(require,module,exports){ /** * Module dependencies. */ @@ -44717,6 +45021,15 @@ WS.prototype.doOpen = function(){ var protocols = void(0); var opts = { agent: this.agent }; + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + this.ws = new WebSocket(uri, protocols, opts); if (this.ws.binaryType === undefined) { @@ -44871,7 +45184,7 @@ WS.prototype.check = function(){ return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name); }; -},{"../transport":54,"component-inherit":61,"debug":62,"engine.io-parser":65,"parseqs":75,"ws":77}],60:[function(require,module,exports){ +},{"../transport":55,"component-inherit":62,"debug":63,"engine.io-parser":66,"parseqs":78,"ws":80}],61:[function(require,module,exports){ // browser shim for xmlhttprequest module var hasCORS = require('has-cors'); @@ -44909,7 +45222,7 @@ module.exports = function(opts) { } } -},{"has-cors":72}],61:[function(require,module,exports){ +},{"has-cors":75}],62:[function(require,module,exports){ module.exports = function(a, b){ var fn = function(){}; @@ -44917,7 +45230,7 @@ module.exports = function(a, b){ a.prototype = new fn; a.prototype.constructor = a; }; -},{}],62:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ /** * This is the web browser implementation of `debug()`. @@ -45066,7 +45379,7 @@ function load() { exports.enable(load()); -},{"./debug":63}],63:[function(require,module,exports){ +},{"./debug":64}],64:[function(require,module,exports){ /** * This is the common logic for both the Node.js and web browser @@ -45265,7 +45578,7 @@ function coerce(val) { return val; } -},{"ms":64}],64:[function(require,module,exports){ +},{"ms":65}],65:[function(require,module,exports){ /** * Helpers. */ @@ -45378,13 +45691,14 @@ function plural(ms, n, name) { return Math.ceil(ms / n) + ' ' + name + 's'; } -},{}],65:[function(require,module,exports){ +},{}],66:[function(require,module,exports){ (function (global){ /** * Module dependencies. */ var keys = require('./keys'); +var hasBinary = require('has-binary'); var sliceBuffer = require('arraybuffer.slice'); var base64encoder = require('base64-arraybuffer'); var after = require('after'); @@ -45399,6 +45713,20 @@ var utf8 = require('utf8'); var isAndroid = navigator.userAgent.match(/Android/i); +/** + * Check if we are running in PhantomJS. + * Uploading a Blob with PhantomJS does not work correctly, as reported here: + * https://github.com/ariya/phantomjs/issues/11395 + * @type boolean + */ +var isPhantomJS = /PhantomJS/i.test(navigator.userAgent); + +/** + * When true, avoids using Blobs to encode payloads. + * @type boolean + */ +var dontSendBlobs = isAndroid || isPhantomJS; + /** * Current protocol version. */ @@ -45470,6 +45798,11 @@ exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) { return encodeBlob(packet, supportsBinary, callback); } + // might be an object with { base64: true, data: dataAsBase64String } + if (data && data.base64) { + return encodeBase64Object(packet, callback); + } + // Sending data as a utf-8 string var encoded = packets[packet.type]; @@ -45482,6 +45815,12 @@ exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) { }; +function encodeBase64Object(packet, callback) { + // packet data is an object { base64: true, data: dataAsBase64String } + var message = 'b' + exports.packets[packet.type] + packet.data.data; + return callback(message); +} + /** * Encode packet helpers for binary types */ @@ -45521,7 +45860,7 @@ function encodeBlob(packet, supportsBinary, callback) { return exports.encodeBase64Packet(packet, callback); } - if (isAndroid) { + if (dontSendBlobs) { return encodeBlobAsArrayBuffer(packet, supportsBinary, callback); } @@ -45653,8 +45992,10 @@ exports.encodePayload = function (packets, supportsBinary, callback) { supportsBinary = null; } - if (supportsBinary) { - if (Blob && !isAndroid) { + var isBinary = hasBinary(packets); + + if (supportsBinary && isBinary) { + if (Blob && !dontSendBlobs) { return exports.encodePayloadAsBlob(packets, callback); } @@ -45670,7 +46011,7 @@ exports.encodePayload = function (packets, supportsBinary, callback) { } function encodeOne(packet, doneCallback) { - exports.encodePacket(packet, supportsBinary, true, function(message) { + exports.encodePacket(packet, !isBinary ? false : supportsBinary, true, function(message) { doneCallback(null, setLengthHeader(message)); }); } @@ -45948,7 +46289,7 @@ exports.decodePayloadAsBinary = function (data, binaryType, callback) { }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./keys":66,"after":67,"arraybuffer.slice":68,"base64-arraybuffer":69,"blob":70,"utf8":71}],66:[function(require,module,exports){ +},{"./keys":67,"after":68,"arraybuffer.slice":69,"base64-arraybuffer":70,"blob":71,"has-binary":72,"utf8":74}],67:[function(require,module,exports){ /** * Gets the keys for an object. @@ -45969,7 +46310,7 @@ module.exports = Object.keys || function keys (obj){ return arr; }; -},{}],67:[function(require,module,exports){ +},{}],68:[function(require,module,exports){ module.exports = after function after(count, callback, err_cb) { @@ -45999,7 +46340,7 @@ function after(count, callback, err_cb) { function noop() {} -},{}],68:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ /** * An abstraction for slicing an arraybuffer even when * ArrayBuffer.prototype.slice is not supported @@ -46030,7 +46371,7 @@ module.exports = function(arraybuffer, start, end) { return result.buffer; }; -},{}],69:[function(require,module,exports){ +},{}],70:[function(require,module,exports){ /* * base64-arraybuffer * https://github.com/niklasvh/base64-arraybuffer @@ -46091,7 +46432,7 @@ module.exports = function(arraybuffer, start, end) { }; })("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); -},{}],70:[function(require,module,exports){ +},{}],71:[function(require,module,exports){ (function (global){ /** * Create a blob builder even when vendor prefixes exist @@ -46144,7 +46485,74 @@ module.exports = (function() { })(); }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],71:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ +(function (global){ + +/* + * Module requirements. + */ + +var isArray = require('isarray'); + +/** + * Module exports. + */ + +module.exports = hasBinary; + +/** + * Checks for binary data. + * + * Right now only Buffer and ArrayBuffer are supported.. + * + * @param {Object} anything + * @api public + */ + +function hasBinary(data) { + + function _hasBinary(obj) { + if (!obj) return false; + + if ( (global.Buffer && global.Buffer.isBuffer(obj)) || + (global.ArrayBuffer && obj instanceof ArrayBuffer) || + (global.Blob && obj instanceof Blob) || + (global.File && obj instanceof File) + ) { + return true; + } + + if (isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + if (_hasBinary(obj[i])) { + return true; + } + } + } else if (obj && 'object' == typeof obj) { + if (obj.toJSON) { + obj = obj.toJSON(); + } + + for (var key in obj) { + if (obj.hasOwnProperty(key) && _hasBinary(obj[key])) { + return true; + } + } + } + + return false; + } + + return _hasBinary(data); +} + +}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"isarray":73}],73:[function(require,module,exports){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +},{}],74:[function(require,module,exports){ (function (global){ /*! http://mths.be/utf8js v2.0.0 by @mathias */ ;(function(root) { @@ -46387,7 +46795,7 @@ module.exports = (function() { }(this)); }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],72:[function(require,module,exports){ +},{}],75:[function(require,module,exports){ /** * Module dependencies. @@ -46412,7 +46820,7 @@ try { module.exports = false; } -},{"global":73}],73:[function(require,module,exports){ +},{"global":76}],76:[function(require,module,exports){ /** * Returns `this`. Execute this without a "context" (i.e. without it being @@ -46422,7 +46830,7 @@ try { module.exports = (function () { return this; })(); -},{}],74:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ (function (global){ /** * JSON parse. @@ -46457,7 +46865,7 @@ module.exports = function parsejson(data) { } }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],75:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ /** * Compiles a querystring * Returns string representation of the object @@ -46496,7 +46904,7 @@ exports.decode = function(qs){ return qry; }; -},{}],76:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ /** * Parses an URI * @@ -46537,7 +46945,7 @@ module.exports = function parseuri(str) { return uri; }; -},{}],77:[function(require,module,exports){ +},{}],80:[function(require,module,exports){ /** * Module dependencies. @@ -46582,7 +46990,7 @@ function ws(uri, protocols, opts) { if (WebSocket) ws.prototype = WebSocket.prototype; -},{}],78:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ (function (global){ /* @@ -46631,7 +47039,7 @@ function hasBinary(data) { } for (var key in obj) { - if (obj.hasOwnProperty(key) && _hasBinary(obj[key])) { + if (Object.prototype.hasOwnProperty.call(obj, key) && _hasBinary(obj[key])) { return true; } } @@ -46644,12 +47052,9 @@ function hasBinary(data) { } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"isarray":79}],79:[function(require,module,exports){ -module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; -}; - -},{}],80:[function(require,module,exports){ +},{"isarray":82}],82:[function(require,module,exports){ +module.exports=require(73) +},{}],83:[function(require,module,exports){ var indexOf = [].indexOf; @@ -46660,7 +47065,7 @@ module.exports = function(arr, obj){ } return -1; }; -},{}],81:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ /** * HOP ref. @@ -46745,7 +47150,7 @@ exports.length = function(obj){ exports.isEmpty = function(obj){ return 0 == exports.length(obj); }; -},{}],82:[function(require,module,exports){ +},{}],85:[function(require,module,exports){ /** * Parses an URI * @@ -46772,7 +47177,7 @@ module.exports = function parseuri(str) { return uri; }; -},{}],83:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ (function (global){ /*global Blob,File*/ @@ -46917,7 +47322,7 @@ exports.removeBlobs = function(data, callback) { }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./is-buffer":85,"isarray":86}],84:[function(require,module,exports){ +},{"./is-buffer":88,"isarray":89}],87:[function(require,module,exports){ /** * Module dependencies. @@ -47160,7 +47565,7 @@ Decoder.prototype.add = function(obj) { this.reconstructor = new BinaryReconstructor(packet); // no attachments, labeled binary but no binary data to follow - if (this.reconstructor.reconPack.attachments == 0) { + if (this.reconstructor.reconPack.attachments === 0) { this.emit('decoded', packet); } } else { // non-binary full packet @@ -47201,11 +47606,15 @@ function decodeString(str) { // look up attachments if type binary if (exports.BINARY_EVENT == p.type || exports.BINARY_ACK == p.type) { - p.attachments = ''; + var buf = ''; while (str.charAt(++i) != '-') { - p.attachments += str.charAt(i); + buf += str.charAt(i); + if (i == str.length) break; } - p.attachments = Number(p.attachments); + if (buf != Number(buf) || str.charAt(i) != '-') { + throw new Error('Illegal attachments'); + } + p.attachments = Number(buf); } // look up namespace (if any) @@ -47215,7 +47624,7 @@ function decodeString(str) { var c = str.charAt(i); if (',' == c) break; p.nsp += c; - if (i + 1 == str.length) break; + if (i == str.length) break; } } else { p.nsp = '/'; @@ -47223,7 +47632,7 @@ function decodeString(str) { // look up id var next = str.charAt(i + 1); - if ('' != next && Number(next) == next) { + if ('' !== next && Number(next) == next) { p.id = ''; while (++i) { var c = str.charAt(i); @@ -47232,7 +47641,7 @@ function decodeString(str) { break; } p.id += str.charAt(i); - if (i + 1 == str.length) break; + if (i == str.length) break; } p.id = Number(p.id); } @@ -47315,7 +47724,7 @@ function error(data){ }; } -},{"./binary":83,"./is-buffer":85,"component-emitter":49,"debug":50,"isarray":86,"json3":87}],85:[function(require,module,exports){ +},{"./binary":86,"./is-buffer":88,"component-emitter":50,"debug":51,"isarray":89,"json3":90}],88:[function(require,module,exports){ (function (global){ module.exports = isBuf; @@ -47332,9 +47741,9 @@ function isBuf(obj) { } }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],86:[function(require,module,exports){ -module.exports=require(79) -},{}],87:[function(require,module,exports){ +},{}],89:[function(require,module,exports){ +module.exports=require(73) +},{}],90:[function(require,module,exports){ /*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */ ;(function (window) { // Convenience aliases. @@ -48197,7 +48606,7 @@ module.exports=require(79) } }(this)); -},{}],88:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ module.exports = toArray function toArray(list, index) { @@ -48212,7 +48621,7 @@ function toArray(list, index) { return array } -},{}],89:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ var traverse = module.exports = function (obj) { return new Traverse(obj); }; @@ -48528,7 +48937,7 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { return key in obj; }; -},{}],90:[function(require,module,exports){ +},{}],93:[function(require,module,exports){ // Generated by CoffeeScript 1.7.1 (function() { var lang; @@ -48589,7 +48998,7 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { }).call(this); -},{}],91:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ // Generated by CoffeeScript 1.7.1 (function() { var deprecate, hasModule, makeTwix, @@ -49305,10 +49714,10 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { }).call(this); -},{"./lang":90,"moment":41}],92:[function(require,module,exports){ -// Underscore.js 1.5.2 +},{"./lang":93,"moment":41}],95:[function(require,module,exports){ +// Underscore.js 1.8.2 // http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { @@ -49322,9 +49731,6 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Save the previous value of the `_` variable. var previousUnderscore = root._; - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; @@ -49332,25 +49738,19 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { var push = ArrayProto.push, slice = ArrayProto.slice, - concat = ArrayProto.concat, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, nativeIsArray = Array.isArray, nativeKeys = Object.keys, - nativeBind = FuncProto.bind; + nativeBind = FuncProto.bind, + nativeCreate = Object.create; + + // Naked function reference for surrogate-prototype-swapping. + var Ctor = function(){}; // Create a safe reference to the Underscore object for use below. var _ = function(obj) { @@ -49361,8 +49761,7 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Export the Underscore object for **Node.js**, with // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object via a string identifier, - // for Closure Compiler "advanced" mode. + // the browser, add `_` as a global object. if (typeof exports !== 'undefined') { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = _; @@ -49373,160 +49772,208 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { } // Current version. - _.VERSION = '1.5.2'; + _.VERSION = '1.8.2'; + + // Internal function that returns an efficient (for current engines) version + // of the passed-in callback, to be repeatedly applied in other Underscore + // functions. + var optimizeCb = function(func, context, argCount) { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return function(value) { + return func.call(context, value); + }; + case 2: return function(value, other) { + return func.call(context, value, other); + }; + case 3: return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; + }; + + // A mostly-internal function to generate callbacks that can be applied + // to each element in a collection, returning the desired result — either + // identity, an arbitrary callback, a property matcher, or a property accessor. + var cb = function(value, context, argCount) { + if (value == null) return _.identity; + if (_.isFunction(value)) return optimizeCb(value, context, argCount); + if (_.isObject(value)) return _.matcher(value); + return _.property(value); + }; + _.iteratee = function(value, context) { + return cb(value, context, Infinity); + }; + + // An internal function for creating assigner functions. + var createAssigner = function(keysFunc, undefinedOnly) { + return function(obj) { + var length = arguments.length; + if (length < 2 || obj == null) return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], + keys = keysFunc(source), + l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; + } + } + return obj; + }; + }; + + // An internal function for creating a new object that inherits from another. + var baseCreate = function(prototype) { + if (!_.isObject(prototype)) return {}; + if (nativeCreate) return nativeCreate(prototype); + Ctor.prototype = prototype; + var result = new Ctor; + Ctor.prototype = null; + return result; + }; + + // Helper for collection methods to determine whether a collection + // should be iterated as an array or as an object + // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + var isArrayLike = function(collection) { + var length = collection && collection.length; + return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; + }; // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, length = obj.length; i < length; i++) { - if (iterator.call(context, obj[i], i, obj) === breaker) return; + // Handles raw objects in addition to array-likes. Treats all + // sparse array-likes as if they were dense. + _.each = _.forEach = function(obj, iteratee, context) { + iteratee = optimizeCb(iteratee, context); + var i, length; + if (isArrayLike(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee(obj[i], i, obj); } } else { var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; + for (i = 0, length = keys.length; i < length; i++) { + iteratee(obj[keys[i]], keys[i], obj); } } + return obj; }; - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = _.collect = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results.push(iterator.call(context, value, index, list)); - }); + // Return the results of applying the iteratee to each element. + _.map = _.collect = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + results[index] = iteratee(obj[currentKey], currentKey, obj); + } return results; }; - var reduceError = 'Reduce of empty array with no initial value'; + // Create a reducing function iterating left or right. + function createReduce(dir) { + // Optimized iterator function as using arguments.length + // in the main function will deoptimize the, see #1991. + function iterator(obj, iteratee, memo, keys, index, length) { + for (; index >= 0 && index < length; index += dir) { + var currentKey = keys ? keys[index] : index; + memo = iteratee(memo, obj[currentKey], currentKey, obj); + } + return memo; + } - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); + return function(obj, iteratee, memo, context) { + iteratee = optimizeCb(iteratee, context, 4); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length, + index = dir > 0 ? 0 : length - 1; + // Determine the initial value if none is provided. + if (arguments.length < 3) { + memo = obj[keys ? keys[index] : index]; + index += dir; } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; + return iterator(obj, iteratee, memo, keys, index, length); + }; + } + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. + _.reduce = _.foldl = _.inject = createReduce(1); // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var length = obj.length; - if (length !== +length) { - var keys = _.keys(obj); - length = keys.length; - } - each(obj, function(value, index, list) { - index = keys ? keys[--length] : --length; - if (!initial) { - memo = obj[index]; - initial = true; - } else { - memo = iterator.call(context, memo, obj[index], index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; + _.reduceRight = _.foldr = createReduce(-1); // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { - var result; - any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; + _.find = _.detect = function(obj, predicate, context) { + var key; + if (isArrayLike(obj)) { + key = _.findIndex(obj, predicate, context); + } else { + key = _.findKey(obj, predicate, context); + } + if (key !== void 0 && key !== -1) return obj[key]; }; // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { + _.filter = _.select = function(obj, predicate, context) { var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); - each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results.push(value); + predicate = cb(predicate, context); + _.each(obj, function(value, index, list) { + if (predicate(value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { - return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); - }, context); + _.reject = function(obj, predicate, context) { + return _.filter(obj, _.negate(cb(predicate)), context); }; // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); - each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; - }); - return !!result; + _.every = _.all = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) return false; + } + return true; }; // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); - each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; - }); - return !!result; + _.some = _.any = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = !isArrayLike(obj) && _.keys(obj), + length = (keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = keys ? keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) return true; + } + return false; }; // Determine if the array or object contains a given value (using `===`). - // Aliased as `include`. - _.contains = _.include = function(obj, target) { - if (obj == null) return false; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - return any(obj, function(value) { - return value === target; - }); + // Aliased as `includes` and `include`. + _.contains = _.includes = _.include = function(obj, target, fromIndex) { + if (!isArrayLike(obj)) obj = _.values(obj); + return _.indexOf(obj, target, typeof fromIndex == 'number' && fromIndex) >= 0; }; // Invoke a method (with arguments) on every item in a collection. @@ -49534,100 +49981,111 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { var args = slice.call(arguments, 2); var isFunc = _.isFunction(method); return _.map(obj, function(value) { - return (isFunc ? method : value[method]).apply(value, args); + var func = isFunc ? method : value[method]; + return func == null ? func : func.apply(value, args); }); }; // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); + return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? void 0 : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); + _.where = function(obj, attrs) { + return _.filter(obj, _.matcher(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); + return _.find(obj, _.matcher(attrs)); }; - // Return the maximum element or (element-based computation). - // Can't optimize arrays of integers longer than 65,535 elements. - // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797) - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.max.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed > result.computed && (result = {value : value, computed : computed}); - }); - return result.value; + // Return the maximum element (or element-based computation). + _.max = function(obj, iteratee, context) { + var result = -Infinity, lastComputed = -Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value > result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; }; // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.min.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); - }); - return result.value; + _.min = function(obj, iteratee, context) { + var result = Infinity, lastComputed = Infinity, + value, computed; + if (iteratee == null && obj != null) { + obj = isArrayLike(obj) ? obj : _.values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value < result) { + result = value; + } + } + } else { + iteratee = cb(iteratee, context); + _.each(obj, function(value, index, list) { + computed = iteratee(value, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = value; + lastComputed = computed; + } + }); + } + return result; }; - // Shuffle an array, using the modern version of the + // Shuffle a collection, using the modern version of the // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). _.shuffle = function(obj) { - var rand; - var index = 0; - var shuffled = []; - each(obj, function(value) { - rand = _.random(index++); - shuffled[index - 1] = shuffled[rand]; - shuffled[rand] = value; - }); + var set = isArrayLike(obj) ? obj : _.values(obj); + var length = set.length; + var shuffled = Array(length); + for (var index = 0, rand; index < length; index++) { + rand = _.random(0, index); + if (rand !== index) shuffled[index] = shuffled[rand]; + shuffled[rand] = set[index]; + } return shuffled; }; - // Sample **n** random values from an array. - // If **n** is not specified, returns a single random element from the array. + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `map`. _.sample = function(obj, n, guard) { - if (arguments.length < 2 || guard) { + if (n == null || guard) { + if (!isArrayLike(obj)) obj = _.values(obj); return obj[_.random(obj.length - 1)]; } return _.shuffle(obj).slice(0, Math.max(0, n)); }; - // An internal function to generate lookup iterators. - var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); + // Sort the object's values by a criterion produced by an iteratee. + _.sortBy = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); return _.pluck(_.map(obj, function(value, index, list) { return { value: value, index: index, - criteria: iterator.call(context, value, index, list) + criteria: iteratee(value, index, list) }; }).sort(function(left, right) { var a = left.criteria; @@ -49642,12 +50100,12 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // An internal function used for aggregate "group by" operations. var group = function(behavior) { - return function(obj, value, context) { + return function(obj, iteratee, context) { var result = {}; - var iterator = value == null ? _.identity : lookupIterator(value); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); + iteratee = cb(iteratee, context); + _.each(obj, function(value, index) { + var key = iteratee(value, index, obj); + behavior(result, value, key); }); return result; }; @@ -49655,48 +50113,46 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); + _.groupBy = group(function(result, value, key) { + if (_.has(result, key)) result[key].push(value); else result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `groupBy`, but for // when you know that your index values will be unique. - _.indexBy = group(function(result, key, value) { + _.indexBy = group(function(result, value, key) { result[key] = value; }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. - _.countBy = group(function(result, key) { - _.has(result, key) ? result[key]++ : result[key] = 1; + _.countBy = group(function(result, value, key) { + if (_.has(result, key)) result[key]++; else result[key] = 1; }); - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); - var value = iterator.call(context, obj); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >>> 1; - iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid; - } - return low; - }; - // Safely create a real, live array from anything iterable. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); - if (obj.length === +obj.length) return _.map(obj, _.identity); + if (isArrayLike(obj)) return _.map(obj, _.identity); return _.values(obj); }; // Return the number of elements in an object. _.size = function(obj) { if (obj == null) return 0; - return (obj.length === +obj.length) ? obj.length : _.keys(obj).length; + return isArrayLike(obj) ? obj.length : _.keys(obj).length; + }; + + // Split a collection into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(obj, predicate, context) { + predicate = cb(predicate, context); + var pass = [], fail = []; + _.each(obj, function(value, key, obj) { + (predicate(value, key, obj) ? pass : fail).push(value); + }); + return [pass, fail]; }; // Array Functions @@ -49707,34 +50163,30 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; - return (n == null) || guard ? array[0] : slice.call(array, 0, n); + if (n == null || guard) return array[0]; + return _.initial(array, array.length - n); }; // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. + // the array, excluding the last N. _.initial = function(array, n, guard) { - return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); }; // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. + // values in the array. _.last = function(array, n, guard) { if (array == null) return void 0; - if ((n == null) || guard) { - return array[array.length - 1]; - } else { - return slice.call(array, Math.max(array.length - n, 0)); - } + if (n == null || guard) return array[array.length - 1]; + return _.rest(array, Math.max(0, array.length - n)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. The **guard** - // check allows it to work with `_.map`. + // the rest N values in the array. _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, (n == null) || guard ? 1 : n); + return slice.call(array, n == null || guard ? 1 : n); }; // Trim out all falsy values from an array. @@ -49743,23 +50195,28 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { }; // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, output) { - if (shallow && _.every(input, _.isArray)) { - return concat.apply(output, input); - } - each(input, function(value) { - if (_.isArray(value) || _.isArguments(value)) { - shallow ? push.apply(output, value) : flatten(value, shallow, output); - } else { - output.push(value); + var flatten = function(input, shallow, strict, startIndex) { + var output = [], idx = 0; + for (var i = startIndex || 0, length = input && input.length; i < length; i++) { + var value = input[i]; + if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { + //flatten current level of array or arguments object + if (!shallow) value = flatten(value, shallow, strict); + var j = 0, len = value.length; + output.length += len; + while (j < len) { + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; } - }); + } return output; }; // Flatten out an array, either recursively (by default), or just one level. _.flatten = function(array, shallow) { - return flatten(array, shallow, []); + return flatten(array, shallow, false); }; // Return a version of the array that does not contain the specified value(s). @@ -49770,66 +50227,90 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iterator, context) { - if (_.isFunction(isSorted)) { - context = iterator; - iterator = isSorted; + _.uniq = _.unique = function(array, isSorted, iteratee, context) { + if (array == null) return []; + if (!_.isBoolean(isSorted)) { + context = iteratee; + iteratee = isSorted; isSorted = false; } - var initial = iterator ? _.map(array, iterator, context) : array; - var results = []; + if (iteratee != null) iteratee = cb(iteratee, context); + var result = []; var seen = []; - each(initial, function(value, index) { - if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) { - seen.push(value); - results.push(array[index]); + for (var i = 0, length = array.length; i < length; i++) { + var value = array[i], + computed = iteratee ? iteratee(value, i, array) : value; + if (isSorted) { + if (!i || seen !== computed) result.push(value); + seen = computed; + } else if (iteratee) { + if (!_.contains(seen, computed)) { + seen.push(computed); + result.push(value); + } + } else if (!_.contains(result, value)) { + result.push(value); } - }); - return results; + } + return result; }; // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { - return _.uniq(_.flatten(arguments, true)); + return _.uniq(flatten(arguments, true, true)); }; // Produce an array that contains every item shared between all the // passed-in arrays. _.intersection = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; - }); - }); + if (array == null) return []; + var result = []; + var argsLength = arguments.length; + for (var i = 0, length = array.length; i < length; i++) { + var item = array[i]; + if (_.contains(result, item)) continue; + for (var j = 1; j < argsLength; j++) { + if (!_.contains(arguments[j], item)) break; + } + if (j === argsLength) result.push(item); + } + return result; }; // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = function(array) { - var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); - return _.filter(array, function(value){ return !_.contains(rest, value); }); + var rest = flatten(arguments, true, true, 1); + return _.filter(array, function(value){ + return !_.contains(rest, value); + }); }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { - var length = _.max(_.pluck(arguments, "length").concat(0)); - var results = new Array(length); - for (var i = 0; i < length; i++) { - results[i] = _.pluck(arguments, '' + i); + return _.unzip(arguments); + }; + + // Complement of _.zip. Unzip accepts an array of arrays and groups + // each array's elements on shared indices + _.unzip = function(array) { + var length = array && _.max(array, 'length').length || 0; + var result = Array(length); + + for (var index = 0; index < length; index++) { + result[index] = _.pluck(array, index); } - return results; + return result; }; // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. _.object = function(list, values) { - if (list == null) return {}; var result = {}; - for (var i = 0, length = list.length; i < length; i++) { + for (var i = 0, length = list && list.length; i < length; i++) { if (values) { result[list[i]] = values[i]; } else { @@ -49839,40 +50320,68 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { return result; }; - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. + // Return the position of the first occurrence of an item in an array, + // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i = 0, length = array.length; - if (isSorted) { - if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); - } else { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } + var i = 0, length = array && array.length; + if (typeof isSorted == 'number') { + i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted; + } else if (isSorted && length) { + i = _.sortedIndex(array, item); + return array[i] === item ? i : -1; + } + if (item !== item) { + return _.findIndex(slice.call(array, i), _.isNaN); } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); for (; i < length; i++) if (array[i] === item) return i; return -1; }; - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. _.lastIndexOf = function(array, item, from) { - if (array == null) return -1; - var hasIndex = from != null; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { - return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); + var idx = array ? array.length : 0; + if (typeof from == 'number') { + idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1); + } + if (item !== item) { + return _.findLastIndex(slice.call(array, 0, idx), _.isNaN); } - var i = (hasIndex ? from : array.length); - while (i--) if (array[i] === item) return i; + while (--idx >= 0) if (array[idx] === item) return idx; return -1; }; + // Generator function to create the findIndex and findLastIndex functions + function createIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = array != null && array.length; + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) return index; + } + return -1; + }; + } + + // Returns the first index on an array-like that passes a predicate test + _.findIndex = createIndexFinder(1); + + _.findLastIndex = createIndexFinder(-1); + + // Use a comparator function to figure out the smallest index at which + // an object should be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iteratee, context) { + iteratee = cb(iteratee, context, 1); + var value = iteratee(obj); + var low = 0, high = array.length; + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; + } + return low; + }; + // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](http://docs.python.org/library/functions.html#range). @@ -49881,15 +50390,13 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { stop = start || 0; start = 0; } - step = arguments[2] || 1; + step = step || 1; var length = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(length); + var range = Array(length); - while(idx < length) { - range[idx++] = start; - start += step; + for (var idx = 0; idx < length; idx++, start += step) { + range[idx] = start; } return range; @@ -49898,68 +50405,83 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Function (ahem) Functions // ------------------ - // Reusable constructor function for prototype setting. - var ctor = function(){}; + // Determines whether to execute a function as a constructor + // or a normal function with the provided arguments + var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); + var self = baseCreate(sourceFunc.prototype); + var result = sourceFunc.apply(self, args); + if (_.isObject(result)) return result; + return self; + }; // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = function(func, context) { - var args, bound; if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError; - args = slice.call(arguments, 2); - return bound = function() { - if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); - ctor.prototype = func.prototype; - var self = new ctor; - ctor.prototype = null; - var result = func.apply(self, args.concat(slice.call(arguments))); - if (Object(result) === result) return result; - return self; + if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); + var args = slice.call(arguments, 2); + var bound = function() { + return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); }; + return bound; }; // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. _.partial = function(func) { - var args = slice.call(arguments, 1); - return function() { - return func.apply(this, args.concat(slice.call(arguments))); + var boundArgs = slice.call(arguments, 1); + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); }; + return bound; }; - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length === 0) throw new Error("bindAll must be passed function names"); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); + var i, length = arguments.length, key; + if (length <= 1) throw new Error('bindAll must be passed function names'); + for (i = 1; i < length; i++) { + key = arguments[i]; + obj[key] = _.bind(obj[key], obj); + } return obj; }; // Memoize an expensive function by storing its results. _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); + var memoize = function(key) { + var cache = memoize.cache; + var address = '' + (hasher ? hasher.apply(this, arguments) : key); + if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); + return cache[address]; }; + memoize.cache = {}; + return memoize; }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = function(func, wait) { var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(null, args); }, wait); + return setTimeout(function(){ + return func.apply(null, args); + }, wait); }; // Defers a function, scheduling it to run after the current call stack has // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; + _.defer = _.partial(_.delay, _, 1); // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run @@ -49970,23 +50492,27 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { var context, args, result; var timeout = null; var previous = 0; - options || (options = {}); + if (!options) options = {}; var later = function() { - previous = options.leading === false ? 0 : new Date; + previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); + if (!timeout) context = args = null; }; return function() { - var now = new Date; + var now = _.now(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } previous = now; result = func.apply(context, args); + if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } @@ -50000,38 +50526,33 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + + if (last < wait && last >= 0) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + if (!timeout) context = args = null; + } + } + }; + return function() { context = this; args = arguments; - timestamp = new Date(); - var later = function() { - var last = (new Date()) - timestamp; - if (last < wait) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) result = func.apply(context, args); - } - }; + timestamp = _.now(); var callNow = immediate && !timeout; - if (!timeout) { - timeout = setTimeout(later, wait); + if (!timeout) timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + context = args = null; } - if (callNow) result = func.apply(context, args); - return result; - }; - }; - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - memo = func.apply(this, arguments); - func = null; - return memo; + return result; }; }; @@ -50039,27 +50560,30 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { + return _.partial(wrapper, func); + }; + + // Returns a negated version of the passed-in predicate. + _.negate = function(predicate) { return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); + return !predicate.apply(this, arguments); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { - var funcs = arguments; + var args = arguments; + var start = args.length - 1; return function() { - var args = arguments; - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; + var i = start; + var result = args[start].apply(this, arguments); + while (i--) result = args[i].call(this, result); + return result; }; }; - // Returns a function that will only be executed after being called N times. + // Returns a function that will only be executed on and after the Nth call. _.after = function(times, func) { return function() { if (--times < 1) { @@ -50068,15 +50592,66 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { }; }; + // Returns a function that will only be executed up to (but not including) the Nth call. + _.before = function(times, func) { + var memo; + return function() { + if (--times > 0) { + memo = func.apply(this, arguments); + } + if (times <= 1) func = null; + return memo; + }; + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = _.partial(_.before, 2); + // Object Functions // ---------------- - // Retrieve the names of an object's properties. + // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. + var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); + var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', + 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; + + function collectNonEnumProps(obj, keys) { + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; + + // Constructor is a special case. + var prop = 'constructor'; + if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); + + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { + keys.push(prop); + } + } + } + + // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (_.has(obj, key)) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); + return keys; + }; + + // Retrieve all the property names of an object. + _.allKeys = function(obj) { + if (!_.isObject(obj)) return []; + var keys = []; + for (var key in obj) keys.push(key); + // Ahem, IE < 9. + if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; @@ -50084,18 +50659,33 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { _.values = function(obj) { var keys = _.keys(obj); var length = keys.length; - var values = new Array(length); + var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[keys[i]]; } return values; }; + // Returns the results of applying the iteratee to each element of the object + // In contrast to _.map it returns an object + _.mapObject = function(obj, iteratee, context) { + iteratee = cb(iteratee, context); + var keys = _.keys(obj), + length = keys.length, + results = {}, + currentKey; + for (var index = 0; index < length; index++) { + currentKey = keys[index]; + results[currentKey] = iteratee(obj[currentKey], currentKey, obj); + } + return results; + }; + // Convert an object into a list of `[key, value]` pairs. _.pairs = function(obj) { var keys = _.keys(obj); var length = keys.length; - var pairs = new Array(length); + var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [keys[i], obj[keys[i]]]; } @@ -50123,48 +50713,57 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { }; // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - obj[prop] = source[prop]; - } - } - }); - return obj; + _.extend = createAssigner(_.allKeys); + + // Assigns a given object with all the own properties in the passed-in object(s) + // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) + _.extendOwn = _.assign = createAssigner(_.keys); + + // Returns the first key on an object that passes a predicate test + _.findKey = function(obj, predicate, context) { + predicate = cb(predicate, context); + var keys = _.keys(obj), key; + for (var i = 0, length = keys.length; i < length; i++) { + key = keys[i]; + if (predicate(obj[key], key, obj)) return key; + } }; // Return a copy of the object only containing the whitelisted properties. - _.pick = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - each(keys, function(key) { - if (key in obj) copy[key] = obj[key]; - }); - return copy; + _.pick = function(object, oiteratee, context) { + var result = {}, obj = object, iteratee, keys; + if (obj == null) return result; + if (_.isFunction(oiteratee)) { + keys = _.allKeys(obj); + iteratee = optimizeCb(oiteratee, context); + } else { + keys = flatten(arguments, false, false, 1); + iteratee = function(value, key, obj) { return key in obj; }; + obj = Object(obj); + } + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i]; + var value = obj[key]; + if (iteratee(value, key, obj)) result[key] = value; + } + return result; }; // Return a copy of the object without the blacklisted properties. - _.omit = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - for (var key in obj) { - if (!_.contains(keys, key)) copy[key] = obj[key]; + _.omit = function(obj, iteratee, context) { + if (_.isFunction(iteratee)) { + iteratee = _.negate(iteratee); + } else { + var keys = _.map(flatten(arguments, false, false, 1), String); + iteratee = function(value, key) { + return !_.contains(keys, key); + }; } - return copy; + return _.pick(obj, iteratee, context); }; // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - if (obj[prop] === void 0) obj[prop] = source[prop]; - } - } - }); - return obj; - }; + _.defaults = createAssigner(_.allKeys, true); // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { @@ -50180,11 +50779,24 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { return obj; }; + // Returns whether an object has a given set of `key:value` pairs. + _.isMatch = function(object, attrs) { + var keys = _.keys(attrs), length = keys.length; + if (object == null) return !length; + var obj = Object(object); + for (var i = 0; i < length; i++) { + var key = keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + return true; + }; + + // Internal recursive comparison function for `isEqual`. var eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a == 1 / b; + if (a === b) return a !== 0 || 1 / a === 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; // Unwrap any wrapped objects. @@ -50192,97 +50804,98 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); - if (className != toString.call(b)) return false; + if (className !== toString.call(b)) return false; switch (className) { - // Strings, numbers, dates, and booleans are compared by value. + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case '[object RegExp]': + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. - return a == String(b); + return '' + a === '' + b; case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); + // `NaN`s are equivalent, but non-reflexive. + // Object(NaN) is equivalent to NaN + if (+a !== +a) return +b !== +b; + // An `egal` comparison is performed for other numeric values. + return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; + return +a === +b; + } + + var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false; + + // Objects with different constructors are not equivalent, but `Object`s or `Array`s + // from different frames are. + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && + _.isFunction(bCtor) && bCtor instanceof bCtor) + && ('constructor' in a && 'constructor' in b)) { + return false; + } } - if (typeof a != 'object' || typeof b != 'object') return false; // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. + + // Initializing stack of traversed objects. + // It's done here since we only need them for objects and arrays comparison. + aStack = aStack || []; + bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. - if (aStack[length] == a) return bStack[length] == b; - } - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; + if (aStack[length] === a) return bStack[length] === b; } + // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); - var size = 0, result = true; + // Recursively compare objects and arrays. - if (className == '[object Array]') { + if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack))) break; - } + length = a.length; + if (length !== b.length) return false; + // Deep compare the contents, ignoring non-numeric properties. + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. - for (var key in a) { - if (_.has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (_.has(b, key) && !(size--)) break; - } - result = !size; + var keys = _.keys(a), key; + length = keys.length; + // Ensure that both objects contain the same number of properties before comparing deep equality. + if (_.keys(b).length !== length) return false; + while (length--) { + // Deep compare each member + key = keys[length]; + if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); - return result; + return true; }; // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { - return eq(a, b, [], []); + return eq(a, b); }; // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. _.isEmpty = function(obj) { if (obj == null) return true; - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; + if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; + return _.keys(obj).length === 0; }; // Is a given value a DOM element? @@ -50293,33 +50906,35 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Is a given value an array? // Delegates to ECMA5's native Array.isArray _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) == '[object Array]'; + return toString.call(obj) === '[object Array]'; }; // Is a given variable an object? _.isObject = function(obj) { - return obj === Object(obj); + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; }; - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. - each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { + // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. + _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { _['is' + name] = function(obj) { - return toString.call(obj) == '[object ' + name + ']'; + return toString.call(obj) === '[object ' + name + ']'; }; }); - // Define a fallback version of the method in browsers (ahem, IE), where + // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. if (!_.isArguments(arguments)) { _.isArguments = function(obj) { - return !!(obj && _.has(obj, 'callee')); + return _.has(obj, 'callee'); }; } - // Optimize `isFunction` if appropriate. - if (typeof (/./) !== 'function') { + // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, + // IE 11 (#1621), and in Safari 8 (#1929). + if (typeof /./ != 'function' && typeof Int8Array != 'object') { _.isFunction = function(obj) { - return typeof obj === 'function'; + return typeof obj == 'function' || false; }; } @@ -50330,12 +50945,12 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Is the given value `NaN`? (NaN is the only number which does not equal itself). _.isNaN = function(obj) { - return _.isNumber(obj) && obj != +obj; + return _.isNumber(obj) && obj !== +obj; }; // Is a given value a boolean? _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; + return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; }; // Is a given value equal to null? @@ -50351,7 +50966,7 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // Shortcut function for checking if an object has a given property directly // on itself (in other words, not on a prototype). _.has = function(obj, key) { - return hasOwnProperty.call(obj, key); + return obj != null && hasOwnProperty.call(obj, key); }; // Utility Functions @@ -50364,15 +50979,47 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { return this; }; - // Keep the identity function around for default iterators. + // Keep the identity function around for default iteratees. _.identity = function(value) { return value; }; + // Predicate-generating functions. Often useful outside of Underscore. + _.constant = function(value) { + return function() { + return value; + }; + }; + + _.noop = function(){}; + + _.property = function(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; + }; + + // Generates a function for a given object that returns a given property. + _.propertyOf = function(obj) { + return obj == null ? function(){} : function(key) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of + // `key:value` pairs. + _.matcher = _.matches = function(attrs) { + attrs = _.extendOwn({}, attrs); + return function(obj) { + return _.isMatch(obj, attrs); + }; + }; + // Run a function **n** times. - _.times = function(n, iterator, context) { + _.times = function(n, iteratee, context) { var accum = Array(Math.max(0, n)); - for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); + iteratee = optimizeCb(iteratee, context, 1); + for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; }; @@ -50385,54 +51032,49 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { return min + Math.floor(Math.random() * (max - min + 1)); }; - // List of HTML entities for escaping. - var entityMap = { - escape: { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - } + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { + return new Date().getTime(); }; - entityMap.unescape = _.invert(entityMap.escape); - // Regexes containing the keys and values listed immediately above. - var entityRegexes = { - escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), - unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g') + // List of HTML entities for escaping. + var escapeMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' }; + var unescapeMap = _.invert(escapeMap); // Functions for escaping and unescaping strings to/from HTML interpolation. - _.each(['escape', 'unescape'], function(method) { - _[method] = function(string) { - if (string == null) return ''; - return ('' + string).replace(entityRegexes[method], function(match) { - return entityMap[method][match]; - }); + var createEscaper = function(map) { + var escaper = function(match) { + return map[match]; }; - }); + // Regexes for identifying a key that needs to be escaped + var source = '(?:' + _.keys(map).join('|') + ')'; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, 'g'); + return function(string) { + string = string == null ? '' : '' + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; + }; + _.escape = createEscaper(escapeMap); + _.unescape = createEscaper(unescapeMap); // If the value of the named `property` is a function then invoke it with the // `object` as context; otherwise, return it. - _.result = function(object, property) { - if (object == null) return void 0; - var value = object[property]; + _.result = function(object, property, fallback) { + var value = object == null ? void 0 : object[property]; + if (value === void 0) { + value = fallback; + } return _.isFunction(value) ? value.call(object) : value; }; - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result.call(this, func.apply(_, args)); - }; - }); - }; - // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; @@ -50461,22 +51103,26 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { '\\': '\\', '\r': 'r', '\n': 'n', - '\t': 't', '\u2028': 'u2028', '\u2029': 'u2029' }; - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; + var escaper = /\\|'|\r|\n|\u2028|\u2029/g; + + var escapeChar = function(match) { + return '\\' + escapes[match]; + }; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; + // NB: `oldSettings` only exists for backwards compatibility. + _.template = function(text, settings, oldSettings) { + if (!settings && oldSettings) settings = oldSettings; settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ + var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source @@ -50486,19 +51132,18 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); + source += text.slice(index, offset).replace(escaper, escapeChar); + index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { + } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { + } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } - index = offset + match.length; + + // Adobe VMs need the match returned to produce the correct offest. return match; }); source += "';\n"; @@ -50508,29 +51153,31 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; + source + 'return __p;\n'; try { - render = new Function(settings.variable || 'obj', '_', source); + var render = new Function(settings.variable || 'obj', '_', source); } catch (e) { e.source = source; throw e; } - if (data) return render(data, _); var template = function(data) { return render.call(this, data, _); }; - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; + // Provide the compiled source as a convenience for precompilation. + var argument = settings.variable || 'obj'; + template.source = 'function(' + argument + '){\n' + source + '}'; return template; }; - // Add a "chain" function, which will delegate to the wrapper. + // Add a "chain" function. Start chaining a wrapped Underscore object. _.chain = function(obj) { - return _(obj).chain(); + var instance = _(obj); + instance._chain = true; + return instance; }; // OOP @@ -50540,54 +51187,76 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { // underscore functions. Wrapped objects may be chained. // Helper function to continue chaining intermediate results. - var result = function(obj) { - return this._chain ? _(obj).chain() : obj; + var result = function(instance, obj) { + return instance._chain ? _(obj).chain() : obj; + }; + + // Add your own custom functions to the Underscore object. + _.mixin = function(obj) { + _.each(_.functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return result(this, func.apply(_, args)); + }; + }); }; // Add all of the Underscore functions to the wrapper object. _.mixin(_); // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); - if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; - return result.call(this, obj); + if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; + return result(this, obj); }; }); // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { + _.each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { - return result.call(this, method.apply(this._wrapped, arguments)); + return result(this, method.apply(this._wrapped, arguments)); }; }); - _.extend(_.prototype, { - - // Start chaining a wrapped Underscore object. - chain: function() { - this._chain = true; - return this; - }, - - // Extracts the result from a wrapped and chained object. - value: function() { - return this._wrapped; - } + // Extracts the result from a wrapped and chained object. + _.prototype.value = function() { + return this._wrapped; + }; - }); + // Provide unwrapping proxy for some methods used in engine operations + // such as arithmetic and JSON stringification. + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + + _.prototype.toString = function() { + return '' + this._wrapped; + }; -}).call(this); + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } +}.call(this)); -},{}],93:[function(require,module,exports){ +},{}],96:[function(require,module,exports){ module.exports={ "name": "joola.sdk", "preferGlobal": false, - "version": "0.8.3", + "version": "0.8.4", "author": "Joola ", "description": "joola's software development kit (SDK)", "engine": "node >= 0.10.x", @@ -50619,13 +51288,13 @@ module.exports={ "cloneextend": "^0.0.3", "deep-extend": "^0.2.11", "eventemitter2": "~0.4.13", - "jquery": "^2.1.1", + "jquery": "^2.1.3", "jquery-ui": "^1.10.5", - "moment": "^2.8.4", - "socket.io-client": "^1.3.3", + "moment": "^2.9.0", + "socket.io-client": "^1.3.5", "traverse": "^0.6.6", "twix": "^0.5.1", - "underscore": "^1.7.0" + "underscore": "^1.8.2" }, "devDependencies": { "chai": "~1.9.1", @@ -50648,7 +51317,7 @@ module.exports={ "license": "GPL-3.0" } -},{}],94:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ /** * @title joola/lib/sdk/common/api * @copyright (c) Joola Smart Solutions, Ltd. @@ -50961,7 +51630,7 @@ joola.events.on('rpc:done', function () { joola.usage = {currentCalls: 0}; joola.usage.currentCalls--; }); -},{"../index":102,"http":13,"https":17,"querystring":23,"url":32}],95:[function(require,module,exports){ +},{"../index":105,"http":13,"https":17,"querystring":23,"url":32}],98:[function(require,module,exports){ /** * joola * @@ -51081,7 +51750,7 @@ dispatch.buildstub = function (callback) { }; -},{"../../../build/temp/meta.json":1,"../index":102,"cloneextend":35}],96:[function(require,module,exports){ +},{"../../../build/temp/meta.json":1,"../index":105,"cloneextend":35}],99:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -51102,7 +51771,7 @@ _events._id = 'events'; module.exports = exports = _events; -},{"../index":102,"eventemitter2":37}],97:[function(require,module,exports){ +},{"../index":105,"eventemitter2":37}],100:[function(require,module,exports){ (function (global){ /** * @title joola @@ -51131,7 +51800,7 @@ joola.timezone = function (tz) { return offset; }; }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"../index":102}],98:[function(require,module,exports){ +},{"../index":105}],101:[function(require,module,exports){ (function (Buffer){ /*jshint -W083 */ @@ -51431,7 +52100,7 @@ common.formatDate = function (date) { return format(date, 'mmm dd, yyyy'); }; }).call(this,require("buffer").Buffer) -},{"../index":102,"./modifiers":101,"buffer":3,"cloneextend":35,"crypto":7,"deep-extend":36,"traverse":89,"underscore":92,"util":34}],99:[function(require,module,exports){ +},{"../index":105,"./modifiers":104,"buffer":3,"cloneextend":35,"crypto":7,"deep-extend":36,"traverse":92,"underscore":95,"util":34}],102:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -51510,7 +52179,7 @@ logger.error = function (message, callback) { }; -},{"../index":102}],100:[function(require,module,exports){ +},{"../index":105}],103:[function(require,module,exports){ var memory = function () { this.content = {}; @@ -51545,7 +52214,7 @@ var memory = function () { }; module.exports = new memory(); -},{}],101:[function(require,module,exports){ +},{}],104:[function(require,module,exports){ /** * @title joola/lib/common/modifiers * @overview Includes different prototype modifiers used by joola @@ -51713,7 +52382,7 @@ String.prototype.commas = function () { parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); return parts.join("."); }; -},{}],102:[function(require,module,exports){ +},{}],105:[function(require,module,exports){ (function (global){ /** * @title joola @@ -52057,7 +52726,7 @@ joola.on('ready', function () { }); }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./../../package.json":93,"./common/api":94,"./common/dispatch":95,"./common/events":96,"./common/globals":97,"./common/index":98,"./common/logger":99,"./common/memory":100,"./common/modifiers":101,"./viz/index":117,"querystring":23,"socket.io-client":42,"url":32}],103:[function(require,module,exports){ +},{"./../../package.json":96,"./common/api":97,"./common/dispatch":98,"./common/events":99,"./common/globals":100,"./common/index":101,"./common/logger":102,"./common/memory":103,"./common/modifiers":104,"./viz/index":120,"querystring":23,"socket.io-client":42,"url":32}],106:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -52683,7 +53352,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(BarTable, events.EventEmitter); -},{"../index":102,"events":12,"jquery":40,"underscore":92,"util":34}],104:[function(require,module,exports){ +},{"../index":105,"events":12,"jquery":40,"underscore":95,"util":34}],107:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -53089,7 +53758,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(Canvas, events.EventEmitter); -},{"../index":102,"cloneextend":35,"events":12,"jquery":40,"underscore":92,"util":34}],105:[function(require,module,exports){ +},{"../index":105,"cloneextend":35,"events":12,"jquery":40,"underscore":95,"util":34}],108:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -53208,7 +53877,7 @@ var DatePicker = module.exports = function (options, callback) { if (options.fromdate) this.base_fromdate = new Date(options.fromdate); else - this.base_fromdate = self.addDays(this.base_todate, -90); + this.base_fromdate = self.addDays(this.base_todate, options.daysback|| -90); if (this.base_fromdate < this.min_date) { this.base_fromdate = new Date();//this.min_date.fixDate(true, false); @@ -53245,10 +53914,8 @@ var DatePicker = module.exports = function (options, callback) { //self.getState(self); - this.offsetX = 0; - this.offsetY = 0; - if (options.offsetTop) - this.options.offsetTop = options.offsetTop; + this.offsetX = options.offsetX || 0; + this.offsetY = options.offsetY || 0; this.verify = function (options, callback) { if (callback) @@ -53763,8 +54430,8 @@ var DatePicker = module.exports = function (options, callback) { $picker.show(); $picker.offset({ - top: $container.offset().top + $container.height() + (self.options.offsetTop || 1), - left: $dateboxcontainer.offset().left - $picker.outerWidth() + $dateboxcontainer.outerWidth() + top: $container.offset().top + $container.height() - 1 + self.offsetY, + left: $dateboxcontainer.offset().left - $picker.outerWidth() + $dateboxcontainer.outerWidth() + self.offsetX }); } }); @@ -53805,7 +54472,8 @@ var DatePicker = module.exports = function (options, callback) { //this.registerDateUpdate(this.updateLabels); this.handleChange(); - return callback(null, self); + callback(null, self); + return self; }; @@ -53857,7 +54525,7 @@ var DatePicker = module.exports = function (options, callback) { if (self.options.canvas) { self.options.canvas.emit('datechange', options); } - $$(self).trigger("datechange", options); + self.emit("datechange", options); //$$(joola).trigger("datechange", options); if (self.options.onUpdate) @@ -54151,13 +54819,15 @@ joola.events.on('core.init.finish', function () { existing.destroy(); } } + //create new if (!options) options = {}; options.container = this.get(0); - result = new joola.viz.DatePicker(options, function (err) { + result = new joola.viz.DatePicker(options, function (err, ref) { if (err) throw err; + return callback(null, ref); //bartable.draw(options, callback); }).options.$container; } @@ -54177,7 +54847,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(DatePicker, events.EventEmitter); -},{"../index":102,"events":12,"jquery":40,"jquery-ui/datepicker":39,"underscore":92,"util":34}],106:[function(require,module,exports){ +},{"../index":105,"events":12,"jquery":40,"jquery-ui/datepicker":39,"underscore":95,"util":34}],109:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -54480,7 +55150,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(DimensionPicker, events.EventEmitter); -},{"../index":102,"cloneextend":35,"events":12,"jquery":40,"util":34}],107:[function(require,module,exports){ +},{"../index":105,"cloneextend":35,"events":12,"jquery":40,"util":34}],110:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -54597,7 +55267,7 @@ joola.events.on('core.init.finish', function () { }; } }); -},{"../index":102,"jquery":40,"underscore":92}],108:[function(require,module,exports){ +},{"../index":105,"jquery":40,"underscore":95}],111:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -54729,7 +55399,7 @@ joola.events.on('core.init.finish', function () { }; } }); -},{"../index":102}],109:[function(require,module,exports){ +},{"../index":105}],112:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -55050,7 +55720,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(Metric, events.EventEmitter); -},{"../index":102,"cloneextend":35,"events":12,"jquery":40,"underscore":92,"util":34}],110:[function(require,module,exports){ +},{"../index":105,"cloneextend":35,"events":12,"jquery":40,"underscore":95,"util":34}],113:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -55349,7 +56019,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(MetricPicker, events.EventEmitter); -},{"../index":102,"cloneextend":35,"events":12,"jquery":40,"util":34}],111:[function(require,module,exports){ +},{"../index":105,"cloneextend":35,"events":12,"jquery":40,"util":34}],114:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -55644,7 +56314,7 @@ joola.events.on('core.init.finish', function () { }; } }); -},{"../index":102,"underscore":92}],112:[function(require,module,exports){ +},{"../index":105,"underscore":95}],115:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -55868,7 +56538,7 @@ Pie.template = function (options) { return html; }; -},{"../index":102,"underscore":92}],113:[function(require,module,exports){ +},{"../index":105,"underscore":95}],116:[function(require,module,exports){ /*jshint -W083 */ /** @@ -56088,7 +56758,7 @@ joola.events.on('core.init.finish', function () { }); -},{"../index":102,"underscore":92}],114:[function(require,module,exports){ +},{"../index":105,"underscore":95}],117:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -56343,7 +57013,7 @@ joola.events.on('core.init.finish', function () { }; } }); -},{"../index":102}],115:[function(require,module,exports){ +},{"../index":105}],118:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -57330,7 +58000,7 @@ joola.events.on('core.init.finish', function () { util.inherits(Table, events.EventEmitter); -},{"../index":102,"async":2,"cloneextend":35,"events":12,"jquery":40,"underscore":92,"util":34}],116:[function(require,module,exports){ +},{"../index":105,"async":2,"cloneextend":35,"events":12,"jquery":40,"underscore":95,"util":34}],119:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -58023,7 +58693,7 @@ joola.events.on('core.init.finish', function () { }); util.inherits(Timeline, events.EventEmitter); -},{"../index":102,"cloneextend":35,"events":12,"jquery":40,"moment":41,"twix":91,"underscore":92,"util":34}],117:[function(require,module,exports){ +},{"../index":105,"cloneextend":35,"events":12,"jquery":40,"moment":41,"twix":94,"underscore":95,"util":34}],120:[function(require,module,exports){ /** * @title joola * @overview the open-source data analytics framework @@ -58322,7 +58992,7 @@ viz.fetch = function (context, query, callback) { }); } if (context.options.done) - context.options.done.apply(context, context.data); + context.options.done.apply(context, [context.data,messages]); if (context.done) context.done(context.data, messages); return callback(null, context.data); @@ -58406,4 +59076,4 @@ viz.destroy = function (self, vizOptions) { } }); });*/ -},{"../index":102,"./BarTable":103,"./Canvas":104,"./DatePicker":105,"./DimensionPicker":106,"./FilterBox":107,"./Geo":108,"./Metric":109,"./MetricPicker":110,"./MiniTable":111,"./Pie":112,"./PunchCard":113,"./Sparkline":114,"./Table":115,"./Timeline":116,"async":2,"cloneextend":35,"jquery":40,"underscore":92}]},{},[102]) \ No newline at end of file +},{"../index":105,"./BarTable":106,"./Canvas":107,"./DatePicker":108,"./DimensionPicker":109,"./FilterBox":110,"./Geo":111,"./Metric":112,"./MetricPicker":113,"./MiniTable":114,"./Pie":115,"./PunchCard":116,"./Sparkline":117,"./Table":118,"./Timeline":119,"async":2,"cloneextend":35,"jquery":40,"underscore":95}]},{},[105]) \ No newline at end of file diff --git a/build/release/joola.min.css b/build/release/joola.min.css index ad3f2c3..3693276 100644 --- a/build/release/joola.min.css +++ b/build/release/joola.min.css @@ -1,2 +1,2 @@ -/*! joola.sdk - v0.8.3 - 2015-03-23 */ +/*! joola.sdk - v0.8.4 - 2015-03-29 */ [jio-domain=joola]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-collapse:collapse;border-spacing:0}[jio-domain=joola]{font-family:Signika,helvetica,arial,sans-serif}[jio-domain=joola] .clearfix{clear:both}[jio-domain=joola] .btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}[jio-domain=joola] .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;color:#333;background-color:#fff;border-color:#ccc}[jio-domain=joola] .btn:hover,.btn:focus{color:#333;text-decoration:none}[jio-domain=joola] .btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}[jio-domain=joola] .btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}[jio-domain=joola] .btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}[jio-domain=joola] .btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}[jio-domain=joola] .btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}[jio-domain=joola] .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}[jio-domain=joola] .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}[jio-domain=joola] .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}[jio-domain=joola] .btn-group>.btn:first-child{margin-left:0}[jio-domain=joola] .btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}[jio-domain=joola] .unselectable{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}[jio-domain=joola] .line-separator{height:1px}[jio-domain=joola] .chevron.before::before{border-style:solid;border-width:.25em .25em 0 0;content:'';display:inline-block;height:.45em;left:.15em;position:relative;transform:rotate(-45deg);width:.45em}[jio-domain=joola] .chevron.before.right:before{left:-.15em;transform:rotate(45deg)}[jio-domain=joola] .chevron.before.bottom:before{top:0;transform:rotate(135deg)}[jio-domain=joola] .chevron.before.left:before{transform:rotate(-135deg)}[jio-domain=joola] .chevron.after::after{border-style:solid;border-width:.25em .25em 0 0;content:'';display:inline-block;height:.45em;left:.15em;position:relative;transform:rotate(-45deg);width:.45em}[jio-domain=joola] .chevron.after.right:after{left:-.15em;transform:rotate(45deg)}[jio-domain=joola] .chevron.after.bottom:after{top:0;transform:rotate(135deg)}[jio-domain=joola] .chevron.after.left:after{transform:rotate(-135deg)}[jio-domain=joola] span.icon-help{position:relative;display:inline}[jio-domain=joola] span.icon-help span{position:absolute;width:150px;color:#FFF;background:#000;height:30px;line-height:30px;text-align:center;visibility:hidden;border-radius:6px;padding-left:5px;padding-right:5px;font-size:12px}[jio-domain=joola] span.icon-help span:after{content:'';position:absolute;bottom:100%;left:48%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000;border-right:8px solid transparent;border-left:8px solid transparent}[jio-domain=joola] span:hover.icon-help span{visibility:visible;opacity:.8;top:30px;left:48%;margin-left:-76px;z-index:999}[jio-type=bartable] .table{margin-bottom:10px;width:100%}[jio-type=bartable] .table tr{vertical-align:top}[jio-type=bartable] .table td{padding-top:8px;padding-bottom:5px}[jio-type=bartable] .table tr:first-of-type td{text-overflow:ellipsis;padding-top:5px;padding-bottom:5px;white-space:nowrap;overflow:hidden;min-width:100px}[jio-type=bartable] .table td .caption{text-overflow:ellipsis;line-height:17px;color:#666;font-weight:500;text-transform:uppercase;white-space:nowrap;overflow:hidden}[jio-type=bartable] .table td .subcaption{color:#999;font-size:12px;font-weight:400;line-height:1;text-transform:uppercase;margin-top:2px}[jio-type=bartable] .table.table-striped tbody>tr:nth-child(even)>td{background-color:#fff}[jio-type=bartable] .bartable-caption{line-height:1.2857142857em;margin:20px 0;padding:0;text-transform:uppercase;font-size:18px;font-weight:400;color:#333;text-align:center}[jio-type=bartable] .nodata,[jio-type=bartable] .loading{text-align:center}[jio-type=bartable] .barwrapper{float:left;width:95%}[jio-type=bartable] .barwrapper.compare .tablebar{height:15px}[jio-type=bartable] .barwrapper.compare .tablebar.compare_ratio{margin-top:1px}[jio-type=bartable] .tablebar{background-color:#058dc7;float:left;height:30px}[jio-type=bartable] tr[data-selectable=true] td{cursor:pointer}[jio-type=bartable] tr[data-selectable=true]:hover{background-color:#efefef}[jio-type=bartable] tr[data-selectable=true].active td{background-color:#efefef}[jio-type=datepicker]{float:right}[jio-type=datepicker] a{color:#428bca;text-decoration:none}[jio-type=datepicker] .jcontainer{background-color:#fff;border:1px solid #CCC;cursor:pointer;position:relative;z-index:19;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px}[jio-type=datepicker] .jcontainer:hover{border:1px solid #CCC}[jio-type=datepicker] .expanded{border:1px solid #CCC;border-bottom:1px solid #fff;border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0}[jio-type=datepicker] .picker.compare{margin-top:17px}[jio-type=datepicker] .datetable{border-collapse:collapse}[jio-type=datepicker] .datetable .dates{padding:5px;text-align:left}[jio-type=datepicker] .datetable .dates .datelabel{color:#1C2E3D}[jio-type=datepicker] .datetable .dates .compare{color:#999;font-size:13px}[jio-type=datepicker] .datetable .dates .compare .datelabel.fromdate,[jio-type=datepicker] .datetable .dates .compare .datelabel.todate{font-size:13px;color:#333}[jio-type=datepicker] .datebox .dropdownmarker-wrapper{width:25px;background-color:#f5f5f5}[jio-type=datepicker] .datetable .dropdownmarker{position:absolute;top:12px;right:8px;display:block;width:0;height:0;content:"";border:5px solid;border-right-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-top-color:inherit}[jio-type=datepicker].compare .datetable .dropdownmarker{top:20px}[jio-type=datepicker] .datebox.expanded .datetable .dropdownmarker{top:5px;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;border-bottom-color:inherit}[jio-type=datepicker].compare .datebox.expanded .datetable .dropdownmarker{top:13px}[jio-type=datepicker] .picker{position:absolute;background-color:#F7F7F7;border:1px solid #CCC;margin-left:1px;margin-top:-1px;padding:10px;white-space:nowrap;z-index:1000;border-radius:5px 0 5px 5px;-moz-border-radius:5px 0 5px 5px;-webkit-border-bottom-left-radius:5px;-webkit-border-bottom-right-radius:5px}[jio-type=datepicker] .picker .wrapper .control{padding:0 10px;white-space:nowrap;vertical-align:top}[jio-type=datepicker] .picker .wrapper .control .optionscontainer{display:block;clear:both;padding:5px;font-size:16px;line-height:20px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .customdate{font-weight:700;margin-bottom:3px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .customdate select{border:#9A9A9A solid 1px;background-color:#fff;color:#000}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .customdate select.selector{width:auto;height:auto;padding:1px;margin-bottom:5px;margin-left:6px;width:120px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption span{top:-2px;position:relative}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .daterange .dateoption{border:#ccc solid 1px;cursor:pointer;width:6.5em;line-height:20px;padding:2px;padding-left:5px;margin-bottom:6px;margin-left:2px;margin-right:2px;margin-top:2px;font-size:16px;font-family:Signika,helvetica,arial,sans-serif}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .daterange .dateoption.active{border:#07C solid 3px;margin-top:0;margin-bottom:4px;margin-left:2px;margin-right:2px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .comparerange .dateoption.active{border:#86BE2B solid 3px;margin-bottom:4px;margin-left:2px;margin-right:2px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .daterange .dateoption.invalid{border:#B00 solid 3px;margin-bottom:4px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption{padding:3px;white-space:nowrap;padding-right:22px;display:none;margin-bottom:3px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption .checker{}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption.visible{display:block}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .divider{border-top:#666 dotted 1px;margin-top:3px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .buttons{padding-top:15px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .apply{margin-top:-15px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .cancel{text-decoration:underline;color:#24B;cursor:pointer;padding-left:10px}[jio-type=datepicker] .picker .wrapper .calendars{white-space:nowrap;margin:2px;width:405px}[jio-type=datepicker] .picker .wrapper .calendars table{border-collapse:collapse}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev,[jio-type=datepicker] .picker .wrapper .calendars .datetable-next{vertical-align:top}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div,[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div{border:#CCC solid 1px;background-color:#DDD;cursor:pointer}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div{border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:0}[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div{border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div div.inline-block,[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div div.inline-block{height:9px;padding:0;width:4px}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div div.inline-block{display:block;width:0;height:0;content:"";border:5px solid;border-left-color:transparent;border-top-color:transparent;border-bottom-color:transparent;margin-right:6px;margin-top:-5px}[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div div.inline-block{display:block;width:0;height:0;content:"";border:5px solid;border-right-color:transparent;border-top-color:transparent;border-bottom-color:transparent;margin-left:6px;margin-top:-5px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer input,[jio-type=datepicker] .picker .wrapper .control .optionscontainer textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:none;-moz-transition:border linear .1s,box-shadow linear .1s;-ms-transition:border linear .1s,box-shadow linear .1s;-o-transition:border linear .1s,box-shadow linear .1s;transition:border linear .1s,box-shadow linear .1s}[jio-type=datepicker] .picker .wrapper .calendars .ui-datepicker-prev,[jio-type=datepicker] .picker .wrapper .calendars .ui-datepicker-next{display:none}[jio-type=datepicker] .ui-datepicker-calendar td{border-bottom:#F7F7F7 solid 1px;border-right:#F7F7F7 solid 1px;background-color:#fff}[jio-type=datepicker] .ui-datepicker-title{text-align:center;background-color:#DDD;font-size:85%;color:#07C;cursor:default;border-bottom:#CCC solid 1px;height:18px}[jio-type=datepicker] .daycell{text-align:center;padding:2px 3px;vertical-align:middle;font-size:72%;cursor:pointer}[jio-type=datepicker] .daycell a{text-decoration:none}[jio-type=datepicker] .daycell:hover{background-color:#FC3}[jio-type=datepicker] .daycell.disabled,[jio-type=datepicker] .daycell.ui-state-disabled{cursor:default;color:#DDD;font-weight:400;background-color:#fff}[jio-type=datepicker] .daycell.inrange{background-color:#07C}[jio-type=datepicker] .daycell.inrange:hover{background-color:#FC3}[jio-type=datepicker] .daycell.inrange a{color:#fff}[jio-type=datepicker] .daycell.compare.disabled{cursor:default;color:#DDD;font-weight:400;background-color:#fff}[jio-type=datepicker] .daycell.compare.inrange{background-color:#86BE2B}[jio-type=datepicker] .daycell.basencompare.inrange{background-color:#00B1AB}[jio-type=datepicker] .daycell.compare.inrange:hover{background-color:#FC3}[jio-type=datepicker] .ui-datepicker-calendar th{text-align:center;padding:2px 3px;vertical-align:middle;font-size:80%;border-bottom:#F7F7F7 solid 1px;border-right:#F7F7F7 solid 1px;background-color:#fff;cursor:default;border-bottom:#CCC solid 1px}[jio-type=datepicker] .jcontainer{background:0}[jio-type=datepicker] select{display:inline-block;float:none;height:auto;margin-top:auto;width:auto}[jio-type=datepicker] .daterange{padding-left:0!important}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption .checker{top:4px;margin-left:0}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .compareoption{font-weight:300}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .customdate{font-weight:300}[jio-type=datepicker] .daycell{font-size:11px;font-weight:300;line-height:22px}[jio-type=datepicker] .daycell a{color:#08c;border-bottom:0}.ui-datepicker-calendar th{font-weight:600;line-height:22px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .apply{margin-top:-5px;font-family:Signika,helvetica,arial,sans-serif;background-color:#6d6d6d;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#6d6d6d),color-stop(100%,#1a1a1a));background-image:-webkit-linear-gradient(top,#6d6d6d,#1a1a1a);background-image:-moz-linear-gradient(to bottom,#6d6d6d,#1a1a1a);background-image:-o-linear-gradient(top,#6d6d6d,#1a1a1a);background-image:linear-gradient(top,#6d6d6d,#1a1a1a);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#6d6d6d', EndColorStr='#1a1a1a');border:1px solid #4c4c4c;border-bottom:0;border-radius:5px;color:#fff;text-shadow:0 -1px 0 #272727;font-size:.875em;height:28px;line-height:26px;padding:1px 10px;text-transform:uppercase}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .apply:hover{background-color:#7f7f7f;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#7f7f7f),color-stop(100%,#1a1a1a));background-image:-webkit-linear-gradient(top,#7f7f7f,#1a1a1a);background-image:-moz-linear-gradient(to bottom,#7f7f7f,#1a1a1a);background-image:-o-linear-gradient(top,#7f7f7f,#1a1a1a);background-image:linear-gradient(top,#7f7f7f,#1a1a1a);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#7f7f7f', EndColorStr='#1a1a1a')}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div,[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div{padding-top:14px;height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[jio-type=datepicker] .picker .wrapper .calendars .datetable-prev div div.inline-block,[jio-type=datepicker] .picker .wrapper .calendars .datetable-next div div.inline-block{}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .customdate{display:none}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .divider{display:none}[jio-type=datepicker] ._buttons{bottom:15px;position:absolute;right:25px}[jio-type=datepicker] .picker .wrapper .control .optionscontainer input,[jio-type=datepicker] .picker .wrapper .control .optionscontainer textarea{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}[jio-type=datepicker] .picker .wrapper .control .optionscontainer .daterange .dateoption.active{margin-left:2px;margin-right:2px}[jio-type=datepicker] .picker .wrapper .calendars{padding-top:5px}[jio-type=datepicker] .ui-datepicker-title{height:28px;color:#666;padding-bottom:4px;padding-top:7px;font-weight:300;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[jio-type=dimensionpicker]{float:left;position:relative}[jio-type=dimensionpicker] .picker-container{position:absolute;background-color:#fff;display:none;border:1px solid #ddd;padding:5px;z-index:1000}[jio-type=dimensionpicker] .picker-container.active{display:block}[jio-type=dimensionpicker] .name{font-weight:700}[jio-type=dimensionpicker] .dimensionOption{padding:5px;background-color:#dae2cb;border:1px solid #738d68;margin-top:2px;margin-bottom:2px;margin-left:7px;cursor:pointer;font-size:13px;font-weight:700;color:#738d68}[jio-type=dimensionpicker] .dimensionOption:hover,[jio-type=dimensionpicker] .dimensionOption.active{background-color:#9bb47a;color:#fff}[jio-type=dimensionpicker] .dimensionOption.disabled{opacity:.6;cursor:default}[jio-type=dimensionpicker] .dimensionOption.active{opacity:1;cursor:default}[jio-type=dimensionpicker] input.quicksearch{padding:5px;border:1px solid #DDD;font-family:Signika,helvetica,arial,sans-serif;font-size:14px;background-color:#FFF;margin-left:7px}[jio-type=dimensionpicker] input.quicksearch{margin-bottom:5px}[jio-type=filterbox]{}[jio-type=filterbox] .filterbox{padding:5px;margin:0;border-top:0;min-height:0;border-bottom:1px solid #ddd;margin-bottom:10px;display:none}[jio-type=filterbox] .filterbox:not(:empty){display:block}[jio-type=filterbox] .filter{display:inline-block;padding:5px;padding-left:8px;padding-right:8px;border:1px solid #ddd}[jio-type=filterbox] .filter:not(:first-of-type){margin-left:10px}[jio-type=filterbox] .close{padding-left:5px;cursor:pointer}.animate-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.icon-help:before{content:'\e800'}.icon-sort-desc:before{content:'\e801'}.icon-sort-asc:before{content:'\e802'}.icon-close:before{content:'\e803'}.icon-download:before{content:'\e804'}@font-face{font-family:fontello;src:url(../font/fontello.eot?62438657);src:url(../font/fontello.eot?62438657#iefix) format('embedded-opentype'),url(../font/fontello.svg?62438657#fontello) format('svg');font-weight:400;font-style:normal}@font-face{font-family:fontello;src:url(data:application/octet-stream;base64,d09GRgABAAAAAAzcAA4AAAAAFqgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABRAAAAEQAAABWPihJSmNtYXAAAAGIAAAAOgAAAUrQFRm3Y3Z0IAAAAcQAAAAKAAAACgAAAABmcGdtAAAB0AAABZQAAAtwiJCQWWdhc3AAAAdkAAAACAAAAAgAAAAQZ2x5ZgAAB2wAAAKsAAAETNsx23xoZWFkAAAKGAAAADUAAAA2BVxa1WhoZWEAAApQAAAAHgAAACQHlwNQaG10eAAACnAAAAAYAAAAGBZJAABsb2NhAAAKiAAAAA4AAAAOA/4Cqm1heHAAAAqYAAAAIAAAACAAnwvabmFtZQAACrgAAAF3AAACzcydGx1wb3N0AAAMMAAAAEMAAABXmX5G0HByZXAAAAx0AAAAZQAAAHvdawOFeJxjYGTezjiBgZWBg6mKaQ8DA0MPhGZ8wGDIyMTAwMTAysyAFQSkuaYwOLxgeMHCHPQ/iyGKOYhhGlCYESQHAP0vC/B4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGF6w/P8PUvCCAURLMELVAwEjG8OIBwBoOwayAAAAAAAAAAAAAAAAAAB4nK1WaXMTRxCd1WHLNj6CDxI2gVnGcox2VpjLCBDG7EoW4BzylexCjl1Ldu6LT/wG/ZpekVSRb/y0vB4d2GAnVVQoSv2m9+1M9+ueXpPQksReWI+k3HwpprY2aWTnSUg3bFqO4kPZ2QspU0z+LoiCaLXUvu04JCISgap1hSWC2PfI0iTjQ48yWrYlvWpSbulJd9kaD+qt+vbT0FGO3QklNZuhQ+uRLanCqBJFMu2RkjYtw9VfSVrh5yvMfNUMJYLoJJLGm2EMj+Rn44xWGa3GdhxFkU2WG0WKRDM8iCKPslpin1wxQUD5oBlSXvk0onyEH5EVe5TTCnHJdprf9yU/6R3OvyTieouyJQf+QHZkB3unK/ki0toK46adbEehivB0fSfEI5uT6p/sUV7TaOB2RaYnzQiWyleQWPkJZfYPyWrhfMqXPBrVkoOcCFovc2Jf8g60HkdMiWsmyILujk6IoO6XnKHYY/q4+OO9XSwXIQTIOJb1jkq4EEYpYbOaJG0EOYiSskWV1HpHTJzyOi3iLWG/Tu3oS2e0Sag7MZ6th46tnKjkeDSp00ymTu2k5tGUBlFKOhM85tcBlB/RJK+2sZrEyqNpbDNjJJFQoIVzaSqIZSeWNAXRPJrRm7thmmvXokWaPFDPPXpPb26Fmzs9p+3AP2v8Z3UqpoO9MJ2eDshKfJp2uUnRun56hn8m8UPWAiqRLTbDlMVDtn4H5eVjS47CawNs957zK+h99kTIpIH4G/AeL9UpBUyFmFVQC9201rUsy9RqVotUZOq7IU0rX9ZpAk05Dn1jX8Y4/q+ZGUtMCd/vxOnZEZeeufYlyDSH3GZdj+Z1arFdgM5sz+k0y/Z9nebYfqDTPNvzOh1ha+t0lO2HOi2w/UinY2wvaEGT7jsEchGBXMAGEoGwdRAI20sIhK1CIGwXEQjbIgJhu4RA2H6MQNguIxC2l7Wsmn4qaRw7E8sARYgDoznuyGVuKldTyaUSrotGpzbkKXKrpKJ4Vv0rA/3ikTesgbVAukTW/IpJrnxUleOPrmh508S5Ao5Vf3tzXJ8TD2W/WPhT8L/amqqkV6x5ZHIVeSPQk+NE1yYVj67p8rmqR9f/i4oOa4F+A6UQC0VZlg2+mZDwUafTUA1c5RAzGzMP1/W6Zc3P4fybGCEL6H78NxQaC9yDTllJWe1gr9XXj2W5twflsCdYkmK+zOtb4YuMzEr7RWYpez7yecAVMCqVYasNXK3gzXsS85DpTfJMELcVZYOkjceZILGBYx4wb76TICRMXbWB2imcsIG8YMwp2O+EQ1RvlOVwe6F9Ho2Uf2tX7MgZFU0Q+G32Rtjrs1DyW6yBhCe/1NdAVSFNxbipgEsj5YZq8GFcrdtGMk6gr6jYDcuyig8fR9x3So5lIPlIEatHRz+tvUKd1Ln9yihu3zv9CIJBaWL+9r6Z4qCUd7WSZVZtA1O3GpVT15rDxasO3c2j7nvH2Sdy1jTddE/c9L6mVbeDg7lZEO3bHJSlTC6o68MOG6jLzaXQ6mVckt52DzAsMKDfoRUb/1f3cfg8V6oKo+NIvZ2oH6PPYgzyDzh/R/UF6OcxTLmGlOd7lxOfbtzD2TJdxV2sn+LfwKy15mbpGnBD0w2Yh6xaHbrKDXynBjo90tyO9BDwse4K8QBgE8Bi8InuWsbzKYDxfMYcH+Bz5jBoMofBFnMYbDNnDWCHOQx2mcNgjzkMvmDOOsCXzGEQModBxBwGT5gTADxlDoOvmMPga+Yw+IY59wG+ZQ6DmDkMEuYw2Nd0ayhzixd0F6htUBXowPQTFvewONRUGbK/44Vhf28Qs38wiKk/aro9pP7EC0P92SCm/mIQU3/VdGdI/Y0Xhvq7QUz9wyCmPtMvxnKZwV9GvkuFA8ouNp/z98T7B8IaQLYAAQAB//8AD3icdVNNaBNBGJ1vfyeTdHeT7s7GNF2Tbd2Wpk11k+6KxaagqNBaoYIevViQVnqQiiAiCB6V6NWePOnVFhWkeCpF9KBHjx6LB09FNLSJ3za2xqSF2Tfvfd8MzPseS8TGduOJ+EwcJpRwUiHsbdijxWQQRwoQkBSRiEC6/WAs8ArgKqrJ7e5grOz1uaqiWqWxchj4NrdMVdEhWvvVCgSw8R4Mpf6z/rD+Q4HEmuMJniNkEbMvM/Ozk4NnpUXDmEkYBk1wxqy4okk3JYVni+KQUP/VvMbgHqR2HC/reP34CXDBHZ6ZzgzdkKRMNm2a6RRPUF2lyRg1T1EpYZhGyiWEyIQ05sVNcZboZICE5Dy5SvTJxOWpM+OlgmPGRXmkIFumgq6801AOxsHnx0x04I6ChyrZLFnJEtbbznWj7ss3dSnfqYUXjFYp24X6lrIia+oKpV0LjC5QhgvuMFqL+ghYrC9HHOaa4viu+ELZkYWIRVBR1BVZXo1ZIolKO4R93u+B9Y/yfdrq3+7039ejSej/ML9ymx/xAN06j3YNy52ehYut3tpdt0xjb3DFDtOXDnJ6mH+hsdN4JV4T46SfnCD0dXGwJyag5fIohAGC5+owEIFiHgU1Au5XwI4gCE0N3KIwAb4DwgM2N8dYiTm4xx3mx+O4x33m4I7FEvt6a2Pzw6Jyd23r3f1vWtTtje+dQvq/fnx7fWlp/XsEBP8t0vgtPseMKEliShXSNclODvdyPaGIUvTYIigOTECIRAOOBCetYhIDY1ESu6+N8uB/cwxx/NgJMUP8DX3ho+lwIeUaT81cSuDZ9Lkc3/5kO5DjIE7lr+SnQeS5NyxVQyO1ZIzZVa5VNQ7V9HXdFNKZtGDqe+TRKseL1irPTedwwaCdrDG8ZVs13QSu1cgfzwG81nicY2BkYGAAYk/JB4/j+W2+MnAzvwCKMFzUWbAJQpc1/f/zP4v5BXMQkMvBwAQSBQB0GA2vAAAAeJxjYGRgYA76n8UQxfyCgeH/dyAJFEEBbACQpQXtAAAD6AAAA5gAAAPoAAAD6AAAA1kAAAOgAAAAAAAAAGwA7AFsAb4CJgAAAAEAAAAGAFgABQAAAAAAAgAAABAAcwAAACALcAAAAAB4nHWRzUrDQBRGv2lr1RZUFNx6V1IR0x/oRhAKlbrRTZFuJY1pkpJmymRa6Gv4Dj6ML+Gz+DWdirSYkMy5Z+7cuZkAOMc3FDZXl8+GFY4YbbiEQzw4LtM/Oq6Qnx0foI5Xx1X6N8c13CJyXMcFPlhBVY4ZTfHpWOFMnTou4URdOS7T3zmukB8cH+BSvTiu0geOaxip3HEd1+qrr+crk0SxlUb/RjqtdlfGK9FUSean4i9srE0uPZnozIZpqr1Az7Y8DKNF6pttuB1HockTnUnba23VU5iFxrfh+7p6vow61k5kYvRMBi5D5kZPw8B6sbXz+2bz737oQ2OOFQwSHlUMC0GD9oZjBy20+SMEY2YIMzdZCTL4SGl8LLgiLmZyxj0+E0YZbciMlOwh4Hu254ekiOtTVjF7s7vxiLTeIym8sC+P3e1mPZGyItMv7Ptv7zmW3K1Da7lq3aUpuhIMdmoIz2M9N6UJ6L3iVCztPZq8//m+H+BkhE0AeJxjYGKAAC4G7ICNgYGRiZGZkYWRlZGNJSM1p4CzOL+oRDcltTiZA8xKLE5mTc7JL07lSMkvz8vJT0xhYAAANA0OJQB4nGPw3sFwIihiIyNjX+QGxp0cDBwMyQUbGVidNjIwaEFoDhR6JwMDAycyi5nBZaMKY0dgxAaHjoiNzCkuG9VAvF0cDQyMLA4dySERICWRQLCRgUdrB+P/1g0svRuZGFwAB9MiuAAAAA==) format('woff'),url(data:application/octet-stream;base64,AAEAAAAOAIAAAwBgT1MvMj4oSUoAAADsAAAAVmNtYXDQFRm3AAABRAAAAUpjdnQgAAAAAAAACrAAAAAKZnBnbYiQkFkAAAq8AAALcGdhc3AAAAAQAAAKqAAAAAhnbHlm2zHbfAAAApAAAARMaGVhZAVcWtUAAAbcAAAANmhoZWEHlwNQAAAHFAAAACRobXR4FkkAAAAABzgAAAAYbG9jYQP+AqoAAAdQAAAADm1heHAAnwvaAAAHYAAAACBuYW1lzJ0bHQAAB4AAAALNcG9zdJl+RtAAAApQAAAAV3ByZXDdawOFAAAWLAAAAHsAAQO3AZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6ADoBANS/2oAWgNSAJYAAAABAAAAAAAAAAAAAwAAAAMAAAAcAAEAAAAAAEQAAwABAAAAHAAEACgAAAAGAAQAAQACAADoBP//AAAAAOgA//8AABgBAAEAAAAAAAAAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8/5ADmgMsAAgAFgA/AAq3NxsOCQUBAy0rATYAEgAEAAIAEzI2NTYmKwEiBgcUFhcTNjU0JiMiBwYHFTM1NDc2MhcWFRQHBg8BBg8BBgcGBxUzNTQ3Nj8BNgHGvgEQBv72/oT+7gYBDLweJgImHgIcJgImHKgaalJAKEQEbhAQTgwQEAgMFgoKFQsGDgRsBAYWHC4DKgL++P6E/u4GAQoBfAES/R4mHB4mJBweJgIBSCIsTkwaKmgEBBocGBQUGBIWDAgPBwgRCQgUOggEDBAUEBIiAAAABQAA/2oD6ANSAA8AJwA3AEcAVwAPQAxTS0M7MyseFAsDBS0rBRUUBisBIiY9ATQ2OwEyFiUUDwEGIi8BJjY7ARE0NjsBMhYVETMyFiUVFAYrASImPQE0NjsBMhYTFRQGIyEiJj0BNDYzITIWExUUBiMhIiY9ATQ2MyEyFgKnCgiPCAoKCI8ICv70BrIFDgeyCAgNawoIawgKawgKAXcKCPoICgoI+ggKawoI/psICgoIAWUICmsKCP4wCAoKCAHQCAoZawgKCghrCAoKPwYHsgUFswkVAwAICgoI/QAKz2sICgoIawgKCgEVawgKCghrCAoKARZrCAoKCGsICgoAAAUAAP9qA+gDUgAXACcANwBHAFcAD0AMU0tDOzMrIxsOBAUtKyUUDwEGIi8BJjY7ARE0NjsBMhYVETMyFgUVFAYjISImPQE0NjMhMhYDFRQGIyEiJj0BNDYzITIWAxUUBisBIiY9ATQ2OwEyFgMVFAYrASImPQE0NjsBMhYBmwayBQ4HsggIDWsKCGsICmsICgJNCgj+MAgKCggB0AgKawoI/psICgoIAWUICmsKCPoICgoI+ggKawoIjwgKCgiPCAouBgeyBQWzCRUDAAgKCgj9AApPawgKCghrCAoKARZrCAoKCGsICgoBFWsICgoIawgKCgEWawgKCghrCAoKAAAC//3/sQNfAwsAJAAxAAi1LigbCQItKyU0LwE3NjQvASYiDwEnJiIPAQYUHwEHBhQfARYyPwEXFjI/ATY3FA4BIi4CPgEyHgECgQplZQoKMwoeCmVlCx4KMgsLZWULCzIKHgtlZQoeCjMK2HLG6MhuBnq89Lp+4A4LZWULHQsyCwtlZQsLMgsdC2VlCx0LMgsLZWULCzILjXXEdHTE6sR0dMQAAAQAAP/5A6EDUgAIABEAJwA/AA1ACjgsHRYPDAYDBC0rJTQuAQYeAT4BNzQuAQ4BFj4BNxUUBgchIiYnNTQ2MyEXFjI/ASEyFgMWDwEGIi8BJjc2OwE1NDY3MzIWBxUzMgLKFB4WAhIiEJEUIBICFhwYRiAW/MsXHgEgFgEDSyFWIUwBAxYgtgoS+goeCvoRCQoXjxYOjw4WAY8YZA8UAhgaGAIUDw8UAhgaGAIUjLMWHgEgFbMWIEwgIEwgASgXEfoKCvoRFxX6DxQBFg76AAABAAAAAQAASRng418PPPUACwPoAAAAANEsoLIAAAAA0Sx2gv/8/2oD6ANSAAAACAACAAAAAAAAAAEAAANS/2oAWgPoAAD/9wPoAAEAAAAAAAAAAAAAAAAAAAAGA+gAAAOYAAAD6AAAA+gAAANZAAADoAAAAAAAAABsAOwBbAG+AiYAAAABAAAABgBYAAUAAAAAAAIAAAAQAHMAAAAgC3AAAAAAAAAAEgDeAAEAAAAAAAAANQAAAAEAAAAAAAEACAA1AAEAAAAAAAIABwA9AAEAAAAAAAMACABEAAEAAAAAAAQACABMAAEAAAAAAAUACwBUAAEAAAAAAAYACABfAAEAAAAAAAoAKwBnAAEAAAAAAAsAEwCSAAMAAQQJAAAAagClAAMAAQQJAAEAEAEPAAMAAQQJAAIADgEfAAMAAQQJAAMAEAEtAAMAAQQJAAQAEAE9AAMAAQQJAAUAFgFNAAMAAQQJAAYAEAFjAAMAAQQJAAoAVgFzAAMAAQQJAAsAJgHJQ29weXJpZ2h0IChDKSAyMDE1IGJ5IG9yaWdpbmFsIGF1dGhvcnMgQCBmb250ZWxsby5jb21mb250ZWxsb1JlZ3VsYXJmb250ZWxsb2ZvbnRlbGxvVmVyc2lvbiAxLjBmb250ZWxsb0dlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAEMAbwBwAHkAcgBpAGcAaAB0ACAAKABDACkAIAAyADAAMQA1ACAAYgB5ACAAbwByAGkAZwBpAG4AYQBsACAAYQB1AHQAaABvAHIAcwAgAEAAIABmAG8AbgB0AGUAbABsAG8ALgBjAG8AbQBmAG8AbgB0AGUAbABsAG8AUgBlAGcAdQBsAGEAcgBmAG8AbgB0AGUAbABsAG8AZgBvAG4AdABlAGwAbABvAFYAZQByAHMAaQBvAG4AIAAxAC4AMABmAG8AbgB0AGUAbABsAG8ARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAQIBAwEEAQUBBgRoZWxwCXNvcnQtZGVzYwhzb3J0LWFzYwVjbG9zZQhkb3dubG9hZAAAAAABAAH//wAPAAAAAAAAAAAAAAAAsAAsILAAVVhFWSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhuQgACABjYyNiGyEhsABZsABDI0SyAAEAQ2BCLbABLLAgYGYtsAIsIGQgsMBQsAQmWrIoAQpDRWNFUltYISMhG4pYILBQUFghsEBZGyCwOFBYIbA4WVkgsQEKQ0VjRWFksChQWCGxAQpDRWNFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwAStZWSOwAFBYZVlZLbADLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbAELCMhIyEgZLEFYkIgsAYjQrEBCkNFY7EBCkOwAGBFY7ADKiEgsAZDIIogirABK7EwBSWwBCZRWGBQG2FSWVgjWSEgsEBTWLABKxshsEBZI7AAUFhlWS2wBSywB0MrsgACAENgQi2wBiywByNCIyCwACNCYbACYmawAWOwAWCwBSotsAcsICBFILALQ2O4BABiILAAUFiwQGBZZrABY2BEsAFgLbAILLIHCwBDRUIqIbIAAQBDYEItsAkssABDI0SyAAEAQ2BCLbAKLCAgRSCwASsjsABDsAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYUREsAFgLbALLCAgRSCwASsjsABDsAQlYCBFiiNhIGSwJFBYsAAbsEBZI7AAUFhlWbADJSNhRESwAWAtsAwsILAAI0KyCwoDRVghGyMhWSohLbANLLECAkWwZGFELbAOLLABYCAgsAxDSrAAUFggsAwjQlmwDUNKsABSWCCwDSNCWS2wDywgsBBiZrABYyC4BABjiiNhsA5DYCCKYCCwDiNCIy2wECxLVFixBGREWSSwDWUjeC2wESxLUVhLU1ixBGREWRshWSSwE2UjeC2wEiyxAA9DVVixDw9DsAFhQrAPK1mwAEOwAiVCsQwCJUKxDQIlQrABFiMgsAMlUFixAQBDYLAEJUKKiiCKI2GwDiohI7ABYSCKI2GwDiohG7EBAENgsAIlQrACJWGwDiohWbAMQ0ewDUNHYLACYiCwAFBYsEBgWWawAWMgsAtDY7gEAGIgsABQWLBAYFlmsAFjYLEAABMjRLABQ7AAPrIBAQFDYEItsBMsALEAAkVUWLAPI0IgRbALI0KwCiOwAGBCIGCwAWG1EBABAA4AQkKKYLESBiuwcisbIlktsBQssQATKy2wFSyxARMrLbAWLLECEystsBcssQMTKy2wGCyxBBMrLbAZLLEFEystsBossQYTKy2wGyyxBxMrLbAcLLEIEystsB0ssQkTKy2wHiwAsA0rsQACRVRYsA8jQiBFsAsjQrAKI7AAYEIgYLABYbUQEAEADgBCQopgsRIGK7ByKxsiWS2wHyyxAB4rLbAgLLEBHistsCEssQIeKy2wIiyxAx4rLbAjLLEEHistsCQssQUeKy2wJSyxBh4rLbAmLLEHHistsCcssQgeKy2wKCyxCR4rLbApLCA8sAFgLbAqLCBgsBBgIEMjsAFgQ7ACJWGwAWCwKSohLbArLLAqK7AqKi2wLCwgIEcgILALQ2O4BABiILAAUFiwQGBZZrABY2AjYTgjIIpVWCBHICCwC0NjuAQAYiCwAFBYsEBgWWawAWNgI2E4GyFZLbAtLACxAAJFVFiwARawLCqwARUwGyJZLbAuLACwDSuxAAJFVFiwARawLCqwARUwGyJZLbAvLCA1sAFgLbAwLACwAUVjuAQAYiCwAFBYsEBgWWawAWOwASuwC0NjuAQAYiCwAFBYsEBgWWawAWOwASuwABa0AAAAAABEPiM4sS8BFSotsDEsIDwgRyCwC0NjuAQAYiCwAFBYsEBgWWawAWNgsABDYTgtsDIsLhc8LbAzLCA8IEcgsAtDY7gEAGIgsABQWLBAYFlmsAFjYLAAQ2GwAUNjOC2wNCyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsjMBARUUKi2wNSywABawBCWwBCVHI0cjYbAJQytlii4jICA8ijgtsDYssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAlDKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAhDIIojRyNHI2EjRmCwBEOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsAJiILAAUFiwQGBZZrABY2EjICCwBCYjRmE4GyOwCENGsAIlsAhDRyNHI2FgILAEQ7ACYiCwAFBYsEBgWWawAWNgIyCwASsjsARDYLABK7AFJWGwBSWwAmIgsABQWLBAYFlmsAFjsAQmYSCwBCVgZCOwAyVgZFBYIRsjIVkjICCwBCYjRmE4WS2wNyywABYgICCwBSYgLkcjRyNhIzw4LbA4LLAAFiCwCCNCICAgRiNHsAErI2E4LbA5LLAAFrADJbACJUcjRyNhsABUWC4gPCMhG7ACJbACJUcjRyNhILAFJbAEJUcjRyNhsAYlsAUlSbACJWG5CAAIAGNjIyBYYhshWWO4BABiILAAUFiwQGBZZrABY2AjLiMgIDyKOCMhWS2wOiywABYgsAhDIC5HI0cjYSBgsCBgZrACYiCwAFBYsEBgWWawAWMjICA8ijgtsDssIyAuRrACJUZSWCA8WS6xKwEUKy2wPCwjIC5GsAIlRlBYIDxZLrErARQrLbA9LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrErARQrLbA+LLA1KyMgLkawAiVGUlggPFkusSsBFCstsD8ssDYriiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSsBFCuwBEMusCsrLbBALLAAFrAEJbAEJiAuRyNHI2GwCUMrIyA8IC4jOLErARQrLbBBLLEIBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAlDKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7ACYiCwAFBYsEBgWWawAWNgILABKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsSsBFCstsEIssDUrLrErARQrLbBDLLA2KyEjICA8sAQjQiM4sSsBFCuwBEMusCsrLbBELLAAFSBHsAAjQrIAAQEVFBMusDEqLbBFLLAAFSBHsAAjQrIAAQEVFBMusDEqLbBGLLEAARQTsDIqLbBHLLA0Ki2wSCywABZFIyAuIEaKI2E4sSsBFCstsEkssAgjQrBIKy2wSiyyAABBKy2wSyyyAAFBKy2wTCyyAQBBKy2wTSyyAQFBKy2wTiyyAABCKy2wTyyyAAFCKy2wUCyyAQBCKy2wUSyyAQFCKy2wUiyyAAA+Ky2wUyyyAAE+Ky2wVCyyAQA+Ky2wVSyyAQE+Ky2wViyyAABAKy2wVyyyAAFAKy2wWCyyAQBAKy2wWSyyAQFAKy2wWiyyAABDKy2wWyyyAAFDKy2wXCyyAQBDKy2wXSyyAQFDKy2wXiyyAAA/Ky2wXyyyAAE/Ky2wYCyyAQA/Ky2wYSyyAQE/Ky2wYiywNysusSsBFCstsGMssDcrsDsrLbBkLLA3K7A8Ky2wZSywABawNyuwPSstsGYssDgrLrErARQrLbBnLLA4K7A7Ky2waCywOCuwPCstsGkssDgrsD0rLbBqLLA5Ky6xKwEUKy2wayywOSuwOystsGwssDkrsDwrLbBtLLA5K7A9Ky2wbiywOisusSsBFCstsG8ssDorsDsrLbBwLLA6K7A8Ky2wcSywOiuwPSstsHIsswkEAgNFWCEbIyFZQiuwCGWwAyRQeLABFTAtAEu4AMhSWLEBAY5ZsAG5CAAIAGNwsQAFQrEAACqxAAVCsQAIKrEABUKxAAgqsQAFQrkAAAAJKrEABUK5AAAACSqxAwBEsSQBiFFYsECIWLEDZESxJgGIUVi6CIAAAQRAiGNUWLEDAERZWVlZsQAMKrgB/4WwBI2xAgBEAA==) format('truetype')}[class^=icon-]:before,[class*=" icon-"]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.icon-help:before{content:'\e800'}.icon-sort-desc:before{content:'\e801'}.icon-sort-asc:before{content:'\e802'}.icon-close:before{content:'\e803'}.icon-download:before{content:'\e804'}.icon-help{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-sort-desc{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-sort-asc{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-close{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-download{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}[class^=icon-],[class*=" icon-"]{font-family:fontello;font-style:normal;font-weight:400;line-height:1em}.icon-help{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-sort-desc{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-sort-asc{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-close{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}.icon-download{*zoom:expression(this.runtimeStyle[=zoom]='1',this.innerHTML=' ')}@font-face{font-family:fontello;src:url(../font/fontello.eot?367386);src:url(../font/fontello.eot?367386#iefix) format('embedded-opentype'),url(../font/fontello.woff?367386) format('woff'),url(../font/fontello.ttf?367386) format('truetype'),url(../font/fontello.svg?367386#fontello) format('svg');font-weight:400;font-style:normal}[class^=icon-]:before,[class*=" icon-"]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.icon-help:before{content:'\e800'}.icon-sort-desc:before{content:'\e801'}.icon-sort-asc:before{content:'\e802'}.icon-close:before{content:'\e803'}.icon-download:before{content:'\e804'}[jio-type=metric]{padding:5px;margin:0;float:none;border-top:0;min-height:0;text-align:center}[jio-type=metric] .caption{line-height:1.2857142857em;margin:0 0 10px;padding:0;text-transform:uppercase;padding-top:10px;color:#999;font-size:18px;font-weight:300;margin-bottom:0}[jio-type=metric] .value{color:#666;font-weight:300;font-size:32px;text-shadow:0 1px 5px rgba(0,0,0,.15)}[jio-type=metric] .summary{color:#999;padding-top:10px}[jio-type=metric] .base{padding-right:5px}[jio-type=metric] .compare{padding-left:5px}[jio-type=metricpicker]{float:left;position:relative}[jio-type=metricpicker] .picker-container{position:absolute;background-color:#fff;display:none;border:1px solid #ddd;padding:5px;z-index:1000}[jio-type=metricpicker] .picker-container.active{display:block}[jio-type=metricpicker] .name{font-weight:700}[jio-type=metricpicker] .metricOption{padding:5px;background-color:#c5dcfe;border:1px solid #2f67b4;margin-top:2px;margin-bottom:2px;margin-left:7px;cursor:pointer;font-size:13px;font-weight:700;color:#2f67b4}[jio-type=metricpicker] .metricOption:hover,[jio-type=metricpicker] .metricOption.active{background-color:#6faefd;color:#fff}[jio-type=metricpicker] .metricOption.disabled{opacity:.6;cursor:default}[jio-type=metricpicker] .metricOption.active{opacity:1;cursor:default}[jio-type=metricpicker] input.quicksearch{padding:5px;border:1px solid #DDD;font-family:Signika,helvetica,arial,sans-serif;font-size:14px;background-color:#FFF;margin-left:7px}[jio-type=metricpicker] input.quicksearch{margin-bottom:5px}[jio-type=table] .table-wrapper{overflow:auto}[jio-type=table] .table{border-top:1px solid #ddd;border-left:1px solid #ddd;margin-bottom:10px;width:100%;border-collapse:collapse;border-spacing:0}[jio-type=table] .table tr{vertical-align:top}[jio-type=table] .table td{padding-top:8px;padding-bottom:5px;padding-left:15px;padding-right:15px;border-right:1px solid #ddd;border-bottom:1px solid #ddd}[jio-type=table] .table th{text-overflow:ellipsis;padding-top:10px;padding-bottom:10px;padding-left:15px;text-align:left;background-color:#e9e9e9;font-weight:700;white-space:nowrap;min-width:100px;border-bottom:2px solid #ddd;border-right:1px solid #ddd;cursor:pointer;text-transform:uppercase}[jio-type=table] .table th .icon-help,[jio-type=table] .table th .icon-close{margin-left:5px}[jio-type=table] .table th .caret-sort{margin-left:15px;margin-right:15px}[jio-type=table] .table td.value.metric{text-align:right}[jio-type=table] .table td.caption.change{font-weight:700}[jio-type=table] .table td.value.change{text-align:right;font-weight:700}[jio-type=table] .table td.sorted{background-color:#F5F5F5}[jio-type=table] .table td.sorted{background-color:#F5F5F5}[jio-type=table] .table td.sorted.value{font-weight:700}[jio-type=table] .table td.value .summary{color:#999;font-size:13px;font-weight:400}[jio-type=table] .table.table-striped tbody>tr:nth-child(even)>td{background-color:#fff}[jio-type=table] .table-caption{line-height:1.2857142857em;margin:20px 0;padding:0;text-transform:uppercase;font-size:18px;font-weight:400;color:#333;text-align:center}[jio-type=table] .nodata,[jio-type=table] .loading{text-align:center}[jio-type=table] .controls{background-color:#f5f5f5;border-top:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;padding:5px;padding-left:15px;padding-top:10px;padding-bottom:10px}[jio-type=table] .table-picker:not(:first-of-type){margin-left:10px}[jio-type=table] .search-wrapper{float:right;margin-right:30px;width:250px}[jio-type=table] .search-wrapper input.search{padding:5px;border:1px solid #DDD;font-family:Signika,helvetica,arial,sans-serif;font-size:16px;background-color:#FFF;margin-left:7px;width:100%}[jio-type=table] .paging{float:right;display:table;vertical-align:middle}[jio-type=table] .paging-wrapper{display:table-cell}[jio-type=table] .showing{display:inline-block;margin-left:20px;margin-right:20px}[jio-type=table] .navigation{display:table-cell}[jio-type=table] .prev,[jio-type=table] .next{padding:5px;padding-left:10px;padding-right:10px;border:1px solid #ddd;cursor:pointer;display:table-cell}[jio-type=table] .prev:hover,[jio-type=table] .next:hover{background-color:#e9e9e9}[jio-type=table] .prev.disabled,[jio-type=table] .next.disabled{opacity:.6}[jio-type=table] .prev.disabled:hover,[jio-type=table] .next.disabled:hover{background-color:inherit}[jio-type=table] .page-size select{padding:3px;border:1px solid #ddd;font-family:Signika,helvetica,arial,sans-serif;font-size:16px;background-color:#fff;margin-left:7px}[jio-type=table] .btn.export{float:right}[jio-type=timeline]{}[jio-type=timeline] .sep{float:left;padding-left:10px;padding-right:10px;padding-top:5px;font-weight:400} \ No newline at end of file diff --git a/build/release/joola.min.js b/build/release/joola.min.js index 8fdee09..48d2d38 100644 --- a/build/release/joola.min.js +++ b/build/release/joola.min.js @@ -1,23 +1,24 @@ -/*! joola.sdk 2015-03-23 */ +/*! joola.sdk 2015-03-29 */ !function(){function a(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function b(){var a,b,c=arguments,d={},e=function(a,b){var c,d;"object"!=typeof a&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&"object"==typeof c&&"[object Array]"!==Object.prototype.toString.call(c)&&"renderTo"!==d&&"number"!=typeof c.nodeType?e(a[d]||{},c):b[d]);return a};for(c[0]===!0&&(d=c[1],c=Array.prototype.slice.call(c,2)),b=c.length,a=0;b>a;a++)d=e(d,c[a]);return d}function c(a,b){return parseInt(a,b||10)}function d(a){return"string"==typeof a}function e(a){return a&&"object"==typeof a}function f(a){return"[object Array]"===Object.prototype.toString.call(a)}function g(a){return"number"==typeof a}function h(a){return nb.log(a)/nb.LN10}function i(a){return nb.pow(10,a)}function j(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function k(a){return a!==N&&null!==a}function l(a,b,c){var f,g;if(d(b))k(c)?a.setAttribute(b,c):a&&a.getAttribute&&(g=a.getAttribute(b));else if(k(b)&&e(b))for(f in b)a.setAttribute(f,b[f]);return g}function m(a){return f(a)?a:[a]}function n(){var a,b,c=arguments,d=c.length;for(a=0;d>a;a++)if(b=c[a],b!==N&&null!==b)return b}function o(b,c){Ab&&!Gb&&c&&c.opacity!==N&&(c.filter="alpha(opacity="+100*c.opacity+")"),a(b.style,c)}function p(b,c,d,e,f){var g=lb.createElement(b);return c&&a(g,c),f&&o(g,{padding:0,border:Xb,margin:0}),d&&o(g,d),e&&e.appendChild(g),g}function q(b,c){var d=function(){return N};return d.prototype=new b,a(d.prototype,c),d}function r(a,b,d,e){var f=kb.numberFormat,g=R.lang,h=+a||0,i=-1===b?(h.toString().split(".")[1]||"").length:isNaN(b=tb(b))?2:b,j=void 0===d?g.decimalPoint:d,k=void 0===e?g.thousandsSep:e,l=0>h?"-":"",m=String(c(h=tb(h).toFixed(i))),n=m.length>3?m.length%3:0;return f!==r?f(a,b,d,e):l+(n?m.substr(0,n)+k:"")+m.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+k)+(i?j+tb(h-m).toFixed(i).slice(2):"")}function s(a,b){return new Array((b||2)+1-String(a).length).join(0)+a}function t(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);return a.unshift(d),c.apply(this,a)}}function u(a,b){var c,d=/f$/,e=/\.([0-9])/,f=R.lang;return d.test(a)?(c=a.match(e),c=c?c[1]:-1,null!==b&&(b=r(b,c,f.decimalPoint,a.indexOf(",")>-1?f.thousandsSep:""))):b=S(a,b),b}function v(a,b){for(var c,d,e,f,g,h,i,j="{",k=!1,l=[];-1!==(i=a.indexOf(j));){if(c=a.slice(0,i),k){for(d=c.split(":"),e=d.shift().split("."),g=e.length,h=b,f=0;g>f;f++)h=h[e[f]];d.length&&(h=u(d.join(":"),h)),l.push(h)}else l.push(c);a=a.slice(i+1),k=!k,j=k?"}":"{"}return l.push(a),l.join("")}function w(a){return nb.pow(10,pb(nb.log(a)/nb.LN10))}function x(a,b,c,d){var e,f;for(c=n(c,1),e=a/c,b||(b=[1,2,2.5,5,10],d===!1&&(1===c?b=[1,2,5,10]:.1>=c&&(b=[1/c]))),f=0;fd;d++)a[d].ss_i=d;for(a.sort(function(a,d){return c=b(a,d),0===c?a.ss_i-d.ss_i:c}),d=0;e>d;d++)delete a[d].ss_i}function z(a){for(var b=a.length,c=a[0];b--;)a[b]c&&(c=a[b]);return c}function B(a,b){var c;for(c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function C(a){Q||(Q=p(Qb)),a&&Q.appendChild(a),Q.innerHTML=""}function D(a){return parseFloat(a.toPrecision(14))}function E(a,b){T=n(a,b.animation)}function F(){var a=R.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";Y=R.global.Date||window.Date,$=6e4*(a&&R.global.timezoneOffset||0),Z=a?Y.UTC:function(a,b,c,d,e,f){return new Y(a,b,n(c,1),n(d,0),n(e,0),n(f,0)).getTime()},_=b+"Minutes",ab=b+"Hours",bb=b+"Day",cb=b+"Date",db=b+"Month",eb=b+"FullYear",fb=c+"Minutes",gb=c+"Hours",hb=c+"Date",ib=c+"Month",jb=c+"FullYear"}function G(a){return R=b(!0,R,a),F(),R}function H(){return R}function I(){}function J(a,b,c,d){this.axis=a,this.pos=b,this.type=c||"",this.isNew=!0,c||d||this.addLabel()}function K(){this.init.apply(this,arguments)}function L(){this.init.apply(this,arguments)}function M(a,b,c,d,e){var f=a.chart.inverted;this.axis=a,this.isNegative=c,this.options=b,this.x=d,this.total=null,this.points={},this.stack=e,this.alignOptions={align:b.align||(f?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:n(b.y,f?4:c?14:-6),x:n(b.x,f?c?-6:6:0)},this.textAlign=b.textAlign||(f?c?"right":"left":"center")}var N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb=document,mb=window,nb=Math,ob=nb.round,pb=nb.floor,qb=nb.ceil,rb=nb.max,sb=nb.min,tb=nb.abs,ub=nb.cos,vb=nb.sin,wb=nb.PI,xb=2*wb/360,yb=navigator.userAgent,zb=mb.opera,Ab=/msie/i.test(yb)&&!zb,Bb=8===lb.documentMode,Cb=/AppleWebKit/.test(yb),Db=/Firefox/.test(yb),Eb=/(Mobile|Android|Windows Phone)/.test(yb),Fb="http://www.w3.org/2000/svg",Gb=!!lb.createElementNS&&!!lb.createElementNS(Fb,"svg").createSVGRect,Hb=Db&&parseInt(yb.split("Firefox/")[1],10)<4,Ib=!Gb&&!Ab&&!!lb.createElement("canvas").getContext,Jb={},Kb=0,Lb=function(){return N},Mb=[],Nb=0,Ob="Highcharts",Pb="4.0.4",Qb="div",Rb="absolute",Sb="relative",Tb="hidden",Ub="highcharts-",Vb="visible",Wb="px",Xb="none",Yb="M",Zb="L",$b=/^[0-9]+$/,_b="",ac="hover",bc="select",cc="stroke-width",dc={};mb.Highcharts?W(16,!0):kb=mb.Highcharts={},S=function(b,c,d){if(!k(c)||isNaN(c))return"Invalid date";b=n(b,"%Y-%m-%d %H:%M:%S");var e,f=new Y(c-$),g=f[ab](),h=f[bb](),i=f[cb](),j=f[db](),l=f[eb](),m=R.lang,o=m.weekdays,p=a({a:o[h].substr(0,3),A:o[h],d:s(i),e:i,b:m.shortMonths[j],B:m.months[j],m:s(j+1),y:l.toString().substr(2,2),Y:l,H:s(g),I:s(g%12||12),l:g%12||12,M:s(f[_]()),p:12>g?"AM":"PM",P:12>g?"am":"pm",S:s(f.getSeconds()),L:s(ob(c%1e3),3)},kb.dateFormats);for(e in p)for(;-1!==b.indexOf("%"+e);)b=b.replace("%"+e,"function"==typeof p[e]?p[e](c):p[e]);return d?b.substr(0,1).toUpperCase()+b.substr(1):b},W=function(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;mb.console&&console.log(c)},V={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:26784e5,year:31556952e3},U={init:function(a,b,c){b=b||"";var d,e,f,g,h,i=a.shift,j=b.indexOf("C")>-1,k=j?7:3,l=b.split(" "),m=[].concat(c),n=function(a){for(f=a.length;f--;)a[f]===Yb&&a.splice(f+1,0,a[f+1],a[f+2],a[f+1],a[f+2])};if(j&&(n(l),n(m)),a.isArea&&(g=l.splice(l.length-6,6),h=m.splice(m.length-6,6)),i<=m.length/k&&l.length===m.length)for(;i--;)m=[].concat(m).splice(0,k).concat(m);if(a.shift=0,l.length)for(d=m.length;l.lengthc)for(;g--;)e=parseFloat(a[g]),f[g]=isNaN(e)?a[g]:c*parseFloat(b[g]-e)+e;else f=b;return f}},function(b){mb.HighchartsAdapter=mb.HighchartsAdapter||b&&{init:function(a){var c=b.fx;b.extend(b.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}}),b.each(["cur","_default","width","height","opacity"],function(a,d){var e,f=c.step;"cur"===d?f=c.prototype:"_default"===d&&b.Tween&&(f=b.Tween.propHooks[d],d="set"),e=f[d],e&&(f[d]=function(b){var c;return b=a?b:this,"align"!==b.prop?(c=b.elem,c.attr?c.attr(b.prop,"cur"===d?N:b.now):e.apply(this,arguments)):void 0})}),t(b.cssHooks.opacity,"get",function(a,b,c){return b.attr?b.opacity||0:a.call(this,b,c)}),this.addAnimSetter("d",function(b){var c,d=b.elem;b.started||(c=a.init(d,d.d,d.toD),b.start=c[0],b.end=c[1],b.started=!0),d.attr("d",a.step(b.start,b.end,b.pos,d.toD))}),this.each=Array.prototype.forEach?function(a,b){return Array.prototype.forEach.call(a,b)}:function(a,b){var c,d=a.length;for(c=0;d>c;c++)if(b.call(a[c],a[c],c,a)===!1)return c},b.fn.highcharts=function(){var a,b,c,e="Chart",f=arguments;return this[0]&&(d(f[0])&&(e=f[0],f=Array.prototype.slice.call(f,1)),a=f[0],a!==N&&(a.chart=a.chart||{},a.chart.renderTo=this[0],c=new kb[e](a,f[1]),b=this),a===N&&(b=Mb[l(this[0],"data-highcharts-chart")])),b}},addAnimSetter:function(a,c){b.Tween?b.Tween.propHooks[a]={set:c}:b.fx.step[a]=c},getScript:b.getScript,inArray:b.inArray,adapterRun:function(a,c){return b(a)[c]()},grep:b.grep,map:function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=b.call(a[d],a[d],d,a);return c},offset:function(a){return b(a).offset()},addEvent:function(a,c,d){b(a).bind(c,d)},removeEvent:function(a,c,d){var e=lb.removeEventListener?"removeEventListener":"detachEvent";lb[e]&&a&&!a[e]&&(a[e]=function(){}),b(a).unbind(c,d)},fireEvent:function(c,d,e,f){var g,h=b.Event(d),i="detached"+d;!Ab&&e&&(delete e.layerX,delete e.layerY,delete e.returnValue),a(h,e),c[d]&&(c[i]=c[d],c[d]=null),b.each(["preventDefault","stopPropagation"],function(a,b){var c=h[b];h[b]=function(){try{c.call(h)}catch(a){"preventDefault"===b&&(g=!0)}}}),b(c).trigger(h),c[i]&&(c[d]=c[i],c[i]=null),!f||h.isDefaultPrevented()||g||f(h)},washMouseEvent:function(a){var b=a.originalEvent||a;return b.pageX===N&&(b.pageX=a.pageX,b.pageY=a.pageY),b},animate:function(a,c,d){var e=b(a);a.style||(a.style={}),c.d&&(a.toD=c.d,c.d=1),e.stop(),c.opacity!==N&&a.attr&&(c.opacity+="px"),a.hasAnim=1,e.animate(c,d)},stop:function(a){a.hasAnim&&b(a).stop()}}}(mb.jQuery);var ec=mb.HighchartsAdapter,fc=ec||{};ec&&ec.init.call(ec,U);var gc=fc.adapterRun,hc=fc.getScript,ic=fc.inArray,jc=fc.each,kc=fc.grep,lc=fc.offset,mc=fc.map,nc=fc.addEvent,oc=fc.removeEvent,pc=fc.fireEvent,qc=fc.washMouseEvent,rc=fc.animate,sc=fc.stop,tc={enabled:!0,x:0,y:15,style:{color:"#606060",cursor:"default",fontSize:"11px"}};R={colors:["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#8085e8","#8d4653","#91e8e1"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/4.0.4/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.0.4/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"}},subtitle:{text:"",align:"center",style:{color:"#555555"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:b(tc,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":r(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:Rb,color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:Rb,width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:Sb,top:"45%"},style:{position:Rb,backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Gb,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',shadow:!0,snap:Eb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var uc=R.plotOptions,vc=uc.line;F();var wc=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,xc=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,yc=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,zc=function(a){function d(a){a&&a.stops?j=mc(a.stops,function(a){return zc(a[1])}):(i=wc.exec(a),i?k=[c(i[1]),c(i[2]),c(i[3]),parseFloat(i[4],10)]:(i=xc.exec(a),i?k=[c(i[1],16),c(i[2],16),c(i[3],16),1]:(i=yc.exec(a),i&&(k=[c(i[1]),c(i[2]),c(i[3]),1]))))}function e(c){var d;return j?(d=b(a),d.stops=[].concat(d.stops),jc(j,function(a,b){d.stops[b]=[d.stops[b][0],a.get(c)]})):d=k&&!isNaN(k[0])?"rgb"===c?"rgb("+k[0]+","+k[1]+","+k[2]+")":"a"===c?k[3]:"rgba("+k.join(",")+")":a,d}function f(a){if(j)jc(j,function(b){b.brighten(a)});else if(g(a)&&0!==a){var b;for(b=0;3>b;b++)k[b]+=c(255*a),k[b]<0&&(k[b]=0),k[b]>255&&(k[b]=255)}return this}function h(a){return k[3]=a,this}var i,j,k=[];return d(a),{get:e,brighten:f,rgba:k,setOpacity:h}};I.prototype={opacity:1,textProps:["fontSize","fontWeight","fontFamily","color","lineHeight","width","textDecoration","textShadow","HcTextStroke"],init:function(a,b){var c=this;c.element="span"===b?p(b):lb.createElementNS(Fb,b),c.renderer=a},animate:function(a,c,d){var e=n(c,T,!0);return sc(this),e?(e=b(e,{}),d&&(e.complete=d),rc(this,a,e)):(this.attr(a),d&&d()),this},colorGradient:function(a,c,d){var e,g,h,i,j,l,m,n,o,p,q,r=this.renderer,s=[];if(a.linearGradient?g="linearGradient":a.radialGradient&&(g="radialGradient"),g){h=a[g],i=r.gradients,l=a.stops,o=d.radialReference,f(h)&&(a[g]=h={x1:h[0],y1:h[1],x2:h[2],y2:h[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===g&&o&&!k(h.gradientUnits)&&(h=b(h,{cx:o[0]-o[2]/2+h.cx*o[2],cy:o[1]-o[2]/2+h.cy*o[2],r:h.r*o[2],gradientUnits:"userSpaceOnUse"}));for(p in h)"id"!==p&&s.push(p,h[p]);for(p in l)s.push(l[p]);s=s.join(","),i[s]?q=i[s].attr("id"):(h.id=q=Ub+Kb++,i[s]=j=r.createElement(g).attr(h).add(r.defs),j.stops=[],jc(l,function(a){var b;0===a[1].indexOf("rgba")?(e=zc(a[1]),m=e.get("rgb"),n=e.get("a")):(m=a[1],n=1),b=r.createElement("stop").attr({offset:a[0],"stop-color":m,"stop-opacity":n}).add(j),j.stops.push(b)})),d.setAttribute(c,"url("+r.url+"#"+q+")")}},attr:function(a,b){var c,d,e,f,g=this.element,h=this;if("string"==typeof a&&b!==N&&(c=a,a={},a[c]=b),"string"==typeof a)h=(this[a+"Getter"]||this._defaultGetter).call(this,a,g);else{for(c in a)d=a[c],f=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&&(e||(this.symbolAttr(a),e=!0),f=!0),!this.rotation||"x"!==c&&"y"!==c||(this.doTransform=!0),f||(this[c+"Setter"]||this._defaultSetter).call(this,d,c,g),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c)&&this.updateShadows(c,d);this.doTransform&&(this.updateTransform(),this.doTransform=!1)}return h},updateShadows:function(a,b){for(var c=this.shadows,d=c.length;d--;)c[d].setAttribute(a,"height"===a?rb(b-(c[d].cutHeight||0),0):"d"===a?this.d:b)},addClass:function(a){var b=this.element,c=l(b,"class")||"";return-1===c.indexOf(a)&&l(b,"class",c+" "+a),this},symbolAttr:function(a){var b=this;jc(["x","y","r","start","end","width","height","innerR","anchorX","anchorY"],function(c){b[c]=n(a[c],b[c])}),b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":Xb)},crisp:function(a){var b,c,d=this,e={},f=a.strokeWidth||d.strokeWidth||0;c=ob(f)%2/2,a.x=pb(a.x||d.x||0)+c,a.y=pb(a.y||d.y||0)+c,a.width=pb((a.width||d.width||0)-2*c),a.height=pb((a.height||d.height||0)-2*c),a.strokeWidth=f;for(b in a)d[b]!==a[b]&&(d[b]=e[b]=a[b]);return e},css:function(b){var d,e,f,g=this,h=g.styles,i={},j=g.element,k="",m=!h;if(b&&b.color&&(b.fill=b.color),h)for(e in b)b[e]!==h[e]&&(i[e]=b[e],m=!0);if(m){if(d=g.textWidth=b&&b.width&&"text"===j.nodeName.toLowerCase()&&c(b.width),h&&(b=a(h,i)),g.styles=b,d&&(Ib||!Gb&&g.renderer.forExport)&&delete b.width,Ab&&!Gb)o(g.element,b);else{f=function(a,b){return"-"+b.toLowerCase()};for(e in b)k+=e.replace(/([A-Z])/g,f)+":"+b[e]+";";l(j,"style",k)}d&&g.added&&g.renderer.buildText(g)}return g},on:function(a,b){var c=this,d=c.element;return P&&"click"===a?(d.ontouchstart=function(a){c.touchEventFired=Y.now(),a.preventDefault(),b.call(d,a)},d.onclick=function(a){(-1===yb.indexOf("Android")||Y.now()-(c.touchEventFired||0)>1100)&&b.call(d,a)}):d["on"+a]=b,this},setRadialReference:function(a){return this.element.radialReference=a,this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){var a=this;return a.inverted=!0,a.updateTransform(),a},updateTransform:function(){var a,b=this,c=b.translateX||0,d=b.translateY||0,e=b.scaleX,f=b.scaleY,g=b.inverted,h=b.rotation,i=b.element;g&&(c+=b.attr("width"),d+=b.attr("height")),a=["translate("+c+","+d+")"],g?a.push("rotate(90) scale(-1,1)"):h&&a.push("rotate("+h+" "+(i.getAttribute("x")||0)+" "+(i.getAttribute("y")||0)+")"),(k(e)||k(f))&&a.push("scale("+n(e,1)+" "+n(f,1)+")"),a.length&&i.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;return a.parentNode.appendChild(a),this},align:function(a,b,c){var e,f,g,h,i,k={},l=this.renderer,m=l.alignedObjects;return a?(this.alignOptions=a,this.alignByTranslate=b,(!c||d(c))&&(this.alignTo=i=c||"renderer",j(m,this),m.push(this),c=null)):(a=this.alignOptions,b=this.alignByTranslate,i=this.alignTo),c=n(c,l[i],l),e=a.align,f=a.verticalAlign,g=(c.x||0)+(a.x||0),h=(c.y||0)+(a.y||0),("right"===e||"center"===e)&&(g+=(c.width-(a.width||0))/{right:1,center:2}[e]),k[b?"translateX":"x"]=ob(g),("bottom"===f||"middle"===f)&&(h+=(c.height-(a.height||0))/({bottom:1,middle:2}[f]||1)),k[b?"translateY":"y"]=ob(h),this[this.placed?"animate":"attr"](k),this.placed=!0,this.alignAttr=k,this},getBBox:function(){var b,c,d,e=this,f=e.bBox,g=e.renderer,h=e.rotation,i=e.element,j=e.styles,k=h*xb,l=e.textStr;if((""===l||$b.test(l))&&(d="num."+l.toString().length+(j?"|"+j.fontSize+"|"+j.fontFamily:"")),d&&(f=g.cache[d]),!f){if(i.namespaceURI===Fb||g.forExport){try{f=i.getBBox?a({},i.getBBox()):{width:i.offsetWidth,height:i.offsetHeight}}catch(m){}(!f||f.width<0)&&(f={width:0,height:0})}else f=e.htmlGetBBox();g.isSVG&&(b=f.width,c=f.height,Ab&&j&&"11px"===j.fontSize&&"16.9"===c.toPrecision(3)&&(f.height=c=14),h&&(f.width=tb(c*vb(k))+tb(b*ub(k)),f.height=tb(c*ub(k))+tb(b*vb(k)))),e.bBox=f,d&&(g.cache[d]=f)}return f},show:function(a){return a&&this.element.namespaceURI===Fb?this.element.removeAttribute("visibility"):this.attr({visibility:a?"inherit":Vb}),this},hide:function(){return this.attr({visibility:Tb})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b,d,e,f,g,h=this.renderer,i=a||h,j=i.element||h.box,m=this.element,n=this.zIndex;if(a&&(this.parentGroup=a),this.parentInverted=a&&a.inverted,void 0!==this.textStr&&h.buildText(this),n&&(i.handleZ=!0,n=c(n)),i.handleZ)for(b=j.childNodes,f=0;fn||!k(n)&&k(e))){j.insertBefore(m,d),g=!0;break}return g||j.appendChild(m),this.added=!0,this.onAdd&&this.onAdd(),this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a,b,c,d=this,e=d.element||{},f=d.shadows,g=d.renderer.isSVG&&"SPAN"===e.nodeName&&d.parentGroup;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,sc(d),d.clipPath&&(d.clipPath=d.clipPath.destroy()),d.stops){for(c=0;c=d;d++)e=k.cloneNode(0),f=2*g+1-2*d,l(e,{isShadow:"true",stroke:a.color||"black","stroke-opacity":h*d,"stroke-width":f,transform:"translate"+i,fill:Xb}),c&&(l(e,"height",rb(l(e,"height")-f,0)),e.cutHeight=f),b?b.element.appendChild(e):k.parentNode.insertBefore(e,k),j.push(e);this.shadows=j}return this},xGetter:function(a){return"circle"===this.element.nodeName&&(a={x:"cx",y:"cy"}[a]||a),this._defaultGetter(a)},_defaultGetter:function(a){var b=n(this[a],this.element?this.element.getAttribute(a):null,0);return/^[\-0-9\.]+$/.test(b)&&(b=parseFloat(b)),b},dSetter:function(a,b,c){a&&a.join&&(a=a.join(" ")),/(NaN| {2}|^$)/.test(a)&&(a="M 0 0"),c.setAttribute(b,a),this[b]=a},dashstyleSetter:function(a){var b;if(a=a&&a.toLowerCase()){for(a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),b=a.length;b--;)a[b]=c(a[b])*this["stroke-width"];a=a.join(",").replace("NaN","none"),this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,b,c){this[b]=a,c.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=lb.createElementNS(Fb,"title"),this.element.appendChild(b)),b.textContent=n(a,"").replace(/<[^>]*>/g,"")},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,b,c){"string"==typeof a?c.setAttribute(b,a):a&&this.colorGradient(a,b,c)},zIndexSetter:function(a,b,c){c.setAttribute(b,a),this[b]=a},_defaultSetter:function(a,b,c){c.setAttribute(b,a)}},I.prototype.yGetter=I.prototype.xGetter,I.prototype.translateXSetter=I.prototype.translateYSetter=I.prototype.rotationSetter=I.prototype.verticalAlignSetter=I.prototype.scaleXSetter=I.prototype.scaleYSetter=function(a,b){this[b]=a,this.doTransform=!0},I.prototype["stroke-widthSetter"]=I.prototype.strokeSetter=function(a,b,c){this[b]=a,this.stroke&&this["stroke-width"]?(this.strokeWidth=this["stroke-width"],I.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===b&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),this.hasStroke=!1)};var Ac=function(){this.init.apply(this,arguments)};Ac.prototype={Element:I,init:function(a,b,c,d,e){var f,g,h,i=this,j=location;f=i.createElement("svg").attr({version:"1.1"}).css(this.getStyle(d)),g=f.element,a.appendChild(g),-1===a.innerHTML.indexOf("xmlns")&&l(g,"xmlns",Fb),i.isSVG=!0,i.box=g,i.boxWrapper=f,i.alignedObjects=[],i.url=(Db||Cb)&&lb.getElementsByTagName("base").length?j.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",h=this.createElement("desc").add(),h.element.appendChild(lb.createTextNode("Created with "+Ob+" "+Pb)),i.defs=this.createElement("defs").add(),i.forExport=e,i.gradients={},i.cache={},i.setSize(b,c,!1);var k,m;Db&&a.getBoundingClientRect&&(i.subPixelFix=k=function(){o(a,{left:0,top:0}),m=a.getBoundingClientRect(),o(a,{left:qb(m.left)-m.left+Wb,top:qb(m.top)-m.top+Wb})},k(),nc(mb,"resize",k))},getStyle:function(b){return this.style=a({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},b)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this,b=a.defs;return a.box=null,a.boxWrapper=a.boxWrapper.destroy(),B(a.gradients||{}),a.gradients=null,b&&(a.defs=b.destroy()),a.subPixelFix&&oc(mb,"resize",a.subPixelFix),a.alignedObjects=null,null},createElement:function(a){var b=new this.Element;return b.init(this,a),b},draw:function(){},buildText:function(a){for(var b,d,e,f=a.element,g=this,h=g.forExport,i=n(a.textStr,"").toString(),j=-1!==i.indexOf("<"),k=f.childNodes,m=l(f,"x"),p=a.styles,q=a.textWidth,r=p&&p.lineHeight,s=p&&p.HcTextStroke,t=k.length,u=function(a){return r?c(r):g.fontMetrics(/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:p&&p.fontSize||g.style.fontSize||12,a).h};t--;)f.removeChild(k[t]);return j||s||-1!==i.indexOf(" ")?(d=/<.*style="([^"]+)".*>/,e=/<.*href="(http[^"]+)".*>/,q&&!a.added&&this.box.appendChild(f),b=j?i.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g):[i],""===b[b.length-1]&&b.pop(),jc(b,function(b,c){var i,j=0;b=b.replace(//g,"|||"),i=b.split("|||"),jc(i,function(b){if(""!==b||1===i.length){var k,n={},r=lb.createElementNS(Fb,"tspan");if(d.test(b)&&(k=b.match(d)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),l(r,"style",k)),e.test(b)&&!h&&(l(r,"onclick",'location.href="'+b.match(e)[1]+'"'),o(r,{cursor:"pointer"})),b=(b.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==b){if(r.appendChild(lb.createTextNode(b)),j?n.dx=0:c&&null!==m&&(n.x=m),l(r,n),f.appendChild(r),!j&&c&&(!Gb&&h&&o(r,{display:"block"}),l(r,"dy",u(r))),q)for(var s,t,v,w=b.replace(/([^\^])-/g,"$1- ").split(" "),x=i.length>1||w.length>1&&"nowrap"!==p.whiteSpace,y=p.HcHeight,z=[],A=u(r),B=1;x&&(w.length||z.length);)delete a.bBox,v=a.getBBox(),t=v.width,!Gb&&g.forExport&&(t=g.measureSpanWidth(r.firstChild.data,a.styles)),s=t>q,s&&1!==w.length?(r.removeChild(r.firstChild),z.unshift(w.pop())):(w=z,z=[],w.length&&(B++,y&&B*A>y?(w=["..."],a.attr("title",a.textStr)):(r=lb.createElementNS(Fb,"tspan"),l(r,{dy:A,x:m}),k&&l(r,"style",k),f.appendChild(r))),t>q&&(q=t)),w.length&&r.appendChild(lb.createTextNode(w.join(" ").replace(/- /g,"-")));j++}}})}),void 0):void f.appendChild(lb.createTextNode(i))},button:function(c,d,e,f,g,h,i,j,k){var l,m,n,o,p,q,r=this.label(c,d,e,k,null,null,null,null,"button"),s=0,t={x1:0,y1:0,x2:0,y2:1};return g=b({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:t,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},g),n=g.style,delete g.style,h=b(g,{stroke:"#68A",fill:{linearGradient:t,stops:[[0,"#FFF"],[1,"#ACF"]]}},h),o=h.style,delete h.style,i=b(g,{stroke:"#68A",fill:{linearGradient:t,stops:[[0,"#9BD"],[1,"#CDF"]]}},i),p=i.style,delete i.style,j=b(g,{style:{color:"#CCC"}},j),q=j.style,delete j.style,nc(r.element,Ab?"mouseover":"mouseenter",function(){3!==s&&r.attr(h).css(o)}),nc(r.element,Ab?"mouseout":"mouseleave",function(){3!==s&&(l=[g,h,i][s],m=[n,o,p][s],r.attr(l).css(m))}),r.setState=function(a){r.state=s=a,a?2===a?r.attr(i).css(p):3===a&&r.attr(j).css(q):r.attr(g).css(n)},r.on("click",function(){3!==s&&f.call(r)}).attr(g).css(a({cursor:"default"},n))},crispLine:function(a,b){return a[1]===a[4]&&(a[1]=a[4]=ob(a[1])-b%2/2),a[2]===a[5]&&(a[2]=a[5]=ob(a[2])+b%2/2),a},path:function(b){var c={fill:Xb};return f(b)?c.d=b:e(b)&&a(c,b),this.createElement("path").attr(c)},circle:function(a,b,c){var d=e(a)?a:{x:a,y:b,r:c},f=this.createElement("circle");return f.xSetter=function(a){this.element.setAttribute("cx",a)},f.ySetter=function(a){this.element.setAttribute("cy",a)},f.attr(d)},arc:function(a,b,c,d,f,g){var h;return e(a)&&(b=a.y,c=a.r,d=a.innerR,f=a.start,g=a.end,a=a.x),h=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:f||0,end:g||0}),h.r=c,h},rect:function(a,b,c,d,f,g){f=e(a)?a.r:f;var h=this.createElement("rect"),i=e(a)?a:a===N?{}:{x:a,y:b,width:rb(c,0),height:rb(d,0)};return g!==N&&(i.strokeWidth=g,i=h.crisp(i)),f&&(i.r=f),h.rSetter=function(a){l(this.element,{rx:a,ry:a})},h.attr(i)},setSize:function(a,b,c){var d=this,e=d.alignedObjects,f=e.length;for(d.width=a,d.height=b,d.boxWrapper[n(c,!0)?"animate":"attr"]({width:a,height:b});f--;)e[f].align()},g:function(a){var b=this.createElement("g");return k(a)?b.attr({"class":Ub+a}):b},image:function(b,c,d,e,f){var g,h={preserveAspectRatio:Xb};return arguments.length>1&&a(h,{x:c,y:d,width:e,height:f}),g=this.createElement("image").attr(h),g.element.setAttributeNS?g.element.setAttributeNS("http://www.w3.org/1999/xlink","href",b):g.element.setAttribute("hc-svg-href",b),g},symbol:function(b,c,d,e,f,g){var h,i,j,k,l,m=this.symbols[b],n=m&&m(ob(c),ob(d),e,f,g),o=/^url\((.*?)\)$/;return n?(h=this.path(n),a(h,{symbolName:b,x:c,y:d,width:e,height:f}),g&&a(h,g)):o.test(b)&&(l=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(ob((e-b[0])/2),ob((f-b[1])/2)))},j=b.match(o)[1],k=Jb[j]||g&&g.width&&g.height&&[g.width,g.height],h=this.image(j).attr({x:c,y:d}),h.isImg=!0,k?l(h,k):(h.attr({width:0,height:0}),i=p("img",{onload:function(){l(h,Jb[j]=[this.width,this.height])},src:j}))),h},symbols:{circle:function(a,b,c,d){var e=.166*c;return[Yb,a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return[Yb,a,b,Zb,a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return[Yb,a+c/2,b,Zb,a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return[Yb,a,b,Zb,a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return[Yb,a+c/2,b,Zb,a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,g=e.r||c||d,h=e.end-.001,i=e.innerR,j=e.open,k=ub(f),l=vb(f),m=ub(h),n=vb(h),o=e.end-fc&&l>b+j&&b+d-j>l?f.splice(13,3,"L",a+c,l-h,a+c+g,l,a+c,l+h,a+c,b+d-i):k&&0>k&&l>b+j&&b+d-j>l?f.splice(33,3,"L",a,l+h,a-g,l,a,l-h,a,b+i):l&&l>d&&k>a+j&&a+c-j>k?f.splice(23,3,"L",k+h,b+d,k,b+d+g,k-h,b+d,a+i,b+d):l&&0>l&&k>a+j&&a+c-j>k&&f.splice(3,3,"L",k-h,b,k,b-g,k+h,b,c-i,b),f}},clipRect:function(a,b,c,d){var e,f=Ub+Kb++,g=this.createElement("clipPath").attr({id:f}).add(this.defs);return e=this.rect(a,b,c,d,0).add(g),e.id=f,e.clipPath=g,e},text:function(a,b,c,d){var e,f=this,g=Ib||!Gb&&f.forExport,h={};return d&&!f.forExport?f.html(a,b,c):(h.x=Math.round(b||0),c&&(h.y=Math.round(c)),(a||0===a)&&(h.text=a),e=f.createElement("text").attr(h),g&&e.css({position:Rb}),d||(e.xSetter=function(a,b,c){var d,e,f=c.getElementsByTagName("tspan"),g=c.getAttribute(b);for(e=0;ea?a+4:ob(1.2*a),e=ob(.8*d);return{h:d,b:e,f:a}},label:function(c,d,e,f,g,h,i,j,l){function m(){var b,c,d=z.element.style;q=(void 0===r||void 0===s||y.styles.textAlign)&&z.textStr&&z.getBBox(),y.width=(r||q.width||0)+2*B+C,y.height=(s||q.height||0)+2*B,v=B+x.fontMetrics(d&&d.fontSize,z).b,w&&(p||(b=ob(-A*B),c=j?-v:0,y.box=p=f?x.symbol(f,b,c,y.width,y.height,E):x.rect(b,c,y.width,y.height,0,E[cc]),p.attr("fill",Xb).add(y)),p.isImg||p.attr(a({width:ob(y.width),height:ob(y.height)},E)),E=null)}function n(){var a,b=y.styles,c=b&&b.textAlign,d=C+B*(1-A);a=j?0:v,k(r)&&q&&("center"===c||"right"===c)&&(d+={center:.5,right:1}[c]*(r-q.width)),(d!==z.x||a!==z.y)&&(z.attr("x",d),a!==N&&z.attr("y",a)),z.x=d,z.y=a }function o(a,b){p?p.attr(a,b):E[a]=b}var p,q,r,s,t,u,v,w,x=this,y=x.g(l),z=x.text("",0,0,i).attr({zIndex:1}),A=0,B=3,C=0,D=0,E={};y.onAdd=function(){z.add(y),y.attr({text:c||0===c?c:"",x:d,y:e}),p&&k(g)&&y.attr({anchorX:g,anchorY:h})},y.widthSetter=function(a){r=a},y.heightSetter=function(a){s=a},y.paddingSetter=function(a){k(a)&&a!==B&&(B=a,n())},y.paddingLeftSetter=function(a){k(a)&&a!==C&&(C=a,n())},y.alignSetter=function(a){A={left:0,center:.5,right:1}[a]},y.textSetter=function(a){a!==N&&z.textSetter(a),m(),n()},y["stroke-widthSetter"]=function(a,b){a&&(w=!0),D=a%2/2,o(b,a)},y.strokeSetter=y.fillSetter=y.rSetter=function(a,b){"fill"===b&&a&&(w=!0),o(b,a)},y.anchorXSetter=function(a,b){g=a,o(b,a+D-t)},y.anchorYSetter=function(a,b){h=a,o(b,a-u)},y.xSetter=function(a){y.x=a,A&&(a-=A*((r||q.width)+B)),t=ob(a),y.attr("translateX",t)},y.ySetter=function(a){u=y.y=ob(a),y.attr("translateY",u)};var F=y.css;return a(y,{css:function(a){if(a){var c={};a=b(a),jc(y.textProps,function(b){a[b]!==N&&(c[b]=a[b],delete a[b])}),z.css(c)}return F.call(y,a)},getBBox:function(){return{width:q.width+2*B,height:q.height+2*B,x:q.x-B,y:q.y-B}},shadow:function(a){return p&&p.shadow(a),y},destroy:function(){oc(y.element,"mouseenter"),oc(y.element,"mouseleave"),z&&(z=z.destroy()),p&&(p=p.destroy()),I.prototype.destroy.call(y),y=x=m=n=o=null}})}},O=Ac,a(I.prototype,{htmlCss:function(b){var c=this,d=c.element,e=b&&"SPAN"===d.tagName&&b.width;return e&&(delete b.width,c.textWidth=e,c.updateTransform()),c.styles=a(c.styles,b),o(c.element,b),c},htmlGetBBox:function(){var a=this,b=a.element,c=a.bBox;return c||("text"===b.nodeName&&(b.style.position=Rb),c=a.bBox={x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}),c},htmlUpdateTransform:function(){if(!this.added)return void(this.alignOnAdd=!0);var a=this,b=a.renderer,d=a.element,e=a.translateX||0,f=a.translateY||0,g=a.x||0,h=a.y||0,i=a.textAlign||"left",j={left:0,center:.5,right:1}[i],l=a.shadows;if(o(d,{marginLeft:e,marginTop:f}),l&&jc(l,function(a){o(a,{marginLeft:e+1,marginTop:f+1})}),a.inverted&&jc(d.childNodes,function(a){b.invertChild(a,d)}),"SPAN"===d.tagName){var m,p,q=a.rotation,r=c(a.textWidth),s=[q,i,d.innerHTML,a.textWidth].join(",");s!==a.cTT&&(p=b.fontMetrics(d.style.fontSize).b,k(q)&&a.setSpanRotation(q,j,p),m=n(a.elemWidth,d.offsetWidth),m>r&&/[ \-]/.test(d.textContent||d.innerText)&&(o(d,{width:r+Wb,display:"block",whiteSpace:"normal"}),m=r),a.getSpanCorrection(m,p,j,q,i)),o(d,{left:g+(a.xCorr||0)+Wb,top:h+(a.yCorr||0)+Wb}),Cb&&(p=d.offsetHeight),a.cTT=s}},setSpanRotation:function(a,b,c){var d={},e=Ab?"-ms-transform":Cb?"-webkit-transform":Db?"MozTransform":zb?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)",d[e+(Db?"Origin":"-origin")]=d.transformOrigin=100*b+"% "+c+"px",o(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c,this.yCorr=-b}}),a(Ac.prototype,{html:function(b,c,d){var e=this.createElement("span"),f=e.element,g=e.renderer;return e.textSetter=function(a){a!==f.innerHTML&&delete this.bBox,f.innerHTML=this.textStr=a},e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,b){"align"===b&&(b="textAlign"),e[b]=a,e.htmlUpdateTransform()},e.attr({text:b,x:ob(c),y:ob(d)}).css({position:Rb,whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),e.css=e.htmlCss,g.isSVG&&(e.add=function(b){var c,d,h=g.box.parentNode,i=[];if(this.parentGroup=b,b){if(c=b.div,!c){for(d=b;d;)i.push(d),d=d.parentGroup;jc(i.reverse(),function(b){var d;c=b.div=b.div||p(Qb,{className:l(b.element,"class")},{position:Rb,left:(b.translateX||0)+Wb,top:(b.translateY||0)+Wb},c||h),d=c.style,a(b,{translateXSetter:function(a,c){d.left=a+Wb,b[c]=a,b.doTransform=!0},translateYSetter:function(a,c){d.top=a+Wb,b[c]=a,b.doTransform=!0},visibilitySetter:function(a,b){d[b]=a}})})}}else c=h;return c.appendChild(f),e.added=!0,e.alignOnAdd&&e.htmlUpdateTransform(),e}),e}});var Bc,Cc;if(!Gb&&!Ib){Cc={init:function(a,b){var c=this,d=["<",b,' filled="f" stroked="f"'],e=["position: ",Rb,";"],f=b===Qb;("shape"===b||f)&&e.push("left:0;top:0;width:1px;height:1px;"),e.push("visibility: ",f?Tb:Vb),d.push(' style="',e.join(""),'"/>'),b&&(d=f||"span"===b||"img"===b?d.join(""):a.prepVML(d),c.element=p(d)),c.renderer=a},add:function(a){var b=this,c=b.renderer,d=b.element,e=c.box,f=a&&a.inverted,g=a?a.element||a:e;return f&&c.invertChild(d,g),g.appendChild(d),b.added=!0,b.alignOnAdd&&!b.deferUpdateTransform&&b.updateTransform(),b.onAdd&&b.onAdd(),b},updateTransform:I.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=ub(a*xb),c=vb(a*xb);o(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):Xb})},getSpanCorrection:function(a,b,c,d,e){var f,g=d?ub(d*xb):1,h=d?vb(d*xb):0,i=n(this.elemHeight,this.element.offsetHeight),j=e&&"left"!==e;this.xCorr=0>g&&-a,this.yCorr=0>h&&-i,f=0>g*h,this.xCorr+=h*b*(f?1-c:c),this.yCorr-=g*b*(d?f?c:1-c:1),j&&(this.xCorr-=a*c*(0>g?-1:1),d&&(this.yCorr-=i*c*(0>h?-1:1)),o(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)g(a[b])?c[b]=ob(10*a[b])-5:"Z"===a[b]?c[b]="x":(c[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1)));return c.join(" ")||"x"},clip:function(a){var b,c,d=this;return a?(b=a.members,j(b,d),b.push(d),d.destroyClip=function(){j(b,d)},c=a.getCSS(d)):(d.destroyClip&&d.destroyClip(),c={clip:Bb?"inherit":"rect(auto)"}),d.css(c)},css:I.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&C(a)},destroy:function(){return this.destroyClip&&this.destroyClip(),I.prototype.destroy.apply(this)},on:function(a,b){return this.element["on"+a]=function(){var a=mb.event;a.target=a.srcElement,b(a)},this},cutOffPath:function(a,b){var d;return a=a.split(/[ ,]/),d=a.length,(9===d||11===d)&&(a[d-4]=a[d-2]=c(a[d-2])-10*b),a.join(" ")},shadow:function(a,b,d){var e,f,g,h,i,j,k,l=[],m=this.element,o=this.renderer,q=m.style,r=m.path;if(r&&"string"!=typeof r.value&&(r="x"),i=r,a){for(j=n(a.width,3),k=(a.opacity||.15)/j,e=1;3>=e;e++)h=2*j+1-2*e,d&&(i=this.cutOffPath(r.value,h+.5)),g=[''],f=p(o.prepVML(g),null,{left:c(q.left)+n(a.offsetX,1),top:c(q.top)+n(a.offsetY,1)}),d&&(f.cutOff=h+1),g=[''],p(o.prepVML(g),null,null,f),b?b.element.appendChild(f):m.parentNode.insertBefore(f,m),l.push(f);this.shadows=l}return this},updateShadows:Lb,setAttr:function(a,b){Bb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){var d=c.getElementsByTagName("stroke")[0]||p(this.renderer.prepVML([""]),null,null,c);d[b]=a||"solid",this[b]=a},dSetter:function(a,b,c){var d,e=this.shadows;if(a=a||[],this.d=a.join&&a.join(" "),c.path=a=this.pathToVML(a),e)for(d=e.length;d--;)e[d].path=e[d].cutOff?this.cutOffPath(a,e[d].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;"SPAN"===d?c.style.color=a:"IMG"!==d&&(c.filled=a!==Xb,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},opacitySetter:Lb,rotationSetter:function(a,b,c){var d=c.style;this[b]=d[b]=a,d.left=-ob(vb(a*xb)+1)+Wb,d.top=ob(ub(a*xb))+Wb},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a,this[b]=a,g(a)&&(a+=Wb),this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){"inherit"===a&&(a=Vb),this.shadows&&jc(this.shadows,function(c){c.style[b]=a}),"DIV"===c.nodeName&&(a=a===Tb?"-999em":0,Bb||(c.style[b]=a?Vb:Tb),b="top"),c.style[b]=a},xSetter:function(a,b,c){this[b]=a,"x"===b?b="left":"y"===b&&(b="top"),this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}},kb.VMLElement=Cc=q(I,Cc),Cc.prototype.ySetter=Cc.prototype.widthSetter=Cc.prototype.heightSetter=Cc.prototype.xSetter;var Dc={Element:Cc,isIE8:yb.indexOf("MSIE 8.0")>-1,init:function(b,c,d,e){var f,g,h,i=this;if(i.alignedObjects=[],f=i.createElement(Qb).css(a(this.getStyle(e),{position:Sb})),g=f.element,b.appendChild(f.element),i.isVML=!0,i.box=g,i.boxWrapper=f,i.cache={},i.setSize(c,d,!1),!lb.namespaces.hcv){lb.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),h="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ";try{lb.createStyleSheet().cssText=h}catch(j){lb.styleSheets[0].cssText+=h}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(b,c,d,f){var g=this.createElement(),h=e(b);return a(g,{members:[],left:(h?b.x:b)+1,top:(h?b.y:c)+1,width:(h?b.width:d)-1,height:(h?b.height:f)-1,getCSS:function(b){var c=b.element,d=c.nodeName,e="shape"===d,f=b.inverted,g=this,h=g.top-(e?c.offsetTop:0),i=g.left,j=i+g.width,k=h+g.height,l={clip:"rect("+ob(f?i:h)+"px,"+ob(f?k:j)+"px,"+ob(f?j:k)+"px,"+ob(f?h:i)+"px)"};return!f&&Bb&&"DIV"===d&&a(l,{width:j+Wb,height:k+Wb}),l},updateClipping:function(){jc(g.members,function(a){a.element&&a.css(g.getCSS(a))})}})},color:function(a,b,c,d){var e,f,g,h=this,i=/^rgba/,j=Xb;if(a&&a.linearGradient?g="gradient":a&&a.radialGradient&&(g="pattern"),g){var k,l,m,n,o,q,r,s,t,u,v,w,x=a.linearGradient||a.radialGradient,y="",z=a.stops,A=[],B=function(){f=[''],p(h.prepVML(f),null,null,b)};if(v=z[0],w=z[z.length-1],v[0]>0&&z.unshift([0,v[1]]),w[0]<1&&z.push([1,w[1]]),jc(z,function(a,b){i.test(a[1])?(e=zc(a[1]),k=e.get("rgb"),l=e.get("a")):(k=a[1],l=1),A.push(100*a[0]+"% "+k),b?(s=l,t=k):(r=l,u=k)}),"fill"===c)if("gradient"===g)m=x.x1||x[0]||0,n=x.y1||x[1]||0,o=x.x2||x[2]||0,q=x.y2||x[3]||0,y='angle="'+(90-180*nb.atan((q-n)/(o-m))/wb)+'"',B();else{var C,D=x.r,E=2*D,F=2*D,G=x.cx,H=x.cy,I=b.radialReference,J=function(){I&&(C=d.getBBox(),G+=(I[0]-C.x)/C.width-.5,H+=(I[1]-C.y)/C.height-.5,E*=I[2]/C.width,F*=I[2]/C.height),y='src="'+R.global.VMLRadialGradientURL+'" size="'+E+","+F+'" origin="0.5,0.5" position="'+G+","+H+'" color2="'+u+'" ',B()};d.added?J():d.onAdd=J,j=t}else j=k}else if(i.test(a)&&"IMG"!==b.tagName)e=zc(a),f=["<",c,' opacity="',e.get("a"),'"/>'],p(this.prepVML(f),null,null,b),j=e.get("rgb");else{var K=b.getElementsByTagName(c);K.length&&(K[0].opacity=1,K[0].type="solid"),j=a}return j},prepVML:function(a){var b="display:inline-block;behavior:url(#default#VML);",c=this.isIE8;return a=a.join(""),c?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="'+b+'" />'):a.replace('style="','style="'+b)):a=a.replace("<","1&&f.attr({x:b,y:c,width:d,height:e}),f},createElement:function(a){return"rect"===a?this.symbol(a):Ac.prototype.createElement.call(this,a)},invertChild:function(a,b){var d=this,e=b.style,f="IMG"===a.tagName&&a.style;o(a,{flip:"x",left:c(e.width)-(f?c(f.top):1),top:c(e.height)-(f?c(f.left):1),rotation:-90}),jc(a.childNodes,function(b){d.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f,g=e.start,h=e.end,i=e.r||c||d,j=e.innerR,k=ub(g),l=vb(g),m=ub(h),n=vb(h);return h-g===0?["x"]:(f=["wa",a-i,b-i,a+i,b+i,a+i*k,b+i*l,a+i*m,b+i*n],e.open&&!j&&f.push("e",Yb,a,b),f.push("at",a-j,b-j,a+j,b+j,a+j*m,b+j*n,a+j*k,b+j*l,"x","e"),f.isArc=!0,f)},circle:function(a,b,c,d,e){return e&&(c=d=2*e.r),e&&e.isCircle&&(a-=c/2,b-=d/2),["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return Ac.prototype.symbols[k(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}};kb.VMLRenderer=Bc=function(){this.init.apply(this,arguments)},Bc.prototype=b(Ac.prototype,Dc),O=Bc}Ac.prototype.measureSpanWidth=function(a,b){var c,d=lb.createElement("span"),e=lb.createTextNode(a);return d.appendChild(e),o(d,b),this.box.appendChild(d),c=d.offsetWidth,C(d),c};var Ec,Fc;Ib&&(kb.CanVGRenderer=Ec=function(){Fb="http://www.w3.org/1999/xhtml"},Ec.prototype.symbols={},Fc=function(){function a(){var a,c=b.length;for(a=0;c>a;a++)b[a]();b=[]}var b=[];return{push:function(c,d){0===b.length&&hc(d,a),b.push(c)}}}(),O=Ec),J.prototype={addLabel:function(){var b,c,d,e,f=this,h=f.axis,j=h.options,l=h.chart,m=h.horiz,o=h.categories,p=h.names,q=f.pos,r=j.labels,s=r.rotation,t=h.tickPositions,u=m&&o&&!r.step&&!r.staggerLines&&!r.rotation&&l.plotWidth/t.length||!m&&(l.margin[3]||.33*l.chartWidth),v=q===t[0],w=q===t[t.length-1],x=o?n(o[q],p[q],q):q,y=f.label,z=t.info;h.isDatetimeAxis&&z&&(e=j.dateTimeLabelFormats[z.higherRanks[q]||z.unitName]),f.isFirst=v,f.isLast=w,b=h.labelFormatter.call({axis:h,chart:l,isFirst:v,isLast:w,dateTimeLabelFormat:e,value:h.isLog?D(i(x)):x}),c=u&&{width:rb(1,ob(u-2*(r.padding||10)))+Wb},k(y)?y&&y.attr({text:b}).css(c):(d={align:h.labelAlign},g(s)&&(d.rotation=s),u&&r.ellipsis&&(c.HcHeight=h.len/t.length),f.label=y=k(b)&&r.enabled?l.renderer.text(b,0,0,r.useHTML).attr(d).css(a(c,r.style)).add(h.labelGroup):null,h.tickBaseline=l.renderer.fontMetrics(r.style.fontSize,y).b,s&&2===h.side&&(h.tickBaseline*=ub(s*xb))),f.yOffset=y?n(r.y,h.tickBaseline+(2===h.side?8:-(y.getBBox().height/2))):0},getLabelSize:function(){var a=this.label,b=this.axis;return a?a.getBBox()[b.horiz?"height":"width"]:0},getLabelSides:function(){var a=this.label.getBBox(),b=this.axis,c=b.horiz,d=b.options,e=d.labels,f=c?a.width:a.height,g=c?e.x-f*{left:0,center:.5,right:1}[b.labelAlign]:0,h=c?f+g:f;return[g,h]},handleOverflow:function(a,b){var c,d,e,f,g,h=!0,i=this.axis,j=this.isFirst,k=this.isLast,l=i.horiz,m=l?b.x:b.y,n=i.reversed,o=i.tickPositions,p=this.getLabelSides(),q=p[0],r=p[1],s=this.label.line,t=s||0,u=i.labelEdge,v=i.justifyLabels&&(j||k);if(u[t]===N||m+q>u[t]?u[t]=m+r:v||(h=!1),v){g=i.justifyToPlot,c=g?i.pos:0,d=g?c+i.len:i.chart.chartWidth;do a+=j?1:-1,e=i.ticks[o[a]];while(o[a]&&(!e||!e.label||e.label.line!==s));f=e&&e.label.xy&&e.label.xy.x+e.getLabelSides()[j?0:1],j&&!n||k&&n?c>m+q&&(m=c-q,e&&m+r>f&&(h=!1)):m+r>d&&(m=d-r,e&&f>m+q&&(h=!1)),b.x=m}return h},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,l=i.staggerLines;return a=a+e.x-(f&&d?f*j*(k?-1:1):0),b=b+this.yOffset-(f&&!d?f*j*(k?1:-1):0),l&&(c.line=g/(h||1)%l,b+=c.line*(i.labelOffset/l)),{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine([Yb,a,b,Zb,a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d,e,f,g=this,h=g.axis,i=h.options,j=h.chart,k=j.renderer,l=h.horiz,m=g.type,o=g.label,p=g.pos,q=i.labels,r=g.gridLine,s=m?m+"Grid":"grid",t=m?m+"Tick":"tick",u=i[s+"LineWidth"],v=i[s+"LineColor"],w=i[s+"LineDashStyle"],x=i[t+"Length"],y=i[t+"Width"]||0,z=i[t+"Color"],A=i[t+"Position"],B=g.mark,C=q.step,D=!0,E=h.tickmarkOffset,F=g.getPosition(l,p,E,b),G=F.x,H=F.y,I=l&&G===h.pos+h.len||!l&&H===h.pos?-1:1;c=n(c,1),this.isActive=!0,u&&(d=h.getPlotLinePath(p+E,u*I,b,!0),r===N&&(f={stroke:v,"stroke-width":u},w&&(f.dashstyle=w),m||(f.zIndex=1),b&&(f.opacity=0),g.gridLine=r=u?k.path(d).attr(f).add(h.gridGroup):null),!b&&r&&d&&r[g.isNew?"attr":"animate"]({d:d,opacity:c})),y&&x&&("inside"===A&&(x=-x),h.opposite&&(x=-x),e=g.getMarkPath(G,H,x,y*I,l,k),B?B.animate({d:e,opacity:c}):g.mark=k.path(e).attr({stroke:z,"stroke-width":y,opacity:c}).add(h.axisGroup)),o&&!isNaN(G)&&(o.xy=F=g.getLabelPosition(G,H,o,l,q,E,a,C),g.isFirst&&!g.isLast&&!n(i.showFirstLabel,1)||g.isLast&&!g.isFirst&&!n(i.showLastLabel,1)?D=!1:h.isRadial||q.step||q.rotation||b||0===c||(D=g.handleOverflow(a,F)),C&&a%C&&(D=!1),D&&!isNaN(F.y)?(F.opacity=c,o[g.isNew?"attr":"animate"](F),g.isNew=!1):o.attr("y",-9999))},destroy:function(){B(this,this.axis)}},kb.PlotLineOrBand=function(a,b){this.axis=a,b&&(this.options=b,this.id=b.id)},kb.PlotLineOrBand.prototype={render:function(){var a,c,d,e,f,g,i=this,j=i.axis,l=j.horiz,m=(j.pointRange||0)/2,n=i.options,o=n.label,p=i.label,q=n.width,r=n.to,s=n.from,t=k(s)&&k(r),u=n.value,v=n.dashStyle,w=i.svgElem,x=[],y=n.color,B=n.zIndex,C=n.events,D={},E=j.chart.renderer;if(j.isLog&&(s=h(s),r=h(r),u=h(u)),q)x=j.getPlotLinePath(u,q),D={stroke:y,"stroke-width":q},v&&(D.dashstyle=v);else{if(!t)return;s=rb(s,j.min-m),r=sb(r,j.max+m),x=j.getPlotBandPath(s,r,n),y&&(D.fill=y),n.borderWidth&&(D.stroke=n.borderColor,D["stroke-width"]=n.borderWidth)}if(k(B)&&(D.zIndex=B),w)x?w.animate({d:x},null,w.onGetPath):(w.hide(),w.onGetPath=function(){w.show()},p&&(i.label=p=p.destroy()));else if(x&&x.length&&(i.svgElem=w=E.path(x).attr(D).add(),C)){a=function(a){w.on(a,function(b){C[a].apply(i,[b])})};for(c in C)a(c)}return o&&k(o.text)&&x&&x.length&&j.width>0&&j.height>0?(o=b({align:l&&t&&"center",x:l?!t&&4:10,verticalAlign:!l&&t&&"middle",y:l?t?16:10:t?6:-4,rotation:l&&!t&&90},o),p||(D={align:o.textAlign||o.align,rotation:o.rotation},k(B)&&(D.zIndex=B),i.label=p=E.text(o.text,0,0,o.useHTML).attr(D).css(o.style).add()),d=[x[1],x[4],t?x[6]:x[1]],e=[x[2],x[5],t?x[7]:x[2]],f=z(d),g=z(e),p.align(o,!1,{x:f,y:g,width:A(d)-f,height:A(e)-g}),p.show()):p&&p.hide(),i},destroy:function(){j(this.axis.plotLinesAndBands,this),delete this.axis,B(this)}},X={getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);return d&&c?d.push(c[4],c[5],c[1],c[2]):d=null,d},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(a,b){var c=new kb.PlotLineOrBand(this,a).render(),d=this.userOptions;return c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c)),c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();jc([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&j(b,b[e])})}},K.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:tc,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return r(this.total,-1)},style:tc.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX,d=this;d.horiz=a.inverted?!c:c,d.isXAxis=c,d.coll=c?"xAxis":"yAxis",d.opposite=b.opposite,d.side=b.side||(d.horiz?d.opposite?0:2:d.opposite?1:3),d.setOptions(b);var e=this.options,f=e.type,g="datetime"===f;d.labelFormatter=e.labels.formatter||d.defaultLabelFormatter,d.userOptions=b,d.minPixelPadding=0,d.chart=a,d.reversed=e.reversed,d.zoomEnabled=e.zoomEnabled!==!1,d.categories=e.categories||"category"===f,d.names=[],d.isLog="logarithmic"===f,d.isDatetimeAxis=g,d.isLinked=k(e.linkedTo),d.tickmarkOffset=d.categories&&"between"===e.tickmarkPlacement&&1===n(e.tickInterval,1)?.5:0,d.ticks={},d.labelEdge=[],d.minorTicks={},d.plotLinesAndBands=[],d.alternateBands={},d.len=0,d.minRange=d.userMinRange=e.minRange||e.maxZoom,d.range=e.range,d.offset=e.offset||0,d.stacks={},d.oldStacks={},d.max=null,d.min=null,d.crosshair=n(e.crosshair,m(a.options.tooltip.crosshairs)[c?0:1],!1);var j,l=d.options.events;-1===ic(d,a.axes)&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,d):a.axes.push(d),a[d.coll].push(d)),d.series=d.series||[],a.inverted&&c&&d.reversed===N&&(d.reversed=!0),d.removePlotBand=d.removePlotBandOrLine,d.removePlotLine=d.removePlotBandOrLine;for(j in l)nc(d,j,l[j]);d.isLog&&(d.val2lin=h,d.lin2val=i)},setOptions:function(a){this.options=b(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],b(R[this.coll],a))},defaultLabelFormatter:function(){var a,b,c=this.axis,d=this.value,e=c.categories,f=this.dateTimeLabelFormat,g=R.lang.numericSymbols,h=g&&g.length,i=c.options.labels.format,j=c.isLog?d:c.tickInterval;if(i)b=v(i,this);else if(e)b=d;else if(f)b=S(f,d);else if(h&&j>=1e3)for(;h--&&b===N;)a=Math.pow(1e3,h+1),j>=a&&null!==g[h]&&(b=r(d/a,-1)+g[h]);return b===N&&(b=tb(d)>=1e4?r(d,0):r(d,-1,N,"")),b},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1,a.dataMin=a.dataMax=a.ignoreMinPadding=a.ignoreMaxPadding=null,a.buildStacks&&a.buildStacks(),jc(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d,e,f,g=c.options,h=g.threshold;a.hasVisibleSeries=!0,a.isLog&&0>=h&&(h=null),a.isXAxis?(d=c.xData,d.length&&(a.dataMin=sb(n(a.dataMin,d[0]),z(d)),a.dataMax=rb(n(a.dataMax,d[0]),A(d)))):(c.getExtremes(),f=c.dataMax,e=c.dataMin,k(e)&&k(f)&&(a.dataMin=sb(n(a.dataMin,e),e),a.dataMax=rb(n(a.dataMax,f),f)),k(h)&&(a.dataMin>=h?(a.dataMin=h,a.ignoreMinPadding=!0):a.dataMaxf||f>m+k.width)&&(j=!0)):(f=m,h=q-k.right,(o>g||g>o+k.height)&&(j=!0)),j&&!d?null:l.renderer.crispLine([Yb,f,g,Zb,h,i],b||1)},getLinearTickPositions:function(a,b,c){var d,e,f=D(pb(b/a)*a),h=D(qb(c/a)*a),i=[];if(b===c&&g(b))return[b];for(d=f;h>=d&&(i.push(d),d=D(d+a),d!==e);)e=d;return i},getMinorTickPositions:function(){var a,b,c,d=this,e=d.options,f=d.tickPositions,g=d.minorTickInterval,h=[];if(d.isLog)for(c=f.length,b=1;c>b;b++)h=h.concat(d.getLogTickPositions(g,f[b-1],f[b],!0));else if(d.isDatetimeAxis&&"auto"===e.minorTickInterval)h=h.concat(d.getTimeTicks(d.normalizeTimeTickInterval(g),d.min,d.max,e.startOfWeek)),h[0]=i.minRange;if(i.isXAxis&&i.minRange===N&&!i.isLog&&(k(j.min)||k(j.max)?i.minRange=null:(jc(i.series,function(a){for(e=a.xData,f=a.xIncrement?1:e.length-1,c=f;c>0;c--)d=e[c]-e[c-1],(b===N||b>d)&&(b=d)}),i.minRange=sb(5*b,i.dataMax-i.dataMin))),m-lm-l&&(g[0]=m-p,g[1]=n(j.min,m-p),l=A(g))}i.min=l,i.max=m},setAxisTranslation:function(a){var b,c,e=this,f=e.max-e.min,g=e.axisPointRange||0,h=0,i=0,j=e.linkedParent,l=!!e.categories,m=e.transA;(e.isXAxis||l||g)&&(j?(h=j.minPointOffset,i=j.pointRangePadding):jc(e.series,function(a){var c=l?1:e.isXAxis?a.pointRange:e.axisPointRange||0,j=a.options.pointPlacement,m=a.closestPointRange;c>f&&(c=0),g=rb(g,c),h=rb(h,d(j)?0:c/2),i=rb(i,"on"===j?0:c),!a.noSharedTooltip&&k(m)&&(b=k(b)?sb(b,m):m)}),c=e.ordinalSlope&&b?e.ordinalSlope/b:1,e.minPointOffset=h*=c,e.pointRangePadding=i*=c,e.pointRange=sb(g,f),e.closestPointRange=b),a&&(e.oldTransA=m),e.translationSlope=e.transA=m=e.len/(f+i||1),e.transB=e.horiz?e.left:e.bottom,e.minPixelPadding=m*h},setTickPositions:function(a){var b,c,d,e,f=this,i=f.chart,j=f.options,l=j.startOnTick,m=j.endOnTick,o=f.isLog,p=f.isDatetimeAxis,q=f.isXAxis,r=f.isLinked,s=f.options.tickPositioner,t=j.maxPadding,u=j.minPadding,v=j.tickInterval,y=j.minTickInterval,z=j.tickPixelInterval,A=f.categories;if(r?(f.linkedParent=i[f.coll][j.linkedTo],c=f.linkedParent.getExtremes(),f.min=n(c.min,c.dataMin),f.max=n(c.max,c.dataMax),j.type!==f.linkedParent.options.type&&W(11,1)):(f.min=n(f.userMin,j.min,f.dataMin),f.max=n(f.userMax,j.max,f.dataMax)),o&&(!a&&sb(f.min,n(f.dataMin,f.min))<=0&&W(10,1),f.min=D(h(f.min)),f.max=D(h(f.max))),f.range&&k(f.max)&&(f.userMin=f.min=rb(f.min,f.max-f.range),f.userMax=f.max,f.range=null),f.beforePadding&&f.beforePadding(),f.adjustForMinRange(),A||f.axisPointRange||f.usePercentage||r||!k(f.min)||!k(f.max)||(b=f.max-f.min,b&&(k(j.min)||k(f.userMin)||!u||!(f.dataMin<0)&&f.ignoreMinPadding||(f.min-=b*u),k(j.max)||k(f.userMax)||!t||!(f.dataMax>0)&&f.ignoreMaxPadding||(f.max+=b*t))),g(j.floor)&&(f.min=rb(f.min,j.floor)),g(j.ceiling)&&(f.max=sb(f.max,j.ceiling)),f.min===f.max||void 0===f.min||void 0===f.max?f.tickInterval=1:r&&!v&&z===f.linkedParent.options.tickPixelInterval?f.tickInterval=f.linkedParent.tickInterval:(f.tickInterval=n(v,A?1:(f.max-f.min)*z/rb(f.len,z)),!k(v)&&f.len1&&f.tickInterval<5&&f.max>1e3&&f.max<9999)))),f.minorTickInterval="auto"===j.minorTickInterval&&f.tickInterval?f.tickInterval/5:j.minorTickInterval,f.tickPositions=d=j.tickPositions?[].concat(j.tickPositions):s&&s.apply(f,[f.min,f.max]),d||(!f.ordinalPositions&&(f.max-f.min)/f.tickInterval>rb(2*f.len,200)&&W(19,!0),d=p?f.getTimeTicks(f.normalizeTimeTickInterval(f.tickInterval,j.units),f.min,f.max,j.startOfWeek,f.ordinalPositions,f.closestPointRange,!0):o?f.getLogTickPositions(f.tickInterval,f.min,f.max):f.getLinearTickPositions(f.tickInterval,f.min,f.max),e&&d.splice(1,d.length-2),f.tickPositions=d),!r){var B,C=d[0],E=d[d.length-1],F=f.minPointOffset||0;l?f.min=C:f.min-F>C&&d.shift(),m?f.max=E:f.max+F1e13?1:.001,f.min-=B,f.max+=B)}},setMaxTicks:function(){var a=this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&this.options.alignTicks!==!1&&(b[d]=c.length),a.maxTicks=b},adjustTickAmount:function(){var a=this,b=a.chart,c=a._maxTicksKey,d=a.tickPositions,e=b.maxTicks;if(e&&e[c]&&!a.isDatetimeAxis&&!a.categories&&!a.isLinked&&a.options.alignTicks!==!1&&this.min!==N){var f,g=a.tickAmount,h=d.length;if(a.tickAmount=f=e[c],f>h){for(;d.length=rb(d,n(e.max,d))&&(b=N)),this.displayBtn=a!==N||b!==N,this.setExtremes(a,b,!1,N,{trigger:"zoom"}),!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=b.offsetRight||0,e=this.horiz,f=n(b.width,a.plotWidth-c+d),g=n(b.height,a.plotHeight),h=n(b.top,a.plotTop),i=n(b.left,a.plotLeft+c),j=/%$/;j.test(g)&&(g=parseInt(g,10)/100*a.plotHeight),j.test(h)&&(h=parseInt(h,10)/100*a.plotHeight+a.plotTop),this.left=i,this.top=h,this.width=f,this.height=g,this.bottom=a.chartHeight-g-h,this.right=a.chartWidth-f-i,this.len=rb(e?f:g,0),this.pos=e?i:h},getExtremes:function(){var a=this,b=a.isLog;return{min:b?D(i(a.min)):a.min,max:b?D(i(a.max)):a.max,dataMin:a.dataMin,dataMax:a.dataMax,userMin:a.userMin,userMax:a.userMax}},getThreshold:function(a){var b=this,c=b.isLog,d=c?i(b.min):b.min,e=c?i(b.max):b.max;return d>a||null===a?a=d:a>e&&(a=e),b.translate(a,0,1,0,1)},autoLabelAlign:function(a){var b,c=(n(a,0)-90*this.side+720)%360;return b=c>15&&165>c?"right":c>195&&345>c?"left":"center"},getOffset:function(){var a,b,c,d,e,f,g,h,i,j,l,m,o,p,q,r=this,s=r.chart,t=s.renderer,u=r.options,v=r.tickPositions,w=r.ticks,x=r.horiz,y=r.side,z=s.inverted?[1,0,3,2][y]:y,A=0,B=0,C=u.title,D=u.labels,E=0,F=s.axisOffset,G=s.clipOffset,H=[-1,1,1,-1][y],I=1,K=n(D.maxStaggerLines,5);if(r.hasData=a=r.hasVisibleSeries||k(r.min)&&k(r.max)&&!!v,r.showAxis=b=a||n(u.showEmpty,!0),r.staggerLines=r.horiz&&D.staggerLines,r.axisGroup||(r.gridGroup=t.g("grid").attr({zIndex:u.gridZIndex||1}).add(),r.axisGroup=t.g("axis").attr({zIndex:u.zIndex||2}).add(),r.labelGroup=t.g("axis-labels").attr({zIndex:D.zIndex||7}).addClass(Ub+r.coll.toLowerCase()+"-labels").add()),a||r.isLinked){if(r.labelAlign=n(D.align||r.autoLabelAlign(D.rotation)),jc(v,function(a){w[a]?w[a].addLabel():w[a]=new J(r,a)}),r.horiz&&!r.staggerLines&&K&&!D.rotation){for(g=r.reversed?[].concat(v).reverse():v;K>I;){for(h=[],i=!1,f=0;f1&&(r.staggerLines=I)}jc(v,function(a){(0===y||2===y||{1:"left",3:"right"}[y]===r.labelAlign)&&(E=rb(w[a].getLabelSize(),E))}),r.staggerLines&&(E*=r.staggerLines,r.labelOffset=E)}else for(e in w)w[e].destroy(),delete w[e];C&&C.text&&C.enabled!==!1&&(r.axisTitle||(r.axisTitle=t.text(C.text,0,0,C.useHTML).attr({zIndex:7,rotation:C.rotation||0,align:C.textAlign||{low:"left",middle:"center",high:"right"}[C.align]}).addClass(Ub+this.coll.toLowerCase()+"-title").css(C.style).add(r.axisGroup),r.axisTitle.isNew=!0),b&&(A=r.axisTitle.getBBox()[x?"height":"width"],c=C.offset,B=k(c)?0:n(C.margin,x?5:10)),r.axisTitle[b?"show":"hide"]()),r.offset=H*n(u.offset,F[y]),q=2===y?r.tickBaseline:0,d=E+B+(E&&H*(x?n(D.y,r.tickBaseline+8):D.x)-q),r.axisTitleMargin=n(c,d),F[y]=rb(F[y],r.axisTitleMargin+A+H*r.offset,d),G[z]=rb(G[z],2*pb(u.lineWidth/2)) },getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,g=b.chartHeight-this.bottom-(c?this.height:0)+d;return c&&(a*=-1),b.renderer.crispLine([Yb,e?this.left:f,e?g:this.top,Zb,e?b.chartWidth-this.right:f,e?g:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,d=this.top,e=this.len,f=this.options.title,g=a?b:d,h=this.opposite,i=this.offset,j=c(f.style.fontSize||12),k={low:g+(a?0:e),middle:g+e/2,high:g+(a?e:0)}[f.align],l=(a?d+this.height:b)+(a?1:-1)*(h?-1:1)*this.axisTitleMargin+(2===this.side?j:0);return{x:a?k:l+(h?this.width:0)+i+(f.x||0),y:a?l-(h?this.height:0)+i:k+(f.y||0)}},render:function(){var a,b,c,d,e=this,f=e.horiz,g=e.reversed,h=e.chart,j=h.renderer,l=e.options,m=e.isLog,n=e.isLinked,o=e.tickPositions,p=e.axisTitle,q=e.ticks,r=e.minorTicks,s=e.alternateBands,t=l.stackLabels,u=l.alternateGridColor,v=e.tickmarkOffset,w=l.lineWidth,x=h.hasRendered,y=x&&k(e.oldMin)&&!isNaN(e.oldMin),z=e.hasData,A=e.showAxis,B=l.labels.overflow,C=e.justifyLabels=f&&B!==!1;e.labelEdge.length=0,e.justifyToPlot="justify"===B,jc([q,r,s],function(a){var b;for(b in a)a[b].isActive=!1}),(z||n)&&(e.minorTickInterval&&!e.categories&&jc(e.getMinorTickPositions(),function(a){r[a]||(r[a]=new J(e,a,"minor")),y&&r[a].isNew&&r[a].render(null,!0),r[a].render(null,!1,1)}),o.length&&(a=o.slice(),(f&&g||!f&&!g)&&a.reverse(),C&&(a=a.slice(1).concat([a[0]])),jc(a,function(b,c){C&&(c=c===a.length-1?0:c+1),(!n||b>=e.min&&b<=e.max)&&(q[b]||(q[b]=new J(e,b)),y&&q[b].isNew&&q[b].render(c,!0,.1),q[b].render(c))}),v&&0===e.min&&(q[-1]||(q[-1]=new J(e,-1,null,!0)),q[-1].render(-1))),u&&jc(o,function(a,b){b%2===0&&a=V.second&&(l.setMilliseconds(0),l.setSeconds(m>=V.minute?0:o*pb(l.getSeconds()/o))),m>=V.minute&&l[fb](m>=V.hour?0:o*pb(l[_]()/o)),m>=V.hour&&l[gb](m>=V.day?0:o*pb(l[ab]()/o)),m>=V.day&&l[hb](m>=V.month?1:o*pb(l[cb]()/o)),m>=V.month&&(l[ib](m>=V.year?0:o*pb(l[db]()/o)),g=l[eb]()),m>=V.year&&(g-=g%o,l[jb](g)),m===V.week&&l[hb](l[cb]()-l[bb]()+n(e,1)),f=1,$&&(l=new Y(l.getTime()+$)),g=l[eb]();for(var p=l.getTime(),q=l[db](),r=l[cb](),s=(V.day+(j?$:60*l.getTimezoneOffset()*1e3))%V.day;d>p;)h.push(p),m===V.year?p=Z(g+f*o,0):m===V.month?p=Z(g,q+f*o):j||m!==V.day&&m!==V.week?p+=m*o:p=Z(g,q,r+f*o*(m===V.day?1:7)),f++;h.push(p),jc(kc(h,function(a){return m<=V.hour&&a%V.day===s}),function(a){i[a]="day"})}return h.info=a(b,{higherRanks:i,totalRange:m*o}),h},K.prototype.normalizeTimeTickInterval=function(a,b){var c,d,e=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],f=e[e.length-1],g=V[f[0]],h=f[1];for(d=0;d=a)break}return g===V.year&&5*g>a&&(h=[1,2,5]),c=x(a/g,h,"year"===f[0]?rb(w(a/g),1):1),{unitRange:g,count:c,unitName:f[0]}},K.prototype.getLogTickPositions=function(a,b,c,d){var e=this,f=e.options,g=e.len,j=[];if(d||(e._minorAutoInterval=null),a>=.5)a=ob(a),j=e.getLinearTickPositions(a,b,c);else if(a>=.08){var k,l,m,o,p,q,r,s=pb(b);for(k=a>.3?[1,2,4]:a>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],l=s;c+1>l&&!r;l++)for(o=k.length,m=0;o>m&&!r;m++)p=h(i(l)*k[m]),p>b&&(!d||c>=q)&&q!==N&&j.push(q),q>c&&(r=!0),q=p}else{var t=i(b),u=i(c),v=f[d?"minorTickInterval":"tickInterval"],y="auto"===v?null:v,z=f.tickPixelInterval/(d?5:1),A=d?g/e.tickPositions.length:g;a=n(y,e._minorAutoInterval,(u-t)*z/(A||1)),a=x(a,null,w(a)),j=mc(e.getLinearTickPositions(a,t,u),h),d||(e._minorAutoInterval=a/5)}return d||(e.tickInterval=a),j};var Gc=kb.Tooltip=function(){this.init.apply(this,arguments)};Gc.prototype={init:function(a,b){var d=b.borderWidth,e=b.style,f=c(e.padding);this.chart=a,this.options=b,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:f,fill:b.backgroundColor,"stroke-width":d,r:b.borderRadius,zIndex:8}).css(e).css({padding:0}).add().attr({y:-9999}),Ib||this.label.shadow(b.shadow),this.shared=b.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(b,c,d,e){var f=this,g=f.now,h=f.options.animation!==!1&&!f.isHidden&&(tb(b-g.x)>1||tb(c-g.y)>1),i=f.followPointer||f.len>1;a(g,{x:h?(2*g.x+b)/3:b,y:h?(g.y+c)/2:c,anchorX:i?N:h?(2*g.anchorX+d)/3:d,anchorY:i?N:h?(g.anchorY+e)/2:e}),f.label.attr(g),h&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){f&&f.move(b,c,d,e)},32))},hide:function(a){var b,c=this;clearTimeout(this.hideTimer),this.isHidden||(b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){c.label.fadeOut(),c.isHidden=!0},n(a,this.options.hideDelay,500)),b&&jc(b,function(a){a.setState()}),this.chart.hoverPoints=null)},getAnchor:function(a,b){var c,d,e=this.chart,f=e.inverted,g=e.plotTop,h=0,i=0;return a=m(a),c=a[0].tooltipPos,this.followPointer&&b&&(b.chartX===N&&(b=e.pointer.normalize(b)),c=[b.chartX-e.plotLeft,b.chartY-g]),c||(jc(a,function(a){d=a.series.yAxis,h+=a.plotX,i+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!f&&d?d.top-g:0)}),h/=a.length,i/=a.length,c=[f?e.plotWidth-i:h,this.shared&&!f&&a.length>1&&b?b.chartY-g:f?e.plotHeight-h:i]),mc(c,ob)},getPosition:function(a,b,c){var d,e=this.chart,f=this.distance,g={},h=["y",e.chartHeight,b,c.plotY+e.plotTop],i=["x",e.chartWidth,a,c.plotX+e.plotLeft],j=c.ttBelow||e.inverted&&!c.negative||!e.inverted&&c.negative,k=function(a,b,c,d){var e=d-f>c,h=b>d+f+c,i=d-f-c,k=d+f;if(j&&h)g[a]=k;else if(!j&&e)g[a]=i;else if(e)g[a]=i;else{if(!h)return!1;g[a]=k}},l=function(a,b,c,d){return f>d||d>b-f?!1:void(g[a]=c/2>d?1:d>b-c/2?b-c-2:d-c/2)},m=function(a){var b=h;h=i,i=b,d=a},n=function(){k.apply(0,h)!==!1?l.apply(0,i)!==!1||d||(m(!0),n()):d?g.x=g.y=0:(m(!0),n())};return(e.inverted||this.len>1)&&m(),n(),g},defaultFormatter:function(a){var b,c=this.points||m(this),d=c[0].series;return b=[a.tooltipHeaderFormatter(c[0])],jc(c,function(a){d=a.series,b.push(d.tooltipFormatter&&d.tooltipFormatter(a)||a.point.tooltipFormatter(d.tooltipOptions.pointFormat))}),b.push(a.options.footerFormat||""),b.join("")},refresh:function(a,b){var c,d,e,f,g,h,i=this,j=i.chart,k=i.label,l=i.options,o={},p=[],q=l.formatter||i.defaultFormatter,r=j.hoverPoints,s=i.shared;clearTimeout(this.hideTimer),i.followPointer=m(a)[0].series.tooltipOptions.followPointer,e=i.getAnchor(a,b),c=e[0],d=e[1],!s||a.series&&a.series.noSharedTooltip?o=a.getLabelConfig():(j.hoverPoints=a,r&&jc(r,function(a){a.setState()}),jc(a,function(a){a.setState(ac),p.push(a.getLabelConfig())}),o={x:a[0].category,y:a[0].y},o.points=p,this.len=p.length,a=a[0]),f=q.call(o,i),h=a.series,this.distance=n(h.tooltipOptions.distance,16),f===!1?this.hide():(i.isHidden&&(sc(k),k.attr("opacity",1).show()),k.attr({text:f}),g=l.borderColor||a.color||h.color||"#606060",k.attr({stroke:g}),i.updatePosition({plotX:c,plotY:d,negative:a.negative,ttBelow:a.ttBelow}),this.isHidden=!1),pc(j,"tooltipRefresh",{text:f,x:c+j.plotLeft,y:d+j.plotTop,borderColor:g})},updatePosition:function(a){var b=this.chart,c=this.label,d=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(ob(d.x),ob(d.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)},tooltipHeaderFormatter:function(a){var b,c=a.series,d=c.tooltipOptions,e=d.dateTimeLabelFormats,f=d.xDateFormat,h=c.xAxis,i=h&&"datetime"===h.options.type&&g(a.key),j=d.headerFormat,k=h&&h.closestPointRange;if(i&&!f){if(k){for(b in V)if(V[b]>=k||V[b]<=V.day&&a.key%V[b]>0){f=e[b];break}}else f=e.day;f=f||e.year}return i&&f&&(j=j.replace("{point.key}","{point.key:"+f+"}")),v(j,{point:a,series:c})}};var Hc;P=lb.documentElement.ontouchstart!==N;var Ic=kb.Pointer=function(a,b){this.init(a,b)};if(Ic.prototype={init:function(a,b){var c,d,e=b.chart,f=e.events,g=Ib?"":e.zoomType,h=a.inverted;this.options=b,this.chart=a,this.zoomX=c=/x/.test(g),this.zoomY=d=/y/.test(g),this.zoomHor=c&&!h||d&&h,this.zoomVert=d&&!h||c&&h,this.hasZoom=c||d,this.runChartClick=f&&!!f.click,this.pinchDown=[],this.lastValidTouch={},kb.Tooltip&&b.tooltip.enabled&&(a.tooltip=new Gc(a,b.tooltip),this.followTouchMove=b.tooltip.followTouchMove),this.setDOMEvents()},normalize:function(b,c){var d,e,f;return b=b||window.event,b=qc(b),b.target||(b.target=b.srcElement),f=b.touches?b.touches.length?b.touches.item(0):b.changedTouches[0]:b,c||(this.chartPosition=c=lc(this.chart.container)),f.pageX===N?(d=rb(b.x,b.clientX-c.left),e=b.y):(d=f.pageX-c.left,e=f.pageY-c.top),a(b,{chartX:ob(d),chartY:ob(e)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};return jc(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})}),b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var b,c,d,e,f,g,h=this,i=h.chart,j=i.series,k=i.tooltip,l=i.hoverPoint,m=i.hoverSeries,o=i.chartWidth,p=h.getIndex(a);if(k&&h.options.tooltip.shared&&(!m||!m.noSharedTooltip)){for(d=[],e=j.length,f=0;e>f;f++)j[f].visible&&j[f].options.enableMouseTracking!==!1&&!j[f].noSharedTooltip&&j[f].singularTooltips!==!0&&j[f].tooltipPoints.length&&(c=j[f].tooltipPoints[p],c&&c.series&&(c._dist=tb(p-c.clientX),o=sb(o,c._dist),d.push(c)));for(e=d.length;e--;)d[e]._dist>o&&d.splice(e,1);d.length&&d[0].clientX!==h.hoverX&&(k.refresh(d,a),h.hoverX=d[0].clientX)}b=m&&m.tooltipOptions.followPointer,m&&m.tracker&&!b?(c=m.tooltipPoints[p],c&&c!==l&&c.onMouseOver(a)):k&&b&&!k.isHidden&&(g=k.getAnchor([{}],a),k.updatePosition({plotX:g[0],plotY:g[1]})),k&&!h._onDocumentMouseMove&&(h._onDocumentMouseMove=function(a){Mb[Hc]&&Mb[Hc].pointer.onDocumentMouseMove(a)},nc(lb,"mousemove",h._onDocumentMouseMove)),jc(i.axes,function(b){b.drawCrosshair(a,n(c,l))})},reset:function(a,b){var c=this,d=c.chart,e=d.hoverSeries,f=d.hoverPoint,g=d.tooltip,h=g&&g.shared?d.hoverPoints:f;a=a&&g&&h,a&&m(h)[0].plotX===N&&(a=!1),a?(g.refresh(h),f&&f.setState(f.state,!0)):(f&&f.onMouseOut(),e&&e.onMouseOut(),g&&g.hide(b),c._onDocumentMouseMove&&(oc(lb,"mousemove",c._onDocumentMouseMove),c._onDocumentMouseMove=null),jc(d.axes,function(a){a.hideCrosshair()}),c.hoverX=null)},scaleGroups:function(a,b){var c,d=this.chart;jc(d.series,function(e){c=a||e.getPlotBox(),e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(c),e.markerGroup&&(e.markerGroup.attr(c),e.markerGroup.clip(b?d.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(c))}),d.clipRect.attr(b||d.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type,b.cancelClick=!1,b.mouseDownX=this.mouseDownX=a.chartX,b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b,c,d=this.chart,e=d.options.chart,f=a.chartX,g=a.chartY,h=this.zoomHor,i=this.zoomVert,j=d.plotLeft,k=d.plotTop,l=d.plotWidth,m=d.plotHeight,n=this.mouseDownX,o=this.mouseDownY,p=e.panKey&&a[e.panKey+"Key"];j>f?f=j:f>j+l&&(f=j+l),k>g?g=k:g>k+m&&(g=k+m),this.hasDragged=Math.sqrt(Math.pow(n-f,2)+Math.pow(o-g,2)),this.hasDragged>10&&(b=d.isInsidePlot(n-j,o-k),d.hasCartesianSeries&&(this.zoomX||this.zoomY)&&b&&!p&&(this.selectionMarker||(this.selectionMarker=d.renderer.rect(j,k,h?1:l,i?1:m,0).attr({fill:e.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add())),this.selectionMarker&&h&&(c=f-n,this.selectionMarker.attr({width:tb(c),x:(c>0?0:c)+n})),this.selectionMarker&&i&&(c=g-o,this.selectionMarker.attr({height:tb(c),y:(c>0?0:c)+o})),b&&!this.selectionMarker&&e.panning&&d.pan(a,e.panning))},drop:function(b){var c=this.chart,d=this.hasPinched;if(this.selectionMarker){var e,f={xAxis:[],yAxis:[],originalEvent:b.originalEvent||b},g=this.selectionMarker,h=g.attr?g.attr("x"):g.x,i=g.attr?g.attr("y"):g.y,j=g.attr?g.attr("width"):g.width,k=g.attr?g.attr("height"):g.height;(this.hasDragged||d)&&(jc(c.axes,function(a){if(a.zoomEnabled){var c=a.horiz,d="touchend"===b.type?a.minPixelPadding:0,g=a.toValue((c?h:i)+d),l=a.toValue((c?h+j:i+k)-d);isNaN(g)||isNaN(l)||(f[a.coll].push({axis:a,min:sb(g,l),max:rb(g,l)}),e=!0)}}),e&&pc(c,"selection",f,function(b){c.zoom(a(b,d?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),d&&this.scaleGroups()}c&&(o(c.container,{cursor:c._cursor}),c.cancelClick=this.hasDragged>10,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a),a.preventDefault&&a.preventDefault(),this.dragStart(a)},onDocumentMouseUp:function(a){Mb[Hc]&&Mb[Hc].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries;a=this.normalize(a,c),c&&d&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=Mb[Hc];a&&(a.pointer.reset(),a.pointer.chartPosition=null)},onContainerMouseMove:function(a){var b=this.chart;Hc=b.index,a=this.normalize(a),a.returnValue=!1,"mousedown"===b.mouseIsDown&&this.drag(a),!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||b.openMenu||this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=l(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf(Ub+"container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries,c=a.relatedTarget||a.toElement,d=c&&c.point&&c.point.series;!b||b.options.stickyTracking||this.inClass(c,Ub+"tooltip")||d===b||b.onMouseOut()},onContainerClick:function(b){var c=this.chart,d=c.hoverPoint,e=c.plotLeft,f=c.plotTop;b=this.normalize(b),b.cancelBubble=!0,c.cancelClick||(d&&this.inClass(b.target,Ub+"tracker")?(pc(d.series,"click",a(b,{point:d})),c.hoverPoint&&d.firePointEvent("click",b)):(a(b,this.getCoordinates(b)),c.isInsidePlot(b.chartX-e,b.chartY-f)&&pc(c,"click",b)))},setDOMEvents:function(){var a=this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)},b.onmousemove=function(b){a.onContainerMouseMove(b)},b.onclick=function(b){a.onContainerClick(b)},nc(b,"mouseleave",a.onContainerMouseLeave),1===Nb&&nc(lb,"mouseup",a.onDocumentMouseUp),P&&(b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},1===Nb&&nc(lb,"touchend",a.onDocumentTouchEnd))},destroy:function(){var a;oc(this.chart.container,"mouseleave",this.onContainerMouseLeave),Nb||(oc(lb,"mouseup",this.onDocumentMouseUp),oc(lb,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}},a(kb.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o=this.chart,p=a?"x":"y",q=a?"X":"Y",r="chart"+q,s=a?"width":"height",t=o["plot"+(a?"Left":"Top")],u=h||1,v=o.inverted,w=o.bounds[a?"h":"v"],x=1===b.length,y=b[0][r],z=c[0][r],A=!x&&b[1][r],B=!x&&c[1][r],C=function(){!x&&tb(y-A)>20&&(u=h||tb(z-B)/tb(y-A)),k=(t-z)/u+y,i=o["plot"+(a?"Width":"Height")]/u};C(),j=k,jw.max&&(j=w.max-i,l=!0),l?(z-=.8*(z-g[p][0]),x||(B-=.8*(B-g[p][1])),C()):g[p]=[z,B],v||(f[p]=k-t,f[s]=i),n=v?a?"scaleY":"scaleX":"scale"+q,m=v?1/u:u,e[s]=i,e[p]=j,d[n]=u,d["translate"+q]=m*t+(z-m*y)},pinch:function(b){var c=this,d=c.chart,e=c.pinchDown,f=c.followTouchMove,g=b.touches,h=g.length,i=c.lastValidTouch,j=c.hasZoom,k=c.selectionMarker,l={},m=1===h&&(c.inClass(b.target,Ub+"tracker")&&d.runTrackerClick||c.runChartClick),o={};!j&&!f||m||b.preventDefault(),mc(g,function(a){return c.normalize(a)}),"touchstart"===b.type?(jc(g,function(a,b){e[b]={chartX:a.chartX,chartY:a.chartY}}),i.x=[e[0].chartX,e[1]&&e[1].chartX],i.y=[e[0].chartY,e[1]&&e[1].chartY],jc(d.axes,function(a){if(a.zoomEnabled){var b=d.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(n(a.options.min,a.dataMin)),f=a.toPixels(n(a.options.max,a.dataMax)),g=sb(e,f),h=rb(e,f);b.min=sb(a.pos,g-c),b.max=rb(a.pos+a.len,h+c)}}),c.res=!0):e.length&&(k||(c.selectionMarker=k=a({destroy:Lb},d.plotBox)),c.pinchTranslate(e,g,l,k,o,i),c.hasPinched=j,c.scaleGroups(l,o),!j&&f&&1===h?this.runPointActions(c.normalize(b)):c.res&&(c.res=!1,this.reset(!1,0)))},onContainerTouchStart:function(a){var b=this.chart;Hc=b.index,1===a.touches.length?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()):2===a.touches.length&&this.pinch(a)},onContainerTouchMove:function(a){(1===a.touches.length||2===a.touches.length)&&this.pinch(a)},onDocumentTouchEnd:function(a){Mb[Hc]&&Mb[Hc].pointer.drop(a)}}),mb.PointerEvent||mb.MSPointerEvent){var Jc={},Kc=!!mb.PointerEvent,Lc=function(){var a,b=[];b.item=function(a){return this[a]};for(a in Jc)Jc.hasOwnProperty(a)&&b.push({pageX:Jc[a].pageX,pageY:Jc[a].pageY,target:Jc[a].target});return b},Mc=function(a,b,c,d){var e;a=a.originalEvent||a,"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||!Mb[Hc]||(d(a),e=Mb[Hc].pointer,e[b]({type:c,target:a.currentTarget,preventDefault:Lb,touches:Lc()}))};a(Ic.prototype,{onContainerPointerDown:function(a){Mc(a,"onContainerTouchStart","touchstart",function(a){Jc[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Mc(a,"onContainerTouchMove","touchmove",function(a){Jc[a.pointerId]={pageX:a.pageX,pageY:a.pageY},Jc[a.pointerId].target||(Jc[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){Mc(a,"onContainerTouchEnd","touchend",function(a){delete Jc[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,Kc?"pointerdown":"MSPointerDown",this.onContainerPointerDown),a(this.chart.container,Kc?"pointermove":"MSPointerMove",this.onContainerPointerMove),a(lb,Kc?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),t(Ic.prototype,"init",function(a,b,c){a.call(this,b,c),(this.hasZoom||this.followTouchMove)&&o(b.container,{"-ms-touch-action":Xb,"touch-action":Xb})}),t(Ic.prototype,"setDOMEvents",function(a){a.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(nc)}),t(Ic.prototype,"destroy",function(a){this.batchMSEvents(oc),a.call(this)})}var Nc=kb.Legend=function(a,b){this.init(a,b)};Nc.prototype={init:function(a,c){var d=this,e=c.itemStyle,f=n(c.padding,8),g=c.itemMarginTop||0;this.options=c,c.enabled&&(d.itemStyle=e,d.itemHiddenStyle=b(e,c.itemHiddenStyle),d.itemMarginTop=g,d.padding=f,d.initialItemX=f,d.initialItemY=f-5,d.maxItemWidth=0,d.chart=a,d.itemHeight=0,d.lastLineHeight=0,d.symbolWidth=n(c.symbolWidth,16),d.pages=[],d.render(),nc(d.chart,"endResize",function(){d.positionCheckboxes()}))},colorizeItem:function(a,b){var c,d,e=this,f=e.options,g=a.legendItem,h=a.legendLine,i=a.legendSymbol,j=e.itemHiddenStyle.color,k=b?f.itemStyle.color:j,l=b?a.legendColor||a.color||"#CCC":j,m=a.options&&a.options.marker,n={fill:l};if(g&&g.css({fill:k,color:k}),h&&h.attr({stroke:l}),i){if(m&&i.isMarker){n.stroke=l,m=a.convertAttribs(m);for(c in m)d=m[c],d!==N&&(n[c]=d)}i.attr(n)}},positionItem:function(a){var b=this,c=b.options,d=c.symbolPadding,e=!c.rtl,f=a._legendItemPos,g=f[0],h=f[1],i=a.checkbox;a.legendGroup&&a.legendGroup.translate(e?g:b.legendWidth-g-2*d-4,h),i&&(i.x=g,i.y=h)},destroyItem:function(a){var b=a.checkbox;jc(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())}),b&&C(a.checkbox)},destroy:function(){var a=this,b=a.group,c=a.box;c&&(a.box=c.destroy()),b&&(a.group=b.destroy())},positionCheckboxes:function(a){var b,c=this.group.alignAttr,d=this.clipHeight||this.legendHeight;c&&(b=c.translateY,jc(this.allItems,function(e){var f,g=e.checkbox;g&&(f=b+g.y+(a||0)+3,o(g,{left:c.translateX+e.checkboxOffset+g.x-20+Wb,top:f+Wb,display:f>b-6&&b+d-6>f?"":Xb}))}))},renderTitle:function(){var a,b=this.options,c=this.padding,d=b.title,e=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,c-3,c-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(d.style).add(this.group)),a=this.title.getBBox(),e=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:e})),this.titleHeight=e},renderItem:function(a){var c,d,e,f=this,g=f.chart,h=g.renderer,i=f.options,j="horizontal"===i.layout,k=f.symbolWidth,l=i.symbolPadding,m=f.itemStyle,o=f.itemHiddenStyle,p=f.padding,q=j?n(i.itemDistance,20):0,r=!i.rtl,s=i.width,t=i.itemMarginBottom||0,u=f.itemMarginTop,w=f.initialItemX,x=a.legendItem,y=a.series&&a.series.drawLegendSymbol?a.series:a,z=y.options,A=f.createCheckboxForItem&&z&&z.showCheckbox,B=i.useHTML;x||(a.legendGroup=h.g("legend-item").attr({zIndex:1}).add(f.scrollGroup),a.legendItem=x=h.text(i.labelFormat?v(i.labelFormat,a):i.labelFormatter.call(a),r?k+l:-l,f.baseline||0,B).css(b(a.visible?m:o)).attr({align:r?"left":"right",zIndex:2}).add(a.legendGroup),f.baseline||(f.baseline=h.fontMetrics(m.fontSize,x).f+3+u,x.attr("y",f.baseline)),y.drawLegendSymbol(f,a),f.setItemEvents&&f.setItemEvents(a,x,B,m,o),f.colorizeItem(a,a.visible),A&&f.createCheckboxForItem(a)),d=x.getBBox(),e=a.checkboxOffset=i.itemWidth||a.legendItemWidth||k+l+d.width+q+(A?20:0),f.itemHeight=c=ob(a.legendItemHeight||d.height),j&&f.itemX-w+e>(s||g.chartWidth-2*p-w-i.x)&&(f.itemX=w,f.itemY+=u+f.lastLineHeight+t,f.lastLineHeight=0),f.maxItemWidth=rb(f.maxItemWidth,e),f.lastItemY=u+f.itemY+t,f.lastLineHeight=rb(c,f.lastLineHeight),a._legendItemPos=[f.itemX,f.itemY],j?f.itemX+=e:(f.itemY+=u+c+t,f.lastLineHeight=c),f.offsetWidth=s||rb((j?f.itemX-w-q:e)+p,f.offsetWidth)},getAllItems:function(){var a=[];return jc(this.chart.series,function(b){var c=b.options;n(c.showInLegend,k(c.linkedTo)?!1:N,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))}),a},render:function(){var b,c,d,e,f=this,g=f.chart,h=g.renderer,i=f.group,j=f.box,k=f.options,l=f.padding,m=k.borderWidth,n=k.backgroundColor;f.itemX=f.initialItemX,f.itemY=f.initialItemY,f.offsetWidth=0,f.lastItemY=0,i||(f.group=i=h.g("legend").attr({zIndex:7}).add(),f.contentGroup=h.g().attr({zIndex:1}).add(i),f.scrollGroup=h.g().add(f.contentGroup)),f.renderTitle(),b=f.getAllItems(),y(b,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)}),k.reversed&&b.reverse(),f.allItems=b,f.display=c=!!b.length,jc(b,function(a){f.renderItem(a)}),d=k.width||f.offsetWidth,e=f.lastItemY+f.lastLineHeight+f.titleHeight,e=f.handleOverflow(e),(m||n)&&(d+=l,e+=l,j?d>0&&e>0&&(j[j.isNew?"attr":"animate"](j.crisp({width:d,height:e})),j.isNew=!1):(f.box=j=h.rect(0,0,d,e,k.borderRadius,m||0).attr({stroke:k.borderColor,"stroke-width":m||0,fill:n||Xb}).add(i).shadow(k.shadow),j.isNew=!0),j[c?"show":"hide"]()),f.legendWidth=d,f.legendHeight=e,jc(b,function(a){f.positionItem(a)}),c&&i.align(a({width:d,height:e},k),!0,"spacingBox"),g.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b,c,d=this,e=this.chart,f=e.renderer,g=this.options,h=g.y,i="top"===g.verticalAlign,j=e.spacingBox.height+(i?-h:h)-this.padding,k=g.maxHeight,l=this.clipRect,m=g.navigation,o=n(m.animation,!0),p=m.arrowSize||12,q=this.nav,r=this.pages,s=this.allItems;return"horizontal"===g.layout&&(j/=2),k&&(j=sb(j,k)),r.length=0,a>j&&!g.useHTML?(this.clipHeight=b=rb(j-20-this.titleHeight-this.padding,0),this.currentPage=n(this.currentPage,1),this.fullHeight=a,jc(s,function(a,d){var e=a._legendItemPos[1],f=ob(a.legendItem.getBBox().height),g=r.length;(!g||e-r[g-1]>b&&(c||e)!==r[g-1])&&(r.push(c||e),g++),d===s.length-1&&e+f-r[g-1]>b&&r.push(e),e!==c&&(c=e)}),l||(l=d.clipRect=f.clipRect(0,this.padding,9999,0),d.contentGroup.clip(l)),l.attr({height:b}),q||(this.nav=q=f.g().attr({zIndex:1}).add(this.group),this.up=f.symbol("triangle",0,0,p,p).on("click",function(){d.scroll(-1,o)}).add(q),this.pager=f.text("",15,10).css(m.style).add(q),this.down=f.symbol("triangle-down",0,0,p,p).on("click",function(){d.scroll(1,o)}).add(q)),d.scroll(0),a=j):q&&(l.attr({height:e.chartHeight}),q.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),a},scroll:function(a,b){var c,d=this.pages,e=d.length,f=this.currentPage+a,g=this.clipHeight,h=this.options.navigation,i=h.activeColor,j=h.inactiveColor,k=this.pager,l=this.padding;f>e&&(f=e),f>0&&(b!==N&&E(b,this.chart),this.nav.attr({translateX:l,translateY:g+this.padding+7+this.titleHeight,visibility:Vb}),this.up.attr({fill:1===f?j:i}).css({cursor:1===f?"default":"pointer"}),k.attr({text:f+"/"+e}),this.down.attr({x:18+this.pager.getBBox().width,fill:f===e?j:i}).css({cursor:f===e?"default":"pointer"}),c=-d[f-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=f,this.positionCheckboxes(c))}};var Oc=kb.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||12;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-5-c/2,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b,c,d,e=this.options,f=e.marker,g=a.options,h=a.symbolWidth,i=this.chart.renderer,j=this.legendGroup,k=a.baseline-ob(.3*i.fontMetrics(g.itemStyle.fontSize,this.legendItem).b);e.lineWidth&&(d={"stroke-width":e.lineWidth},e.dashStyle&&(d.dashstyle=e.dashStyle),this.legendLine=i.path([Yb,0,k,Zb,h,k]).attr(d).add(j)),f&&f.enabled!==!1&&(b=f.radius,this.legendSymbol=c=i.symbol(this.symbol,h/2-b,k-b,2*b,2*b).add(j),c.isMarker=!0)}};(/Trident\/7\.0/.test(yb)||Db)&&t(Nc.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d(),setTimeout(d)}),L.prototype={init:function(a,c){var d,e=a.series;a.series=null,d=b(R,a),d.series=a.series=e,this.userOptions=a;var f=d.chart;this.margin=this.splashArray("margin",f),this.spacing=this.splashArray("spacing",f);var g=f.events;this.bounds={h:{},v:{}},this.callback=c,this.isResizing=0,this.options=d,this.axes=[],this.series=[],this.hasCartesianSeries=f.showAxes;var h,i=this;if(i.index=Mb.length,Mb.push(i),Nb++,f.reflow!==!1&&nc(i,"load",function(){i.initReflow()}),g)for(h in g)nc(i,h,g[h]);i.xAxis=[],i.yAxis=[],i.animation=Ib?!1:n(f.animation,!0),i.pointCount=i.colorCounter=i.symbolCounter=0,i.firstRender()},initSeries:function(a){var b,c=this,d=c.options.chart,e=a.type||d.type||d.defaultSeriesType,f=dc[e];return f||W(17,!0),b=new f,b.init(this,a),b},isInsidePlot:function(a,b,c){var d=c?b:a,e=c?a:b;return d>=0&&d<=this.plotWidth&&e>=0&&e<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&jc(this.axes,function(a){a.adjustTickAmount()}),this.maxTicks=null},redraw:function(b){var c,d,e,f=this,g=f.axes,h=f.series,i=f.pointer,j=f.legend,k=f.isDirtyLegend,l=f.hasCartesianSeries,m=f.isDirtyBox,n=h.length,o=n,p=f.renderer,q=p.isHidden(),r=[];for(E(b,f),q&&f.cloneRenderTo(),f.layOutTitles();o--;)if(e=h[o],e.options.stacking&&(c=!0,e.isDirty)){d=!0;break}if(d)for(o=n;o--;)e=h[o],e.options.stacking&&(e.isDirty=!0);jc(h,function(a){a.isDirty&&"point"===a.options.legendType&&(k=!0)}),k&&j.options.enabled&&(j.render(),f.isDirtyLegend=!1),c&&f.getStacks(),l&&(f.isResizing||(f.maxTicks=null,jc(g,function(a){a.setScale()})),f.adjustTickAmounts()),f.getMargins(),l&&(jc(g,function(a){a.isDirty&&(m=!0)}),jc(g,function(b){b.isDirtyExtremes&&(b.isDirtyExtremes=!1,r.push(function(){pc(b,"afterSetExtremes",a(b.eventArgs,b.getExtremes())),delete b.eventArgs})),(m||c)&&b.redraw()})),m&&f.drawChartBox(),jc(h,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()}),i&&i.reset(!0),p.draw(),pc(f,"redraw"),q&&f.cloneRenderTo(!0),jc(r,function(a){a.call()})},get:function(a){var b,c,d,e=this,f=e.axes,g=e.series;for(b=0;b19?a.containerHeight:400)) },cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),C(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),o(b,{position:Rb,top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),lb.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var b,e,f,g,h,i,j=this,k=j.options.chart,m="data-highcharts-chart";j.renderTo=g=k.renderTo,i=Ub+Kb++,d(g)&&(j.renderTo=g=lb.getElementById(g)),g||W(13,!0),h=c(l(g,m)),!isNaN(h)&&Mb[h]&&Mb[h].hasRendered&&Mb[h].destroy(),l(g,m,j.index),g.innerHTML="",k.skipClone||g.offsetWidth||j.cloneRenderTo(),j.getChartSize(),e=j.chartWidth,f=j.chartHeight,j.container=b=p(Qb,{className:Ub+"container"+(k.className?" "+k.className:""),id:i},a({position:Sb,overflow:Tb,width:e+Wb,height:f+Wb,textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},k.style),j.renderToClone||g),j._cursor=b.style.cursor,j.renderer=k.forExport?new Ac(b,e,f,k.style,!0):new O(b,e,f,k.style),Ib&&j.renderer.create(j,b,e,f)},getMargins:function(){var a,b=this,c=b.spacing,d=b.legend,e=b.margin,f=b.options.legend,g=n(f.margin,20),h=f.x,i=f.y,j=f.align,l=f.verticalAlign,m=b.titleOffset;b.resetMargins(),a=b.axisOffset,m&&!k(e[0])&&(b.plotTop=rb(b.plotTop,m+b.options.title.margin+c[0])),d.display&&!f.floating&&("right"===j?k(e[1])||(b.marginRight=rb(b.marginRight,d.legendWidth-h+g+c[1])):"left"===j?k(e[3])||(b.plotLeft=rb(b.plotLeft,d.legendWidth+h+g+c[3])):"top"===l?k(e[0])||(b.plotTop=rb(b.plotTop,d.legendHeight+i+g+c[0])):"bottom"===l&&(k(e[2])||(b.marginBottom=rb(b.marginBottom,d.legendHeight-i+g+c[2])))),b.extraBottomMargin&&(b.marginBottom+=b.extraBottomMargin),b.extraTopMargin&&(b.plotTop+=b.extraTopMargin),b.hasCartesianSeries&&jc(b.axes,function(a){a.getOffset()}),k(e[3])||(b.plotLeft+=a[3]),k(e[0])||(b.plotTop+=a[0]),k(e[2])||(b.marginBottom+=a[2]),k(e[1])||(b.marginRight+=a[1]),b.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||gc(d,"width"),f=c.height||gc(d,"height"),g=a?a.target:mb,h=function(){b.container&&(b.setSize(e,f,!1),b.hasUserSize=null)};b.hasUserSize||!e||!f||g!==mb&&g!==lb||((e!==b.containerWidth||f!==b.containerHeight)&&(clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(h,100):h()),b.containerWidth=e,b.containerHeight=f)},initReflow:function(){var a=this,b=function(b){a.reflow(b)};nc(mb,"resize",b),nc(a,"destroy",function(){oc(mb,"resize",b)})},setSize:function(a,b,c){var d,e,f,g=this;g.isResizing+=1,f=function(){g&&pc(g,"endResize",null,function(){g.isResizing-=1})},E(c,g),g.oldChartHeight=g.chartHeight,g.oldChartWidth=g.chartWidth,k(a)&&(g.chartWidth=d=rb(0,ob(a)),g.hasUserSize=!!d),k(b)&&(g.chartHeight=e=rb(0,ob(b))),(T?rc:o)(g.container,{width:d+Wb,height:e+Wb},T),g.setChartSize(!0),g.renderer.setSize(d,e,c),g.maxTicks=null,jc(g.axes,function(a){a.isDirty=!0,a.setScale()}),jc(g.series,function(a){a.isDirty=!0}),g.isDirtyLegend=!0,g.isDirtyBox=!0,g.layOutTitles(),g.getMargins(),g.redraw(c),g.oldChartHeight=null,pc(g,"resize"),T===!1?f():setTimeout(f,T&&T.duration||500)},setChartSize:function(a){var b,c,d,e,f,g,h,i=this,j=i.inverted,k=i.renderer,l=i.chartWidth,m=i.chartHeight,n=i.options.chart,o=i.spacing,p=i.clipOffset;i.plotLeft=d=ob(i.plotLeft),i.plotTop=e=ob(i.plotTop),i.plotWidth=f=rb(0,ob(l-d-i.marginRight)),i.plotHeight=g=rb(0,ob(m-e-i.marginBottom)),i.plotSizeX=j?g:f,i.plotSizeY=j?f:g,i.plotBorderWidth=n.plotBorderWidth||0,i.spacingBox=k.spacingBox={x:o[3],y:o[0],width:l-o[3]-o[1],height:m-o[0]-o[2]},i.plotBox=k.plotBox={x:d,y:e,width:f,height:g},h=2*pb(i.plotBorderWidth/2),b=qb(rb(h,p[3])/2),c=qb(rb(h,p[0])/2),i.clipBox={x:b,y:c,width:pb(i.plotSizeX-rb(h,p[1])/2-b),height:rb(0,pb(i.plotSizeY-rb(h,p[2])/2-c))},a||jc(i.axes,function(a){a.setAxisSize(),a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.spacing,c=a.margin;a.plotTop=n(c[0],b[0]),a.marginRight=n(c[1],b[1]),a.marginBottom=n(c[2],b[2]),a.plotLeft=n(c[3],b[3]),a.axisOffset=[0,0,0,0],a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a,b,c=this,d=c.options.chart,e=c.renderer,f=c.chartWidth,g=c.chartHeight,h=c.chartBackground,i=c.plotBackground,j=c.plotBorder,k=c.plotBGImage,l=d.borderWidth||0,m=d.backgroundColor,n=d.plotBackgroundColor,o=d.plotBackgroundImage,p=d.plotBorderWidth||0,q=c.plotLeft,r=c.plotTop,s=c.plotWidth,t=c.plotHeight,u=c.plotBox,v=c.clipRect,w=c.clipBox;a=l+(d.shadow?8:0),(l||m)&&(h?h.animate(h.crisp({width:f-a,height:g-a})):(b={fill:m||Xb},l&&(b.stroke=d.borderColor,b["stroke-width"]=l),c.chartBackground=e.rect(a/2,a/2,f-a,g-a,d.borderRadius,l).attr(b).addClass(Ub+"background").add().shadow(d.shadow))),n&&(i?i.animate(u):c.plotBackground=e.rect(q,r,s,t,0).attr({fill:n}).add().shadow(d.plotShadow)),o&&(k?k.animate(u):c.plotBGImage=e.image(o,q,r,s,t).add()),v?v.animate({width:w.width,height:w.height}):c.clipRect=e.clipRect(w),p&&(j?j.animate(j.crisp({x:q,y:r,width:s,height:t,strokeWidth:-p})):c.plotBorder=e.rect(q,r,s,t,0,-p).attr({stroke:d.plotBorderColor,"stroke-width":p,fill:Xb,zIndex:1}).add()),c.isDirtyBox=!1},propFromSeries:function(){var a,b,c,d=this,e=d.options.chart,f=d.options.series;jc(["inverted","angular","polar"],function(g){for(a=dc[e.type||e.defaultSeriesType],c=d[g]||e[g]||a&&a.prototype[g],b=f&&f.length;!c&&b--;)a=dc[f[b].type],a&&a.prototype[g]&&(c=!0);d[g]=c})},linkSeries:function(){var a=this,b=a.series;jc(b,function(a){a.linkedSeries.length=0}),jc(b,function(b){var c=b.options.linkedTo;d(c)&&(c=":previous"===c?a.series[b.index-1]:a.get(c),c&&(c.linkedSeries.push(b),b.linkedParent=c))})},renderSeries:function(){jc(this.series,function(a){a.translate(),a.setTooltipPoints&&a.setTooltipPoints(),a.render()})},renderLabels:function(){var b=this,d=b.options.labels;d.items&&jc(d.items,function(e){var f=a(d.style,e.style),g=c(f.left)+b.plotLeft,h=c(f.top)+b.plotTop+12;delete f.left,delete f.top,b.renderer.text(e.html,g,h).attr({zIndex:2}).css(f).add()})},render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options;a.setTitle(),a.legend=new Nc(a,d.legend),a.getStacks(),jc(b,function(a){a.setScale()}),a.getMargins(),a.maxTicks=null,jc(b,function(a){a.setTickPositions(!0),a.setMaxTicks()}),a.adjustTickAmounts(),a.getMargins(),a.drawChartBox(),a.hasCartesianSeries&&jc(b,function(a){a.render()}),a.seriesGroup||(a.seriesGroup=c.g("series-group").attr({zIndex:3}).add()),a.renderSeries(),a.renderLabels(),a.showCredits(d.credits),a.hasRendered=!0},showCredits:function(a){a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text,0,0).on("click",function(){a.href&&(location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position))},destroy:function(){var a,b=this,c=b.axes,d=b.series,e=b.container,f=e&&e.parentNode;for(pc(b,"destroy"),Mb[b.index]=N,Nb--,b.renderTo.removeAttribute("data-highcharts-chart"),oc(b),a=c.length;a--;)c[a]=c[a].destroy();for(a=d.length;a--;)d[a]=d[a].destroy();jc(["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","scroller","rangeSelector","legend","resetZoomButton","tooltip","renderer"],function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())}),e&&(e.innerHTML="",oc(e),f&&C(e));for(a in b)delete b[a]},isReadyToRender:function(){var a=this;return!Gb&&mb==mb.top&&"complete"!==lb.readyState||Ib&&!mb.canvg?(Ib?Fc.push(function(){a.firstRender()},a.options.global.canvasToolsURL):lb.attachEvent("onreadystatechange",function(){lb.detachEvent("onreadystatechange",a.firstRender),"complete"===lb.readyState&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;a.isReadyToRender()&&(a.getContainer(),pc(a,"init"),a.resetMargins(),a.setChartSize(),a.propFromSeries(),a.getAxes(),jc(b.series||[],function(b){a.initSeries(b)}),a.linkSeries(),pc(a,"beforeRender"),kb.Pointer&&(a.pointer=new Ic(a,b)),a.render(),a.renderer.draw(),c&&c.apply(a,[a]),jc(a.callbacks,function(b){b.apply(a,[a])}),a.cloneRenderTo(!0),pc(a,"load"))},splashArray:function(a,b){var c=b[a],d=e(c)?c:[c,c,c,c];return[n(b[a+"Top"],d[0]),n(b[a+"Right"],d[1]),n(b[a+"Bottom"],d[2]),n(b[a+"Left"],d[3])]}},L.prototype.callbacks=[];var Pc=kb.CenteredSeriesMixin={getCenter:function(){var a,b,d=this.options,e=this.chart,f=2*(d.slicedOffset||0),g=e.plotWidth-2*f,h=e.plotHeight-2*f,i=d.center,j=[n(i[0],"50%"),n(i[1],"50%"),d.size||"100%",d.innerSize||0],k=sb(g,h);return mc(j,function(d,e){return b=/%$/.test(d),a=2>e||2===e&&b,(b?[g,h,k,k][e]*c(d)/100:d)+(a?f:0)})}},Qc=function(){};Qc.prototype={init:function(a,b,c){var d,e=this;return e.series=a,e.applyOptions(b,c),e.pointAttr={},a.options.colorByPoint&&(d=a.options.colors||a.chart.options.colors,e.color=e.color||d[a.colorCounter++],a.colorCounter===d.length&&(a.colorCounter=0)),a.chart.pointCount++,e},applyOptions:function(b,c){var d=this,e=d.series,f=e.options.pointValKey||e.pointValKey;return b=Qc.prototype.optionsToObject.call(this,b),a(d,b),d.options=d.options?a(d.options,b):b,f&&(d.y=d[f]),d.x===N&&e&&(d.x=c===N?e.autoIncrement():c),d},optionsToObject:function(a){var b,c={},d=this.series,e=d.pointArrayMap||["y"],g=e.length,h=0,i=0;if("number"==typeof a||null===a)c[e[0]]=a;else if(f(a))for(a.length>g&&(b=typeof a[0],"string"===b?c.name=a[0]:"number"===b&&(c.x=a[0]),h++);g>i;)c[e[i++]]=a[h++];else"object"==typeof a&&(c=a,a.dataLabels&&(d._hasPointLabels=!0),a.marker&&(d._hasPointMarkers=!0));return c},destroy:function(){var a,b=this,c=b.series,d=c.chart,e=d.hoverPoints;d.pointCount--,e&&(b.setState(),j(e,b),e.length||(d.hoverPoints=null)),b===d.hoverPoint&&b.onMouseOut(),(b.graphic||b.dataLabel)&&(oc(b),b.destroyElements()),b.legendItem&&d.legend.destroyItem(b);for(a in b)b[a]=null},destroyElements:function(){for(var a,b=this,c=["graphic","dataLabel","dataLabelUpper","group","connector","shadowGroup"],d=6;d--;)a=c[d],b[a]&&(b[a]=b[a].destroy())},getLabelConfig:function(){var a=this;return{x:a.category,y:a.y,key:a.name||a.category,series:a.series,point:a,percentage:a.percentage,total:a.total||a.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=n(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";return jc(b.pointArrayMap||["y"],function(b){b="{point."+b,(e||f)&&(a=a.replace(b+"}",e+b+"}"+f)),a=a.replace(b+"}",b+":,."+d+"f}")}),v(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series,f=e.options;(f.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents(),"click"===a&&f.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}),pc(this,a,b,c)}};var Rc=function(){};Rc.prototype={isCartesian:!0,type:"line",pointClass:Qc,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(b,c){var d,e,f=this,g=b.series,h=function(a,b){return n(a.options.index,a._i)-n(b.options.index,b._i)};f.chart=b,f.options=c=f.setOptions(c),f.linkedSeries=[],f.bindAxes(),a(f,{name:c.name,state:_b,pointAttr:{},visible:c.visible!==!1,selected:c.selected===!0}),Ib&&(c.animation=!1),e=c.events;for(d in e)nc(f,d,e[d]);(e&&e.click||c.point&&c.point.events&&c.point.events.click||c.allowPointSelect)&&(b.runTrackerClick=!0),f.getColor(),f.getSymbol(),jc(f.parallelArrays,function(a){f[a+"Data"]=[]}),f.setData(c.data,!1),f.isCartesian&&(b.hasCartesianSeries=!0),g.push(f),f._i=g.length-1,y(g,h),this.yAxis&&y(this.yAxis.series,h),jc(g,function(a,b){a.index=b,a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a,b=this,c=b.options,d=b.chart;jc(b.axisTypes||[],function(e){jc(d[e],function(d){a=d.options,(c[e]===a.index||c[e]!==N&&c[e]===a.id||c[e]===N&&0===a.index)&&(d.series.push(b),b[e]=d,d.isDirty=!0)}),b[e]||b.optionalAxis===e||W(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,e="number"==typeof b?function(d){var e="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};jc(c.parallelArrays,e)},autoIncrement:function(){var a=this,b=a.options,c=a.xIncrement;return c=n(c,b.pointStart,0),a.pointInterval=n(a.pointInterval,b.pointInterval,1),a.xIncrement=c+a.pointInterval,c},getSegments:function(){var a,b=this,c=-1,d=[],e=b.points,f=e.length;if(f)if(b.options.connectNulls){for(a=f;a--;)null===e[a].y&&e.splice(a,1);e.length&&(d=[e])}else jc(e,function(a,b){null===a.y?(b>c+1&&d.push(e.slice(c+1,b)),c=b):b===f-1&&d.push(e.slice(c+1,b+1))});b.segments=d},setOptions:function(a){var c,d=this.chart,e=d.options,f=e.plotOptions,g=d.userOptions||{},h=g.plotOptions||{},i=f[this.type];return this.userOptions=a,c=b(i,f.series,a),this.tooltipOptions=b(R.tooltip,R.plotOptions[this.type].tooltip,g.tooltip,h.series&&h.series.tooltip,h[this.type]&&h[this.type].tooltip,a.tooltip),null===i.marker&&delete c.marker,c},getCyclic:function(a,b,c){var d,e=this.userOptions,f="_"+a+"Index",g=a+"Counter";b||(k(e[f])?d=e[f]:(e[f]=d=this.chart[g]%c.length,this.chart[g]+=1),b=c[d]),this[a]=b},getColor:function(){this.options.colorByPoint||this.getCyclic("color",this.options.color||uc[this.type].color,this.chart.options.colors)},getSymbol:function(){var a=this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols),/^url/.test(this.symbol)&&(a.radius=0)},drawLegendSymbol:Oc.drawLineMarker,setData:function(a,b,c,e){var h,i,j,k=this,l=k.points,m=l&&l.length||0,o=k.options,p=k.chart,q=null,r=k.xAxis,s=r&&!!r.categories,t=k.tooltipPoints,u=o.turboThreshold,v=this.xData,w=this.yData,x=k.pointArrayMap,y=x&&x.length;if(a=a||[],h=a.length,b=n(b,!0),e===!1||!h||m!==h||k.cropped||k.hasGroupedData){if(k.xIncrement=null,k.pointRange=s?1:o.pointRange,k.colorCounter=0,jc(this.parallelArrays,function(a){k[a+"Data"].length=0}),u&&h>u){for(i=0;null===q&&h>i;)q=a[i],i++;if(g(q)){var z=n(o.pointStart,0),A=n(o.pointInterval,1);for(i=0;h>i;i++)v[i]=z,w[i]=a[i],z+=A;k.xIncrement=z}else if(f(q))if(y)for(i=0;h>i;i++)j=a[i],v[i]=j[0],w[i]=j.slice(1,y+1);else for(i=0;h>i;i++)j=a[i],v[i]=j[0],w[i]=j[1];else W(12)}else for(i=0;h>i;i++)a[i]!==N&&(j={series:k},k.pointClass.prototype.applyOptions.apply(j,[a[i]]),k.updateParallelArrays(j,i),s&&j.name&&(r.names[j.x]=j.name));for(d(w[0])&&W(14,!0),k.data=[],k.options.data=a,i=m;i--;)l[i]&&l[i].destroy&&l[i].destroy();t&&(t.length=0),r&&(r.minRange=r.userMinRange),k.isDirty=k.isDirtyData=p.isDirtyBox=!0,c=!1}else jc(a,function(a,b){l[b].update(a,!1,null,!1)});b&&p.redraw(c)},processData:function(a){var b,c,d,e,f,g,h,i,j=this,k=j.xData,l=j.yData,m=k.length,n=0,o=j.xAxis,p=j.options,q=p.cropThreshold,r=0,s=j.isCartesian;if(s&&!j.isDirty&&!o.isDirty&&!j.yAxis.isDirty&&!a)return!1;for(o&&(g=o.getExtremes(),h=g.min,i=g.max),s&&j.sorted&&(!q||m>q||j.forceCrop)&&(k[m-1]i?(k=[],l=[]):(k[0]i)&&(b=this.cropData(j.xData,j.yData,h,i),k=b.xData,l=b.yData,n=b.start,c=!0,r=k.length)),f=k.length-1;f>=0;f--)d=k[f]-k[f-1],!c&&k[f]>h&&k[f]0&&(e===N||e>d)?e=d:0>d&&j.requireSorting&&W(15);j.cropped=c,j.cropStart=n,j.processedXData=k,j.processedYData=l,j.activePointCount=r,null===p.pointRange&&(j.pointRange=e||1),j.closestPointRange=e},cropData:function(a,b,c,d){var e,f=a.length,g=0,h=f,i=n(this.cropShoulder,1);for(e=0;f>e;e++)if(a[e]>=c){g=rb(0,e-i);break}for(;f>e;e++)if(a[e]>d){h=e+i;break}return{xData:a.slice(g,h),yData:b.slice(g,h),start:g,end:h}},generatePoints:function(){var a,b,c,d,e=this,f=e.options,g=f.data,h=e.data,i=e.processedXData,j=e.processedYData,k=e.pointClass,l=i.length,n=e.cropStart||0,o=e.hasGroupedData,p=[];if(!h&&!o){var q=[];q.length=g.length,h=e.data=q}for(d=0;l>d;d++)b=n+d,o?p[d]=(new k).init(e,[i[d]].concat(m(j[d]))):(h[b]?c=h[b]:g[b]!==N&&(h[b]=c=(new k).init(e,g[b],i[d])),p[d]=c),p[d].index=b;if(h&&(l!==(a=h.length)||o))for(d=0;a>d;d++)d!==n||o||(d+=l),h[d]&&(h[d].destroyElements(),h[d].plotX=N);e.data=h,e.points=p},getExtremes:function(a){var b,c,d,e,f,g,h,i,j,k=this.xAxis,l=this.yAxis,m=this.processedXData,o=[],p=0,q=k.getExtremes(),r=q.min,s=q.max;for(a=a||this.stackedYData||this.processedYData,b=a.length,i=0;b>i;i++)if(g=m[i],h=a[i],c=null!==h&&h!==N&&(!l.isLog||h.length||h>0),d=this.getExtremesFromAll||this.cropped||(m[i+1]||g)>=r&&(m[i-1]||g)<=s,c&&d)if(j=h.length)for(;j--;)null!==h[j]&&(o[p++]=h[j]);else o[p++]=h;this.dataMin=n(e,z(o)),this.dataMax=n(f,A(o))},translate:function(){this.processedXData||this.processData(),this.generatePoints();var a,b=this,c=b.options,d=c.stacking,e=b.xAxis,f=e.categories,h=b.yAxis,i=b.points,j=i.length,l=!!b.modifyValue,m=c.pointPlacement,o="between"===m||g(m),p=c.threshold;for(a=0;j>a;a++){var q,r,s=i[a],t=s.x,u=s.y,v=s.low,w=d&&h.stacks[(b.negStacks&&p>u?"-":"")+b.stackKey];h.isLog&&0>=u&&(s.y=u=null,W(10)),s.plotX=e.translate(t,0,0,0,1,m,"flags"===this.type),d&&b.visible&&w&&w[t]&&(q=w[t],r=q.points[b.index+","+a],v=r[0],u=r[1],0===v&&(v=n(p,h.min)),h.isLog&&0>=v&&(v=null),s.total=s.stackTotal=q.total,s.percentage=q.total&&s.y/q.total*100,s.stackY=u,q.setOffset(b.pointXOffset||0,b.barW||0)),s.yBottom=k(v)?h.translate(v,0,1,0,1):null,l&&(u=b.modifyValue(u,s)),s.plotY="number"==typeof u&&1/0!==u?h.translate(u,0,1,0,1):N,s.clientX=o?e.translate(t,0,0,0,1):s.plotX,s.negative=s.y<(p||0),s.category=f&&f[s.x]!==N?f[s.x]:s.x}b.getSegments()},animate:function(b){var c,d,f,g=this,h=g.chart,i=h.renderer,j=g.options.animation,k=g.clipBox||h.clipBox,l=h.inverted;j&&!e(j)&&(j=uc[g.type].animation),f=["_sharedClip",j.duration,j.easing,k.height].join(","),b?(c=h[f],d=h[f+"m"],c||(h[f]=c=i.clipRect(a(k,{width:0})),h[f+"m"]=d=i.clipRect(-99,l?-h.plotLeft:-h.plotTop,99,l?h.chartWidth:h.chartHeight)),g.group.clip(c),g.markerGroup.clip(d),g.sharedClipKey=f):(c=h[f],c&&c.animate({width:h.plotSizeX},j),h[f+"m"]&&h[f+"m"].animate({width:h.plotSizeX+99},j),g.animate=null)},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group,d=this.clipBox;c&&this.options.clip!==!1&&(b&&d||c.clip(d?a.renderer.clipRect(d):a.clipRect),this.markerGroup.clip()),pc(this,"afterAnimate"),setTimeout(function(){b&&a[b]&&(d||(a[b]=a[b].destroy()),a[b+"m"]&&(a[b+"m"]=a[b+"m"].destroy()))},100)},drawPoints:function(){var b,c,d,e,f,g,h,i,j,k,l,m,o,p=this,q=p.points,r=p.chart,s=p.options,t=s.marker,u=p.pointAttr[""],v=p.markerGroup,w=n(t.enabled,!p.requireSorting||p.activePointCount<.5*p.xAxis.len/t.radius);if(t.enabled!==!1||p._hasPointMarkers)for(e=q.length;e--;)f=q[e],c=pb(f.plotX),d=f.plotY,j=f.graphic,k=f.marker||{},l=!!f.marker,m=w&&k.enabled===N||k.enabled,o=r.isInsidePlot(ob(c),d,r.inverted),m&&d!==N&&!isNaN(d)&&null!==f.y?(b=f.pointAttr[f.selected?bc:_b]||u,g=b.r,h=n(k.symbol,p.symbol),i=0===h.indexOf("url"),j?j[o?"show":"hide"](!0).animate(a({x:c-g,y:d-g},j.symbolName?{width:2*g,height:2*g}:{})):o&&(g>0||i)&&(f.graphic=j=r.renderer.symbol(h,c-g,d-g,2*g,2*g,l?k:t).attr(b).add(v))):j&&(f.graphic=j.destroy())},convertAttribs:function(a,b,c,d){var e,f,g=this.pointAttrToOptions,h={};a=a||{},b=b||{},c=c||{},d=d||{};for(e in g)f=g[e],h[e]=n(a[f],b[e],c[e],d[e]);return h},getAttribs:function(){var b,c,d,e,f,g,h=this,i=h.options,j=uc[h.type].marker?i.marker:i,l=j.states,m=l[ac],n=h.color,o={stroke:n,fill:n},p=h.points||[],q=[],r=h.pointAttrToOptions,s=h.hasPointSpecificOptions,t=i.negativeColor,u=j.lineColor,v=j.fillColor,w=i.turboThreshold;if(i.marker?(m.radius=m.radius||j.radius+m.radiusPlus,m.lineWidth=m.lineWidth||j.lineWidth+m.lineWidthPlus):m.color=m.color||zc(m.color||n).brighten(m.brightness).get(),q[_b]=h.convertAttribs(j,o),jc([ac,bc],function(a){q[a]=h.convertAttribs(l[a],q[_b])}),h.pointAttr=q,c=p.length,!w||w>c||s)for(;c--;){if(d=p[c],j=d.options&&d.options.marker||d.options,j&&j.enabled===!1&&(j.radius=0),d.negative&&t&&(d.color=d.fillColor=t),s=i.colorByPoint||d.color,d.options)for(g in r)k(j[r[g]])&&(s=!0);s?(j=j||{},e=[],l=j.states||{},b=l[ac]=l[ac]||{},i.marker||(b.color=b.color||!d.options.color&&m.color||zc(d.color).brighten(b.brightness||m.brightness).get()),f={color:d.color},v||(f.fillColor=d.color),u||(f.lineColor=d.color),e[_b]=h.convertAttribs(a(f,j),q[_b]),e[ac]=h.convertAttribs(l[ac],q[ac],e[_b]),e[bc]=h.convertAttribs(l[bc],q[bc],e[_b])):e=q,d.pointAttr=e}},destroy:function(){var a,b,c,d,e,f=this,g=f.chart,h=/AppleWebKit\/533/.test(yb),i=f.data||[];for(pc(f,"destroy"),oc(f),jc(f.axisTypes||[],function(a){e=f[a],e&&(j(e.series,f),e.isDirty=e.forceRedraw=!0)}),f.legendItem&&f.chart.legend.destroyItem(f),b=i.length;b--;)c=i[b],c&&c.destroy&&c.destroy();f.points=null,clearTimeout(f.animationTimeout),jc(["area","graph","dataLabelsGroup","group","markerGroup","tracker","graphNeg","areaNeg","posClip","negClip"],function(b){f[b]&&(a=h&&"group"===b?"hide":"destroy",f[b][a]())}),g.hoverSeries===f&&(g.hoverSeries=null),j(g.series,f);for(d in f)delete f[d]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;return jc(a,function(e,f){var g,h=e.plotX,i=e.plotY;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?Zb:Yb),d&&f&&(g=a[f-1],"right"===d?c.push(g.plotX,i):"center"===d?c.push((g.plotX+h)/2,g.plotY,(g.plotX+h)/2,i):c.push(h,g.plotY)),c.push(e.plotX,e.plotY))}),c},getGraphPath:function(){var a,b=this,c=[],d=[];return jc(b.segments,function(e){a=b.getSegmentPath(e),e.length>1?c=c.concat(a):d.push(e[0])}),b.singlePoints=d,b.graphPath=c,c},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f="square"!==b.linecap,g=this.getGraphPath(),h=b.negativeColor;h&&c.push(["graphNeg",h]),jc(c,function(c,h){var i,j=c[0],k=a[j];k?(sc(k),k.animate({d:g})):d&&g.length&&(i={stroke:c[1],"stroke-width":d,fill:Xb,zIndex:1},e?i.dashstyle=e:f&&(i["stroke-linecap"]=i["stroke-linejoin"]="round"),a[j]=a.chart.renderer.path(g).attr(i).add(a.group).shadow(!h&&b.shadow))})},clipNeg:function(){var a,b,c,d,e,f=this.options,g=this.chart,h=g.renderer,i=f.negativeColor||f.negativeFillColor,j=this.graph,k=this.area,l=this.posClip,m=this.negClip,n=g.chartWidth,o=g.chartHeight,p=rb(n,o),q=this.yAxis;i&&(j||k)&&(a=ob(q.toPixels(f.threshold||0,!0)),0>a&&(p-=a),d={x:0,y:0,width:p,height:a},e={x:0,y:a,width:p,height:p},g.inverted&&(d.height=e.y=g.plotWidth-a,h.isVML&&(d={x:g.plotWidth-a-g.plotLeft,y:0,width:n,height:o},e={x:a+g.plotLeft-n,y:0,width:g.plotLeft+a,height:n})),q.reversed?(b=e,c=d):(b=d,c=e),l?(l.animate(b),m.animate(c)):(this.posClip=l=h.clipRect(b),this.negClip=m=h.clipRect(c),j&&this.graphNeg&&(j.clip(l),this.graphNeg.clip(m)),k&&(k.clip(l),this.areaNeg.clip(m))))},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};jc(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;b.xAxis&&(nc(c,"resize",a),nc(b,"destroy",function(){oc(c,"resize",a)}),a(),b.invertGroups=a)},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;return g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||.1}).add(e)),f[g?"attr":"animate"](this.getPlotBox()),f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;return a.inverted&&(b=c,c=this.xAxis),{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a,b=this,c=b.chart,d=b.options,e=d.animation,f=e&&!!b.animate&&c.renderer.isSVG&&n(e.duration,500)||0,g=b.visible?Vb:Tb,h=d.zIndex,i=b.hasRendered,j=c.seriesGroup;a=b.plotGroup("group","series",g,h,j),b.markerGroup=b.plotGroup("markerGroup","markers",g,h,j),f&&b.animate(!0),b.getAttribs(),a.inverted=b.isCartesian?c.inverted:!1,b.drawGraph&&(b.drawGraph(),b.clipNeg()),jc(b.points,function(a){a.redraw&&a.redraw()}),b.drawDataLabels&&b.drawDataLabels(),b.visible&&b.drawPoints(),b.drawTracker&&b.options.enableMouseTracking!==!1&&b.drawTracker(),c.inverted&&b.invertGroups(),d.clip===!1||b.sharedClipKey||i||a.clip(c.clipRect),f&&b.animate(),i||(f?b.animationTimeout=setTimeout(function(){b.afterAnimate()},f):b.afterAnimate()),b.isDirty=b.isDirtyData=!1,b.hasRendered=!0},redraw:function(){var a=this,b=a.chart,c=a.isDirtyData,d=a.group,e=a.xAxis,f=a.yAxis;d&&(b.inverted&&d.attr({width:b.plotWidth,height:b.plotHeight}),d.animate({translateX:n(e&&e.left,b.plotLeft),translateY:n(f&&f.top,b.plotTop)})),a.translate(),a.setTooltipPoints&&a.setTooltipPoints(!0),a.render(),c&&pc(a,"updatedData")}},M.prototype={destroy:function(){B(this,this.axis)},render:function(a){var b=this.options,c=b.format,d=c?v(c,this):b.formatter.call(this);this.label?this.label.attr({text:d,visibility:Tb}):this.label=this.axis.chart.renderer.text(d,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:Tb}).add(a)},setOffset:function(a,b){var c,d=this,e=d.axis,f=e.chart,g=f.inverted,h=this.isNegative,i=e.translate(e.usePercentage?100:this.total,0,0,0,1),j=e.translate(0),k=tb(i-j),l=f.xAxis[0].translate(this.x)+a,m=f.plotHeight,n={x:g?h?i:i-k:l,y:g?m-l-b:h?m-i-k:m-i,width:g?k:b,height:g?b:k},o=this.label;o&&(o.align(this.alignOptions,null,n),c=o.alignAttr,o[this.options.crop===!1||f.isInsidePlot(c.x,c.y)?"show":"hide"](!0))}},K.prototype.buildStacks=function(){var a=this.series,b=n(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;cf;f++)g=j[f],h=k[f],e=i.index+","+f,a=t&&o>h,d=a?s:r,v[d]||(v[d]={}),v[d][g]||(w[d]&&w[d][g]?(v[d][g]=w[d][g],v[d][g].total=null):v[d][g]=new M(u,u.options.stackLabels,a,g,p)),b=v[d][g],b.points[e]=[b.cum||0],"percent"===q?(c=a?r:s,t&&v[c]&&v[c][g]?(c=v[c][g],b.total=c.total=rb(c.total,b.total)+tb(h)||0):b.total=D(b.total+(tb(h)||0))):b.total=D(b.total+(h||0)),b.cum=(b.cum||0)+(h||0),b.points[e].push(b.cum),l[f]=b.cum;"percent"===q&&(u.usePercentage=!0),this.stackedYData=l,u.oldStacks={}}},Rc.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData;jc([b,"-"+b],function(b){for(var e,f,g,h,i=d.length;i--;)e=d[i],f=c[b]&&c[b][e],g=f&&f.points[a.index+","+i],g&&(h=f.total?100/f.total:0,g[0]=D(g[0]*h),g[1]=D(g[1]*h),a.stackedYData[i]=g[1])})},a(L.prototype,{addSeries:function(a,b,c){var d,e=this;return a&&(b=n(b,!0),pc(e,"addSeries",{options:a},function(){d=e.initSeries(a),e.isDirtyLegend=!0,e.linkSeries(),b&&e.redraw(c)})),d},addAxis:function(a,c,d,e){var f,g=c?"xAxis":"yAxis",h=this.options;f=new K(this,b(a,{index:this[g].length,isX:c})),h[g]=m(h[g]||{}),h[g].push(a),n(d,!0)&&this.redraw(e)},showLoading:function(b){var c=this,d=c.options,e=c.loadingDiv,f=d.loading,g=function(){e&&o(e,{left:c.plotLeft+Wb,top:c.plotTop+Wb,width:c.plotWidth+Wb,height:c.plotHeight+Wb})};e||(c.loadingDiv=e=p(Qb,{className:Ub+"loading"},a(f.style,{zIndex:10,display:Xb}),c.container),c.loadingSpan=p("span",null,f.labelStyle,e),nc(c,"redraw",g)),c.loadingSpan.innerHTML=b||d.lang.loading,c.loadingShown||(o(e,{opacity:0,display:""}),rc(e,{opacity:f.style.opacity},{duration:f.showDuration||0}),c.loadingShown=!0),g()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&rc(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){o(b,{display:Xb})}}),this.loadingShown=!1}}),a(Qc.prototype,{update:function(a,b,c,d){function g(){i.applyOptions(a),e(a)&&!f(a)&&(i.redraw=function(){k&&(a&&a.marker&&a.marker.symbol?i.graphic=k.destroy():k.attr(i.pointAttr[i.state||""])),a&&a.dataLabels&&i.dataLabel&&(i.dataLabel=i.dataLabel.destroy()),i.redraw=null}),h=i.index,j.updateParallelArrays(i,h),m.data[h]=i.options,j.isDirty=j.isDirtyData=!0,!j.fixedBox&&j.hasCartesianSeries&&(l.isDirtyBox=!0),"point"===m.legendType&&l.legend.destroyItem(i),b&&l.redraw(c)}var h,i=this,j=i.series,k=i.graphic,l=j.chart,m=j.options;b=n(b,!0),d===!1?g():i.firePointEvent("update",{options:a},g)},remove:function(a,b){var c,d=this,e=d.series,f=e.points,g=e.chart,h=e.data;E(b,g),a=n(a,!0),d.firePointEvent("remove",null,function(){c=ic(d,h),h.length===f.length&&f.splice(c,1),h.splice(c,1),e.options.data.splice(c,1),e.updateParallelArrays(d,"splice",c,1),d.destroy(),e.isDirty=!0,e.isDirtyData=!0,a&&g.redraw()})}}),a(Rc.prototype,{addPoint:function(a,b,c,d){var e,f,g,h,i=this,j=i.options,k=i.data,l=i.graph,m=i.area,o=i.chart,p=i.xAxis&&i.xAxis.names,q=l&&l.shift||0,r=j.data,s=i.xData;if(E(d,o),c&&jc([l,m,i.graphNeg,i.areaNeg],function(a){a&&(a.shift=q+1)}),m&&(m.isArea=!0),b=n(b,!0),e={series:i},i.pointClass.prototype.applyOptions.apply(e,[a]),g=e.x,h=s.length,i.requireSorting&&gg;)h--;i.updateParallelArrays(e,"splice",h,0,0),i.updateParallelArrays(e,h),p&&e.name&&(p[g]=e.name),r.splice(h,0,a),f&&(i.data.splice(h,0,null),i.processData()),"point"===j.legendType&&i.generatePoints(),c&&(k[0]&&k[0].remove?k[0].remove(!1):(k.shift(),i.updateParallelArrays(e,"shift"),r.shift())),i.isDirty=!0,i.isDirtyData=!0,b&&(i.getAttribs(),o.redraw())},remove:function(a,b){var c=this,d=c.chart;a=n(a,!0),c.isRemoving||(c.isRemoving=!0,pc(c,"remove",null,function(){c.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,d.linkSeries(),a&&d.redraw(b)})),c.isRemoving=!1},update:function(c,d){var e,f=this,g=this.chart,h=this.userOptions,i=this.type,j=dc[i].prototype,k=["group","markerGroup","dataLabelsGroup"];jc(k,function(a){k[a]=f[a],delete f[a]}),c=b(h,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},c),this.remove(!1);for(e in j)j.hasOwnProperty(e)&&(this[e]=N);a(this,dc[c.type||i].prototype),jc(k,function(a){f[a]=k[a]}),this.init(g,c),g.linkSeries(),n(d,!0)&&g.redraw(!1)}}),a(K.prototype,{update:function(c,d){var e=this.chart;c=e.options[this.coll][this.options.index]=b(this.userOptions,c),this.destroy(!0),this._addedPlotLB=N,this.init(e,a(c,{events:N})),e.isDirtyBox=!0,n(d,!0)&&e.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);j(b.axes,this),j(b[c],this),b.options[c].splice(this.options.index,1),jc(b[c],function(a,b){a.options.index=b}),this.destroy(),b.isDirtyBox=!0,n(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}});var Sc=q(Rc);dc.line=Sc,uc.area=b(vc,{threshold:0});var Tc=q(Rc,{type:"area",getSegments:function(){var a,b,c,d,e=this,f=[],g=[],h=[],i=this.xAxis,j=this.yAxis,k=j.stacks[this.stackKey],l={},m=this.points,n=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(c=0;c=0;b--)c=n(a[b].yBottom,h),bq&&e>l?(e=rb(q,l),g=2*l-e):q>e&&l>e&&(e=sb(q,l),g=2*l-e),g>s&&g>l?(g=rb(s,l),e=2*l-g):s>g&&l>g&&(g=sb(s,l),e=2*l-g),b.rightContX=f,b.rightContY=g}return c?(h=["C",m.rightContX||m.plotX,m.rightContY||m.plotY,d||k,e||l,k,l],m.rightContX=m.rightContY=null):h=[Yb,k,l],h}});dc.spline=Uc,uc.areaspline=b(uc.area);var Vc=Tc.prototype,Wc=q(Uc,{type:"areaspline",closedStacks:!0,getSegmentPath:Vc.getSegmentPath,closeSegment:Vc.closeSegment,drawGraph:Vc.drawGraph,drawLegendSymbol:Oc.drawRectangle});dc.areaspline=Wc,uc.column=b(vc,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0});var Xc=q(Rc,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){Rc.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&jc(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var a,b,c=this,d=c.options,e=c.xAxis,f=c.yAxis,g=e.reversed,h={},i=0;d.grouping===!1?i=1:jc(c.chart.series,function(d){var e=d.options,g=d.yAxis;d.type===c.type&&d.visible&&f.len===g.len&&f.pos===g.pos&&(e.stacking?(a=d.stackKey,h[a]===N&&(h[a]=i++),b=h[a]):e.grouping!==!1&&(b=i++),d.columnIndex=b)});var j=sb(tb(e.transA)*(e.ordinalSlope||d.pointRange||e.closestPointRange||e.tickInterval||1),e.len),l=j*d.groupPadding,m=j-2*l,o=m/i,p=d.pointWidth,q=k(p)?(o-p)/2:o*d.pointPadding,r=n(p,o-2*q),s=(g?i-(c.columnIndex||0):c.columnIndex)||0,t=q+(l+s*o-j/2)*(g?-1:1);return c.columnMetrics={width:r,offset:t}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=n(c.borderWidth,a.activePointCount>.5*a.xAxis.len?0:1),e=a.yAxis,f=c.threshold,g=a.translatedThreshold=e.getThreshold(f),h=n(c.minPointLength,5),i=a.getColumnMetrics(),j=i.width,k=a.barW=rb(j,1+2*d),l=a.pointXOffset=i.offset,m=-(d%2?.5:0),o=d%2?.5:1;b.renderer.isVML&&b.inverted&&(o+=1),c.pointPadding&&(k=qb(k)),Rc.prototype.translate.apply(a),jc(a.points,function(c){var d,f,i,p=n(c.yBottom,g),q=sb(rb(-999-p,c.plotY),e.len+999+p),r=c.plotX+l,s=k,t=sb(q,p),u=rb(q,p)-t;tb(u)h?p-h:g-(e.translate(c.y,0,1,0,1)<=g?h:0))),c.barX=r,c.pointWidth=j,c.tooltipPos=b.inverted?[e.len-q,a.xAxis.len-r-s/2]:[r+s/2,q+e.pos-b.plotTop],d=ob(r+s)+m,r=ob(r)+m,s=d-r,i=tb(t)<.5,f=ob(t+u)+o,t=ob(t)+o,u=f-t,i&&(t-=1,u+=1),c.shapeType="rect",c.shapeArgs={x:r,y:t,width:s,height:u}})},getSymbol:Lb,drawLegendSymbol:Oc.drawRectangle,drawGraph:Lb,drawPoints:function(){var a,c,d=this,e=this.chart,f=d.options,g=e.renderer,h=f.animationLimit||250;jc(d.points,function(i){var j,l=i.plotY,m=i.graphic;l===N||isNaN(l)||null===i.y?m&&(i.graphic=m.destroy()):(a=i.shapeArgs,j=k(d.borderWidth)?{"stroke-width":d.borderWidth}:{},c=i.pointAttr[i.selected?bc:_b]||d.pointAttr[_b],m?(sc(m),m.attr(j)[e.pointCount {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"},stickyTracking:!1});var Zc=q(Rc,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&Rc.prototype.drawGraph.call(this)}});dc.scatter=Zc,uc.pie=b(vc,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});var $c=q(Qc,{init:function(){Qc.prototype.init.apply(this,arguments);var b,c=this;return c.y<0&&(c.y=null),a(c,{visible:c.visible!==!1,name:n(c.name,"Slice")}),b=function(a){c.slice("select"===a.type)},nc(c,"select",b),nc(c,"unselect",b),c},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible=a=a===N?!b.visible:a,c.options.data[ic(b,c.data)]=b.options,jc(["graphic","dataLabel","connector","shadowGroup"],function(c){b[c]&&b[c][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),!c.isDirty&&c.options.ignoreHiddenPoint&&(c.isDirty=!0,d.redraw())},slice:function(a,b,c){var d,e=this,f=e.series,g=f.chart;E(c,g),b=n(b,!0),e.sliced=e.options.sliced=a=k(a)?a:!e.sliced,f.options.data[ic(e,f.data)]=e.options,d=a?e.slicedTranslation:{translateX:0,translateY:0},e.graphic.animate(d),e.shadowGroup&&e.shadowGroup.animate(d)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),_c={type:"pie",isCartesian:!1,pointClass:$c,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:Lb,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(jc(c,function(a){var c=a.graphic,e=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:e.r,start:e.start,end:e.end},b.options.animation))}),b.animate=null)},setData:function(a,b,c,d){Rc.prototype.setData.call(this,a,!1,c,d),this.processData(),this.generatePoints(),n(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,b,c,d,e=0,f=this.options.ignoreHiddenPoint;for(Rc.prototype.generatePoints.call(this),b=this.points,c=b.length,a=0;c>a;a++)d=b[a],e+=f&&!d.visible?0:d.y;for(this.total=e,a=0;c>a;a++)d=b[a],d.percentage=e>0?d.y/e*100:0,d.total=e},translate:function(a){this.generatePoints();var b,c,d,e,f,g,h,i=this,j=0,k=1e3,l=i.options,m=l.slicedOffset,o=m+l.borderWidth,p=l.startAngle||0,q=i.startAngleRad=wb/180*(p-90),r=i.endAngleRad=wb/180*(n(l.endAngle,p+360)-90),s=r-q,t=i.points,u=l.dataLabels.distance,v=l.ignoreHiddenPoint,w=t.length;for(a||(i.center=a=i.getCenter()),i.getX=function(b,c){return d=nb.asin(sb((b-a[1])/(a[2]/2+u),1)),a[0]+(c?-1:1)*ub(d)*(a[2]/2+u)},g=0;w>g;g++)h=t[g],b=q+j*s,(!v||h.visible)&&(j+=h.percentage/100),c=q+j*s,h.shapeType="arc",h.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:ob(b*k)/k,end:ob(c*k)/k},d=(c+b)/2,d>1.5*wb?d-=2*wb:-wb/2>d&&(d+=2*wb),h.slicedTranslation={translateX:ob(ub(d)*m),translateY:ob(vb(d)*m)},e=ub(d)*a[2]/2,f=vb(d)*a[2]/2,h.tooltipPos=[a[0]+.7*e,a[1]+.7*f],h.half=-wb/2>d||d>wb/2?1:0,h.angle=d,o=sb(o,u/2),h.labelPos=[a[0]+e+ub(d)*u,a[1]+f+vb(d)*u,a[0]+e+ub(d)*o,a[1]+f+vb(d)*o,a[0]+e,a[1]+f,0>u?"center":h.half?"right":"left",d]},drawGraph:null,drawPoints:function(){var b,c,d,e,f=this,g=f.chart,h=g.renderer,i=f.options.shadow;i&&!f.shadowGroup&&(f.shadowGroup=h.g("shadow").add(f.group)),jc(f.points,function(g){c=g.graphic,e=g.shapeArgs,d=g.shadowGroup,i&&!d&&(d=g.shadowGroup=h.g("shadow").add(f.shadowGroup)),b=g.sliced?g.slicedTranslation:{translateX:0,translateY:0},d&&d.attr(b),c?c.animate(a(e,b)):g.graphic=c=h[g.shapeType](e).setRadialReference(f.center).attr(g.pointAttr[g.selected?bc:_b]).attr({"stroke-linejoin":"round"}).attr(b).add(f.group).shadow(i,d),void 0!==g.visible&&g.setVisible(g.visible)})},sortByAngle:function(a,b){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*b})},drawLegendSymbol:Oc.drawRectangle,getCenter:Pc.getCenter,getSymbol:Lb};_c=q(Rc,_c),dc.pie=_c,Rc.prototype.drawDataLabels=function(){var c,d,e,f,g=this,h=g.options,i=h.cursor,j=h.dataLabels,l=g.points,m=g.hasRendered||0;(j.enabled||g._hasPointLabels)&&(g.dlProcessOptions&&g.dlProcessOptions(j),f=g.plotGroup("dataLabelsGroup","data-labels",j.defer?Tb:Vb,j.zIndex||6),n(j.defer,!0)&&(f.attr({opacity:+m}),m||nc(g,"afterAnimate",function(){g.visible&&f.show(),f[h.animation?"animate":"attr"]({opacity:1},{duration:200})})),d=j,jc(l,function(h){var l,m,o,p,q,r=h.dataLabel,s=h.connector,t=!0;if(c=h.options&&h.options.dataLabels,l=n(c&&c.enabled,d.enabled),r&&!l)h.dataLabel=r.destroy();else if(l){if(j=b(d,c),q=j.rotation,m=h.getLabelConfig(),e=j.format?v(j.format,m):j.formatter.call(m,j),j.style.color=n(j.color,j.style.color,g.color,"black"),r)k(e)?(r.attr({text:e}),t=!1):(h.dataLabel=r=r.destroy(),s&&(h.connector=s.destroy()));else if(k(e)){o={fill:j.backgroundColor,stroke:j.borderColor,"stroke-width":j.borderWidth,r:j.borderRadius||0,rotation:q,padding:j.padding,zIndex:1};for(p in o)o[p]===N&&delete o[p];r=h.dataLabel=g.chart.renderer[q?"text":"label"](e,0,-999,null,null,null,j.useHTML).attr(o).css(a(j.style,i&&{cursor:i})).add(f).shadow(j.shadow)}r&&g.alignDataLabel(h,r,j,null,t)}}))},Rc.prototype.alignDataLabel=function(b,c,d,e,f){var g,h=this.chart,i=h.inverted,j=n(b.plotX,-999),k=n(b.plotY,-999),l=c.getBBox(),m=this.visible&&(b.series.forceDL||h.isInsidePlot(j,ob(k),i)||e&&h.isInsidePlot(j,i?e.x+1:e.y+e.height-1,i));m&&(e=a({x:i?h.plotWidth-k:j,y:ob(i?h.plotHeight-j:k),width:0,height:0},e),a(d,{width:l.width,height:l.height}),d.rotation?c[f?"attr":"animate"]({x:e.x+d.x+e.width/2,y:e.y+d.y+e.height/2}).attr({align:d.align}):(c.align(d,null,e),g=c.alignAttr,"justify"===n(d.overflow,"justify")?this.justifyDataLabel(c,d,g,l,e,f):n(d.crop,!0)&&(m=h.isInsidePlot(g.x,g.y)&&h.isInsidePlot(g.x+l.width,g.y+l.height)))),m||(c.attr({y:-999}),c.placed=!1)},Rc.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g,h,i=this.chart,j=b.align,k=b.verticalAlign;g=c.x,0>g&&("right"===j?b.align="left":b.x=-g,h=!0),g=c.x+d.width,g>i.plotWidth&&("left"===j?b.align="right":b.x=i.plotWidth-g,h=!0),g=c.y,0>g&&("bottom"===k?b.verticalAlign="top":b.y=-g,h=!0),g=c.y+d.height,g>i.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=i.plotHeight-g,h=!0),h&&(a.placed=!f,a.align(b,null,e))},dc.pie&&(dc.pie.prototype.drawDataLabels=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,o=this,p=o.data,q=o.chart,r=o.options.dataLabels,s=n(r.connectorPadding,10),t=n(r.connectorWidth,1),u=q.plotWidth,v=q.plotHeight,w=n(r.softConnector,!0),x=r.distance,y=o.center,z=y[2]/2,B=y[1],C=x>0,D=[[],[]],E=[0,0,0,0],F=function(a,b){return b.y-a.y};if(o.visible&&(r.enabled||o._hasPointLabels)){for(Rc.prototype.drawDataLabels.apply(o),jc(p,function(a){a.dataLabel&&a.visible&&D[a.half].push(a)}),l=2;l--;){var G,H,I,J,K=[],L=[],M=D[l],N=M.length;if(N){for(o.sortByAngle(M,l-.5),m=g=0;!g&&M[m];)g=M[m]&&M[m].dataLabel&&(M[m].dataLabel.getBBox().height||21),m++;if(x>0){for(I=sb(B+z+x,q.plotHeight),H=rb(0,B-z-x);I>=H;H+=g)K.push(H);if(G=K.length,N>G){for(k=[].concat(M),k.sort(F),m=N;m--;)k[m].rank=m;for(m=N;m--;)M[m].rank>=G&&M.splice(m,1);N=M.length}for(m=0;N>m;m++){a=M[m],f=a.labelPos;var O,P,Q=9999;for(P=0;G>P;P++)O=tb(K[P]-f[1]),Q>O&&(Q=O,J=P);if(m>J&&null!==K[m])J=m;else if(N-m+J>G&&null!==K[m])for(J=G-N+m;null===K[J];)J++;else for(;null===K[J];)J++;L.push({i:J,y:K[J]}),K[J]=null}L.sort(F)}for(m=0;N>m;m++){var R,S;a=M[m],f=a.labelPos,d=a.dataLabel,j=a.visible===!1?Tb:Vb,S=f[1],x>0?(R=L.pop(),J=R.i,i=R.y,(S>i&&null!==K[J+1]||i>S&&null!==K[J-1])&&(i=sb(rb(0,S),q.plotHeight))):i=S,h=r.justify?y[0]+(l?-1:1)*(z+x):o.getX(i===B-z-x||i===B+z+x?S:i,l),d._attr={visibility:j,align:f[6]},d._pos={x:h+r.x+({left:s,right:-s}[f[6]]||0),y:i+r.y-10},d.connX=h,d.connY=i,null===this.options.size&&(e=d.width,s>h-e?E[3]=rb(ob(e-h+s),E[3]):h+e>u-s&&(E[1]=rb(ob(h+e-u+s),E[1])),0>i-g/2?E[0]=rb(ob(-i+g/2),E[0]):i+g/2>v&&(E[2]=rb(ob(i+g/2-v),E[2])))}}}(0===A(E)||this.verifyDataLabelOverflow(E))&&(this.placeDataLabels(),C&&t&&jc(this.points,function(a){b=a.connector,f=a.labelPos,d=a.dataLabel,d&&d._pos?(j=d._attr.visibility,h=d.connX,i=d.connY,c=w?[Yb,h+("left"===f[6]?5:-5),i,"C",h,i,2*f[2]-f[4],2*f[3]-f[5],f[2],f[3],Zb,f[4],f[5]]:[Yb,h+("left"===f[6]?5:-5),i,Zb,f[2],f[3],Zb,f[4],f[5]],b?(b.animate({d:c}),b.attr("visibility",j)):a.connector=b=o.chart.renderer.path(c).attr({"stroke-width":t,stroke:r.connectorColor||a.color||"#606060",visibility:j}).add(o.dataLabelsGroup)):b&&(a.connector=b.destroy())}))}},dc.pie.prototype.placeDataLabels=function(){jc(this.points,function(a){var b,c=a.dataLabel;c&&(b=c._pos,b?(c.attr(c._attr),c[c.moved?"animate":"attr"](b),c.moved=!0):c&&c.attr({y:-999}))})},dc.pie.prototype.alignDataLabel=Lb,dc.pie.prototype.verifyDataLabelOverflow=function(a){var b,c=this.center,d=this.options,e=d.center,f=d.minSize||80,g=f;return null!==e[0]?g=rb(c[2]-rb(a[1],a[3]),f):(g=rb(c[2]-a[1]-a[3],f),c[0]+=(a[3]-a[1])/2),null!==e[1]?g=rb(sb(g,c[2]-rb(a[0],a[2])),f):(g=rb(sb(g,c[2]-a[0]-a[2]),f),c[1]+=(a[0]-a[2])/2),gn(this.translatedThreshold,g.plotSizeY),k=n(d.inside,!!this.options.stacking);i&&(e=b(i),h&&(e={x:g.plotWidth-e.y-e.height,y:g.plotHeight-e.x-e.width,width:e.height,height:e.width}),k||(h?(e.x+=j?0:e.width,e.width=0):(e.y+=j?e.height:0,e.height=0))),d.align=n(d.align,!h||k?"center":j?"right":"left"),d.verticalAlign=n(d.verticalAlign,h||k?"middle":j?"top":"bottom"),Rc.prototype.alignDataLabel.call(this,a,c,d,e,f)});var ad=kb.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var d,e=c.target;for(b.hoverSeries!==a&&a.onMouseOver();e&&!d;)d=e.point,e=e.parentNode;d!==N&&d!==b.hoverPoint&&d.onMouseOver(c)};jc(a.points,function(a){a.graphic&&(a.graphic.element.point=a),a.dataLabel&&(a.dataLabel.element.point=a)}),a._hasTracking||(jc(a.trackerGroups,function(b){a[b]&&(a[b].addClass(Ub+"tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),P&&a[b].on("touchstart",f))}),a._hasTracking=!0)},drawTrackerGraph:function(){var a,b,c=this,d=c.options,e=d.trackByArea,f=[].concat(e?c.areaPath:c.graphPath),g=f.length,h=c.chart,i=h.pointer,j=h.renderer,k=h.options.tooltip.snap,l=c.tracker,m=d.cursor,n=m&&{cursor:m},o=c.singlePoints,p=function(){h.hoverSeries!==c&&c.onMouseOver()},q="rgba(192,192,192,"+(Gb?1e-4:.002)+")";if(g&&!e)for(b=g+1;b--;)f[b]===Yb&&f.splice(b+1,0,f[b+1]-k,f[b+2],Zb),(b&&f[b]===Yb||b===g)&&f.splice(b,0,Zb,f[b-2]+k,f[b-1]);for(b=0;bsb(i.dataMin,i.min)&&kh;h++)if(e=j[h],f=e.x,f>=l.min&&f<=l.max)for(g=j[h+1],c=d===N?0:d+1,d=j[h+1]?sb(rb(0,pb((e.clientX+(g?g.wrappedClientX||g.clientX:m))/2)),m):m;c>=0&&d>=c;)n[c++]=e;i.tooltipPoints=n}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){var b=this;b.selected=a=a===N?!b.selected:a,b.checkbox&&(b.checkbox.checked=a),pc(b,a?"select":"unselect")},drawTracker:ad.drawTrackerGraph}),a(kb,{Axis:K,Chart:L,Color:zc,Point:Qc,Tick:J,Renderer:O,Series:Rc,SVGElement:I,SVGRenderer:Ac,arrayMin:z,arrayMax:A,charts:Mb,dateFormat:S,format:v,pathAnim:U,getOptions:H,hasBidiBug:Hb,isTouchDevice:Eb,numberFormat:r,seriesTypes:dc,setOptions:G,addEvent:nc,removeEvent:oc,createElement:p,discardElement:C,css:o,each:jc,extend:a,map:mc,merge:b,pick:n,splat:m,extendClass:q,pInt:c,wrap:t,svg:Gb,canvas:Ib,vml:!Gb&&!Ib,product:Ob,version:Pb})}();var HighchartsAdapter=function(){function a(a){function c(a,b,c){a.removeEventListener(b,c,!1)}function d(a,b,c){c=a.HCProxiedMethods[c.toString()],a.detachEvent("on"+b,c)}function e(a,b){var e,f,g,h,i=a.HCEvents;if(a.removeEventListener)e=c;else{if(!a.attachEvent)return;e=d}b?(f={},f[b]=!0):f=i;for(h in f)if(i[h])for(g=i[h].length;g--;)e(a,h,i[h][g])}return a.HCExtended||Highcharts.extend(a,{HCExtended:!0,HCEvents:{},bind:function(a,c){var d,e=this,f=this.HCEvents;e.addEventListener?e.addEventListener(a,c,!1):e.attachEvent&&(d=function(a){a.target=a.srcElement||window,c.call(e,a)},e.HCProxiedMethods||(e.HCProxiedMethods={}),e.HCProxiedMethods[c.toString()]=d,e.attachEvent("on"+a,d)),f[a]===b&&(f[a]=[]),f[a].push(c)},unbind:function(a,b){var f,g;a?(f=this.HCEvents[a]||[],b?(g=HighchartsAdapter.inArray(b,f),g>-1&&(f.splice(g,1),this.HCEvents[a]=f),this.removeEventListener?c(this,a,b):this.attachEvent&&d(this,a,b)):(e(this,a),this.HCEvents[a]=[])):(e(this),this.HCEvents={})},trigger:function(a,b){var c,d,e,f=this.HCEvents[a]||[],g=this,h=f.length;for(d=function(){b.defaultPrevented=!0},c=0;h>c;c++){if(e=f[c],b.stopped)return;b.preventDefault=d,b.target=g,b.type||(b.type=a),e.call(this,b)===!1&&b.preventDefault()}}}),a}var b,c,d,e=document,f=[],g=[],h={};return Math.easeInOutSine=function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},{init:function(a){e.defaultView||(this._getStyle=function(a,b){var c;return a.style[b]?a.style[b]:("opacity"===b&&(b="filter"),c=a.currentStyle[b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})],"filter"===b&&(c=c.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100})),""===c?1:c)},this.adapterRun=function(a,b){var c={width:"clientWidth",height:"clientHeight"}[b];return c?(a.style.zoom=1,a[c]-2*parseInt(HighchartsAdapter._getStyle(a,"padding"),10)):void 0}),Array.prototype.forEach||(this.each=function(a,b){for(var c=0,d=a.length;d>c;c++)if(b.call(a[c],a[c],c,a)===!1)return c}),Array.prototype.indexOf||(this.inArray=function(a,b){var c,d=0;if(b)for(c=b.length;c>d;d++)if(b[d]===a)return d;return-1}),Array.prototype.filter||(this.grep=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)b(a[d],d)&&c.push(a[d]);return c}),d=function(a,b,c){this.options=b,this.elem=a,this.prop=c},d.prototype={update:function(){var b,c=this.paths,d=this.elem,e=d.element;h[this.prop]?h[this.prop](this):c&&e?d.attr("d",a.step(c[0],c[1],this.now,this.toD)):d.attr?e&&d.attr(this.prop,this.now):(b={},b[this.prop]=this.now+this.unit,Highcharts.css(d,b)),this.options.step&&this.options.step.call(this.elem,this.now,this)},custom:function(a,b,d){var e,f=this,h=function(a){return f.step(a)};this.startTime=+new Date,this.start=a,this.end=b,this.unit=d,this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&1===g.push(h)&&(c=setInterval(function(){for(e=0;e=f.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0,c=!0;for(d in f.curAnim)f.curAnim[d]!==!0&&(c=!1);c&&f.complete&&f.complete.call(g),b=!1}else{var h=e-this.startTime;this.state=h/f.duration,this.pos=f.easing(h,0,1,f.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0}return b}},this.animate=function(b,c,e){var f,g,h,i,j,k="";b.stopAnimation=!1,("object"!=typeof e||null===e)&&(i=arguments,e={duration:i[2],easing:i[3],complete:i[4]}),"number"!=typeof e.duration&&(e.duration=400),e.easing=Math[e.easing]||Math.easeInOutSine,e.curAnim=Highcharts.extend({},c);for(j in c)h=new d(b,e,j),g=null,"d"===j?(h.paths=a.init(b,b.d,c.d),h.toD=c.d,f=0,g=1):b.attr?f=b.attr(j):(f=parseFloat(HighchartsAdapter._getStyle(b,j))||0,"opacity"!==j&&(k="px")),g||(g=c[j]),h.custom(f,g,k)}},_getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},addAnimSetter:function(a,b){h[a]=b},getScript:function(a,b){var c=e.getElementsByTagName("head")[0],d=e.createElement("script");d.type="text/javascript",d.src=a,d.onload=b,c.appendChild(d)},inArray:function(a,b){return b.indexOf?b.indexOf(a):f.indexOf.call(b,a)},adapterRun:function(a,b){return parseInt(HighchartsAdapter._getStyle(a,b),10)},grep:function(a,b){return f.filter.call(a,b)},map:function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=b.call(a[d],a[d],d,a);return c},offset:function(a){var b=document.documentElement,c=a.getBoundingClientRect();return{top:c.top+(window.pageYOffset||b.scrollTop)-(b.clientTop||0),left:c.left+(window.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}},addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){a(b).unbind(c,d)},fireEvent:function(a,b,c,d){var f;e.createEvent&&(a.dispatchEvent||a.fireEvent)?(f=e.createEvent("Events"),f.initEvent(b,!0,!0),f.target=a,Highcharts.extend(f,c),a.dispatchEvent?a.dispatchEvent(f):a.fireEvent(b,f)):a.HCExtended===!0&&(c=c||{},a.trigger(b,c)),c&&c.defaultPrevented&&(d=null),d&&d(c)},washMouseEvent:function(a){return a},stop:function(a){a.stopAnimation=!0},each:function(a,b){return Array.prototype.forEach.call(a,b)}}}();!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gq&&e>l?(e=rb(q,l),g=2*l-e):q>e&&l>e&&(e=sb(q,l),g=2*l-e),g>s&&g>l?(g=rb(s,l),e=2*l-g):s>g&&l>g&&(g=sb(s,l),e=2*l-g),b.rightContX=f,b.rightContY=g}return c?(h=["C",m.rightContX||m.plotX,m.rightContY||m.plotY,d||k,e||l,k,l],m.rightContX=m.rightContY=null):h=[Yb,k,l],h}});dc.spline=Uc,uc.areaspline=b(uc.area);var Vc=Tc.prototype,Wc=q(Uc,{type:"areaspline",closedStacks:!0,getSegmentPath:Vc.getSegmentPath,closeSegment:Vc.closeSegment,drawGraph:Vc.drawGraph,drawLegendSymbol:Oc.drawRectangle});dc.areaspline=Wc,uc.column=b(vc,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0});var Xc=q(Rc,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){Rc.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&jc(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var a,b,c=this,d=c.options,e=c.xAxis,f=c.yAxis,g=e.reversed,h={},i=0;d.grouping===!1?i=1:jc(c.chart.series,function(d){var e=d.options,g=d.yAxis;d.type===c.type&&d.visible&&f.len===g.len&&f.pos===g.pos&&(e.stacking?(a=d.stackKey,h[a]===N&&(h[a]=i++),b=h[a]):e.grouping!==!1&&(b=i++),d.columnIndex=b)});var j=sb(tb(e.transA)*(e.ordinalSlope||d.pointRange||e.closestPointRange||e.tickInterval||1),e.len),l=j*d.groupPadding,m=j-2*l,o=m/i,p=d.pointWidth,q=k(p)?(o-p)/2:o*d.pointPadding,r=n(p,o-2*q),s=(g?i-(c.columnIndex||0):c.columnIndex)||0,t=q+(l+s*o-j/2)*(g?-1:1);return c.columnMetrics={width:r,offset:t}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=n(c.borderWidth,a.activePointCount>.5*a.xAxis.len?0:1),e=a.yAxis,f=c.threshold,g=a.translatedThreshold=e.getThreshold(f),h=n(c.minPointLength,5),i=a.getColumnMetrics(),j=i.width,k=a.barW=rb(j,1+2*d),l=a.pointXOffset=i.offset,m=-(d%2?.5:0),o=d%2?.5:1;b.renderer.isVML&&b.inverted&&(o+=1),c.pointPadding&&(k=qb(k)),Rc.prototype.translate.apply(a),jc(a.points,function(c){var d,f,i,p=n(c.yBottom,g),q=sb(rb(-999-p,c.plotY),e.len+999+p),r=c.plotX+l,s=k,t=sb(q,p),u=rb(q,p)-t;tb(u)h?p-h:g-(e.translate(c.y,0,1,0,1)<=g?h:0))),c.barX=r,c.pointWidth=j,c.tooltipPos=b.inverted?[e.len-q,a.xAxis.len-r-s/2]:[r+s/2,q+e.pos-b.plotTop],d=ob(r+s)+m,r=ob(r)+m,s=d-r,i=tb(t)<.5,f=ob(t+u)+o,t=ob(t)+o,u=f-t,i&&(t-=1,u+=1),c.shapeType="rect",c.shapeArgs={x:r,y:t,width:s,height:u}})},getSymbol:Lb,drawLegendSymbol:Oc.drawRectangle,drawGraph:Lb,drawPoints:function(){var a,c,d=this,e=this.chart,f=d.options,g=e.renderer,h=f.animationLimit||250;jc(d.points,function(i){var j,l=i.plotY,m=i.graphic;l===N||isNaN(l)||null===i.y?m&&(i.graphic=m.destroy()):(a=i.shapeArgs,j=k(d.borderWidth)?{"stroke-width":d.borderWidth}:{},c=i.pointAttr[i.selected?bc:_b]||d.pointAttr[_b],m?(sc(m),m.attr(j)[e.pointCount {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"},stickyTracking:!1});var Zc=q(Rc,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&Rc.prototype.drawGraph.call(this)}});dc.scatter=Zc,uc.pie=b(vc,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});var $c=q(Qc,{init:function(){Qc.prototype.init.apply(this,arguments);var b,c=this;return c.y<0&&(c.y=null),a(c,{visible:c.visible!==!1,name:n(c.name,"Slice")}),b=function(a){c.slice("select"===a.type)},nc(c,"select",b),nc(c,"unselect",b),c},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible=a=a===N?!b.visible:a,c.options.data[ic(b,c.data)]=b.options,jc(["graphic","dataLabel","connector","shadowGroup"],function(c){b[c]&&b[c][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),!c.isDirty&&c.options.ignoreHiddenPoint&&(c.isDirty=!0,d.redraw())},slice:function(a,b,c){var d,e=this,f=e.series,g=f.chart;E(c,g),b=n(b,!0),e.sliced=e.options.sliced=a=k(a)?a:!e.sliced,f.options.data[ic(e,f.data)]=e.options,d=a?e.slicedTranslation:{translateX:0,translateY:0},e.graphic.animate(d),e.shadowGroup&&e.shadowGroup.animate(d)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),_c={type:"pie",isCartesian:!1,pointClass:$c,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:Lb,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(jc(c,function(a){var c=a.graphic,e=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:e.r,start:e.start,end:e.end},b.options.animation))}),b.animate=null)},setData:function(a,b,c,d){Rc.prototype.setData.call(this,a,!1,c,d),this.processData(),this.generatePoints(),n(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,b,c,d,e=0,f=this.options.ignoreHiddenPoint;for(Rc.prototype.generatePoints.call(this),b=this.points,c=b.length,a=0;c>a;a++)d=b[a],e+=f&&!d.visible?0:d.y;for(this.total=e,a=0;c>a;a++)d=b[a],d.percentage=e>0?d.y/e*100:0,d.total=e},translate:function(a){this.generatePoints();var b,c,d,e,f,g,h,i=this,j=0,k=1e3,l=i.options,m=l.slicedOffset,o=m+l.borderWidth,p=l.startAngle||0,q=i.startAngleRad=wb/180*(p-90),r=i.endAngleRad=wb/180*(n(l.endAngle,p+360)-90),s=r-q,t=i.points,u=l.dataLabels.distance,v=l.ignoreHiddenPoint,w=t.length;for(a||(i.center=a=i.getCenter()),i.getX=function(b,c){return d=nb.asin(sb((b-a[1])/(a[2]/2+u),1)),a[0]+(c?-1:1)*ub(d)*(a[2]/2+u)},g=0;w>g;g++)h=t[g],b=q+j*s,(!v||h.visible)&&(j+=h.percentage/100),c=q+j*s,h.shapeType="arc",h.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:ob(b*k)/k,end:ob(c*k)/k},d=(c+b)/2,d>1.5*wb?d-=2*wb:-wb/2>d&&(d+=2*wb),h.slicedTranslation={translateX:ob(ub(d)*m),translateY:ob(vb(d)*m)},e=ub(d)*a[2]/2,f=vb(d)*a[2]/2,h.tooltipPos=[a[0]+.7*e,a[1]+.7*f],h.half=-wb/2>d||d>wb/2?1:0,h.angle=d,o=sb(o,u/2),h.labelPos=[a[0]+e+ub(d)*u,a[1]+f+vb(d)*u,a[0]+e+ub(d)*o,a[1]+f+vb(d)*o,a[0]+e,a[1]+f,0>u?"center":h.half?"right":"left",d]},drawGraph:null,drawPoints:function(){var b,c,d,e,f=this,g=f.chart,h=g.renderer,i=f.options.shadow;i&&!f.shadowGroup&&(f.shadowGroup=h.g("shadow").add(f.group)),jc(f.points,function(g){c=g.graphic,e=g.shapeArgs,d=g.shadowGroup,i&&!d&&(d=g.shadowGroup=h.g("shadow").add(f.shadowGroup)),b=g.sliced?g.slicedTranslation:{translateX:0,translateY:0},d&&d.attr(b),c?c.animate(a(e,b)):g.graphic=c=h[g.shapeType](e).setRadialReference(f.center).attr(g.pointAttr[g.selected?bc:_b]).attr({"stroke-linejoin":"round"}).attr(b).add(f.group).shadow(i,d),void 0!==g.visible&&g.setVisible(g.visible)})},sortByAngle:function(a,b){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*b})},drawLegendSymbol:Oc.drawRectangle,getCenter:Pc.getCenter,getSymbol:Lb};_c=q(Rc,_c),dc.pie=_c,Rc.prototype.drawDataLabels=function(){var c,d,e,f,g=this,h=g.options,i=h.cursor,j=h.dataLabels,l=g.points,m=g.hasRendered||0;(j.enabled||g._hasPointLabels)&&(g.dlProcessOptions&&g.dlProcessOptions(j),f=g.plotGroup("dataLabelsGroup","data-labels",j.defer?Tb:Vb,j.zIndex||6),n(j.defer,!0)&&(f.attr({opacity:+m}),m||nc(g,"afterAnimate",function(){g.visible&&f.show(),f[h.animation?"animate":"attr"]({opacity:1},{duration:200})})),d=j,jc(l,function(h){var l,m,o,p,q,r=h.dataLabel,s=h.connector,t=!0;if(c=h.options&&h.options.dataLabels,l=n(c&&c.enabled,d.enabled),r&&!l)h.dataLabel=r.destroy();else if(l){if(j=b(d,c),q=j.rotation,m=h.getLabelConfig(),e=j.format?v(j.format,m):j.formatter.call(m,j),j.style.color=n(j.color,j.style.color,g.color,"black"),r)k(e)?(r.attr({text:e}),t=!1):(h.dataLabel=r=r.destroy(),s&&(h.connector=s.destroy()));else if(k(e)){o={fill:j.backgroundColor,stroke:j.borderColor,"stroke-width":j.borderWidth,r:j.borderRadius||0,rotation:q,padding:j.padding,zIndex:1};for(p in o)o[p]===N&&delete o[p];r=h.dataLabel=g.chart.renderer[q?"text":"label"](e,0,-999,null,null,null,j.useHTML).attr(o).css(a(j.style,i&&{cursor:i})).add(f).shadow(j.shadow)}r&&g.alignDataLabel(h,r,j,null,t)}}))},Rc.prototype.alignDataLabel=function(b,c,d,e,f){var g,h=this.chart,i=h.inverted,j=n(b.plotX,-999),k=n(b.plotY,-999),l=c.getBBox(),m=this.visible&&(b.series.forceDL||h.isInsidePlot(j,ob(k),i)||e&&h.isInsidePlot(j,i?e.x+1:e.y+e.height-1,i));m&&(e=a({x:i?h.plotWidth-k:j,y:ob(i?h.plotHeight-j:k),width:0,height:0},e),a(d,{width:l.width,height:l.height}),d.rotation?c[f?"attr":"animate"]({x:e.x+d.x+e.width/2,y:e.y+d.y+e.height/2}).attr({align:d.align}):(c.align(d,null,e),g=c.alignAttr,"justify"===n(d.overflow,"justify")?this.justifyDataLabel(c,d,g,l,e,f):n(d.crop,!0)&&(m=h.isInsidePlot(g.x,g.y)&&h.isInsidePlot(g.x+l.width,g.y+l.height)))),m||(c.attr({y:-999}),c.placed=!1)},Rc.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g,h,i=this.chart,j=b.align,k=b.verticalAlign;g=c.x,0>g&&("right"===j?b.align="left":b.x=-g,h=!0),g=c.x+d.width,g>i.plotWidth&&("left"===j?b.align="right":b.x=i.plotWidth-g,h=!0),g=c.y,0>g&&("bottom"===k?b.verticalAlign="top":b.y=-g,h=!0),g=c.y+d.height,g>i.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=i.plotHeight-g,h=!0),h&&(a.placed=!f,a.align(b,null,e))},dc.pie&&(dc.pie.prototype.drawDataLabels=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,o=this,p=o.data,q=o.chart,r=o.options.dataLabels,s=n(r.connectorPadding,10),t=n(r.connectorWidth,1),u=q.plotWidth,v=q.plotHeight,w=n(r.softConnector,!0),x=r.distance,y=o.center,z=y[2]/2,B=y[1],C=x>0,D=[[],[]],E=[0,0,0,0],F=function(a,b){return b.y-a.y};if(o.visible&&(r.enabled||o._hasPointLabels)){for(Rc.prototype.drawDataLabels.apply(o),jc(p,function(a){a.dataLabel&&a.visible&&D[a.half].push(a)}),l=2;l--;){var G,H,I,J,K=[],L=[],M=D[l],N=M.length;if(N){for(o.sortByAngle(M,l-.5),m=g=0;!g&&M[m];)g=M[m]&&M[m].dataLabel&&(M[m].dataLabel.getBBox().height||21),m++;if(x>0){for(I=sb(B+z+x,q.plotHeight),H=rb(0,B-z-x);I>=H;H+=g)K.push(H);if(G=K.length,N>G){for(k=[].concat(M),k.sort(F),m=N;m--;)k[m].rank=m;for(m=N;m--;)M[m].rank>=G&&M.splice(m,1);N=M.length}for(m=0;N>m;m++){a=M[m],f=a.labelPos;var O,P,Q=9999;for(P=0;G>P;P++)O=tb(K[P]-f[1]),Q>O&&(Q=O,J=P);if(m>J&&null!==K[m])J=m;else if(N-m+J>G&&null!==K[m])for(J=G-N+m;null===K[J];)J++;else for(;null===K[J];)J++;L.push({i:J,y:K[J]}),K[J]=null}L.sort(F)}for(m=0;N>m;m++){var R,S;a=M[m],f=a.labelPos,d=a.dataLabel,j=a.visible===!1?Tb:Vb,S=f[1],x>0?(R=L.pop(),J=R.i,i=R.y,(S>i&&null!==K[J+1]||i>S&&null!==K[J-1])&&(i=sb(rb(0,S),q.plotHeight))):i=S,h=r.justify?y[0]+(l?-1:1)*(z+x):o.getX(i===B-z-x||i===B+z+x?S:i,l),d._attr={visibility:j,align:f[6]},d._pos={x:h+r.x+({left:s,right:-s}[f[6]]||0),y:i+r.y-10},d.connX=h,d.connY=i,null===this.options.size&&(e=d.width,s>h-e?E[3]=rb(ob(e-h+s),E[3]):h+e>u-s&&(E[1]=rb(ob(h+e-u+s),E[1])),0>i-g/2?E[0]=rb(ob(-i+g/2),E[0]):i+g/2>v&&(E[2]=rb(ob(i+g/2-v),E[2])))}}}(0===A(E)||this.verifyDataLabelOverflow(E))&&(this.placeDataLabels(),C&&t&&jc(this.points,function(a){b=a.connector,f=a.labelPos,d=a.dataLabel,d&&d._pos?(j=d._attr.visibility,h=d.connX,i=d.connY,c=w?[Yb,h+("left"===f[6]?5:-5),i,"C",h,i,2*f[2]-f[4],2*f[3]-f[5],f[2],f[3],Zb,f[4],f[5]]:[Yb,h+("left"===f[6]?5:-5),i,Zb,f[2],f[3],Zb,f[4],f[5]],b?(b.animate({d:c}),b.attr("visibility",j)):a.connector=b=o.chart.renderer.path(c).attr({"stroke-width":t,stroke:r.connectorColor||a.color||"#606060",visibility:j}).add(o.dataLabelsGroup)):b&&(a.connector=b.destroy())}))}},dc.pie.prototype.placeDataLabels=function(){jc(this.points,function(a){var b,c=a.dataLabel;c&&(b=c._pos,b?(c.attr(c._attr),c[c.moved?"animate":"attr"](b),c.moved=!0):c&&c.attr({y:-999}))})},dc.pie.prototype.alignDataLabel=Lb,dc.pie.prototype.verifyDataLabelOverflow=function(a){var b,c=this.center,d=this.options,e=d.center,f=d.minSize||80,g=f;return null!==e[0]?g=rb(c[2]-rb(a[1],a[3]),f):(g=rb(c[2]-a[1]-a[3],f),c[0]+=(a[3]-a[1])/2),null!==e[1]?g=rb(sb(g,c[2]-rb(a[0],a[2])),f):(g=rb(sb(g,c[2]-a[0]-a[2]),f),c[1]+=(a[0]-a[2])/2),gn(this.translatedThreshold,g.plotSizeY),k=n(d.inside,!!this.options.stacking);i&&(e=b(i),h&&(e={x:g.plotWidth-e.y-e.height,y:g.plotHeight-e.x-e.width,width:e.height,height:e.width}),k||(h?(e.x+=j?0:e.width,e.width=0):(e.y+=j?e.height:0,e.height=0))),d.align=n(d.align,!h||k?"center":j?"right":"left"),d.verticalAlign=n(d.verticalAlign,h||k?"middle":j?"top":"bottom"),Rc.prototype.alignDataLabel.call(this,a,c,d,e,f)});var ad=kb.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var d,e=c.target;for(b.hoverSeries!==a&&a.onMouseOver();e&&!d;)d=e.point,e=e.parentNode;d!==N&&d!==b.hoverPoint&&d.onMouseOver(c)};jc(a.points,function(a){a.graphic&&(a.graphic.element.point=a),a.dataLabel&&(a.dataLabel.element.point=a)}),a._hasTracking||(jc(a.trackerGroups,function(b){a[b]&&(a[b].addClass(Ub+"tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),P&&a[b].on("touchstart",f))}),a._hasTracking=!0)},drawTrackerGraph:function(){var a,b,c=this,d=c.options,e=d.trackByArea,f=[].concat(e?c.areaPath:c.graphPath),g=f.length,h=c.chart,i=h.pointer,j=h.renderer,k=h.options.tooltip.snap,l=c.tracker,m=d.cursor,n=m&&{cursor:m},o=c.singlePoints,p=function(){h.hoverSeries!==c&&c.onMouseOver()},q="rgba(192,192,192,"+(Gb?1e-4:.002)+")";if(g&&!e)for(b=g+1;b--;)f[b]===Yb&&f.splice(b+1,0,f[b+1]-k,f[b+2],Zb),(b&&f[b]===Yb||b===g)&&f.splice(b,0,Zb,f[b-2]+k,f[b-1]);for(b=0;bsb(i.dataMin,i.min)&&kh;h++)if(e=j[h],f=e.x,f>=l.min&&f<=l.max)for(g=j[h+1],c=d===N?0:d+1,d=j[h+1]?sb(rb(0,pb((e.clientX+(g?g.wrappedClientX||g.clientX:m))/2)),m):m;c>=0&&d>=c;)n[c++]=e;i.tooltipPoints=n}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){var b=this;b.selected=a=a===N?!b.selected:a,b.checkbox&&(b.checkbox.checked=a),pc(b,a?"select":"unselect")},drawTracker:ad.drawTrackerGraph}),a(kb,{Axis:K,Chart:L,Color:zc,Point:Qc,Tick:J,Renderer:O,Series:Rc,SVGElement:I,SVGRenderer:Ac,arrayMin:z,arrayMax:A,charts:Mb,dateFormat:S,format:v,pathAnim:U,getOptions:H,hasBidiBug:Hb,isTouchDevice:Eb,numberFormat:r,seriesTypes:dc,setOptions:G,addEvent:nc,removeEvent:oc,createElement:p,discardElement:C,css:o,each:jc,extend:a,map:mc,merge:b,pick:n,splat:m,extendClass:q,pInt:c,wrap:t,svg:Gb,canvas:Ib,vml:!Gb&&!Ib,product:Ob,version:Pb})}();var HighchartsAdapter=function(){function a(a){function c(a,b,c){a.removeEventListener(b,c,!1)}function d(a,b,c){c=a.HCProxiedMethods[c.toString()],a.detachEvent("on"+b,c)}function e(a,b){var e,f,g,h,i=a.HCEvents;if(a.removeEventListener)e=c;else{if(!a.attachEvent)return;e=d}b?(f={},f[b]=!0):f=i;for(h in f)if(i[h])for(g=i[h].length;g--;)e(a,h,i[h][g])}return a.HCExtended||Highcharts.extend(a,{HCExtended:!0,HCEvents:{},bind:function(a,c){var d,e=this,f=this.HCEvents;e.addEventListener?e.addEventListener(a,c,!1):e.attachEvent&&(d=function(a){a.target=a.srcElement||window,c.call(e,a)},e.HCProxiedMethods||(e.HCProxiedMethods={}),e.HCProxiedMethods[c.toString()]=d,e.attachEvent("on"+a,d)),f[a]===b&&(f[a]=[]),f[a].push(c)},unbind:function(a,b){var f,g;a?(f=this.HCEvents[a]||[],b?(g=HighchartsAdapter.inArray(b,f),g>-1&&(f.splice(g,1),this.HCEvents[a]=f),this.removeEventListener?c(this,a,b):this.attachEvent&&d(this,a,b)):(e(this,a),this.HCEvents[a]=[])):(e(this),this.HCEvents={})},trigger:function(a,b){var c,d,e,f=this.HCEvents[a]||[],g=this,h=f.length;for(d=function(){b.defaultPrevented=!0},c=0;h>c;c++){if(e=f[c],b.stopped)return;b.preventDefault=d,b.target=g,b.type||(b.type=a),e.call(this,b)===!1&&b.preventDefault()}}}),a}var b,c,d,e=document,f=[],g=[],h={};return Math.easeInOutSine=function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},{init:function(a){e.defaultView||(this._getStyle=function(a,b){var c;return a.style[b]?a.style[b]:("opacity"===b&&(b="filter"),c=a.currentStyle[b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})],"filter"===b&&(c=c.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100})),""===c?1:c)},this.adapterRun=function(a,b){var c={width:"clientWidth",height:"clientHeight"}[b];return c?(a.style.zoom=1,a[c]-2*parseInt(HighchartsAdapter._getStyle(a,"padding"),10)):void 0}),Array.prototype.forEach||(this.each=function(a,b){for(var c=0,d=a.length;d>c;c++)if(b.call(a[c],a[c],c,a)===!1)return c}),Array.prototype.indexOf||(this.inArray=function(a,b){var c,d=0;if(b)for(c=b.length;c>d;d++)if(b[d]===a)return d;return-1}),Array.prototype.filter||(this.grep=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)b(a[d],d)&&c.push(a[d]);return c}),d=function(a,b,c){this.options=b,this.elem=a,this.prop=c},d.prototype={update:function(){var b,c=this.paths,d=this.elem,e=d.element;h[this.prop]?h[this.prop](this):c&&e?d.attr("d",a.step(c[0],c[1],this.now,this.toD)):d.attr?e&&d.attr(this.prop,this.now):(b={},b[this.prop]=this.now+this.unit,Highcharts.css(d,b)),this.options.step&&this.options.step.call(this.elem,this.now,this)},custom:function(a,b,d){var e,f=this,h=function(a){return f.step(a)};this.startTime=+new Date,this.start=a,this.end=b,this.unit=d,this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&1===g.push(h)&&(c=setInterval(function(){for(e=0;e=f.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0,c=!0;for(d in f.curAnim)f.curAnim[d]!==!0&&(c=!1);c&&f.complete&&f.complete.call(g),b=!1}else{var h=e-this.startTime;this.state=h/f.duration,this.pos=f.easing(h,0,1,f.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0}return b}},this.animate=function(b,c,e){var f,g,h,i,j,k="";b.stopAnimation=!1,("object"!=typeof e||null===e)&&(i=arguments,e={duration:i[2],easing:i[3],complete:i[4]}),"number"!=typeof e.duration&&(e.duration=400),e.easing=Math[e.easing]||Math.easeInOutSine,e.curAnim=Highcharts.extend({},c);for(j in c)h=new d(b,e,j),g=null,"d"===j?(h.paths=a.init(b,b.d,c.d),h.toD=c.d,f=0,g=1):b.attr?f=b.attr(j):(f=parseFloat(HighchartsAdapter._getStyle(b,j))||0,"opacity"!==j&&(k="px")),g||(g=c[j]),h.custom(f,g,k)}},_getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},addAnimSetter:function(a,b){h[a]=b},getScript:function(a,b){var c=e.getElementsByTagName("head")[0],d=e.createElement("script");d.type="text/javascript",d.src=a,d.onload=b,c.appendChild(d)},inArray:function(a,b){return b.indexOf?b.indexOf(a):f.indexOf.call(b,a)},adapterRun:function(a,b){return parseInt(HighchartsAdapter._getStyle(a,b),10)},grep:function(a,b){return f.filter.call(a,b)},map:function(a,b){for(var c=[],d=0,e=a.length;e>d;d++)c[d]=b.call(a[d],a[d],d,a);return c},offset:function(a){var b=document.documentElement,c=a.getBoundingClientRect();return{top:c.top+(window.pageYOffset||b.scrollTop)-(b.clientTop||0),left:c.left+(window.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}},addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){a(b).unbind(c,d)},fireEvent:function(a,b,c,d){var f;e.createEvent&&(a.dispatchEvent||a.fireEvent)?(f=e.createEvent("Events"),f.initEvent(b,!0,!0),f.target=a,Highcharts.extend(f,c),a.dispatchEvent?a.dispatchEvent(f):a.fireEvent(b,f)):a.HCExtended===!0&&(c=c||{},a.trigger(b,c)),c&&c.defaultPrevented&&(d=null),d&&d(c)},washMouseEvent:function(a){return a},stop:function(a){a.stopAnimation=!0},each:function(a,b){return Array.prototype.forEach.call(a,b)}}}();!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=a.length&&d(null))}))})},f.forEach=f.each,f.eachSeries=function(a,b,c){if(c=c||function(){},!a.length)return c();var d=0,e=function(){b(a[d],function(b){b?(c(b),c=function(){}):(d+=1,d>=a.length?c(null):e())})};e()},f.forEachSeries=f.eachSeries,f.eachLimit=function(a,b,c,d){var e=k(b);e.apply(null,[a,c,d])},f.forEachLimit=f.eachLimit;var k=function(a){return function(b,c,d){if(d=d||function(){},!b.length||0>=a)return d();var e=0,f=0,g=0;!function h(){if(e>=b.length)return d();for(;a>g&&f=b.length?d():h())})}()}},l=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a.apply(null,[f.each].concat(b))}},m=function(a,b){return function(){var c=Array.prototype.slice.call(arguments);return b.apply(null,[k(a)].concat(c))}},n=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a.apply(null,[f.eachSeries].concat(b))}},o=function(a,b,c,d){var e=[];b=h(b,function(a,b){return{index:b,value:a}}),a(b,function(a,b){c(a.value,function(c,d){e[a.index]=d,b(c)})},function(a){d(a,e)})};f.map=l(o),f.mapSeries=n(o),f.mapLimit=function(a,b,c,d){return p(b)(a,c,d)};var p=function(a){return m(a,o)};f.reduce=function(a,b,c,d){f.eachSeries(a,function(a,d){c(b,a,function(a,c){b=c,d(a)})},function(a){d(a,b)})},f.inject=f.reduce,f.foldl=f.reduce,f.reduceRight=function(a,b,c,d){var e=h(a,function(a){return a}).reverse();f.reduce(e,b,c,d)},f.foldr=f.reduceRight;var q=function(a,b,c,d){var e=[];b=h(b,function(a,b){return{index:b,value:a}}),a(b,function(a,b){c(a.value,function(c){c&&e.push(a),b()})},function(){d(h(e.sort(function(a,b){return a.index-b.index}),function(a){return a.value}))})};f.filter=l(q),f.filterSeries=n(q),f.select=f.filter,f.selectSeries=f.filterSeries;var r=function(a,b,c,d){var e=[];b=h(b,function(a,b){return{index:b,value:a}}),a(b,function(a,b){c(a.value,function(c){c||e.push(a),b()})},function(){d(h(e.sort(function(a,b){return a.index-b.index}),function(a){return a.value}))})};f.reject=l(r),f.rejectSeries=n(r);var s=function(a,b,c,d){a(b,function(a,b){c(a,function(c){c?(d(a),d=function(){}):b()})},function(){d()})};f.detect=l(s),f.detectSeries=n(s),f.some=function(a,b,c){f.each(a,function(a,d){b(a,function(a){a&&(c(!0),c=function(){}),d()})},function(){c(!1)})},f.any=f.some,f.every=function(a,b,c){f.each(a,function(a,d){b(a,function(a){a||(c(!1),c=function(){}),d()})},function(){c(!0)})},f.all=f.every,f.sortBy=function(a,b,c){f.map(a,function(a,c){b(a,function(b,d){b?c(b):c(null,{value:a,criteria:d})})},function(a,b){if(a)return c(a);var d=function(a,b){var c=a.criteria,d=b.criteria;return d>c?-1:c>d?1:0};c(null,h(b.sort(d),function(a){return a.value}))})},f.auto=function(a,b){b=b||function(){};var c=j(a);if(!c.length)return b(null);var d={},e=[],h=function(a){e.unshift(a)},k=function(a){for(var b=0;bb;b++)a[b].apply(null,arguments)}])))};return e.memo=c,e.unmemoized=a,e},f.unmemoize=function(a){return function(){return(a.unmemoized||a).apply(null,arguments)}},f.times=function(a,b,c){for(var d=[],e=0;a>e;e++)d.push(e);return f.map(d,b,c)},f.timesSeries=function(a,b,c){for(var d=[],e=0;a>e;e++)d.push(e);return f.mapSeries(d,b,c)},f.compose=function(){var a=Array.prototype.reverse.call(arguments);return function(){var b=this,c=Array.prototype.slice.call(arguments),d=c.pop();f.reduce(a,c,function(a,c,d){c.apply(b,a.concat([function(){var a=arguments[0],b=Array.prototype.slice.call(arguments,1);d(a,b)}]))},function(a,c){d.apply(b,[a].concat(c))})}};var w=function(a,b){var c=function(){var c=this,d=Array.prototype.slice.call(arguments),e=d.pop();return a(b,function(a,b){a.apply(c,d.concat([b]))},e)};if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return c.apply(this,d)}return c};f.applyEach=l(w),f.applyEachSeries=n(w),f.forever=function(a,b){function c(d){if(d){if(b)return b(d);throw d}a(c)}c()},"undefined"!=typeof define&&define.amd?define([],function(){return f}):"undefined"!=typeof b&&b.exports?b.exports=f:d.async=f}()}).call(this,a("FWaASH"))},{FWaASH:19}],3:[function(a,b,c){function d(a,b,c){if(!(this instanceof d))return new d(a,b,c);var e=typeof a;if("base64"===b&&"string"===e)for(a=C(a);a.length%4!==0;)a+="=";var f;if("number"===e)f=E(a);else if("string"===e)f=d.byteLength(a,b);else{if("object"!==e)throw new Error("First argument needs to be a number, array or string.");f=E(a.length)}var g;d._useTypedArrays?g=d._augment(new Uint8Array(f)):(g=this,g.length=f,g._isBuffer=!0);var h;if(d._useTypedArrays&&"number"==typeof a.byteLength)g._set(a);else if(G(a))for(h=0;f>h;h++)g[h]=d.isBuffer(a)?a.readUInt8(h):a[h];else if("string"===e)g.write(a,0,b);else if("number"===e&&!d._useTypedArrays&&!c)for(h=0;f>h;h++)g[h]=0;return g}function e(a,b,c,e){c=Number(c)||0;var f=a.length-c;e?(e=Number(e),e>f&&(e=f)):e=f;var g=b.length;R(g%2===0,"Invalid hex string"),e>g/2&&(e=g/2);for(var h=0;e>h;h++){var i=parseInt(b.substr(2*h,2),16);R(!isNaN(i),"Invalid hex string"),a[c+h]=i}return d._charsWritten=2*h,h}function f(a,b,c,e){var f=d._charsWritten=M(I(b),a,c,e);return f}function g(a,b,c,e){var f=d._charsWritten=M(J(b),a,c,e);return f}function h(a,b,c,d){return g(a,b,c,d)}function i(a,b,c,e){var f=d._charsWritten=M(L(b),a,c,e);return f}function j(a,b,c,e){var f=d._charsWritten=M(K(b),a,c,e);return f}function k(a,b,c){return S.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function l(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=N(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+N(e)}function m(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function n(a,b,c){return m(a,b,c)}function o(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=H(a[f]);return e}function p(a,b,c){for(var d=a.slice(b,c),e="",f=0;f=e)){var f;return c?(f=a[b],e>b+1&&(f|=a[b+1]<<8)):(f=a[b]<<8,e>b+1&&(f|=a[b+1])),f}}function r(a,b,c,d){d||(R("boolean"==typeof c,"missing or invalid endian"),R(void 0!==b&&null!==b,"missing offset"),R(b+3=e)){var f;return c?(e>b+2&&(f=a[b+2]<<16),e>b+1&&(f|=a[b+1]<<8),f|=a[b],e>b+3&&(f+=a[b+3]<<24>>>0)):(e>b+1&&(f=a[b+1]<<16),e>b+2&&(f|=a[b+2]<<8),e>b+3&&(f|=a[b+3]),f+=a[b]<<24>>>0),f}}function s(a,b,c,d){d||(R("boolean"==typeof c,"missing or invalid endian"),R(void 0!==b&&null!==b,"missing offset"),R(b+1=e)){var f=q(a,b,c,!0),g=32768&f;return g?-1*(65535-f+1):f}}function t(a,b,c,d){d||(R("boolean"==typeof c,"missing or invalid endian"),R(void 0!==b&&null!==b,"missing offset"),R(b+3=e)){var f=r(a,b,c,!0),g=2147483648&f;return g?-1*(4294967295-f+1):f}}function u(a,b,c,d){return d||(R("boolean"==typeof c,"missing or invalid endian"),R(b+3=f))for(var g=0,h=Math.min(f-c,2);h>g;g++)a[c+g]=(b&255<<8*(d?g:1-g))>>>8*(d?g:1-g)}function x(a,b,c,d,e){e||(R(void 0!==b&&null!==b,"missing value"),R("boolean"==typeof d,"missing or invalid endian"),R(void 0!==c&&null!==c,"missing offset"),R(c+3=f))for(var g=0,h=Math.min(f-c,4);h>g;g++)a[c+g]=b>>>8*(d?g:3-g)&255}function y(a,b,c,d,e){e||(R(void 0!==b&&null!==b,"missing value"),R("boolean"==typeof d,"missing or invalid endian"),R(void 0!==c&&null!==c,"missing offset"),R(c+1=f||(b>=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e))}function z(a,b,c,d,e){e||(R(void 0!==b&&null!==b,"missing value"),R("boolean"==typeof d,"missing or invalid endian"),R(void 0!==c&&null!==c,"missing offset"),R(c+3=f||(b>=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e))}function A(a,b,c,d,e){e||(R(void 0!==b&&null!==b,"missing value"),R("boolean"==typeof d,"missing or invalid endian"),R(void 0!==c&&null!==c,"missing offset"),R(c+3=f||T.write(a,b,c,d,23,4)}function B(a,b,c,d,e){e||(R(void 0!==b&&null!==b,"missing value"),R("boolean"==typeof d,"missing or invalid endian"),R(void 0!==c&&null!==c,"missing offset"),R(c+7=f||T.write(a,b,c,d,52,8)}function C(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function D(a,b,c){return"number"!=typeof a?c:(a=~~a,a>=b?b:a>=0?a:(a+=b,a>=0?a:0))}function E(a){return a=~~Math.ceil(+a),0>a?0:a}function F(a){return(Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)})(a)}function G(a){return F(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function H(a){return 16>a?"0"+a.toString(16):a.toString(16)}function I(a){for(var b=[],c=0;c=d)b.push(a.charCodeAt(c));else{var e=c;d>=55296&&57343>=d&&c++;for(var f=encodeURIComponent(a.slice(e,c+1)).substr(1).split("%"),g=0;g>8,d=b%256,e.push(d),e.push(c);return e}function L(a){return S.toByteArray(a)}function M(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function N(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function O(a,b){R("number"==typeof a,"cannot write a non-number as a number"),R(a>=0,"specified a negative value for writing an unsigned value"),R(b>=a,"value is larger than maximum value for type"),R(Math.floor(a)===a,"value has a fractional component")}function P(a,b,c){R("number"==typeof a,"cannot write a non-number as a number"),R(b>=a,"value larger than maximum allowed value"),R(a>=c,"value smaller than minimum allowed value"),R(Math.floor(a)===a,"value has a fractional component")}function Q(a,b,c){R("number"==typeof a,"cannot write a non-number as a number"),R(b>=a,"value larger than maximum allowed value"),R(a>=c,"value smaller than minimum allowed value")}function R(a,b){if(!a)throw new Error(b||"Failed assertion")}var S=a("base64-js"),T=a("ieee754");c.Buffer=d,c.SlowBuffer=d,c.INSPECT_MAX_BYTES=50,d.poolSize=8192,d._useTypedArrays=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);return b.foo=function(){return 42},42===b.foo()&&"function"==typeof b.subarray}catch(c){return!1}}(),d.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(a){return!(null===a||void 0===a||!a._isBuffer)},d.byteLength=function(a,b){var c;switch(a+="",b||"utf8"){case"hex":c=a.length/2;break;case"utf8":case"utf-8":c=I(a).length;break;case"ascii":case"binary":case"raw":c=a.length;break;case"base64":c=L(a).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=2*a.length;break;default:throw new Error("Unknown encoding")}return c},d.concat=function(a,b){if(R(F(a),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===a.length)return new d(0);if(1===a.length)return a[0];var c;if("number"!=typeof b)for(b=0,c=0;cl&&(c=l)):c=l,d=String(d||"utf8").toLowerCase();var m;switch(d){case"hex":m=e(this,a,b,c);break;case"utf8":case"utf-8":m=f(this,a,b,c);break;case"ascii":m=g(this,a,b,c);break;case"binary":m=h(this,a,b,c);break;case"base64":m=i(this,a,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=j(this,a,b,c);break;default:throw new Error("Unknown encoding")}return m},d.prototype.toString=function(a,b,c){var d=this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0!==c?Number(c):c=d.length,c===b)return"";var e;switch(a){case"hex":e=o(d,b,c);break;case"utf8":case"utf-8":e=l(d,b,c);break;case"ascii":e=m(d,b,c);break;case"binary":e=n(d,b,c);break;case"base64":e=k(d,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=p(d,b,c);break;default:throw new Error("Unknown encoding")}return e},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.copy=function(a,b,c,e){var f=this;if(c||(c=0),e||0===e||(e=this.length),b||(b=0),e!==c&&0!==a.length&&0!==f.length){R(e>=c,"sourceEnd < sourceStart"),R(b>=0&&b=0&&c=0&&e<=f.length,"sourceEnd out of bounds"),e>this.length&&(e=this.length),a.length-bg||!d._useTypedArrays)for(var h=0;g>h;h++)a[h+b]=this[h+c];else a._set(this.subarray(c,c+g),b)}},d.prototype.slice=function(a,b){var c=this.length;if(a=D(a,c,0),b=D(b,c,c),d._useTypedArrays)return d._augment(this.subarray(a,b));for(var e=b-a,f=new d(e,void 0,!0),g=0;e>g;g++)f[g]=this[g+a];return f},d.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},d.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},d.prototype.readUInt8=function(a,b){return b||(R(void 0!==a&&null!==a,"missing offset"),R(a=this.length?void 0:this[a]},d.prototype.readUInt16LE=function(a,b){return q(this,a,!0,b)},d.prototype.readUInt16BE=function(a,b){return q(this,a,!1,b)},d.prototype.readUInt32LE=function(a,b){return r(this,a,!0,b)},d.prototype.readUInt32BE=function(a,b){return r(this,a,!1,b)},d.prototype.readInt8=function(a,b){if(b||(R(void 0!==a&&null!==a,"missing offset"),R(a=this.length)){var c=128&this[a];return c?-1*(255-this[a]+1):this[a]}},d.prototype.readInt16LE=function(a,b){return s(this,a,!0,b)},d.prototype.readInt16BE=function(a,b){return s(this,a,!1,b)},d.prototype.readInt32LE=function(a,b){return t(this,a,!0,b)},d.prototype.readInt32BE=function(a,b){return t(this,a,!1,b)},d.prototype.readFloatLE=function(a,b){return u(this,a,!0,b)},d.prototype.readFloatBE=function(a,b){return u(this,a,!1,b)},d.prototype.readDoubleLE=function(a,b){return v(this,a,!0,b)},d.prototype.readDoubleBE=function(a,b){return v(this,a,!1,b)},d.prototype.writeUInt8=function(a,b,c){c||(R(void 0!==a&&null!==a,"missing value"),R(void 0!==b&&null!==b,"missing offset"),R(b=this.length||(this[b]=a)},d.prototype.writeUInt16LE=function(a,b,c){w(this,a,b,!0,c)},d.prototype.writeUInt16BE=function(a,b,c){w(this,a,b,!1,c)},d.prototype.writeUInt32LE=function(a,b,c){x(this,a,b,!0,c)},d.prototype.writeUInt32BE=function(a,b,c){x(this,a,b,!1,c)},d.prototype.writeInt8=function(a,b,c){c||(R(void 0!==a&&null!==a,"missing value"),R(void 0!==b&&null!==b,"missing offset"),R(b=this.length||(a>=0?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c))},d.prototype.writeInt16LE=function(a,b,c){y(this,a,b,!0,c)},d.prototype.writeInt16BE=function(a,b,c){y(this,a,b,!1,c)},d.prototype.writeInt32LE=function(a,b,c){z(this,a,b,!0,c)},d.prototype.writeInt32BE=function(a,b,c){z(this,a,b,!1,c)},d.prototype.writeFloatLE=function(a,b,c){A(this,a,b,!0,c)},d.prototype.writeFloatBE=function(a,b,c){A(this,a,b,!1,c)},d.prototype.writeDoubleLE=function(a,b,c){B(this,a,b,!0,c)},d.prototype.writeDoubleBE=function(a,b,c){B(this,a,b,!1,c)},d.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),"string"==typeof a&&(a=a.charCodeAt(0)),R("number"==typeof a&&!isNaN(a),"value is not a number"),R(c>=b,"end < start"),c!==b&&0!==this.length){R(b>=0&&b=0&&c<=this.length,"end out of bounds");for(var d=b;c>d;d++)this[d]=a}},d.prototype.inspect=function(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=H(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},d.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(d._useTypedArrays)return new d(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var U=d.prototype;d._augment=function(a){return a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=U.get,a.set=U.set,a.write=U.write,a.toString=U.toString,a.toLocaleString=U.toString,a.toJSON=U.toJSON,a.copy=U.copy,a.slice=U.slice,a.readUInt8=U.readUInt8,a.readUInt16LE=U.readUInt16LE,a.readUInt16BE=U.readUInt16BE,a.readUInt32LE=U.readUInt32LE,a.readUInt32BE=U.readUInt32BE,a.readInt8=U.readInt8,a.readInt16LE=U.readInt16LE,a.readInt16BE=U.readInt16BE,a.readInt32LE=U.readInt32LE,a.readInt32BE=U.readInt32BE,a.readFloatLE=U.readFloatLE,a.readFloatBE=U.readFloatBE,a.readDoubleLE=U.readDoubleLE,a.readDoubleBE=U.readDoubleBE,a.writeUInt8=U.writeUInt8,a.writeUInt16LE=U.writeUInt16LE,a.writeUInt16BE=U.writeUInt16BE,a.writeUInt32LE=U.writeUInt32LE,a.writeUInt32BE=U.writeUInt32BE,a.writeInt8=U.writeInt8,a.writeInt16LE=U.writeInt16LE,a.writeInt16BE=U.writeInt16BE,a.writeInt32LE=U.writeInt32LE,a.writeInt32BE=U.writeInt32BE,a.writeFloatLE=U.writeFloatLE,a.writeFloatBE=U.writeFloatBE,a.writeDoubleLE=U.writeDoubleLE,a.writeDoubleBE=U.writeDoubleBE,a.fill=U.fill,a.inspect=U.inspect,a.toArrayBuffer=U.toArrayBuffer,a}},{"base64-js":4,ieee754:5}],4:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g?62:b===h?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],5:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],6:[function(a,b){function c(a,b){if(a.length%g!==0){var c=a.length+(g-a.length%g);a=f.concat([a,h],c)}for(var d=[],e=b?a.readInt32BE:a.readInt32LE,i=0;in?b=a(b):b.lengthf;f++)d[f]=54^b[f],e[f]=92^b[f];var g=a(h.concat([d,c]));return a(h.concat([e,g]))}function e(a,b){a=a||"sha1";var c=m[a],e=[],g=0;return c||f("algorithm:",a,"is not yet supported"),{update:function(a){return h.isBuffer(a)||(a=new h(a)),e.push(a),g+=a.length,this},digest:function(a){var f=h.concat(e),g=b?d(c,b,f):c(f);return e=null,a?g.toString(a):g}}}function f(){var a=[].slice.call(arguments).join(" ");throw new Error([a,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function g(a,b){for(var c in a)b(a[c],c)}var h=a("buffer").Buffer,i=a("./sha"),j=a("./sha256"),k=a("./rng"),l=a("./md5"),m={sha1:i,sha256:j,md5:l},n=64,o=new h(n);o.fill(0),c.createHash=function(a){return e(a)},c.createHmac=function(a,b){return e(a,b)},c.randomBytes=function(a,b){if(!b||!b.call)return new h(k(a));try{b.call(this,void 0,new h(k(a)))}catch(c){b(c)}},g(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(a){c[a]=function(){f("sorry,",a,"is not implemented yet")}})},{"./md5":8,"./rng":9,"./sha":10,"./sha256":11,buffer:3}],8:[function(a,b){function c(a,b){a[b>>5]|=128<>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,j=-1732584194,k=271733878,l=0;l>16)+(b>>16)+(c>>16);return d<<16|65535&c}function j(a,b){return a<>>32-b}var k=a("./helpers");b.exports=function(a){return k.hash(a,c,16)}},{"./helpers":6}],9:[function(a,b){!function(){var a,c,d=this;a=function(a){for(var b,b,c=new Array(a),d=0;a>d;d++)0==(3&d)&&(b=4294967296*Math.random()),c[d]=b>>>((3&d)<<3)&255;return c},d.crypto&&crypto.getRandomValues&&(c=function(a){var b=new Uint8Array(a);return crypto.getRandomValues(b),b}),b.exports=c||a}()},{}],10:[function(a,b){function c(a,b){a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var c=Array(80),h=1732584193,i=-271733879,j=-1732584194,k=271733878,l=-1009589776,m=0;ms;s++){c[s]=16>s?a[m+s]:g(c[s-3]^c[s-8]^c[s-14]^c[s-16],1); var t=f(f(g(h,5),d(s,i,j,k)),f(f(l,c[s]),e(s)));l=k,k=j,j=g(i,30),i=h,h=t}h=f(h,n),i=f(i,o),j=f(j,p),k=f(k,q),l=f(l,r)}return Array(h,i,j,k,l)}function d(a,b,c,d){return 20>a?b&c|~b&d:40>a?b^c^d:60>a?b&c|b&d|c&d:b^c^d}function e(a){return 20>a?1518500249:40>a?1859775393:60>a?-1894007588:-899497514}function f(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function g(a,b){return a<>>32-b}var h=a("./helpers");b.exports=function(a){return h.hash(a,c,20,!0)}},{"./helpers":6}],11:[function(a,b){var c=a("./helpers"),d=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},e=function(a,b){return a>>>b|a<<32-b},f=function(a,b){return a>>>b},g=function(a,b,c){return a&b^~a&c},h=function(a,b,c){return a&b^a&c^b&c},i=function(a){return e(a,2)^e(a,13)^e(a,22)},j=function(a){return e(a,6)^e(a,11)^e(a,25)},k=function(a){return e(a,7)^e(a,18)^f(a,3)},l=function(a){return e(a,17)^e(a,19)^f(a,10)},m=function(a,b){var c,e,f,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;rs;s++)x[s]=16>s?a[s+r]:d(d(d(l(x[s-2]),x[s-7]),k(x[s-15])),x[s-16]),t=d(d(d(d(q,j(n)),g(n,o,p)),v[s]),x[s]),u=d(i(c),h(c,e,f)),q=p,p=o,o=n,n=d(m,t),m=f,f=e,e=c,c=d(t,u);w[0]=d(c,w[0]),w[1]=d(e,w[1]),w[2]=d(f,w[2]),w[3]=d(m,w[3]),w[4]=d(n,w[4]),w[5]=d(o,w[5]),w[6]=d(p,w[6]),w[7]=d(q,w[7])}return w};b.exports=function(a){return c.hash(a,m,32,!0)}},{"./helpers":6}],12:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],13:[function(a,b){var c=b.exports,d=(a("events").EventEmitter,a("./lib/request")),e=a("url");c.request=function(a,b){"string"==typeof a&&(a=e.parse(a)),a||(a={}),a.host||a.port||(a.port=parseInt(window.location.port,10)),!a.host&&a.hostname&&(a.host=a.hostname),a.scheme||(a.scheme=window.location.protocol.split(":")[0]),a.host||(a.host=window.location.hostname||window.location.host),/:/.test(a.host)&&(a.port||(a.port=a.host.split(":")[1]),a.host=a.host.split(":")[0]),a.port||(a.port="https"==a.scheme?443:80);var c=new d(new f,a);return b&&c.on("response",b),c},c.get=function(a,b){a.method="GET";var d=c.request(a,b);return d.end(),d},c.Agent=function(){},c.Agent.defaultMaxSockets=4;var f=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var a=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],b=0;bthis.offset&&(this.emit("data",b.slice(this.offset)),this.offset=b.length))};var h=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{stream:25,util:34}],16:[function(a,b,c){!function(){function a(a){this.message=a}var b="undefined"!=typeof c?c:this,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.prototype=new Error,a.prototype.name="InvalidCharacterError",b.btoa||(b.btoa=function(b){for(var c,e,f=0,g=d,h="";b.charAt(0|f)||(g="=",f%1);h+=g.charAt(63&c>>8-f%1*8)){if(e=b.charCodeAt(f+=.75),e>255)throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");c=c<<8|e}return h}),b.atob||(b.atob=function(b){if(b=b.replace(/=+$/,""),b.length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var c,e,f=0,g=0,h="";e=b.charAt(g++);~e&&(c=f%4?64*c+e:e,f++%4)?h+=String.fromCharCode(255&c>>(-2*f&6)):0)e=d.indexOf(e);return h})}()},{}],17:[function(a,b){var c=a("http"),d=b.exports;for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);d.request=function(a,b){return a||(a={}),a.scheme="https",c.request.call(this,a,b)}},{http:13}],18:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],19:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],20:[function(a,b,c){(function(a){!function(d){function e(a){throw RangeError(H[a])}function f(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function g(a,b){return f(a.split(G),b).join(".")}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c,r="object"==typeof b&&b&&b.exports==q&&b,s="object"==typeof a&&a;(s.global===s||s.window===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^ -~]/,G=/\x2E|\u3002|\uFF0E|\uFF61/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.2.4",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&!q.nodeType)if(r)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],21:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],22:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],27:[function(a,b){function c(a){return this instanceof c?void d.call(this,a):new c(a)}b.exports=c;var d=a("./transform.js"),e=a("inherits");e(c,d),c.prototype._transform=function(a,b,c){c(null,a)}},{"./transform.js":29,inherits:18}],28:[function(a,b){(function(c){function d(b){b=b||{};var c=b.highWaterMark;this.highWaterMark=c||0===c?c:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!b.objectMode,this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(x||(x=a("string_decoder").StringDecoder),this.decoder=new x(b.encoding),this.encoding=b.encoding)}function e(a){return this instanceof e?(this._readableState=new d(a,this),this.readable=!0,void z.call(this)):new e(a)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(null===c||void 0===c)b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):(b.reading=!1,b.buffer.push(c)),b.needReadable&&l(a),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=D)a=D;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||null===a?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return A.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||c||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,b.length>0?l(a):u(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(b.emittedReadable=!0,b.sync?B(function(){m(a)}):m(a))}function m(a){a.emit("readable")}function n(a,b){b.readingMore||(b.readingMore=!0,B(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length0)return;return 0===d.pipesCount?(d.flowing=!1,void(y.listenerCount(a,"data")>0&&s(a))):void(d.ranOut=!0)}function r(){this._readableState.ranOut&&(this._readableState.ranOut=!1,q(this))}function s(a,b){var c=a._readableState;if(c.flowing)throw new Error("Cannot switch to old mode now.");var d=b||!1,e=!1;a.readable=!0,a.pipe=z.prototype.pipe,a.on=a.addListener=z.prototype.on,a.on("readable",function(){e=!0;for(var b;!d&&null!==(b=a.read());)a.emit("data",b);null===b&&(e=!1,a._readableState.needReadable=!0)}),a.pause=function(){d=!0,this.emit("pause")},a.resume=function(){d=!1,e?B(function(){a.emit("readable")}):this.read(0),this.emit("resume")},a.emit("readable")}function t(a,b){var c,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)return null;if(0===e)c=null;else if(g)c=d.shift();else if(!a||a>=e)c=f?d.join(""):A.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");!b.endEmitted&&b.calledRead&&(b.ended=!0,B(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e,e.ReadableState=d;var x,y=a("events").EventEmitter,z=a("./index.js"),A=a("buffer").Buffer,B=a("process/browser.js").nextTick,C=a("inherits");C(e,z),e.prototype.push=function(a,b){var c=this._readableState;return"string"!=typeof a||c.objectMode||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new A(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){x||(x=a("string_decoder").StringDecoder),this._readableState.decoder=new x(b),this._readableState.encoding=b};var D=8388608;e.prototype.read=function(a){var b=this._readableState;b.calledRead=!0;var c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;b.length-a<=b.highWaterMark&&(d=!0),(b.ended||b.reading)&&(d=!1),d&&(b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),d&&!b.reading&&(a=i(c,b));var e;return e=a>0?t(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),b.ended&&!b.endEmitted&&0===b.length&&u(this),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){a===k&&f()}function e(){a.end()}function f(){a.removeListener("close",h),a.removeListener("finish",i),a.removeListener("drain",o),a.removeListener("error",g),a.removeListener("unpipe",d),k.removeListener("end",e),k.removeListener("end",f),(!a._writableState||a._writableState.needDrain)&&o()}function g(b){j(),0===s&&0===y.listenerCount(a,"error")&&a.emit("error",b)}function h(){a.removeListener("finish",i),j()}function i(){a.removeListener("close",h),j()}function j(){k.unpipe(a)}var k=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=a;break;case 1:l.pipes=[l.pipes,a];break;default:l.pipes.push(a)}l.pipesCount+=1;var m=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,n=m?e:f;l.endEmitted?B(n):k.once("end",n),a.on("unpipe",d);var o=p(k);a.on("drain",o);var s=y.listenerCount(a,"error");return a.once("error",g),a.once("close",h),a.once("finish",i),a.emit("pipe",k),l.flowing||(this.on("readable",r),l.flowing=!0,B(function(){q(k)})),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=z.prototype.on.call(this,a,b);if("data"!==a||this._readableState.flowing||s(this),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):this.read(0))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){s(this),this.read(0),this.emit("resume")},e.prototype.pause=function(){s(this,!0),this.emit("pause")},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)"function"==typeof a[e]&&"undefined"==typeof this[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,function(a){return d.emit.apply(d,b,a)})}),d._read=function(){c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("FWaASH"))},{"./index.js":25,FWaASH:19,buffer:3,events:12,inherits:18,"process/browser.js":26,string_decoder:31}],29:[function(a,b){function c(a,b){this.afterTransform=function(a,c){return d(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,c,d),this.charReceived+=d-c,c=d,this.charReceived=55296&&56319>=e)){if(this.charReceived=this.charLength=0,d==a.length)return b;a=a.slice(d,a.length);break}this.charLength+=this.surrogateSize,b=""}var f=this.detectIncompleteChar(a),g=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-f,g),this.charReceived=f,g-=f),b+=a.toString(this.encoding,0,g);var g=b.length-1,e=b.charCodeAt(g);if(e>=55296&&56319>=e){var h=this.surrogateSize;return this.charLength+=h,this.charReceived+=h,this.charBuffer.copy(this.charBuffer,h,0,h),this.charBuffer.write(b.charAt(b.length-1),this.encoding),b.substring(0,g)}return b},i.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}return b},i.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:3}],32:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return i(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}function i(a){return"string"==typeof a}function j(a){return"object"==typeof a&&null!==a}function k(a){return null===a}function l(a){return null==a}var m=a("punycode");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,p=["<",">",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname=this.hostname.length>u?"":this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.path=c.search?"/"+c.search:null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:20,querystring:23}],33:[function(a,b){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],34:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a){return a}function h(a){var b={};return a.forEach(function(a){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?m(a,b,c,d,String(g),!0):"");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation?console.trace(e):console.error(e),g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var H,I={};c.debuglog=function(a){if(v(H)&&(H=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var d=b.pid;I[a]=function(){var b=c.format.apply(c,arguments);console.error("%s %d: %s",a,d,b)}}else I[a]=function(){};return I[a]},c.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("FWaASH"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":33,FWaASH:19,inherits:18}],35:[function(a,b,c){function d(a,b){if(!b)return a;var c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function e(a,b){if(!b)return a;var c;for(c in b)b.hasOwnProperty(c)&&("undefined"==typeof a[c]||null===a[c])&&(a[c]=b[c]);return a}function f(a,b,c,d,e,g,h){if(a==b)return a;if(!b)return a;var i,j,k=!1;if(h||(e={a:a},g="a"),c||(k=!0,c=[],d=[]),j=c.indexOf(b),-1!=j)return d[j][0][d[j][1]];c.push(b),d.push([e,g]);for(i in b)b.hasOwnProperty(i)&&("undefined"==typeof a[i]?"object"==typeof b[i]?b[i]instanceof Array?a[i]=f([],b[i],c,d,a,i,!0):null===b[i]?a[i]=null:b[i]instanceof Date?(a[i]=new b[i].constructor,a[i].setTime(b[i].getTime())):a[i]=f({},b[i],c,d,a,i,!0):a[i]=b[i]:a[i]="object"==typeof a[i]&&null!==a[i]?f(a[i],b[i],c,d,a,i,!0):b[i]);return k&&(c=null,d=null),h?a:(e=null,a)}function g(a,b,c,d,e,f,h,i){if(a==b)return a;if(!b)return a;var j,k=!1;if(i||(f={a:a},h="a"),d||(k=!0,d=[],e=[]),b_pos=d.indexOf(b),-1!=b_pos)return e[b_pos][0][e[b_pos][1]];d.push(b),e.push([f,h]);for(j in b)b.hasOwnProperty(j)&&("undefined"==typeof a[j]?"object"==typeof b[j]&&c>0?b[j]instanceof Array?a[j]=g([],b[j],c-1,d,e,a,j,!0):null===b[j]?a[j]=null:b[j]instanceof Date?(a[j]=new b[j].constructor,a[j].setTime(b[j].getTime())):a[j]=g({},b[j],c-1,d,e,a,j,!0):a[j]=b[j]:a[j]="object"==typeof a[j]&&null!==a[j]&&c>0?g(a[j],b[j],c-1,d,e,a,j,!0):b[j]);return k&&(d=null,e=null),i?a:(f=null,a)}function h(a){if("object"==typeof a){if(null===a)return null;if(a instanceof Array)return f([],a);if(a instanceof Date){var b=new a.constructor;return b.setTime(a.getTime()),b}return f({},a)}return a}function i(a,b){return"object"==typeof a?null===a?null:f(h(a),b):a}function j(a,b){return"object"==typeof a?null===a?null:a instanceof Array?g([],a,b):g({},a,b):a}function k(a,b,c){if(a){if("object"==typeof a&&a instanceof Array)return a.forEach(a,b,c);if(a)for(var d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d,a)===!1)break}}c.replace=d,c.add=e,c.extend=f,c.extenduptolevel=g,c.clone=h,c.cloneextend=i,c.cloneuptolevel=j,c.foreach=k},{}],36:[function(a,b){(function(a){var c=b.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var b,d,e,f,g,h=arguments[0],i=Array.prototype.slice.call(arguments,1);return i.forEach(function(i){if("object"==typeof i)for(b in i)b in i&&(e=h[b],d=i[b],d!==h&&("object"==typeof d&&null!==d?d instanceof a?(g=new a(d.length),d.copy(g),h[b]=g):d instanceof Date?h[b]=new Date(d.getTime()):"object"==typeof e&&null!==e?(f=Array.isArray(d)?Array.isArray(e)?e:[]:Array.isArray(e)?{}:e,h[b]=c(f,d)):(f=Array.isArray(d)?[]:{},h[b]=c(f,d)):h[b]=d))}),h}}).call(this,a("buffer").Buffer)},{buffer:3}],37:[function(a,b,c){!function(){function a(){this._events={},this._conf&&b.call(this,this._conf)}function b(a){a&&(this._conf=a,a.delimiter&&(this.delimiter=a.delimiter),a.maxListeners&&(this._events.maxListeners=a.maxListeners),a.wildcard&&(this.wildcard=a.wildcard),a.newListener&&(this.newListener=a.newListener),this.wildcard&&(this.listenerTree={}))}function d(a){this._events={},this.newListener=!1,b.call(this,a)}function e(a,b,c,d){if(!c)return[];var f,g,h,i,j,k,l,m=[],n=b.length,o=b[d],p=b[d+1];if(d===n&&c._listeners){if("function"==typeof c._listeners)return a&&a.push(c._listeners),[c];for(f=0,g=c._listeners.length;g>f;f++)a&&a.push(c._listeners[f]);return[c]}if("*"===o||"**"===o||c[o]){if("*"===o){for(h in c)"_listeners"!==h&&c.hasOwnProperty(h)&&(m=m.concat(e(a,b,c[h],d+1)));return m}if("**"===o){l=d+1===n||d+2===n&&"*"===p,l&&c._listeners&&(m=m.concat(e(a,b,c,n)));for(h in c)"_listeners"!==h&&c.hasOwnProperty(h)&&("*"===h||"**"===h?(c[h]._listeners&&!l&&(m=m.concat(e(a,b,c[h],n))),m=m.concat(e(a,b,c[h],d))):m=m.concat(h===p?e(a,b,c[h],d+2):e(a,b,c[h],d)));return m}m=m.concat(e(a,b,c[o],d+1))}if(i=c["*"],i&&e(a,b,i,d+1),j=c["**"])if(n>d){j._listeners&&e(a,b,j,n);for(h in j)"_listeners"!==h&&j.hasOwnProperty(h)&&(h===p?e(a,b,j[h],d+2):h===o?e(a,b,j[h],d+1):(k={},k[h]=j[h],e(a,b,{"**":k},d+1)))}else j._listeners?e(a,b,j,n):j["*"]&&j["*"]._listeners&&e(a,b,j["*"],n);return m}function f(a,b){a="string"==typeof a?a.split(this.delimiter):a.slice();for(var c=0,d=a.length;d>c+1;c++)if("**"===a[c]&&"**"===a[c+1])return;for(var e=this.listenerTree,f=a.shift();f;){if(e[f]||(e[f]={}),e=e[f],0===a.length){if(e._listeners){if("function"==typeof e._listeners)e._listeners=[e._listeners,b];else if(g(e._listeners)&&(e._listeners.push(b),!e._listeners.warned)){var i=h;"undefined"!=typeof this._events.maxListeners&&(i=this._events.maxListeners),i>0&&e._listeners.length>i&&(e._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",e._listeners.length),console.trace())}}else e._listeners=b;return!0}f=a.shift()}return!0}var g=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},h=10;d.prototype.delimiter=".",d.prototype.setMaxListeners=function(b){this._events||a.call(this),this._events.maxListeners=b,this._conf||(this._conf={}),this._conf.maxListeners=b},d.prototype.event="",d.prototype.once=function(a,b){return this.many(a,1,b),this},d.prototype.many=function(a,b,c){function d(){0===--b&&e.off(a,d),c.apply(this,arguments)}var e=this;if("function"!=typeof c)throw new Error("many only accepts instances of Function");return d._origin=c,this.on(a,d),e},d.prototype.emit=function(){this._events||a.call(this);var b=arguments[0];if("newListener"===b&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var c=arguments.length,d=new Array(c-1),f=1;c>f;f++)d[f-1]=arguments[f];for(f=0,c=this._all.length;c>f;f++)this.event=b,this._all[f].apply(this,d)}if("error"===b&&!(this._all||this._events.error||this.wildcard&&this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var g;if(this.wildcard){g=[];var h="string"==typeof b?b.split(this.delimiter):b.slice();e.call(this,g,h,this.listenerTree,0)}else g=this._events[b];if("function"==typeof g){if(this.event=b,1===arguments.length)g.call(this);else if(arguments.length>1)switch(arguments.length){case 2:g.call(this,arguments[1]);break;case 3:g.call(this,arguments[1],arguments[2]);break;default:for(var c=arguments.length,d=new Array(c-1),f=1;c>f;f++)d[f-1]=arguments[f];g.apply(this,d)}return!0}if(g){for(var c=arguments.length,d=new Array(c-1),f=1;c>f;f++)d[f-1]=arguments[f];for(var i=g.slice(),f=0,c=i.length;c>f;f++)this.event=b,i[f].apply(this,d);return i.length>0||!!this._all}return!!this._all},d.prototype.on=function(b,c){if("function"==typeof b)return this.onAny(b),this;if("function"!=typeof c)throw new Error("on only accepts instances of Function");if(this._events||a.call(this),this.emit("newListener",b,c),this.wildcard)return f.call(this,b,c),this;if(this._events[b]){if("function"==typeof this._events[b])this._events[b]=[this._events[b],c];else if(g(this._events[b])&&(this._events[b].push(c),!this._events[b].warned)){var d=h;"undefined"!=typeof this._events.maxListeners&&(d=this._events.maxListeners),d>0&&this._events[b].length>d&&(this._events[b].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[b].length),console.trace())}}else this._events[b]=c;return this},d.prototype.onAny=function(a){if("function"!=typeof a)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(a),this},d.prototype.addListener=d.prototype.on,d.prototype.off=function(a,b){if("function"!=typeof b)throw new Error("removeListener only takes instances of Function");var c,d=[];if(this.wildcard){var f="string"==typeof a?a.split(this.delimiter):a.slice();d=e.call(this,null,f,this.listenerTree,0)}else{if(!this._events[a])return this;c=this._events[a],d.push({_listeners:c})}for(var h=0;hk;k++)if(c[k]===b||c[k].listener&&c[k].listener===b||c[k]._origin&&c[k]._origin===b){j=k;break}if(0>j)continue;return this.wildcard?i._listeners.splice(j,1):this._events[a].splice(j,1),0===c.length&&(this.wildcard?delete i._listeners:delete this._events[a]),this}(c===b||c.listener&&c.listener===b||c._origin&&c._origin===b)&&(this.wildcard?delete i._listeners:delete this._events[a])}return this},d.prototype.offAny=function(a){var b,c=0,d=0;if(a&&this._all&&this._all.length>0){for(b=this._all,c=0,d=b.length;d>c;c++)if(a===b[c])return b.splice(c,1),this}else this._all=[];return this},d.prototype.removeListener=d.prototype.off,d.prototype.removeAllListeners=function(b){if(0===arguments.length)return!this._events||a.call(this),this;if(this.wildcard)for(var c="string"==typeof b?b.split(this.delimiter):b.slice(),d=e.call(this,null,c,this.listenerTree,0),f=0;f=0)&&c(b,!e)}}),a("
").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function e(b,c,d,e){return a.each(f,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),e&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var f="Width"===d?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),h={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?h["inner"+d].call(this):this.each(function(){a(this).css(g,e(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return"number"!=typeof b?h["outer"+d].call(this,b):this.each(function(){a(this).css(g,e(this,b,!0,c)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a)) }),a("").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.support.selectstart="onselectstart"in document.createElement("div"),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c){var d,e=a.plugins[b];if(e&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(d=0;d0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)}})}(b)},{jquery:40}],39:[function(a){var b=a("jquery");a("./core"),function(a,b){function c(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.dpDiv=d(a("
"))}function d(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",function(){a.datepicker._isDisabledDatepicker(f.inline?b.parent()[0]:f.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&a(this).addClass("ui-datepicker-next-hover"))})}function e(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.10.4"}});var f,g="datepicker";a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return e(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var e=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:e,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?d(a("
")):this.dpDiv}},_connectDatepicker:function(b,c){var d=a(b);c.append=a([]),c.trigger=a([]),d.hasClass(this.markerClassName)||(this._attachments(d,c),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(c),a.data(b,g,c),c.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a(""+g+""),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),("focus"===d||"both"===d)&&b.focus(this._showDatepicker),("button"===d||"both"===d)&&(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("").addClass(this._triggerClass).html(f?a("").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;ec&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,c){var d=a(b);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(c.dpDiv),a.data(b,g,c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))},_dialogDatepicker:function(b,c,d,f,h){var i,j,k,l,m,n=this._dialogInst;return n||(this.uuid+=1,i="dp"+this.uuid,this._dialogInput=a(""),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),n=this._dialogInst=this._newInst(this._dialogInput,!1),n.settings={},a.data(this._dialogInput[0],g,n)),e(n.settings,f||{}),c=c&&c.constructor===Date?this._formatDate(n,c):c,this._dialogInput.val(c),this._pos=h?h.length?h:[h.pageX,h.pageY]:null,this._pos||(j=document.documentElement.clientWidth,k=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,m=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[j/2-100+l,k/2-150+m]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=d,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],g,n),this},_destroyDatepicker:function(b){var c,d=a(b),e=a.data(b,g);d.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),a.removeData(b,g),"input"===c?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===c||"span"===c)&&d.removeClass(this.markerClassName).empty())},_enableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,g);e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().removeClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,g);e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().addClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;bd||!c||c.indexOf(d)>-1):void 0},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(e){}return!0},_showDatepicker:function(b){if(b=b.target||b,"input"!==b.nodeName.toLowerCase()&&(b=a("input",b.parentNode)[0]),!a.datepicker._isDisabledDatepicker(b)&&a.datepicker._lastInput!==b){var c,d,f,g,h,i,j;c=a.datepicker._getInst(b),a.datepicker._curInst&&a.datepicker._curInst!==c&&(a.datepicker._curInst.dpDiv.stop(!0,!0),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),d=a.datepicker._get(c,"beforeShow"),f=d?d.apply(b,[b,c]):{},f!==!1&&(e(c.settings,f),c.lastVal=null,a.datepicker._lastInput=b,a.datepicker._setDateFromField(c),a.datepicker._inDialog&&(b.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]+=b.offsetHeight),g=!1,a(b).parents().each(function(){return g|="fixed"===a(this).css("position"),!g}),h={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,c.dpDiv.empty(),c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(c),h=a.datepicker._checkOffset(c,h,g),c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":g?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),c.inline||(i=a.datepicker._get(c,"showAnim"),j=a.datepicker._get(c,"duration"),c.dpDiv.zIndex(a(b).zIndex()+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[i]?c.dpDiv.show(i,a.datepicker._get(c,"showOptions"),j):c.dpDiv[i||"show"](i?j:null),a.datepicker._shouldFocusInput(c)&&c.input.focus(),a.datepicker._curInst=c))}},_updateDatepicker:function(b){this.maxRows=4,f=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b),b.dpDiv.find("."+this._dayOverClass+" a").mouseover();var c,d=this._getNumberOfMonths(b),e=d[1],g=17;b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),e>1&&b.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",g*e+"em"),b.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,d,e,f,h=this._curInst;!h||b&&h!==a.data(b,g)||this._datepickerShowing&&(c=this._get(h,"showAnim"),d=this._get(h,"duration"),e=function(){a.datepicker._tidyDialog(h)},a.effects&&(a.effects.effect[c]||a.effects[c])?h.dpDiv.hide(c,a.datepicker._get(h,"showOptions"),d,e):h.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1,f=this._get(h,"onClose"),f&&f.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id!==a.datepicker._mainDivId&&0===c.parents("#"+a.datepicker._mainDivId).length&&!c.hasClass(a.datepicker.markerClassName)&&!c.closest("."+a.datepicker._triggerClass).length&&a.datepicker._datepickerShowing&&(!a.datepicker._inDialog||!a.blockUI)||c.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!==d)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&6>b,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,h,i=0,j=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,k="string"!=typeof j?j:(new Date).getFullYear()%100+parseInt(j,10),l=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,m=(d?d.dayNames:null)||this._defaults.dayNames,n=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,o=(d?d.monthNames:null)||this._defaults.monthNames,p=-1,q=-1,r=-1,s=-1,t=!1,u=function(a){var c=e+1p&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(k>=p?0:-100)),s>-1)for(q=1,r=s;;){if(f=this._getDaysInMonth(p,q-1),f>=r)break;q++,r-=f}if(h=this._daylightSavingAdjust(new Date(p,q-1,r)),h.getFullYear()!==p||h.getMonth()+1!==q||h.getDate()!==r)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,ab=a.drawYear;if(0>_&&(_+=12,ab--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&Z>b?Z:b;this._daylightSavingAdjust(new Date(ab,_,1))>b;)_--,0>_&&(_=11,ab--);for(a.drawMonth=_,a.drawYear=ab,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(ab,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,ab,_)?"
"+c+"":S?"":""+c+"",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(ab,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,ab,_)?""+e+"":S?"":""+e+"",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"",j=R?"
"+(Q?i:"")+(this._isInRange(a,h)?"":"")+(Q?"":i)+"
":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="
"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,ab,Z,$,w>0||y>0,o,p)+"
",C=l?"":"",v=0;7>v;v++)D=(v+k)%7,C+="=5?" class='ui-datepicker-week-end'":"")+">"+n[D]+"";for(B+=C+"",E=this._getDaysInMonth(ab,_),ab===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(ab,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(ab,_,1-F)),J=0;H>J;J++){for(B+="",K=l?"":"",v=0;7>v;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&Z>I||$&&I>$,K+="",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I); -B+=K+""}_++,_>11&&(_=0,ab++),B+="
"+this._get(a,"weekHeader")+"
"+this._get(a,"calculateWeek")(I)+""+(M&&!r?" ":N?""+I.getDate()+"":""+I.getDate()+"")+"
"+(X?""+(U[0]>0&&y===U[1]-1?"
":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="
",u="";if(f||!q)u+=""+g[b]+"";else{for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+=""}if(s||(t+=u+(!f&&q&&r?"":" ")),!a.yearshtml)if(a.yearshtml="",f||!r)t+=""+c+"";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":" ")+u),t+="
"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),("M"===c||"Y"===c)&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&c>b?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));return 0>b&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new c,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.10.4"}(b)},{"./core":38,jquery:40}],40:[function(a,b){!function(a,c){"object"==typeof b&&"object"==typeof b.exports?b.exports=a.document?c(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return c(a)}:c(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(hb.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=ob[a]={};return _.each(a.match(nb)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+Math.random()}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ub,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:tb.test(c)?_.parseJSON(c):c}catch(e){}sb.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Kb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)rb.set(a[c],"globalEval",!b||rb.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(rb.hasData(a)&&(f=rb.access(a),g=rb.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sb.hasData(a)&&(h=sb.access(a),i=_.extend({},h),sb.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&yb.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Ob[a];return c||(c=t(a,b),"none"!==c&&c||(Nb=(Nb||_("