PageSourceSearch

https://cardioflourish.com/scripts.js

js cardioflourish.com collected 2026-10-07 02:06:23 UTC 2,390,407 bytes, 55,427 lines download raw bytes

vendor: 5,217 bytes, lines 1-194
1/*!
2 * jQuery JavaScript Library v3.5.1
3 * https://jquery.com/
4 *
5 * Includes Sizzle.js
6 * https://sizzlejs.com/
7 *
8 * Copyright JS Foundation and other contributors
9 * Released under the MIT license
10 * https://jquery.org/license
11 *
12 * Date: 2020-05-04T22:49Z
13 */
14( function( global, factory ) {
15
16	"use strict";
17
18	if ( typeof module === "object" && typeof module.exports === "object" ) {
19
20		// For CommonJS and CommonJS-like environments where a proper `window`
21		// is present, execute the factory and get jQuery.
22		// For environments that do not have a `window` with a `document`
23		// (such as Node.js), expose a factory as module.exports.
24		// This accentuates the need for the creation of a real `window`.
25		// e.g. var jQuery = require("jquery")(window);
26		// See ticket #14549 for more info.
27		module.exports = global.document ?
28			factory( global, true ) :
29			function( w ) {
30				if ( !w.document ) {
31					throw new Error( "jQuery requires a window with a document" );
32				}
33				return factory( w );
34			};
35	} else {
36		factory( global );
37	}
38
39// Pass this if window is not defined yet
40} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
41
42// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
43// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
44// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
45// enough that all such attempts are guarded in a try block.
46"use strict";
47
48var arr = [];
49
50var getProto = Object.getPrototypeOf;
51
52var slice = arr.slice;
53
54var flat = arr.flat ? function( array ) {
55	return arr.flat.call( array );
56} : function( array ) {
57	return arr.concat.apply( [], array );
58};
59
60
61var push = arr.push;
62
63var indexOf = arr.indexOf;
64
65var class2type = {};
66
67var toString = class2type.toString;
68
69var hasOwn = class2type.hasOwnProperty;
70
71var fnToString = hasOwn.toString;
72
73var ObjectFunctionString = fnToString.call( Object );
74
75var support = {};
76
77var isFunction = function isFunction( obj ) {
78
79      // Support: Chrome <=57, Firefox <=52
80      // In some browsers, typeof returns "function" for HTML <object> elements
81      // (i.e., `typeof document.createElement( "object" ) === "function"`).
82      // We don't want to classify *any* DOM node as a function.
83      return typeof obj === "function" && typeof obj.nodeType !== "number";
84  };
85
86
87var isWindow = function isWindow( obj ) {
88		return obj != null && obj === obj.window;
89	};
90
91
92var document = window.document;
93
94
95
96	var preservedScriptAttributes = {
97		type: true,
98		src: true,
99		nonce: true,
100		noModule: true
101	};
102
103	function DOMEval( code, node, doc ) {
104		doc = doc || document;
105
106		var i, val,
107			script = doc.createElement( "script" );
108
109		script.text = code;
110		if ( node ) {
111			for ( i in preservedScriptAttributes ) {
112
113				// Support: Firefox 64+, Edge 18+
114				// Some browsers don't support the "nonce" property on scripts.
115				// On the other hand, just using `getAttribute` is not enough as
116				// the `nonce` attribute is reset to an empty string whenever it
117				// becomes browsing-context connected.
118				// See https://github.com/whatwg/html/issues/2369
119				// See https://html.spec.whatwg.org/#nonce-attributes
120				// The `node.getAttribute` check was added for the sake of
121				// `jQuery.globalEval` so that it can fake a nonce-containing node
122				// via an object.
123				val = node[ i ] || node.getAttribute && node.getAttribute( i );
124				if ( val ) {
125					script.setAttribute( i, val );
126				}
127			}
128		}
129		doc.head.appendChild( script ).parentNode.removeChild( script );
130	}
131
132
133function toType( obj ) {
134	if ( obj == null ) {
135		return obj + "";
136	}
137
138	// Support: Android <=2.3 only (functionish RegExp)
139	return typeof obj === "object" || typeof obj === "function" ?
140		class2type[ toString.call( obj ) ] || "object" :
141		typeof obj;
142}
143/* global Symbol */
144// Defining this global in .eslintrc.json would create a danger of using the global
145// unguarded in another place, it seems safer to define global only for this module
146
147
148
149var
150	version = "3.5.1",
151
152	// Define a local copy of jQuery
153	jQuery = function( selector, context ) {
154
155		// The jQuery object is actually just the init constructor 'enhanced'
156		// Need init if jQuery is called (just allow error to be thrown if not included)
157		return new jQuery.fn.init( selector, context );
158	};
159
160jQuery.fn = jQuery.prototype = {
161
162	// The current version of jQuery being used
163	jquery: version,
164
165	constructor: jQuery,
166
167	// The default length of a jQuery object is 0
168	length: 0,
169
170	toArray: function() {
171		return slice.call( this );
172	},
173
174	// Get the Nth element in the matched element set OR
175	// Get the whole matched element set as a clean array
176	get: function( num ) {
177
178		// Return all the elements in a clean array
179		if ( num == null ) {
180			return slice.call( this );
181		}
182
183		// Return just the one element from the set
184		return num < 0 ? this[ num + this.length ] : this[ num ];
185	},
186
187	// Take an array of elements and push it onto the stack
188	// (returning the new matched element set)
189	pushStack: function( elems ) {
190
191		// Build a new jQuery matched element set
192		var ret = jQuery.merge( this.constructor(), elems );
193
194		// Add the old object onto the stack (as a reference)
vendor: 6,004 bytes, lines 195-465
195		ret.prevObject = this;
196
197		// Return the newly-formed element set
198		return ret;
199	},
200
201	// Execute a callback for every element in the matched set.
202	each: function( callback ) {
203		return jQuery.each( this, callback );
204	},
205
206	map: function( callback ) {
207		return this.pushStack( jQuery.map( this, function( elem, i ) {
208			return callback.call( elem, i, elem );
209		} ) );
210	},
211
212	slice: function() {
213		return this.pushStack( slice.apply( this, arguments ) );
214	},
215
216	first: function() {
217		return this.eq( 0 );
218	},
219
220	last: function() {
221		return this.eq( -1 );
222	},
223
224	even: function() {
225		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
226			return ( i + 1 ) % 2;
227		} ) );
228	},
229
230	odd: function() {
231		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
232			return i % 2;
233		} ) );
234	},
235
236	eq: function( i ) {
237		var len = this.length,
238			j = +i + ( i < 0 ? len : 0 );
239		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
240	},
241
242	end: function() {
243		return this.prevObject || this.constructor();
244	},
245
246	// For internal use only.
247	// Behaves like an Array's method, not like a jQuery method.
248	push: push,
249	sort: arr.sort,
250	splice: arr.splice
251};
252
253jQuery.extend = jQuery.fn.extend = function() {
254	var options, name, src, copy, copyIsArray, clone,
255		target = arguments[ 0 ] || {},
256		i = 1,
257		length = arguments.length,
258		deep = false;
259
260	// Handle a deep copy situation
261	if ( typeof target === "boolean" ) {
262		deep = target;
263
264		// Skip the boolean and the target
265		target = arguments[ i ] || {};
266		i++;
267	}
268
269	// Handle case when target is a string or something (possible in deep copy)
270	if ( typeof target !== "object" && !isFunction( target ) ) {
271		target = {};
272	}
273
274	// Extend jQuery itself if only one argument is passed
275	if ( i === length ) {
276		target = this;
277		i--;
278	}
279
280	for ( ; i < length; i++ ) {
281
282		// Only deal with non-null/undefined values
283		if ( ( options = arguments[ i ] ) != null ) {
284
285			// Extend the base object
286			for ( name in options ) {
287				copy = options[ name ];
288
289				// Prevent Object.prototype pollution
290				// Prevent never-ending loop
291				if ( name === "__proto__" || target === copy ) {
292					continue;
293				}
294
295				// Recurse if we're merging plain objects or arrays
296				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
297					( copyIsArray = Array.isArray( copy ) ) ) ) {
298					src = target[ name ];
299
300					// Ensure proper type for the source value
301					if ( copyIsArray && !Array.isArray( src ) ) {
302						clone = [];
303					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
304						clone = {};
305					} else {
306						clone = src;
307					}
308					copyIsArray = false;
309
310					// Never move original objects, clone them
311					target[ name ] = jQuery.extend( deep, clone, copy );
312
313				// Don't bring in undefined values
314				} else if ( copy !== undefined ) {
315					target[ name ] = copy;
316				}
317			}
318		}
319	}
320
321	// Return the modified object
322	return target;
323};
324
325jQuery.extend( {
326
327	// Unique for each copy of jQuery on the page
328	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
329
330	// Assume jQuery is ready without the ready module
331	isReady: true,
332
333	error: function( msg ) {
334		throw new Error( msg );
335	},
336
337	noop: function() {},
338
339	isPlainObject: function( obj ) {
340		var proto, Ctor;
341
342		// Detect obvious negatives
343		// Use toString instead of jQuery.type to catch host objects
344		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
345			return false;
346		}
347
348		proto = getProto( obj );
349
350		// Objects with no prototype (e.g., `Object.create( null )`) are plain
351		if ( !proto ) {
352			return true;
353		}
354
355		// Objects with prototype are plain iff they were constructed by a global Object function
356		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
357		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
358	},
359
360	isEmptyObject: function( obj ) {
361		var name;
362
363		for ( name in obj ) {
364			return false;
365		}
366		return true;
367	},
368
369	// Evaluates a script in a provided context; falls back to the global one
370	// if not specified.
371	globalEval: function( code, options, doc ) {
372		DOMEval( code, { nonce: options && options.nonce }, doc );
373	},
374
375	each: function( obj, callback ) {
376		var length, i = 0;
377
378		if ( isArrayLike( obj ) ) {
379			length = obj.length;
380			for ( ; i < length; i++ ) {
381				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
382					break;
383				}
384			}
385		} else {
386			for ( i in obj ) {
387				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
388					break;
389				}
390			}
391		}
392
393		return obj;
394	},
395
396	// results is for internal usage only
397	makeArray: function( arr, results ) {
398		var ret = results || [];
399
400		if ( arr != null ) {
401			if ( isArrayLike( Object( arr ) ) ) {
402				jQuery.merge( ret,
403					typeof arr === "string" ?
404					[ arr ] : arr
405				);
406			} else {
407				push.call( ret, arr );
408			}
409		}
410
411		return ret;
412	},
413
414	inArray: function( elem, arr, i ) {
415		return arr == null ? -1 : indexOf.call( arr, elem, i );
416	},
417
418	// Support: Android <=4.0 only, PhantomJS 1 only
419	// push.apply(_, arraylike) throws on ancient WebKit
420	merge: function( first, second ) {
421		var len = +second.length,
422			j = 0,
423			i = first.length;
424
425		for ( ; j < len; j++ ) {
426			first[ i++ ] = second[ j ];
427		}
428
429		first.length = i;
430
431		return first;
432	},
433
434	grep: function( elems, callback, invert ) {
435		var callbackInverse,
436			matches = [],
437			i = 0,
438			length = elems.length,
439			callbackExpect = !invert;
440
441		// Go through the array, only saving the items
442		// that pass the validator function
443		for ( ; i < length; i++ ) {
444			callbackInverse = !callback( elems[ i ], i );
445			if ( callbackInverse !== callbackExpect ) {
446				matches.push( elems[ i ] );
447			}
448		}
449
450		return matches;
451	},
452
453	// arg is for internal usage only
454	map: function( elems, callback, arg ) {
455		var length, value,
456			i = 0,
457			ret = [];
458
459		// Go through the array, translating each of the items to their new values
460		if ( isArrayLike( elems ) ) {
461			length = elems.length;
462			for ( ; i < length; i++ ) {
463				value = callback( elems[ i ], i, arg );
464
465				if ( value != null ) {
vendor: 1,491 bytes, lines 466-528
466					ret.push( value );
467				}
468			}
469
470		// Go through every key on the object,
471		} else {
472			for ( i in elems ) {
473				value = callback( elems[ i ], i, arg );
474
475				if ( value != null ) {
476					ret.push( value );
477				}
478			}
479		}
480
481		// Flatten any nested arrays
482		return flat( ret );
483	},
484
485	// A global GUID counter for objects
486	guid: 1,
487
488	// jQuery.support is not used in Core but other projects attach their
489	// properties to it so it needs to exist.
490	support: support
491} );
492
493if ( typeof Symbol === "function" ) {
494	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
495}
496
497// Populate the class2type map
498jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
499function( _i, name ) {
500	class2type[ "[object " + name + "]" ] = name.toLowerCase();
501} );
502
503function isArrayLike( obj ) {
504
505	// Support: real iOS 8.2 only (not reproducible in simulator)
506	// `in` check used to prevent JIT error (gh-2145)
507	// hasOwn isn't used here due to false negatives
508	// regarding Nodelist length in IE
509	var length = !!obj && "length" in obj && obj.length,
510		type = toType( obj );
511
512	if ( isFunction( obj ) || isWindow( obj ) ) {
513		return false;
514	}
515
516	return type === "array" || length === 0 ||
517		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
518}
519var Sizzle =
520/*!
521 * Sizzle CSS Selector Engine v2.3.5
522 * https://sizzlejs.com/
523 *
524 * Copyright JS Foundation and other contributors
525 * Released under the MIT license
526 * https://js.foundation/
527 *
528 * Date: 2020-03-14
vendor: 16,386 bytes, lines 528-1111
528
529 */
530( function( window ) {
531var i,
532	support,
533	Expr,
534	getText,
535	isXML,
536	tokenize,
537	compile,
538	select,
539	outermostContext,
540	sortInput,
541	hasDuplicate,
542
543	// Local document vars
544	setDocument,
545	document,
546	docElem,
547	documentIsHTML,
548	rbuggyQSA,
549	rbuggyMatches,
550	matches,
551	contains,
552
553	// Instance-specific data
554	expando = "sizzle" + 1 * new Date(),
555	preferredDoc = window.document,
556	dirruns = 0,
557	done = 0,
558	classCache = createCache(),
559	tokenCache = createCache(),
560	compilerCache = createCache(),
561	nonnativeSelectorCache = createCache(),
562	sortOrder = function( a, b ) {
563		if ( a === b ) {
564			hasDuplicate = true;
565		}
566		return 0;
567	},
568
569	// Instance methods
570	hasOwn = ( {} ).hasOwnProperty,
571	arr = [],
572	pop = arr.pop,
573	pushNative = arr.push,
574	push = arr.push,
575	slice = arr.slice,
576
577	// Use a stripped-down indexOf as it's faster than native
578	// https://jsperf.com/thor-indexof-vs-for/5
579	indexOf = function( list, elem ) {
580		var i = 0,
581			len = list.length;
582		for ( ; i < len; i++ ) {
583			if ( list[ i ] === elem ) {
584				return i;
585			}
586		}
587		return -1;
588	},
589
590	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
591		"ismap|loop|multiple|open|readonly|required|scoped",
592
593	// Regular expressions
594
595	// http://www.w3.org/TR/css3-selectors/#whitespace
596	whitespace = "[\\x20\\t\\r\\n\\f]",
597
598	// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
599	identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
600		"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
601
602	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
603	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
604
605		// Operator (capture 2)
606		"*([*^$|!~]?=)" + whitespace +
607
608		// "Attribute values must be CSS identifiers [capture 5]
609		// or strings [capture 3 or capture 4]"
610		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
611		whitespace + "*\\]",
612
613	pseudos = ":(" + identifier + ")(?:\\((" +
614
615		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
616		// 1. quoted (capture 3; capture 4 or capture 5)
617		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
618
619		// 2. simple (capture 6)
620		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
621
622		// 3. anything else (capture 2)
623		".*" +
624		")\\)|)",
625
626	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
627	rwhitespace = new RegExp( whitespace + "+", "g" ),
628	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
629		whitespace + "+$", "g" ),
630
631	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
632	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
633		"*" ),
634	rdescend = new RegExp( whitespace + "|>" ),
635
636	rpseudo = new RegExp( pseudos ),
637	ridentifier = new RegExp( "^" + identifier + "$" ),
638
639	matchExpr = {
640		"ID": new RegExp( "^#(" + identifier + ")" ),
641		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
642		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
643		"ATTR": new RegExp( "^" + attributes ),
644		"PSEUDO": new RegExp( "^" + pseudos ),
645		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
646			whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
647			whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
648		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
649
650		// For use in libraries implementing .is()
651		// We use this for POS matching in `select`
652		"needsContext": new RegExp( "^" + whitespace +
653			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
654			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
655	},
656
657	rhtml = /HTML$/i,
658	rinputs = /^(?:input|select|textarea|button)$/i,
659	rheader = /^h\d$/i,
660
661	rnative = /^[^{]+\{\s*\[native \w/,
662
663	// Easily-parseable/retrievable ID or TAG or CLASS selectors
664	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
665
666	rsibling = /[+~]/,
667
668	// CSS escapes
669	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
670	runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
671	funescape = function( escape, nonHex ) {
672		var high = "0x" + escape.slice( 1 ) - 0x10000;
673
674		return nonHex ?
675
676			// Strip the backslash prefix from a non-hex escape sequence
677			nonHex :
678
679			// Replace a hexadecimal escape sequence with the encoded Unicode code point
680			// Support: IE <=11+
681			// For values outside the Basic Multilingual Plane (BMP), manually construct a
682			// surrogate pair
683			high < 0 ?
684				String.fromCharCode( high + 0x10000 ) :
685				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
686	},
687
688	// CSS string/identifier serialization
689	// https://drafts.csswg.org/cssom/#common-serializing-idioms
690	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
691	fcssescape = function( ch, asCodePoint ) {
692		if ( asCodePoint ) {
693
694			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
695			if ( ch === "\0" ) {
696				return "\uFFFD";
697			}
698
699			// Control characters and (dependent upon position) numbers get escaped as code points
700			return ch.slice( 0, -1 ) + "\\" +
701				ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
702		}
703
704		// Other potentially-special ASCII characters get backslash-escaped
705		return "\\" + ch;
706	},
707
708	// Used for iframes
709	// See setDocument()
710	// Removing the function wrapper causes a "Permission Denied"
711	// error in IE
712	unloadHandler = function() {
713		setDocument();
714	},
715
716	inDisabledFieldset = addCombinator(
717		function( elem ) {
718			return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
719		},
720		{ dir: "parentNode", next: "legend" }
721	);
722
723// Optimize for push.apply( _, NodeList )
724try {
725	push.apply(
726		( arr = slice.call( preferredDoc.childNodes ) ),
727		preferredDoc.childNodes
728	);
729
730	// Support: Android<4.0
731	// Detect silently failing push.apply
732	// eslint-disable-next-line no-unused-expressions
733	arr[ preferredDoc.childNodes.length ].nodeType;
734} catch ( e ) {
735	push = { apply: arr.length ?
736
737		// Leverage slice if possible
738		function( target, els ) {
739			pushNative.apply( target, slice.call( els ) );
740		} :
741
742		// Support: IE<9
743		// Otherwise append directly
744		function( target, els ) {
745			var j = target.length,
746				i = 0;
747
748			// Can't trust NodeList.length
749			while ( ( target[ j++ ] = els[ i++ ] ) ) {}
750			target.length = j - 1;
751		}
752	};
753}
754
755function Sizzle( selector, context, results, seed ) {
756	var m, i, elem, nid, match, groups, newSelector,
757		newContext = context && context.ownerDocument,
758
759		// nodeType defaults to 9, since context defaults to document
760		nodeType = context ? context.nodeType : 9;
761
762	results = results || [];
763
764	// Return early from calls with invalid selector or context
765	if ( typeof selector !== "string" || !selector ||
766		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
767
768		return results;
769	}
770
771	// Try to shortcut find operations (as opposed to filters) in HTML documents
772	if ( !seed ) {
773		setDocument( context );
774		context = context || document;
775
776		if ( documentIsHTML ) {
777
778			// If the selector is sufficiently simple, try using a "get*By*" DOM method
779			// (excepting DocumentFragment context, where the methods don't exist)
780			if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
781
782				// ID selector
783				if ( ( m = match[ 1 ] ) ) {
784
785					// Document context
786					if ( nodeType === 9 ) {
787						if ( ( elem = context.getElementById( m ) ) ) {
788
789							// Support: IE, Opera, Webkit
790							// TODO: identify versions
791							// getElementById can match elements by name instead of ID
792							if ( elem.id === m ) {
793								results.push( elem );
794								return results;
795							}
796						} else {
797							return results;
798						}
799
800					// Element context
801					} else {
802
803						// Support: IE, Opera, Webkit
804						// TODO: identify versions
805						// getElementById can match elements by name instead of ID
806						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
807							contains( context, elem ) &&
808							elem.id === m ) {
809
810							results.push( elem );
811							return results;
812						}
813					}
814
815				// Type selector
816				} else if ( match[ 2 ] ) {
817					push.apply( results, context.getElementsByTagName( selector ) );
818					return results;
819
820				// Class selector
821				} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
822					context.getElementsByClassName ) {
823
824					push.apply( results, context.getElementsByClassName( m ) );
825					return results;
826				}
827			}
828
829			// Take advantage of querySelectorAll
830			if ( support.qsa &&
831				!nonnativeSelectorCache[ selector + " " ] &&
832				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
833
834				// Support: IE 8 only
835				// Exclude object elements
836				( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
837
838				newSelector = selector;
839				newContext = context;
840
841				// qSA considers elements outside a scoping root when evaluating child or
842				// descendant combinators, which is not what we want.
843				// In such cases, we work around the behavior by prefixing every selector in the
844				// list with an ID selector referencing the scope context.
845				// The technique has to be used as well when a leading combinator is used
846				// as such selectors are not recognized by querySelectorAll.
847				// Thanks to Andrew Dupont for this technique.
848				if ( nodeType === 1 &&
849					( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
850
851					// Expand context for sibling selectors
852					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
853						context;
854
855					// We can use :scope instead of the ID hack if the browser
856					// supports it & if we're not changing the context.
857					if ( newContext !== context || !support.scope ) {
858
859						// Capture the context ID, setting it first if necessary
860						if ( ( nid = context.getAttribute( "id" ) ) ) {
861							nid = nid.replace( rcssescape, fcssescape );
862						} else {
863							context.setAttribute( "id", ( nid = expando ) );
864						}
865					}
866
867					// Prefix every selector in the list
868					groups = tokenize( selector );
869					i = groups.length;
870					while ( i-- ) {
871						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
872							toSelector( groups[ i ] );
873					}
874					newSelector = groups.join( "," );
875				}
876
877				try {
878					push.apply( results,
879						newContext.querySelectorAll( newSelector )
880					);
881					return results;
882				} catch ( qsaError ) {
883					nonnativeSelectorCache( selector, true );
884				} finally {
885					if ( nid === expando ) {
886						context.removeAttribute( "id" );
887					}
888				}
889			}
890		}
891	}
892
893	// All others
894	return select( selector.replace( rtrim, "$1" ), context, results, seed );
895}
896
897/**
898 * Create key-value caches of limited size
899 * @returns {function(string, object)} Returns the Object data after storing it on itself with
900 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
901 *	deleting the oldest entry
902 */
903function createCache() {
904	var keys = [];
905
906	function cache( key, value ) {
907
908		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
909		if ( keys.push( key + " " ) > Expr.cacheLength ) {
910
911			// Only keep the most recent entries
912			delete cache[ keys.shift() ];
913		}
914		return ( cache[ key + " " ] = value );
915	}
916	return cache;
917}
918
919/**
920 * Mark a function for special use by Sizzle
921 * @param {Function} fn The function to mark
922 */
923function markFunction( fn ) {
924	fn[ expando ] = true;
925	return fn;
926}
927
928/**
929 * Support testing using an element
930 * @param {Function} fn Passed the created element and returns a boolean result
931 */
932function assert( fn ) {
933	var el = document.createElement( "fieldset" );
934
935	try {
936		return !!fn( el );
937	} catch ( e ) {
938		return false;
939	} finally {
940
941		// Remove from its parent by default
942		if ( el.parentNode ) {
943			el.parentNode.removeChild( el );
944		}
945
946		// release memory in IE
947		el = null;
948	}
949}
950
951/**
952 * Adds the same handler for all of the specified attrs
953 * @param {String} attrs Pipe-separated list of attributes
954 * @param {Function} handler The method that will be applied
955 */
956function addHandle( attrs, handler ) {
957	var arr = attrs.split( "|" ),
958		i = arr.length;
959
960	while ( i-- ) {
961		Expr.attrHandle[ arr[ i ] ] = handler;
962	}
963}
964
965/**
966 * Checks document order of two siblings
967 * @param {Element} a
968 * @param {Element} b
969 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
970 */
971function siblingCheck( a, b ) {
972	var cur = b && a,
973		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
974			a.sourceIndex - b.sourceIndex;
975
976	// Use IE sourceIndex if available on both nodes
977	if ( diff ) {
978		return diff;
979	}
980
981	// Check if b follows a
982	if ( cur ) {
983		while ( ( cur = cur.nextSibling ) ) {
984			if ( cur === b ) {
985				return -1;
986			}
987		}
988	}
989
990	return a ? 1 : -1;
991}
992
993/**
994 * Returns a function to use in pseudos for input types
995 * @param {String} type
996 */
997function createInputPseudo( type ) {
998	return function( elem ) {
999		var name = elem.nodeName.toLowerCase();
1000		return name === "input" && elem.type === type;
1001	};
1002}
1003
1004/**
1005 * Returns a function to use in pseudos for buttons
1006 * @param {String} type
1007 */
1008function createButtonPseudo( type ) {
1009	return function( elem ) {
1010		var name = elem.nodeName.toLowerCase();
1011		return ( name === "input" || name === "button" ) && elem.type === type;
1012	};
1013}
1014
1015/**
1016 * Returns a function to use in pseudos for :enabled/:disabled
1017 * @param {Boolean} disabled true for :disabled; false for :enabled
1018 */
1019function createDisabledPseudo( disabled ) {
1020
1021	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1022	return function( elem ) {
1023
1024		// Only certain elements can match :enabled or :disabled
1025		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1026		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1027		if ( "form" in elem ) {
1028
1029			// Check for inherited disabledness on relevant non-disabled elements:
1030			// * listed form-associated elements in a disabled fieldset
1031			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
1032			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1033			// * option elements in a disabled optgroup
1034			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1035			// All such elements have a "form" property.
1036			if ( elem.parentNode && elem.disabled === false ) {
1037
1038				// Option elements defer to a parent optgroup if present
1039				if ( "label" in elem ) {
1040					if ( "label" in elem.parentNode ) {
1041						return elem.parentNode.disabled === disabled;
1042					} else {
1043						return elem.disabled === disabled;
1044					}
1045				}
1046
1047				// Support: IE 6 - 11
1048				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
1049				return elem.isDisabled === disabled ||
1050
1051					// Where there is no isDisabled, check manually
1052					/* jshint -W018 */
1053					elem.isDisabled !== !disabled &&
1054					inDisabledFieldset( elem ) === disabled;
1055			}
1056
1057			return elem.disabled === disabled;
1058
1059		// Try to winnow out elements that can't be disabled before trusting the disabled property.
1060		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1061		// even exist on them, let alone have a boolean value.
1062		} else if ( "label" in elem ) {
1063			return elem.disabled === disabled;
1064		}
1065
1066		// Remaining elements are neither :enabled nor :disabled
1067		return false;
1068	};
1069}
1070
1071/**
1072 * Returns a function to use in pseudos for positionals
1073 * @param {Function} fn
1074 */
1075function createPositionalPseudo( fn ) {
1076	return markFunction( function( argument ) {
1077		argument = +argument;
1078		return markFunction( function( seed, matches ) {
1079			var j,
1080				matchIndexes = fn( [], seed.length, argument ),
1081				i = matchIndexes.length;
1082
1083			// Match elements found at the specified indexes
1084			while ( i-- ) {
1085				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
1086					seed[ j ] = !( matches[ j ] = seed[ j ] );
1087				}
1088			}
1089		} );
1090	} );
1091}
1092
1093/**
1094 * Checks a node for validity as a Sizzle context
1095 * @param {Element|Object=} context
1096 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1097 */
1098function testContext( context ) {
1099	return context && typeof context.getElementsByTagName !== "undefined" && context;
1100}
1101
1102// Expose support vars for convenience
1103support = Sizzle.support = {};
1104
1105/**
1106 * Detects XML nodes
1107 * @param {Element|Object} elem An element or a document
1108 * @returns {Boolean} True iff elem is a non-HTML XML node
1109 */
1110isXML = Sizzle.isXML = function( elem ) {
1111	var namespace = elem
1111.namespaceURI,
1112		docElem =
vendor: 54,357 bytes, lines 1112-3026
1112 ( elem.ownerDocument || elem ).documentElement;
1113
1114	// Support: IE <=8
1115	// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
1116	// https://bugs.jquery.com/ticket/4833
1117	return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
1118};
1119
1120/**
1121 * Sets document-related variables once based on the current document
1122 * @param {Element|Object} [doc] An element or document object to use to set the document
1123 * @returns {Object} Returns the current document
1124 */
1125setDocument = Sizzle.setDocument = function( node ) {
1126	var hasCompare, subWindow,
1127		doc = node ? node.ownerDocument || node : preferredDoc;
1128
1129	// Return early if doc is invalid or already selected
1130	// Support: IE 11+, Edge 17 - 18+
1131	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1132	// two documents; shallow comparisons work.
1133	// eslint-disable-next-line eqeqeq
1134	if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
1135		return document;
1136	}
1137
1138	// Update global variables
1139	document = doc;
1140	docElem = document.documentElement;
1141	documentIsHTML = !isXML( document );
1142
1143	// Support: IE 9 - 11+, Edge 12 - 18+
1144	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1145	// Support: IE 11+, Edge 17 - 18+
1146	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1147	// two documents; shallow comparisons work.
1148	// eslint-disable-next-line eqeqeq
1149	if ( preferredDoc != document &&
1150		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
1151
1152		// Support: IE 11, Edge
1153		if ( subWindow.addEventListener ) {
1154			subWindow.addEventListener( "unload", unloadHandler, false );
1155
1156		// Support: IE 9 - 10 only
1157		} else if ( subWindow.attachEvent ) {
1158			subWindow.attachEvent( "onunload", unloadHandler );
1159		}
1160	}
1161
1162	// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
1163	// Safari 4 - 5 only, Opera <=11.6 - 12.x only
1164	// IE/Edge & older browsers don't support the :scope pseudo-class.
1165	// Support: Safari 6.0 only
1166	// Safari 6.0 supports :scope but it's an alias of :root there.
1167	support.scope = assert( function( el ) {
1168		docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
1169		return typeof el.querySelectorAll !== "undefined" &&
1170			!el.querySelectorAll( ":scope fieldset div" ).length;
1171	} );
1172
1173	/* Attributes
1174	---------------------------------------------------------------------- */
1175
1176	// Support: IE<8
1177	// Verify that getAttribute really returns attributes and not properties
1178	// (excepting IE8 booleans)
1179	support.attributes = assert( function( el ) {
1180		el.className = "i";
1181		return !el.getAttribute( "className" );
1182	} );
1183
1184	/* getElement(s)By*
1185	---------------------------------------------------------------------- */
1186
1187	// Check if getElementsByTagName("*") returns only elements
1188	support.getElementsByTagName = assert( function( el ) {
1189		el.appendChild( document.createComment( "" ) );
1190		return !el.getElementsByTagName( "*" ).length;
1191	} );
1192
1193	// Support: IE<9
1194	support.getElementsByClassName = rnative.test( document.getElementsByClassName );
1195
1196	// Support: IE<10
1197	// Check if getElementById returns elements by name
1198	// The broken getElementById methods don't pick up programmatically-set names,
1199	// so use a roundabout getElementsByName test
1200	support.getById = assert( function( el ) {
1201		docElem.appendChild( el ).id = expando;
1202		return !document.getElementsByName || !document.getElementsByName( expando ).length;
1203	} );
1204
1205	// ID filter and find
1206	if ( support.getById ) {
1207		Expr.filter[ "ID" ] = function( id ) {
1208			var attrId = id.replace( runescape, funescape );
1209			return function( elem ) {
1210				return elem.getAttribute( "id" ) === attrId;
1211			};
1212		};
1213		Expr.find[ "ID" ] = function( id, context ) {
1214			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1215				var elem = context.getElementById( id );
1216				return elem ? [ elem ] : [];
1217			}
1218		};
1219	} else {
1220		Expr.filter[ "ID" ] =  function( id ) {
1221			var attrId = id.replace( runescape, funescape );
1222			return function( elem ) {
1223				var node = typeof elem.getAttributeNode !== "undefined" &&
1224					elem.getAttributeNode( "id" );
1225				return node && node.value === attrId;
1226			};
1227		};
1228
1229		// Support: IE 6 - 7 only
1230		// getElementById is not reliable as a find shortcut
1231		Expr.find[ "ID" ] = function( id, context ) {
1232			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1233				var node, i, elems,
1234					elem = context.getElementById( id );
1235
1236				if ( elem ) {
1237
1238					// Verify the id attribute
1239					node = elem.getAttributeNode( "id" );
1240					if ( node && node.value === id ) {
1241						return [ elem ];
1242					}
1243
1244					// Fall back on getElementsByName
1245					elems = context.getElementsByName( id );
1246					i = 0;
1247					while ( ( elem = elems[ i++ ] ) ) {
1248						node = elem.getAttributeNode( "id" );
1249						if ( node && node.value === id ) {
1250							return [ elem ];
1251						}
1252					}
1253				}
1254
1255				return [];
1256			}
1257		};
1258	}
1259
1260	// Tag
1261	Expr.find[ "TAG" ] = support.getElementsByTagName ?
1262		function( tag, context ) {
1263			if ( typeof context.getElementsByTagName !== "undefined" ) {
1264				return context.getElementsByTagName( tag );
1265
1266			// DocumentFragment nodes don't have gEBTN
1267			} else if ( support.qsa ) {
1268				return context.querySelectorAll( tag );
1269			}
1270		} :
1271
1272		function( tag, context ) {
1273			var elem,
1274				tmp = [],
1275				i = 0,
1276
1277				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1278				results = context.getElementsByTagName( tag );
1279
1280			// Filter out possible comments
1281			if ( tag === "*" ) {
1282				while ( ( elem = results[ i++ ] ) ) {
1283					if ( elem.nodeType === 1 ) {
1284						tmp.push( elem );
1285					}
1286				}
1287
1288				return tmp;
1289			}
1290			return results;
1291		};
1292
1293	// Class
1294	Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
1295		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
1296			return context.getElementsByClassName( className );
1297		}
1298	};
1299
1300	/* QSA/matchesSelector
1301	---------------------------------------------------------------------- */
1302
1303	// QSA and matchesSelector support
1304
1305	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1306	rbuggyMatches = [];
1307
1308	// qSa(:focus) reports false when true (Chrome 21)
1309	// We allow this because of a bug in IE8/9 that throws an error
1310	// whenever `document.activeElement` is accessed on an iframe
1311	// So, we allow :focus to pass through QSA all the time to avoid the IE error
1312	// See https://bugs.jquery.com/ticket/13378
1313	rbuggyQSA = [];
1314
1315	if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
1316
1317		// Build QSA regex
1318		// Regex strategy adopted from Diego Perini
1319		assert( function( el ) {
1320
1321			var input;
1322
1323			// Select is set to empty string on purpose
1324			// This is to test IE's treatment of not explicitly
1325			// setting a boolean content attribute,
1326			// since its presence should be enough
1327			// https://bugs.jquery.com/ticket/12359
1328			docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
1329				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
1330				"<option selected=''></option></select>";
1331
1332			// Support: IE8, Opera 11-12.16
1333			// Nothing should be selected when empty strings follow ^= or $= or *=
1334			// The test attribute must be unknown in Opera but "safe" for WinRT
1335			// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1336			if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
1337				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1338			}
1339
1340			// Support: IE8
1341			// Boolean attributes and "value" are not treated correctly
1342			if ( !el.querySelectorAll( "[selected]" ).length ) {
1343				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1344			}
1345
1346			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1347			if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
1348				rbuggyQSA.push( "~=" );
1349			}
1350
1351			// Support: IE 11+, Edge 15 - 18+
1352			// IE 11/Edge don't find elements on a `[name='']` query in some cases.
1353			// Adding a temporary attribute to the document before the selection works
1354			// around the issue.
1355			// Interestingly, IE 10 & older don't seem to have the issue.
1356			input = document.createElement( "input" );
1357			input.setAttribute( "name", "" );
1358			el.appendChild( input );
1359			if ( !el.querySelectorAll( "[name='']" ).length ) {
1360				rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
1361					whitespace + "*(?:''|\"\")" );
1362			}
1363
1364			// Webkit/Opera - :checked should return selected option elements
1365			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1366			// IE8 throws error here and will not see later tests
1367			if ( !el.querySelectorAll( ":checked" ).length ) {
1368				rbuggyQSA.push( ":checked" );
1369			}
1370
1371			// Support: Safari 8+, iOS 8+
1372			// https://bugs.webkit.org/show_bug.cgi?id=136851
1373			// In-page `selector#id sibling-combinator selector` fails
1374			if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
1375				rbuggyQSA.push( ".#.+[+~]" );
1376			}
1377
1378			// Support: Firefox <=3.6 - 5 only
1379			// Old Firefox doesn't throw on a badly-escaped identifier.
1380			el.querySelectorAll( "\\\f" );
1381			rbuggyQSA.push( "[\\r\\n\\f]" );
1382		} );
1383
1384		assert( function( el ) {
1385			el.innerHTML = "<a href='' disabled='disabled'></a>" +
1386				"<select disabled='disabled'><option/></select>";
1387
1388			// Support: Windows 8 Native Apps
1389			// The type and name attributes are restricted during .innerHTML assignment
1390			var input = document.createElement( "input" );
1391			input.setAttribute( "type", "hidden" );
1392			el.appendChild( input ).setAttribute( "name", "D" );
1393
1394			// Support: IE8
1395			// Enforce case-sensitivity of name attribute
1396			if ( el.querySelectorAll( "[name=d]" ).length ) {
1397				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
1398			}
1399
1400			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1401			// IE8 throws error here and will not see later tests
1402			if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
1403				rbuggyQSA.push( ":enabled", ":disabled" );
1404			}
1405
1406			// Support: IE9-11+
1407			// IE's :disabled selector does not pick up the children of disabled fieldsets
1408			docElem.appendChild( el ).disabled = true;
1409			if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
1410				rbuggyQSA.push( ":enabled", ":disabled" );
1411			}
1412
1413			// Support: Opera 10 - 11 only
1414			// Opera 10-11 does not throw on post-comma invalid pseudos
1415			el.querySelectorAll( "*,:x" );
1416			rbuggyQSA.push( ",.*:" );
1417		} );
1418	}
1419
1420	if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
1421		docElem.webkitMatchesSelector ||
1422		docElem.mozMatchesSelector ||
1423		docElem.oMatchesSelector ||
1424		docElem.msMatchesSelector ) ) ) ) {
1425
1426		assert( function( el ) {
1427
1428			// Check to see if it's possible to do matchesSelector
1429			// on a disconnected node (IE 9)
1430			support.disconnectedMatch = matches.call( el, "*" );
1431
1432			// This should fail with an exception
1433			// Gecko does not error, returns false instead
1434			matches.call( el, "[s!='']:x" );
1435			rbuggyMatches.push( "!=", pseudos );
1436		} );
1437	}
1438
1439	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
1440	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
1441
1442	/* Contains
1443	---------------------------------------------------------------------- */
1444	hasCompare = rnative.test( docElem.compareDocumentPosition );
1445
1446	// Element contains another
1447	// Purposefully self-exclusive
1448	// As in, an element does not contain itself
1449	contains = hasCompare || rnative.test( docElem.contains ) ?
1450		function( a, b ) {
1451			var adown = a.nodeType === 9 ? a.documentElement : a,
1452				bup = b && b.parentNode;
1453			return a === bup || !!( bup && bup.nodeType === 1 && (
1454				adown.contains ?
1455					adown.contains( bup ) :
1456					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1457			) );
1458		} :
1459		function( a, b ) {
1460			if ( b ) {
1461				while ( ( b = b.parentNode ) ) {
1462					if ( b === a ) {
1463						return true;
1464					}
1465				}
1466			}
1467			return false;
1468		};
1469
1470	/* Sorting
1471	---------------------------------------------------------------------- */
1472
1473	// Document order sorting
1474	sortOrder = hasCompare ?
1475	function( a, b ) {
1476
1477		// Flag for duplicate removal
1478		if ( a === b ) {
1479			hasDuplicate = true;
1480			return 0;
1481		}
1482
1483		// Sort on method existence if only one input has compareDocumentPosition
1484		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1485		if ( compare ) {
1486			return compare;
1487		}
1488
1489		// Calculate position if both inputs belong to the same document
1490		// Support: IE 11+, Edge 17 - 18+
1491		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1492		// two documents; shallow comparisons work.
1493		// eslint-disable-next-line eqeqeq
1494		compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
1495			a.compareDocumentPosition( b ) :
1496
1497			// Otherwise we know they are disconnected
1498			1;
1499
1500		// Disconnected nodes
1501		if ( compare & 1 ||
1502			( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
1503
1504			// Choose the first element that is related to our preferred document
1505			// Support: IE 11+, Edge 17 - 18+
1506			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1507			// two documents; shallow comparisons work.
1508			// eslint-disable-next-line eqeqeq
1509			if ( a == document || a.ownerDocument == preferredDoc &&
1510				contains( preferredDoc, a ) ) {
1511				return -1;
1512			}
1513
1514			// Support: IE 11+, Edge 17 - 18+
1515			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1516			// two documents; shallow comparisons work.
1517			// eslint-disable-next-line eqeqeq
1518			if ( b == document || b.ownerDocument == preferredDoc &&
1519				contains( preferredDoc, b ) ) {
1520				return 1;
1521			}
1522
1523			// Maintain original order
1524			return sortInput ?
1525				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1526				0;
1527		}
1528
1529		return compare & 4 ? -1 : 1;
1530	} :
1531	function( a, b ) {
1532
1533		// Exit early if the nodes are identical
1534		if ( a === b ) {
1535			hasDuplicate = true;
1536			return 0;
1537		}
1538
1539		var cur,
1540			i = 0,
1541			aup = a.parentNode,
1542			bup = b.parentNode,
1543			ap = [ a ],
1544			bp = [ b ];
1545
1546		// Parentless nodes are either documents or disconnected
1547		if ( !aup || !bup ) {
1548
1549			// Support: IE 11+, Edge 17 - 18+
1550			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1551			// two documents; shallow comparisons work.
1552			/* eslint-disable eqeqeq */
1553			return a == document ? -1 :
1554				b == document ? 1 :
1555				/* eslint-enable eqeqeq */
1556				aup ? -1 :
1557				bup ? 1 :
1558				sortInput ?
1559				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1560				0;
1561
1562		// If the nodes are siblings, we can do a quick check
1563		} else if ( aup === bup ) {
1564			return siblingCheck( a, b );
1565		}
1566
1567		// Otherwise we need full lists of their ancestors for comparison
1568		cur = a;
1569		while ( ( cur = cur.parentNode ) ) {
1570			ap.unshift( cur );
1571		}
1572		cur = b;
1573		while ( ( cur = cur.parentNode ) ) {
1574			bp.unshift( cur );
1575		}
1576
1577		// Walk down the tree looking for a discrepancy
1578		while ( ap[ i ] === bp[ i ] ) {
1579			i++;
1580		}
1581
1582		return i ?
1583
1584			// Do a sibling check if the nodes have a common ancestor
1585			siblingCheck( ap[ i ], bp[ i ] ) :
1586
1587			// Otherwise nodes in our document sort first
1588			// Support: IE 11+, Edge 17 - 18+
1589			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1590			// two documents; shallow comparisons work.
1591			/* eslint-disable eqeqeq */
1592			ap[ i ] == preferredDoc ? -1 :
1593			bp[ i ] == preferredDoc ? 1 :
1594			/* eslint-enable eqeqeq */
1595			0;
1596	};
1597
1598	return document;
1599};
1600
1601Sizzle.matches = function( expr, elements ) {
1602	return Sizzle( expr, null, null, elements );
1603};
1604
1605Sizzle.matchesSelector = function( elem, expr ) {
1606	setDocument( elem );
1607
1608	if ( support.matchesSelector && documentIsHTML &&
1609		!nonnativeSelectorCache[ expr + " " ] &&
1610		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1611		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
1612
1613		try {
1614			var ret = matches.call( elem, expr );
1615
1616			// IE 9's matchesSelector returns false on disconnected nodes
1617			if ( ret || support.disconnectedMatch ||
1618
1619				// As well, disconnected nodes are said to be in a document
1620				// fragment in IE 9
1621				elem.document && elem.document.nodeType !== 11 ) {
1622				return ret;
1623			}
1624		} catch ( e ) {
1625			nonnativeSelectorCache( expr, true );
1626		}
1627	}
1628
1629	return Sizzle( expr, document, null, [ elem ] ).length > 0;
1630};
1631
1632Sizzle.contains = function( context, elem ) {
1633
1634	// Set document vars if needed
1635	// Support: IE 11+, Edge 17 - 18+
1636	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1637	// two documents; shallow comparisons work.
1638	// eslint-disable-next-line eqeqeq
1639	if ( ( context.ownerDocument || context ) != document ) {
1640		setDocument( context );
1641	}
1642	return contains( context, elem );
1643};
1644
1645Sizzle.attr = function( elem, name ) {
1646
1647	// Set document vars if needed
1648	// Support: IE 11+, Edge 17 - 18+
1649	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
1650	// two documents; shallow comparisons work.
1651	// eslint-disable-next-line eqeqeq
1652	if ( ( elem.ownerDocument || elem ) != document ) {
1653		setDocument( elem );
1654	}
1655
1656	var fn = Expr.attrHandle[ name.toLowerCase() ],
1657
1658		// Don't get fooled by Object.prototype properties (jQuery #13807)
1659		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1660			fn( elem, name, !documentIsHTML ) :
1661			undefined;
1662
1663	return val !== undefined ?
1664		val :
1665		support.attributes || !documentIsHTML ?
1666			elem.getAttribute( name ) :
1667			( val = elem.getAttributeNode( name ) ) && val.specified ?
1668				val.value :
1669				null;
1670};
1671
1672Sizzle.escape = function( sel ) {
1673	return ( sel + "" ).replace( rcssescape, fcssescape );
1674};
1675
1676Sizzle.error = function( msg ) {
1677	throw new Error( "Syntax error, unrecognized expression: " + msg );
1678};
1679
1680/**
1681 * Document sorting and removing duplicates
1682 * @param {ArrayLike} results
1683 */
1684Sizzle.uniqueSort = function( results ) {
1685	var elem,
1686		duplicates = [],
1687		j = 0,
1688		i = 0;
1689
1690	// Unless we *know* we can detect duplicates, assume their presence
1691	hasDuplicate = !support.detectDuplicates;
1692	sortInput = !support.sortStable && results.slice( 0 );
1693	results.sort( sortOrder );
1694
1695	if ( hasDuplicate ) {
1696		while ( ( elem = results[ i++ ] ) ) {
1697			if ( elem === results[ i ] ) {
1698				j = duplicates.push( i );
1699			}
1700		}
1701		while ( j-- ) {
1702			results.splice( duplicates[ j ], 1 );
1703		}
1704	}
1705
1706	// Clear input after sorting to release objects
1707	// See https://github.com/jquery/sizzle/pull/225
1708	sortInput = null;
1709
1710	return results;
1711};
1712
1713/**
1714 * Utility function for retrieving the text value of an array of DOM nodes
1715 * @param {Array|Element} elem
1716 */
1717getText = Sizzle.getText = function( elem ) {
1718	var node,
1719		ret = "",
1720		i = 0,
1721		nodeType = elem.nodeType;
1722
1723	if ( !nodeType ) {
1724
1725		// If no nodeType, this is expected to be an array
1726		while ( ( node = elem[ i++ ] ) ) {
1727
1728			// Do not traverse comment nodes
1729			ret += getText( node );
1730		}
1731	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1732
1733		// Use textContent for elements
1734		// innerText usage removed for consistency of new lines (jQuery #11153)
1735		if ( typeof elem.textContent === "string" ) {
1736			return elem.textContent;
1737		} else {
1738
1739			// Traverse its children
1740			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1741				ret += getText( elem );
1742			}
1743		}
1744	} else if ( nodeType === 3 || nodeType === 4 ) {
1745		return elem.nodeValue;
1746	}
1747
1748	// Do not include comment or processing instruction nodes
1749
1750	return ret;
1751};
1752
1753Expr = Sizzle.selectors = {
1754
1755	// Can be adjusted by the user
1756	cacheLength: 50,
1757
1758	createPseudo: markFunction,
1759
1760	match: matchExpr,
1761
1762	attrHandle: {},
1763
1764	find: {},
1765
1766	relative: {
1767		">": { dir: "parentNode", first: true },
1768		" ": { dir: "parentNode" },
1769		"+": { dir: "previousSibling", first: true },
1770		"~": { dir: "previousSibling" }
1771	},
1772
1773	preFilter: {
1774		"ATTR": function( match ) {
1775			match[ 1 ] = match[ 1 ].replace( runescape, funescape );
1776
1777			// Move the given value to match[3] whether quoted or unquoted
1778			match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
1779				match[ 5 ] || "" ).replace( runescape, funescape );
1780
1781			if ( match[ 2 ] === "~=" ) {
1782				match[ 3 ] = " " + match[ 3 ] + " ";
1783			}
1784
1785			return match.slice( 0, 4 );
1786		},
1787
1788		"CHILD": function( match ) {
1789
1790			/* matches from matchExpr["CHILD"]
1791				1 type (only|nth|...)
1792				2 what (child|of-type)
1793				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1794				4 xn-component of xn+y argument ([+-]?\d*n|)
1795				5 sign of xn-component
1796				6 x of xn-component
1797				7 sign of y-component
1798				8 y of y-component
1799			*/
1800			match[ 1 ] = match[ 1 ].toLowerCase();
1801
1802			if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
1803
1804				// nth-* requires argument
1805				if ( !match[ 3 ] ) {
1806					Sizzle.error( match[ 0 ] );
1807				}
1808
1809				// numeric x and y parameters for Expr.filter.CHILD
1810				// remember that false/true cast respectively to 0/1
1811				match[ 4 ] = +( match[ 4 ] ?
1812					match[ 5 ] + ( match[ 6 ] || 1 ) :
1813					2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
1814				match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
1815
1816				// other types prohibit arguments
1817			} else if ( match[ 3 ] ) {
1818				Sizzle.error( match[ 0 ] );
1819			}
1820
1821			return match;
1822		},
1823
1824		"PSEUDO": function( match ) {
1825			var excess,
1826				unquoted = !match[ 6 ] && match[ 2 ];
1827
1828			if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
1829				return null;
1830			}
1831
1832			// Accept quoted arguments as-is
1833			if ( match[ 3 ] ) {
1834				match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
1835
1836			// Strip excess characters from unquoted arguments
1837			} else if ( unquoted && rpseudo.test( unquoted ) &&
1838
1839				// Get excess from tokenize (recursively)
1840				( excess = tokenize( unquoted, true ) ) &&
1841
1842				// advance to the next closing parenthesis
1843				( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
1844
1845				// excess is a negative index
1846				match[ 0 ] = match[ 0 ].slice( 0, excess );
1847				match[ 2 ] = unquoted.slice( 0, excess );
1848			}
1849
1850			// Return only captures needed by the pseudo filter method (type and argument)
1851			return match.slice( 0, 3 );
1852		}
1853	},
1854
1855	filter: {
1856
1857		"TAG": function( nodeNameSelector ) {
1858			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1859			return nodeNameSelector === "*" ?
1860				function() {
1861					return true;
1862				} :
1863				function( elem ) {
1864					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1865				};
1866		},
1867
1868		"CLASS": function( className ) {
1869			var pattern = classCache[ className + " " ];
1870
1871			return pattern ||
1872				( pattern = new RegExp( "(^|" + whitespace +
1873					")" + className + "(" + whitespace + "|$)" ) ) && classCache(
1874						className, function( elem ) {
1875							return pattern.test(
1876								typeof elem.className === "string" && elem.className ||
1877								typeof elem.getAttribute !== "undefined" &&
1878									elem.getAttribute( "class" ) ||
1879								""
1880							);
1881				} );
1882		},
1883
1884		"ATTR": function( name, operator, check ) {
1885			return function( elem ) {
1886				var result = Sizzle.attr( elem, name );
1887
1888				if ( result == null ) {
1889					return operator === "!=";
1890				}
1891				if ( !operator ) {
1892					return true;
1893				}
1894
1895				result += "";
1896
1897				/* eslint-disable max-len */
1898
1899				return operator === "=" ? result === check :
1900					operator === "!=" ? result !== check :
1901					operator === "^=" ? check && result.indexOf( check ) === 0 :
1902					operator === "*=" ? check && result.indexOf( check ) > -1 :
1903					operator === "$=" ? check && result.slice( -check.length ) === check :
1904					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
1905					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1906					false;
1907				/* eslint-enable max-len */
1908
1909			};
1910		},
1911
1912		"CHILD": function( type, what, _argument, first, last ) {
1913			var simple = type.slice( 0, 3 ) !== "nth",
1914				forward = type.slice( -4 ) !== "last",
1915				ofType = what === "of-type";
1916
1917			return first === 1 && last === 0 ?
1918
1919				// Shortcut for :nth-*(n)
1920				function( elem ) {
1921					return !!elem.parentNode;
1922				} :
1923
1924				function( elem, _context, xml ) {
1925					var cache, uniqueCache, outerCache, node, nodeIndex, start,
1926						dir = simple !== forward ? "nextSibling" : "previousSibling",
1927						parent = elem.parentNode,
1928						name = ofType && elem.nodeName.toLowerCase(),
1929						useCache = !xml && !ofType,
1930						diff = false;
1931
1932					if ( parent ) {
1933
1934						// :(first|last|only)-(child|of-type)
1935						if ( simple ) {
1936							while ( dir ) {
1937								node = elem;
1938								while ( ( node = node[ dir ] ) ) {
1939									if ( ofType ?
1940										node.nodeName.toLowerCase() === name :
1941										node.nodeType === 1 ) {
1942
1943										return false;
1944									}
1945								}
1946
1947								// Reverse direction for :only-* (if we haven't yet done so)
1948								start = dir = type === "only" && !start && "nextSibling";
1949							}
1950							return true;
1951						}
1952
1953						start = [ forward ? parent.firstChild : parent.lastChild ];
1954
1955						// non-xml :nth-child(...) stores cache data on `parent`
1956						if ( forward && useCache ) {
1957
1958							// Seek `elem` from a previously-cached index
1959
1960							// ...in a gzip-friendly way
1961							node = parent;
1962							outerCache = node[ expando ] || ( node[ expando ] = {} );
1963
1964							// Support: IE <9 only
1965							// Defend against cloned attroperties (jQuery gh-1709)
1966							uniqueCache = outerCache[ node.uniqueID ] ||
1967								( outerCache[ node.uniqueID ] = {} );
1968
1969							cache = uniqueCache[ type ] || [];
1970							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1971							diff = nodeIndex && cache[ 2 ];
1972							node = nodeIndex && parent.childNodes[ nodeIndex ];
1973
1974							while ( ( node = ++nodeIndex && node && node[ dir ] ||
1975
1976								// Fallback to seeking `elem` from the start
1977								( diff = nodeIndex = 0 ) || start.pop() ) ) {
1978
1979								// When found, cache indexes on `parent` and break
1980								if ( node.nodeType === 1 && ++diff && node === elem ) {
1981									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
1982									break;
1983								}
1984							}
1985
1986						} else {
1987
1988							// Use previously-cached element index if available
1989							if ( useCache ) {
1990
1991								// ...in a gzip-friendly way
1992								node = elem;
1993								outerCache = node[ expando ] || ( node[ expando ] = {} );
1994
1995								// Support: IE <9 only
1996								// Defend against cloned attroperties (jQuery gh-1709)
1997								uniqueCache = outerCache[ node.uniqueID ] ||
1998									( outerCache[ node.uniqueID ] = {} );
1999
2000								cache = uniqueCache[ type ] || [];
2001								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
2002								diff = nodeIndex;
2003							}
2004
2005							// xml :nth-child(...)
2006							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
2007							if ( diff === false ) {
2008
2009								// Use the same loop as above to seek `elem` from the start
2010								while ( ( node = ++nodeIndex && node && node[ dir ] ||
2011									( diff = nodeIndex = 0 ) || start.pop() ) ) {
2012
2013									if ( ( ofType ?
2014										node.nodeName.toLowerCase() === name :
2015										node.nodeType === 1 ) &&
2016										++diff ) {
2017
2018										// Cache the index of each encountered element
2019										if ( useCache ) {
2020											outerCache = node[ expando ] ||
2021												( node[ expando ] = {} );
2022
2023											// Support: IE <9 only
2024											// Defend against cloned attroperties (jQuery gh-1709)
2025											uniqueCache = outerCache[ node.uniqueID ] ||
2026												( outerCache[ node.uniqueID ] = {} );
2027
2028											uniqueCache[ type ] = [ dirruns, diff ];
2029										}
2030
2031										if ( node === elem ) {
2032											break;
2033										}
2034									}
2035								}
2036							}
2037						}
2038
2039						// Incorporate the offset, then check against cycle size
2040						diff -= last;
2041						return diff === first || ( diff % first === 0 && diff / first >= 0 );
2042					}
2043				};
2044		},
2045
2046		"PSEUDO": function( pseudo, argument ) {
2047
2048			// pseudo-class names are case-insensitive
2049			// http://www.w3.org/TR/selectors/#pseudo-classes
2050			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2051			// Remember that setFilters inherits from pseudos
2052			var args,
2053				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
2054					Sizzle.error( "unsupported pseudo: " + pseudo );
2055
2056			// The user may use createPseudo to indicate that
2057			// arguments are needed to create the filter function
2058			// just as Sizzle does
2059			if ( fn[ expando ] ) {
2060				return fn( argument );
2061			}
2062
2063			// But maintain support for old signatures
2064			if ( fn.length > 1 ) {
2065				args = [ pseudo, pseudo, "", argument ];
2066				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
2067					markFunction( function( seed, matches ) {
2068						var idx,
2069							matched = fn( seed, argument ),
2070							i = matched.length;
2071						while ( i-- ) {
2072							idx = indexOf( seed, matched[ i ] );
2073							seed[ idx ] = !( matches[ idx ] = matched[ i ] );
2074						}
2075					} ) :
2076					function( elem ) {
2077						return fn( elem, 0, args );
2078					};
2079			}
2080
2081			return fn;
2082		}
2083	},
2084
2085	pseudos: {
2086
2087		// Potentially complex pseudos
2088		"not": markFunction( function( selector ) {
2089
2090			// Trim the selector passed to compile
2091			// to avoid treating leading and trailing
2092			// spaces as combinators
2093			var input = [],
2094				results = [],
2095				matcher = compile( selector.replace( rtrim, "$1" ) );
2096
2097			return matcher[ expando ] ?
2098				markFunction( function( seed, matches, _context, xml ) {
2099					var elem,
2100						unmatched = matcher( seed, null, xml, [] ),
2101						i = seed.length;
2102
2103					// Match elements unmatched by `matcher`
2104					while ( i-- ) {
2105						if ( ( elem = unmatched[ i ] ) ) {
2106							seed[ i ] = !( matches[ i ] = elem );
2107						}
2108					}
2109				} ) :
2110				function( elem, _context, xml ) {
2111					input[ 0 ] = elem;
2112					matcher( input, null, xml, results );
2113
2114					// Don't keep the element (issue #299)
2115					input[ 0 ] = null;
2116					return !results.pop();
2117				};
2118		} ),
2119
2120		"has": markFunction( function( selector ) {
2121			return function( elem ) {
2122				return Sizzle( selector, elem ).length > 0;
2123			};
2124		} ),
2125
2126		"contains": markFunction( function( text ) {
2127			text = text.replace( runescape, funescape );
2128			return function( elem ) {
2129				return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
2130			};
2131		} ),
2132
2133		// "Whether an element is represented by a :lang() selector
2134		// is based solely on the element's language value
2135		// being equal to the identifier C,
2136		// or beginning with the identifier C immediately followed by "-".
2137		// The matching of C against the element's language value is performed case-insensitively.
2138		// The identifier C does not have to be a valid language name."
2139		// http://www.w3.org/TR/selectors/#lang-pseudo
2140		"lang": markFunction( function( lang ) {
2141
2142			// lang value must be a valid identifier
2143			if ( !ridentifier.test( lang || "" ) ) {
2144				Sizzle.error( "unsupported lang: " + lang );
2145			}
2146			lang = lang.replace( runescape, funescape ).toLowerCase();
2147			return function( elem ) {
2148				var elemLang;
2149				do {
2150					if ( ( elemLang = documentIsHTML ?
2151						elem.lang :
2152						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
2153
2154						elemLang = elemLang.toLowerCase();
2155						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
2156					}
2157				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
2158				return false;
2159			};
2160		} ),
2161
2162		// Miscellaneous
2163		"target": function( elem ) {
2164			var hash = window.location && window.location.hash;
2165			return hash && hash.slice( 1 ) === elem.id;
2166		},
2167
2168		"root": function( elem ) {
2169			return elem === docElem;
2170		},
2171
2172		"focus": function( elem ) {
2173			return elem === document.activeElement &&
2174				( !document.hasFocus || document.hasFocus() ) &&
2175				!!( elem.type || elem.href || ~elem.tabIndex );
2176		},
2177
2178		// Boolean properties
2179		"enabled": createDisabledPseudo( false ),
2180		"disabled": createDisabledPseudo( true ),
2181
2182		"checked": function( elem ) {
2183
2184			// In CSS3, :checked should return both checked and selected elements
2185			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2186			var nodeName = elem.nodeName.toLowerCase();
2187			return ( nodeName === "input" && !!elem.checked ) ||
2188				( nodeName === "option" && !!elem.selected );
2189		},
2190
2191		"selected": function( elem ) {
2192
2193			// Accessing this property makes selected-by-default
2194			// options in Safari work properly
2195			if ( elem.parentNode ) {
2196				// eslint-disable-next-line no-unused-expressions
2197				elem.parentNode.selectedIndex;
2198			}
2199
2200			return elem.selected === true;
2201		},
2202
2203		// Contents
2204		"empty": function( elem ) {
2205
2206			// http://www.w3.org/TR/selectors/#empty-pseudo
2207			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2208			//   but not by others (comment: 8; processing instruction: 7; etc.)
2209			// nodeType < 6 works because attributes (2) do not appear as children
2210			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2211				if ( elem.nodeType < 6 ) {
2212					return false;
2213				}
2214			}
2215			return true;
2216		},
2217
2218		"parent": function( elem ) {
2219			return !Expr.pseudos[ "empty" ]( elem );
2220		},
2221
2222		// Element/input types
2223		"header": function( elem ) {
2224			return rheader.test( elem.nodeName );
2225		},
2226
2227		"input": function( elem ) {
2228			return rinputs.test( elem.nodeName );
2229		},
2230
2231		"button": function( elem ) {
2232			var name = elem.nodeName.toLowerCase();
2233			return name === "input" && elem.type === "button" || name === "button";
2234		},
2235
2236		"text": function( elem ) {
2237			var attr;
2238			return elem.nodeName.toLowerCase() === "input" &&
2239				elem.type === "text" &&
2240
2241				// Support: IE<8
2242				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2243				( ( attr = elem.getAttribute( "type" ) ) == null ||
2244					attr.toLowerCase() === "text" );
2245		},
2246
2247		// Position-in-collection
2248		"first": createPositionalPseudo( function() {
2249			return [ 0 ];
2250		} ),
2251
2252		"last": createPositionalPseudo( function( _matchIndexes, length ) {
2253			return [ length - 1 ];
2254		} ),
2255
2256		"eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
2257			return [ argument < 0 ? argument + length : argument ];
2258		} ),
2259
2260		"even": createPositionalPseudo( function( matchIndexes, length ) {
2261			var i = 0;
2262			for ( ; i < length; i += 2 ) {
2263				matchIndexes.push( i );
2264			}
2265			return matchIndexes;
2266		} ),
2267
2268		"odd": createPositionalPseudo( function( matchIndexes, length ) {
2269			var i = 1;
2270			for ( ; i < length; i += 2 ) {
2271				matchIndexes.push( i );
2272			}
2273			return matchIndexes;
2274		} ),
2275
2276		"lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
2277			var i = argument < 0 ?
2278				argument + length :
2279				argument > length ?
2280					length :
2281					argument;
2282			for ( ; --i >= 0; ) {
2283				matchIndexes.push( i );
2284			}
2285			return matchIndexes;
2286		} ),
2287
2288		"gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
2289			var i = argument < 0 ? argument + length : argument;
2290			for ( ; ++i < length; ) {
2291				matchIndexes.push( i );
2292			}
2293			return matchIndexes;
2294		} )
2295	}
2296};
2297
2298Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
2299
2300// Add button/input type pseudos
2301for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2302	Expr.pseudos[ i ] = createInputPseudo( i );
2303}
2304for ( i in { submit: true, reset: true } ) {
2305	Expr.pseudos[ i ] = createButtonPseudo( i );
2306}
2307
2308// Easy API for creating new setFilters
2309function setFilters() {}
2310setFilters.prototype = Expr.filters = Expr.pseudos;
2311Expr.setFilters = new setFilters();
2312
2313tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
2314	var matched, match, tokens, type,
2315		soFar, groups, preFilters,
2316		cached = tokenCache[ selector + " " ];
2317
2318	if ( cached ) {
2319		return parseOnly ? 0 : cached.slice( 0 );
2320	}
2321
2322	soFar = selector;
2323	groups = [];
2324	preFilters = Expr.preFilter;
2325
2326	while ( soFar ) {
2327
2328		// Comma and first run
2329		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
2330			if ( match ) {
2331
2332				// Don't consume trailing commas as valid
2333				soFar = soFar.slice( match[ 0 ].length ) || soFar;
2334			}
2335			groups.push( ( tokens = [] ) );
2336		}
2337
2338		matched = false;
2339
2340		// Combinators
2341		if ( ( match = rcombinators.exec( soFar ) ) ) {
2342			matched = match.shift();
2343			tokens.push( {
2344				value: matched,
2345
2346				// Cast descendant combinators to space
2347				type: match[ 0 ].replace( rtrim, " " )
2348			} );
2349			soFar = soFar.slice( matched.length );
2350		}
2351
2352		// Filters
2353		for ( type in Expr.filter ) {
2354			if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
2355				( match = preFilters[ type ]( match ) ) ) ) {
2356				matched = match.shift();
2357				tokens.push( {
2358					value: matched,
2359					type: type,
2360					matches: match
2361				} );
2362				soFar = soFar.slice( matched.length );
2363			}
2364		}
2365
2366		if ( !matched ) {
2367			break;
2368		}
2369	}
2370
2371	// Return the length of the invalid excess
2372	// if we're just parsing
2373	// Otherwise, throw an error or return tokens
2374	return parseOnly ?
2375		soFar.length :
2376		soFar ?
2377			Sizzle.error( selector ) :
2378
2379			// Cache the tokens
2380			tokenCache( selector, groups ).slice( 0 );
2381};
2382
2383function toSelector( tokens ) {
2384	var i = 0,
2385		len = tokens.length,
2386		selector = "";
2387	for ( ; i < len; i++ ) {
2388		selector += tokens[ i ].value;
2389	}
2390	return selector;
2391}
2392
2393function addCombinator( matcher, combinator, base ) {
2394	var dir = combinator.dir,
2395		skip = combinator.next,
2396		key = skip || dir,
2397		checkNonElements = base && key === "parentNode",
2398		doneName = done++;
2399
2400	return combinator.first ?
2401
2402		// Check against closest ancestor/preceding element
2403		function( elem, context, xml ) {
2404			while ( ( elem = elem[ dir ] ) ) {
2405				if ( elem.nodeType === 1 || checkNonElements ) {
2406					return matcher( elem, context, xml );
2407				}
2408			}
2409			return false;
2410		} :
2411
2412		// Check against all ancestor/preceding elements
2413		function( elem, context, xml ) {
2414			var oldCache, uniqueCache, outerCache,
2415				newCache = [ dirruns, doneName ];
2416
2417			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2418			if ( xml ) {
2419				while ( ( elem = elem[ dir ] ) ) {
2420					if ( elem.nodeType === 1 || checkNonElements ) {
2421						if ( matcher( elem, context, xml ) ) {
2422							return true;
2423						}
2424					}
2425				}
2426			} else {
2427				while ( ( elem = elem[ dir ] ) ) {
2428					if ( elem.nodeType === 1 || checkNonElements ) {
2429						outerCache = elem[ expando ] || ( elem[ expando ] = {} );
2430
2431						// Support: IE <9 only
2432						// Defend against cloned attroperties (jQuery gh-1709)
2433						uniqueCache = outerCache[ elem.uniqueID ] ||
2434							( outerCache[ elem.uniqueID ] = {} );
2435
2436						if ( skip && skip === elem.nodeName.toLowerCase() ) {
2437							elem = elem[ dir ] || elem;
2438						} else if ( ( oldCache = uniqueCache[ key ] ) &&
2439							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
2440
2441							// Assign to newCache so results back-propagate to previous elements
2442							return ( newCache[ 2 ] = oldCache[ 2 ] );
2443						} else {
2444
2445							// Reuse newcache so results back-propagate to previous elements
2446							uniqueCache[ key ] = newCache;
2447
2448							// A match means we're done; a fail means we have to keep checking
2449							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
2450								return true;
2451							}
2452						}
2453					}
2454				}
2455			}
2456			return false;
2457		};
2458}
2459
2460function elementMatcher( matchers ) {
2461	return matchers.length > 1 ?
2462		function( elem, context, xml ) {
2463			var i = matchers.length;
2464			while ( i-- ) {
2465				if ( !matchers[ i ]( elem, context, xml ) ) {
2466					return false;
2467				}
2468			}
2469			return true;
2470		} :
2471		matchers[ 0 ];
2472}
2473
2474function multipleContexts( selector, contexts, results ) {
2475	var i = 0,
2476		len = contexts.length;
2477	for ( ; i < len; i++ ) {
2478		Sizzle( selector, contexts[ i ], results );
2479	}
2480	return results;
2481}
2482
2483function condense( unmatched, map, filter, context, xml ) {
2484	var elem,
2485		newUnmatched = [],
2486		i = 0,
2487		len = unmatched.length,
2488		mapped = map != null;
2489
2490	for ( ; i < len; i++ ) {
2491		if ( ( elem = unmatched[ i ] ) ) {
2492			if ( !filter || filter( elem, context, xml ) ) {
2493				newUnmatched.push( elem );
2494				if ( mapped ) {
2495					map.push( i );
2496				}
2497			}
2498		}
2499	}
2500
2501	return newUnmatched;
2502}
2503
2504function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2505	if ( postFilter && !postFilter[ expando ] ) {
2506		postFilter = setMatcher( postFilter );
2507	}
2508	if ( postFinder && !postFinder[ expando ] ) {
2509		postFinder = setMatcher( postFinder, postSelector );
2510	}
2511	return markFunction( function( seed, results, context, xml ) {
2512		var temp, i, elem,
2513			preMap = [],
2514			postMap = [],
2515			preexisting = results.length,
2516
2517			// Get initial elements from seed or context
2518			elems = seed || multipleContexts(
2519				selector || "*",
2520				context.nodeType ? [ context ] : context,
2521				[]
2522			),
2523
2524			// Prefilter to get matcher input, preserving a map for seed-results synchronization
2525			matcherIn = preFilter && ( seed || !selector ) ?
2526				condense( elems, preMap, preFilter, context, xml ) :
2527				elems,
2528
2529			matcherOut = matcher ?
2530
2531				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2532				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2533
2534					// ...intermediate processing is necessary
2535					[] :
2536
2537					// ...otherwise use results directly
2538					results :
2539				matcherIn;
2540
2541		// Find primary matches
2542		if ( matcher ) {
2543			matcher( matcherIn, matcherOut, context, xml );
2544		}
2545
2546		// Apply postFilter
2547		if ( postFilter ) {
2548			temp = condense( matcherOut, postMap );
2549			postFilter( temp, [], context, xml );
2550
2551			// Un-match failing elements by moving them back to matcherIn
2552			i = temp.length;
2553			while ( i-- ) {
2554				if ( ( elem = temp[ i ] ) ) {
2555					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
2556				}
2557			}
2558		}
2559
2560		if ( seed ) {
2561			if ( postFinder || preFilter ) {
2562				if ( postFinder ) {
2563
2564					// Get the final matcherOut by condensing this intermediate into postFinder contexts
2565					temp = [];
2566					i = matcherOut.length;
2567					while ( i-- ) {
2568						if ( ( elem = matcherOut[ i ] ) ) {
2569
2570							// Restore matcherIn since elem is not yet a final match
2571							temp.push( ( matcherIn[ i ] = elem ) );
2572						}
2573					}
2574					postFinder( null, ( matcherOut = [] ), temp, xml );
2575				}
2576
2577				// Move matched elements from seed to results to keep them synchronized
2578				i = matcherOut.length;
2579				while ( i-- ) {
2580					if ( ( elem = matcherOut[ i ] ) &&
2581						( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
2582
2583						seed[ temp ] = !( results[ temp ] = elem );
2584					}
2585				}
2586			}
2587
2588		// Add elements to results, through postFinder if defined
2589		} else {
2590			matcherOut = condense(
2591				matcherOut === results ?
2592					matcherOut.splice( preexisting, matcherOut.length ) :
2593					matcherOut
2594			);
2595			if ( postFinder ) {
2596				postFinder( null, results, matcherOut, xml );
2597			} else {
2598				push.apply( results, matcherOut );
2599			}
2600		}
2601	} );
2602}
2603
2604function matcherFromTokens( tokens ) {
2605	var checkContext, matcher, j,
2606		len = tokens.length,
2607		leadingRelative = Expr.relative[ tokens[ 0 ].type ],
2608		implicitRelative = leadingRelative || Expr.relative[ " " ],
2609		i = leadingRelative ? 1 : 0,
2610
2611		// The foundational matcher ensures that elements are reachable from top-level context(s)
2612		matchContext = addCombinator( function( elem ) {
2613			return elem === checkContext;
2614		}, implicitRelative, true ),
2615		matchAnyContext = addCombinator( function( elem ) {
2616			return indexOf( checkContext, elem ) > -1;
2617		}, implicitRelative, true ),
2618		matchers = [ function( elem, context, xml ) {
2619			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2620				( checkContext = context ).nodeType ?
2621					matchContext( elem, context, xml ) :
2622					matchAnyContext( elem, context, xml ) );
2623
2624			// Avoid hanging onto element (issue #299)
2625			checkContext = null;
2626			return ret;
2627		} ];
2628
2629	for ( ; i < len; i++ ) {
2630		if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
2631			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
2632		} else {
2633			matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
2634
2635			// Return special upon seeing a positional matcher
2636			if ( matcher[ expando ] ) {
2637
2638				// Find the next relative operator (if any) for proper handling
2639				j = ++i;
2640				for ( ; j < len; j++ ) {
2641					if ( Expr.relative[ tokens[ j ].type ] ) {
2642						break;
2643					}
2644				}
2645				return setMatcher(
2646					i > 1 && elementMatcher( matchers ),
2647					i > 1 && toSelector(
2648
2649					// If the preceding token was a descendant combinator, insert an implicit any-element `*`
2650					tokens
2651						.slice( 0, i - 1 )
2652						.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
2653					).replace( rtrim, "$1" ),
2654					matcher,
2655					i < j && matcherFromTokens( tokens.slice( i, j ) ),
2656					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
2657					j < len && toSelector( tokens )
2658				);
2659			}
2660			matchers.push( matcher );
2661		}
2662	}
2663
2664	return elementMatcher( matchers );
2665}
2666
2667function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2668	var bySet = setMatchers.length > 0,
2669		byElement = elementMatchers.length > 0,
2670		superMatcher = function( seed, context, xml, results, outermost ) {
2671			var elem, j, matcher,
2672				matchedCount = 0,
2673				i = "0",
2674				unmatched = seed && [],
2675				setMatched = [],
2676				contextBackup = outermostContext,
2677
2678				// We must always have either seed elements or outermost context
2679				elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
2680
2681				// Use integer dirruns iff this is the outermost matcher
2682				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
2683				len = elems.length;
2684
2685			if ( outermost ) {
2686
2687				// Support: IE 11+, Edge 17 - 18+
2688				// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2689				// two documents; shallow comparisons work.
2690				// eslint-disable-next-line eqeqeq
2691				outermostContext = context == document || context || outermost;
2692			}
2693
2694			// Add elements passing elementMatchers directly to results
2695			// Support: IE<9, Safari
2696			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2697			for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
2698				if ( byElement && elem ) {
2699					j = 0;
2700
2701					// Support: IE 11+, Edge 17 - 18+
2702					// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
2703					// two documents; shallow comparisons work.
2704					// eslint-disable-next-line eqeqeq
2705					if ( !context && elem.ownerDocument != document ) {
2706						setDocument( elem );
2707						xml = !documentIsHTML;
2708					}
2709					while ( ( matcher = elementMatchers[ j++ ] ) ) {
2710						if ( matcher( elem, context || document, xml ) ) {
2711							results.push( elem );
2712							break;
2713						}
2714					}
2715					if ( outermost ) {
2716						dirruns = dirrunsUnique;
2717					}
2718				}
2719
2720				// Track unmatched elements for set filters
2721				if ( bySet ) {
2722
2723					// They will have gone through all possible matchers
2724					if ( ( elem = !matcher && elem ) ) {
2725						matchedCount--;
2726					}
2727
2728					// Lengthen the array for every element, matched or not
2729					if ( seed ) {
2730						unmatched.push( elem );
2731					}
2732				}
2733			}
2734
2735			// `i` is now the count of elements visited above, and adding it to `matchedCount`
2736			// makes the latter nonnegative.
2737			matchedCount += i;
2738
2739			// Apply set filters to unmatched elements
2740			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2741			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2742			// no element matchers and no seed.
2743			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2744			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
2745			// numerically zero.
2746			if ( bySet && i !== matchedCount ) {
2747				j = 0;
2748				while ( ( matcher = setMatchers[ j++ ] ) ) {
2749					matcher( unmatched, setMatched, context, xml );
2750				}
2751
2752				if ( seed ) {
2753
2754					// Reintegrate element matches to eliminate the need for sorting
2755					if ( matchedCount > 0 ) {
2756						while ( i-- ) {
2757							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
2758								setMatched[ i ] = pop.call( results );
2759							}
2760						}
2761					}
2762
2763					// Discard index placeholder values to get only actual matches
2764					setMatched = condense( setMatched );
2765				}
2766
2767				// Add matches to results
2768				push.apply( results, setMatched );
2769
2770				// Seedless set matches succeeding multiple successful matchers stipulate sorting
2771				if ( outermost && !seed && setMatched.length > 0 &&
2772					( matchedCount + setMatchers.length ) > 1 ) {
2773
2774					Sizzle.uniqueSort( results );
2775				}
2776			}
2777
2778			// Override manipulation of globals by nested matchers
2779			if ( outermost ) {
2780				dirruns = dirrunsUnique;
2781				outermostContext = contextBackup;
2782			}
2783
2784			return unmatched;
2785		};
2786
2787	return bySet ?
2788		markFunction( superMatcher ) :
2789		superMatcher;
2790}
2791
2792compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2793	var i,
2794		setMatchers = [],
2795		elementMatchers = [],
2796		cached = compilerCache[ selector + " " ];
2797
2798	if ( !cached ) {
2799
2800		// Generate a function of recursive functions that can be used to check each element
2801		if ( !match ) {
2802			match = tokenize( selector );
2803		}
2804		i = match.length;
2805		while ( i-- ) {
2806			cached = matcherFromTokens( match[ i ] );
2807			if ( cached[ expando ] ) {
2808				setMatchers.push( cached );
2809			} else {
2810				elementMatchers.push( cached );
2811			}
2812		}
2813
2814		// Cache the compiled function
2815		cached = compilerCache(
2816			selector,
2817			matcherFromGroupMatchers( elementMatchers, setMatchers )
2818		);
2819
2820		// Save selector and tokenization
2821		cached.selector = selector;
2822	}
2823	return cached;
2824};
2825
2826/**
2827 * A low-level selection function that works with Sizzle's compiled
2828 *  selector functions
2829 * @param {String|Function} selector A selector or a pre-compiled
2830 *  selector function built with Sizzle.compile
2831 * @param {Element} context
2832 * @param {Array} [results]
2833 * @param {Array} [seed] A set of elements to match against
2834 */
2835select = Sizzle.select = function( selector, context, results, seed ) {
2836	var i, tokens, token, type, find,
2837		compiled = typeof selector === "function" && selector,
2838		match = !seed && tokenize( ( selector = compiled.selector || selector ) );
2839
2840	results = results || [];
2841
2842	// Try to minimize operations if there is only one selector in the list and no seed
2843	// (the latter of which guarantees us context)
2844	if ( match.length === 1 ) {
2845
2846		// Reduce context if the leading compound selector is an ID
2847		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
2848		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
2849			context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
2850
2851			context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
2852				.replace( runescape, funescape ), context ) || [] )[ 0 ];
2853			if ( !context ) {
2854				return results;
2855
2856			// Precompiled matchers will still verify ancestry, so step up a level
2857			} else if ( compiled ) {
2858				context = context.parentNode;
2859			}
2860
2861			selector = selector.slice( tokens.shift().value.length );
2862		}
2863
2864		// Fetch a seed set for right-to-left matching
2865		i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
2866		while ( i-- ) {
2867			token = tokens[ i ];
2868
2869			// Abort if we hit a combinator
2870			if ( Expr.relative[ ( type = token.type ) ] ) {
2871				break;
2872			}
2873			if ( ( find = Expr.find[ type ] ) ) {
2874
2875				// Search, expanding context for leading sibling combinators
2876				if ( ( seed = find(
2877					token.matches[ 0 ].replace( runescape, funescape ),
2878					rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
2879						context
2880				) ) ) {
2881
2882					// If seed is empty or no tokens remain, we can return early
2883					tokens.splice( i, 1 );
2884					selector = seed.length && toSelector( tokens );
2885					if ( !selector ) {
2886						push.apply( results, seed );
2887						return results;
2888					}
2889
2890					break;
2891				}
2892			}
2893		}
2894	}
2895
2896	// Compile and execute a filtering function if one is not provided
2897	// Provide `match` to avoid retokenization if we modified the selector above
2898	( compiled || compile( selector, match ) )(
2899		seed,
2900		context,
2901		!documentIsHTML,
2902		results,
2903		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
2904	);
2905	return results;
2906};
2907
2908// One-time assignments
2909
2910// Sort stability
2911support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
2912
2913// Support: Chrome 14-35+
2914// Always assume duplicates if they aren't passed to the comparison function
2915support.detectDuplicates = !!hasDuplicate;
2916
2917// Initialize against the default document
2918setDocument();
2919
2920// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2921// Detached nodes confoundingly follow *each other*
2922support.sortDetached = assert( function( el ) {
2923
2924	// Should return 1, but returns 4 (following)
2925	return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
2926} );
2927
2928// Support: IE<8
2929// Prevent attribute/property "interpolation"
2930// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2931if ( !assert( function( el ) {
2932	el.innerHTML = "<a href='#'></a>";
2933	return el.firstChild.getAttribute( "href" ) === "#";
2934} ) ) {
2935	addHandle( "type|href|height|width", function( elem, name, isXML ) {
2936		if ( !isXML ) {
2937			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2938		}
2939	} );
2940}
2941
2942// Support: IE<9
2943// Use defaultValue in place of getAttribute("value")
2944if ( !support.attributes || !assert( function( el ) {
2945	el.innerHTML = "<input/>";
2946	el.firstChild.setAttribute( "value", "" );
2947	return el.firstChild.getAttribute( "value" ) === "";
2948} ) ) {
2949	addHandle( "value", function( elem, _name, isXML ) {
2950		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2951			return elem.defaultValue;
2952		}
2953	} );
2954}
2955
2956// Support: IE<9
2957// Use getAttributeNode to fetch booleans when getAttribute lies
2958if ( !assert( function( el ) {
2959	return el.getAttribute( "disabled" ) == null;
2960} ) ) {
2961	addHandle( booleans, function( elem, name, isXML ) {
2962		var val;
2963		if ( !isXML ) {
2964			return elem[ name ] === true ? name.toLowerCase() :
2965				( val = elem.getAttributeNode( name ) ) && val.specified ?
2966					val.value :
2967					null;
2968		}
2969	} );
2970}
2971
2972return Sizzle;
2973
2974} )( window );
2975
2976
2977
2978jQuery.find = Sizzle;
2979jQuery.expr = Sizzle.selectors;
2980
2981// Deprecated
2982jQuery.expr[ ":" ] = jQuery.expr.pseudos;
2983jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
2984jQuery.text = Sizzle.getText;
2985jQuery.isXMLDoc = Sizzle.isXML;
2986jQuery.contains = Sizzle.contains;
2987jQuery.escapeSelector = Sizzle.escape;
2988
2989
2990
2991
2992var dir = function( elem, dir, until ) {
2993	var matched = [],
2994		truncate = until !== undefined;
2995
2996	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
2997		if ( elem.nodeType === 1 ) {
2998			if ( truncate && jQuery( elem ).is( until ) ) {
2999				break;
3000			}
3001			matched.push( elem );
3002		}
3003	}
3004	return matched;
3005};
3006
3007
3008var siblings = function( n, elem ) {
3009	var matched = [];
3010
3011	for ( ; n; n = n.nextSibling ) {
3012		if ( n.nodeType === 1 && n !== elem ) {
3013			matched.push( n );
3014		}
3015	}
3016
3017	return matched;
3018};
3019
3020
3021var rneedsContext = jQuery.expr.match.needsContext;
3022
3023
3024
3025function nodeName( elem, name ) {
3026
3027  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
3028
3029};
vendor: 21,546 bytes, lines 3029-3854
3029
3030var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
3031
3032
3033
3034// Implement the identical functionality for filter and not
3035function winnow( elements, qualifier, not ) {
3036	if ( isFunction( qualifier ) ) {
3037		return jQuery.grep( elements, function( elem, i ) {
3038			return !!qualifier.call( elem, i, elem ) !== not;
3039		} );
3040	}
3041
3042	// Single element
3043	if ( qualifier.nodeType ) {
3044		return jQuery.grep( elements, function( elem ) {
3045			return ( elem === qualifier ) !== not;
3046		} );
3047	}
3048
3049	// Arraylike of elements (jQuery, arguments, Array)
3050	if ( typeof qualifier !== "string" ) {
3051		return jQuery.grep( elements, function( elem ) {
3052			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
3053		} );
3054	}
3055
3056	// Filtered directly for both simple and complex selectors
3057	return jQuery.filter( qualifier, elements, not );
3058}
3059
3060jQuery.filter = function( expr, elems, not ) {
3061	var elem = elems[ 0 ];
3062
3063	if ( not ) {
3064		expr = ":not(" + expr + ")";
3065	}
3066
3067	if ( elems.length === 1 && elem.nodeType === 1 ) {
3068		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
3069	}
3070
3071	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
3072		return elem.nodeType === 1;
3073	} ) );
3074};
3075
3076jQuery.fn.extend( {
3077	find: function( selector ) {
3078		var i, ret,
3079			len = this.length,
3080			self = this;
3081
3082		if ( typeof selector !== "string" ) {
3083			return this.pushStack( jQuery( selector ).filter( function() {
3084				for ( i = 0; i < len; i++ ) {
3085					if ( jQuery.contains( self[ i ], this ) ) {
3086						return true;
3087					}
3088				}
3089			} ) );
3090		}
3091
3092		ret = this.pushStack( [] );
3093
3094		for ( i = 0; i < len; i++ ) {
3095			jQuery.find( selector, self[ i ], ret );
3096		}
3097
3098		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
3099	},
3100	filter: function( selector ) {
3101		return this.pushStack( winnow( this, selector || [], false ) );
3102	},
3103	not: function( selector ) {
3104		return this.pushStack( winnow( this, selector || [], true ) );
3105	},
3106	is: function( selector ) {
3107		return !!winnow(
3108			this,
3109
3110			// If this is a positional/relative selector, check membership in the returned set
3111			// so $("p:first").is("p:last") won't return true for a doc with two "p".
3112			typeof selector === "string" && rneedsContext.test( selector ) ?
3113				jQuery( selector ) :
3114				selector || [],
3115			false
3116		).length;
3117	}
3118} );
3119
3120
3121// Initialize a jQuery object
3122
3123
3124// A central reference to the root jQuery(document)
3125var rootjQuery,
3126
3127	// A simple way to check for HTML strings
3128	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3129	// Strict HTML recognition (#11290: must start with <)
3130	// Shortcut simple #id case for speed
3131	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3132
3133	init = jQuery.fn.init = function( selector, context, root ) {
3134		var match, elem;
3135
3136		// HANDLE: $(""), $(null), $(undefined), $(false)
3137		if ( !selector ) {
3138			return this;
3139		}
3140
3141		// Method init() accepts an alternate rootjQuery
3142		// so migrate can support jQuery.sub (gh-2101)
3143		root = root || rootjQuery;
3144
3145		// Handle HTML strings
3146		if ( typeof selector === "string" ) {
3147			if ( selector[ 0 ] === "<" &&
3148				selector[ selector.length - 1 ] === ">" &&
3149				selector.length >= 3 ) {
3150
3151				// Assume that strings that start and end with <> are HTML and skip the regex check
3152				match = [ null, selector, null ];
3153
3154			} else {
3155				match = rquickExpr.exec( selector );
3156			}
3157
3158			// Match html or make sure no context is specified for #id
3159			if ( match && ( match[ 1 ] || !context ) ) {
3160
3161				// HANDLE: $(html) -> $(array)
3162				if ( match[ 1 ] ) {
3163					context = context instanceof jQuery ? context[ 0 ] : context;
3164
3165					// Option to run scripts is true for back-compat
3166					// Intentionally let the error be thrown if parseHTML is not present
3167					jQuery.merge( this, jQuery.parseHTML(
3168						match[ 1 ],
3169						context && context.nodeType ? context.ownerDocument || context : document,
3170						true
3171					) );
3172
3173					// HANDLE: $(html, props)
3174					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
3175						for ( match in context ) {
3176
3177							// Properties of context are called as methods if possible
3178							if ( isFunction( this[ match ] ) ) {
3179								this[ match ]( context[ match ] );
3180
3181							// ...and otherwise set as attributes
3182							} else {
3183								this.attr( match, context[ match ] );
3184							}
3185						}
3186					}
3187
3188					return this;
3189
3190				// HANDLE: $(#id)
3191				} else {
3192					elem = document.getElementById( match[ 2 ] );
3193
3194					if ( elem ) {
3195
3196						// Inject the element directly into the jQuery object
3197						this[ 0 ] = elem;
3198						this.length = 1;
3199					}
3200					return this;
3201				}
3202
3203			// HANDLE: $(expr, $(...))
3204			} else if ( !context || context.jquery ) {
3205				return ( context || root ).find( selector );
3206
3207			// HANDLE: $(expr, context)
3208			// (which is just equivalent to: $(context).find(expr)
3209			} else {
3210				return this.constructor( context ).find( selector );
3211			}
3212
3213		// HANDLE: $(DOMElement)
3214		} else if ( selector.nodeType ) {
3215			this[ 0 ] = selector;
3216			this.length = 1;
3217			return this;
3218
3219		// HANDLE: $(function)
3220		// Shortcut for document ready
3221		} else if ( isFunction( selector ) ) {
3222			return root.ready !== undefined ?
3223				root.ready( selector ) :
3224
3225				// Execute immediately if ready is not present
3226				selector( jQuery );
3227		}
3228
3229		return jQuery.makeArray( selector, this );
3230	};
3231
3232// Give the init function the jQuery prototype for later instantiation
3233init.prototype = jQuery.fn;
3234
3235// Initialize central reference
3236rootjQuery = jQuery( document );
3237
3238
3239var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3240
3241	// Methods guaranteed to produce a unique set when starting from a unique set
3242	guaranteedUnique = {
3243		children: true,
3244		contents: true,
3245		next: true,
3246		prev: true
3247	};
3248
3249jQuery.fn.extend( {
3250	has: function( target ) {
3251		var targets = jQuery( target, this ),
3252			l = targets.length;
3253
3254		return this.filter( function() {
3255			var i = 0;
3256			for ( ; i < l; i++ ) {
3257				if ( jQuery.contains( this, targets[ i ] ) ) {
3258					return true;
3259				}
3260			}
3261		} );
3262	},
3263
3264	closest: function( selectors, context ) {
3265		var cur,
3266			i = 0,
3267			l = this.length,
3268			matched = [],
3269			targets = typeof selectors !== "string" && jQuery( selectors );
3270
3271		// Positional selectors never match, since there's no _selection_ context
3272		if ( !rneedsContext.test( selectors ) ) {
3273			for ( ; i < l; i++ ) {
3274				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
3275
3276					// Always skip document fragments
3277					if ( cur.nodeType < 11 && ( targets ?
3278						targets.index( cur ) > -1 :
3279
3280						// Don't pass non-elements to Sizzle
3281						cur.nodeType === 1 &&
3282							jQuery.find.matchesSelector( cur, selectors ) ) ) {
3283
3284						matched.push( cur );
3285						break;
3286					}
3287				}
3288			}
3289		}
3290
3291		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
3292	},
3293
3294	// Determine the position of an element within the set
3295	index: function( elem ) {
3296
3297		// No argument, return index in parent
3298		if ( !elem ) {
3299			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
3300		}
3301
3302		// Index in selector
3303		if ( typeof elem === "string" ) {
3304			return indexOf.call( jQuery( elem ), this[ 0 ] );
3305		}
3306
3307		// Locate the position of the desired element
3308		return indexOf.call( this,
3309
3310			// If it receives a jQuery object, the first element is used
3311			elem.jquery ? elem[ 0 ] : elem
3312		);
3313	},
3314
3315	add: function( selector, context ) {
3316		return this.pushStack(
3317			jQuery.uniqueSort(
3318				jQuery.merge( this.get(), jQuery( selector, context ) )
3319			)
3320		);
3321	},
3322
3323	addBack: function( selector ) {
3324		return this.add( selector == null ?
3325			this.prevObject : this.prevObject.filter( selector )
3326		);
3327	}
3328} );
3329
3330function sibling( cur, dir ) {
3331	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
3332	return cur;
3333}
3334
3335jQuery.each( {
3336	parent: function( elem ) {
3337		var parent = elem.parentNode;
3338		return parent && parent.nodeType !== 11 ? parent : null;
3339	},
3340	parents: function( elem ) {
3341		return dir( elem, "parentNode" );
3342	},
3343	parentsUntil: function( elem, _i, until ) {
3344		return dir( elem, "parentNode", until );
3345	},
3346	next: function( elem ) {
3347		return sibling( elem, "nextSibling" );
3348	},
3349	prev: function( elem ) {
3350		return sibling( elem, "previousSibling" );
3351	},
3352	nextAll: function( elem ) {
3353		return dir( elem, "nextSibling" );
3354	},
3355	prevAll: function( elem ) {
3356		return dir( elem, "previousSibling" );
3357	},
3358	nextUntil: function( elem, _i, until ) {
3359		return dir( elem, "nextSibling", until );
3360	},
3361	prevUntil: function( elem, _i, until ) {
3362		return dir( elem, "previousSibling", until );
3363	},
3364	siblings: function( elem ) {
3365		return siblings( ( elem.parentNode || {} ).firstChild, elem );
3366	},
3367	children: function( elem ) {
3368		return siblings( elem.firstChild );
3369	},
3370	contents: function( elem ) {
3371		if ( elem.contentDocument != null &&
3372
3373			// Support: IE 11+
3374			// <object> elements with no `data` attribute has an object
3375			// `contentDocument` with a `null` prototype.
3376			getProto( elem.contentDocument ) ) {
3377
3378			return elem.contentDocument;
3379		}
3380
3381		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3382		// Treat the template element as a regular one in browsers that
3383		// don't support it.
3384		if ( nodeName( elem, "template" ) ) {
3385			elem = elem.content || elem;
3386		}
3387
3388		return jQuery.merge( [], elem.childNodes );
3389	}
3390}, function( name, fn ) {
3391	jQuery.fn[ name ] = function( until, selector ) {
3392		var matched = jQuery.map( this, fn, until );
3393
3394		if ( name.slice( -5 ) !== "Until" ) {
3395			selector = until;
3396		}
3397
3398		if ( selector && typeof selector === "string" ) {
3399			matched = jQuery.filter( selector, matched );
3400		}
3401
3402		if ( this.length > 1 ) {
3403
3404			// Remove duplicates
3405			if ( !guaranteedUnique[ name ] ) {
3406				jQuery.uniqueSort( matched );
3407			}
3408
3409			// Reverse order for parents* and prev-derivatives
3410			if ( rparentsprev.test( name ) ) {
3411				matched.reverse();
3412			}
3413		}
3414
3415		return this.pushStack( matched );
3416	};
3417} );
3418var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
3419
3420
3421
3422// Convert String-formatted options into Object-formatted ones
3423function createOptions( options ) {
3424	var object = {};
3425	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
3426		object[ flag ] = true;
3427	} );
3428	return object;
3429}
3430
3431/*
3432 * Create a callback list using the following parameters:
3433 *
3434 *	options: an optional list of space-separated options that will change how
3435 *			the callback list behaves or a more traditional option object
3436 *
3437 * By default a callback list will act like an event callback list and can be
3438 * "fired" multiple times.
3439 *
3440 * Possible options:
3441 *
3442 *	once:			will ensure the callback list can only be fired once (like a Deferred)
3443 *
3444 *	memory:			will keep track of previous values and will call any callback added
3445 *					after the list has been fired right away with the latest "memorized"
3446 *					values (like a Deferred)
3447 *
3448 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3449 *
3450 *	stopOnFalse:	interrupt callings when a callback returns false
3451 *
3452 */
3453jQuery.Callbacks = function( options ) {
3454
3455	// Convert options from String-formatted to Object-formatted if needed
3456	// (we check in cache first)
3457	options = typeof options === "string" ?
3458		createOptions( options ) :
3459		jQuery.extend( {}, options );
3460
3461	var // Flag to know if list is currently firing
3462		firing,
3463
3464		// Last fire value for non-forgettable lists
3465		memory,
3466
3467		// Flag to know if list was already fired
3468		fired,
3469
3470		// Flag to prevent firing
3471		locked,
3472
3473		// Actual callback list
3474		list = [],
3475
3476		// Queue of execution data for repeatable lists
3477		queue = [],
3478
3479		// Index of currently firing callback (modified by add/remove as needed)
3480		firingIndex = -1,
3481
3482		// Fire callbacks
3483		fire = function() {
3484
3485			// Enforce single-firing
3486			locked = locked || options.once;
3487
3488			// Execute callbacks for all pending executions,
3489			// respecting firingIndex overrides and runtime changes
3490			fired = firing = true;
3491			for ( ; queue.length; firingIndex = -1 ) {
3492				memory = queue.shift();
3493				while ( ++firingIndex < list.length ) {
3494
3495					// Run callback and check for early termination
3496					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
3497						options.stopOnFalse ) {
3498
3499						// Jump to end and forget the data so .add doesn't re-fire
3500						firingIndex = list.length;
3501						memory = false;
3502					}
3503				}
3504			}
3505
3506			// Forget the data if we're done with it
3507			if ( !options.memory ) {
3508				memory = false;
3509			}
3510
3511			firing = false;
3512
3513			// Clean up if we're done firing for good
3514			if ( locked ) {
3515
3516				// Keep an empty list if we have data for future add calls
3517				if ( memory ) {
3518					list = [];
3519
3520				// Otherwise, this object is spent
3521				} else {
3522					list = "";
3523				}
3524			}
3525		},
3526
3527		// Actual Callbacks object
3528		self = {
3529
3530			// Add a callback or a collection of callbacks to the list
3531			add: function() {
3532				if ( list ) {
3533
3534					// If we have memory from a past run, we should fire after adding
3535					if ( memory && !firing ) {
3536						firingIndex = list.length - 1;
3537						queue.push( memory );
3538					}
3539
3540					( function add( args ) {
3541						jQuery.each( args, function( _, arg ) {
3542							if ( isFunction( arg ) ) {
3543								if ( !options.unique || !self.has( arg ) ) {
3544									list.push( arg );
3545								}
3546							} else if ( arg && arg.length && toType( arg ) !== "string" ) {
3547
3548								// Inspect recursively
3549								add( arg );
3550							}
3551						} );
3552					} )( arguments );
3553
3554					if ( memory && !firing ) {
3555						fire();
3556					}
3557				}
3558				return this;
3559			},
3560
3561			// Remove a callback from the list
3562			remove: function() {
3563				jQuery.each( arguments, function( _, arg ) {
3564					var index;
3565					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3566						list.splice( index, 1 );
3567
3568						// Handle firing indexes
3569						if ( index <= firingIndex ) {
3570							firingIndex--;
3571						}
3572					}
3573				} );
3574				return this;
3575			},
3576
3577			// Check if a given callback is in the list.
3578			// If no argument is given, return whether or not list has callbacks attached.
3579			has: function( fn ) {
3580				return fn ?
3581					jQuery.inArray( fn, list ) > -1 :
3582					list.length > 0;
3583			},
3584
3585			// Remove all callbacks from the list
3586			empty: function() {
3587				if ( list ) {
3588					list = [];
3589				}
3590				return this;
3591			},
3592
3593			// Disable .fire and .add
3594			// Abort any current/pending executions
3595			// Clear all callbacks and values
3596			disable: function() {
3597				locked = queue = [];
3598				list = memory = "";
3599				return this;
3600			},
3601			disabled: function() {
3602				return !list;
3603			},
3604
3605			// Disable .fire
3606			// Also disable .add unless we have memory (since it would have no effect)
3607			// Abort any pending executions
3608			lock: function() {
3609				locked = queue = [];
3610				if ( !memory && !firing ) {
3611					list = memory = "";
3612				}
3613				return this;
3614			},
3615			locked: function() {
3616				return !!locked;
3617			},
3618
3619			// Call all callbacks with the given context and arguments
3620			fireWith: function( context, args ) {
3621				if ( !locked ) {
3622					args = args || [];
3623					args = [ context, args.slice ? args.slice() : args ];
3624					queue.push( args );
3625					if ( !firing ) {
3626						fire();
3627					}
3628				}
3629				return this;
3630			},
3631
3632			// Call all the callbacks with the given arguments
3633			fire: function() {
3634				self.fireWith( this, arguments );
3635				return this;
3636			},
3637
3638			// To know if the callbacks have already been called at least once
3639			fired: function() {
3640				return !!fired;
3641			}
3642		};
3643
3644	return self;
3645};
3646
3647
3648function Identity( v ) {
3649	return v;
3650}
3651function Thrower( ex ) {
3652	throw ex;
3653}
3654
3655function adoptValue( value, resolve, reject, noValue ) {
3656	var method;
3657
3658	try {
3659
3660		// Check for promise aspect first to privilege synchronous behavior
3661		if ( value && isFunction( ( method = value.promise ) ) ) {
3662			method.call( value ).done( resolve ).fail( reject );
3663
3664		// Other thenables
3665		} else if ( value && isFunction( ( method = value.then ) ) ) {
3666			method.call( value, resolve, reject );
3667
3668		// Other non-thenables
3669		} else {
3670
3671			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3672			// * false: [ value ].slice( 0 ) => resolve( value )
3673			// * true: [ value ].slice( 1 ) => resolve()
3674			resolve.apply( undefined, [ value ].slice( noValue ) );
3675		}
3676
3677	// For Promises/A+, convert exceptions into rejections
3678	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3679	// Deferred#then to conditionally suppress rejection.
3680	} catch ( value ) {
3681
3682		// Support: Android 4.0 only
3683		// Strict mode functions invoked without .call/.apply get global-object context
3684		reject.apply( undefined, [ value ] );
3685	}
3686}
3687
3688jQuery.extend( {
3689
3690	Deferred: function( func ) {
3691		var tuples = [
3692
3693				// action, add listener, callbacks,
3694				// ... .then handlers, argument index, [final state]
3695				[ "notify", "progress", jQuery.Callbacks( "memory" ),
3696					jQuery.Callbacks( "memory" ), 2 ],
3697				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
3698					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
3699				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
3700					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
3701			],
3702			state = "pending",
3703			promise = {
3704				state: function() {
3705					return state;
3706				},
3707				always: function() {
3708					deferred.done( arguments ).fail( arguments );
3709					return this;
3710				},
3711				"catch": function( fn ) {
3712					return promise.then( null, fn );
3713				},
3714
3715				// Keep pipe for back-compat
3716				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
3717					var fns = arguments;
3718
3719					return jQuery.Deferred( function( newDefer ) {
3720						jQuery.each( tuples, function( _i, tuple ) {
3721
3722							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
3723							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
3724
3725							// deferred.progress(function() { bind to newDefer or newDefer.notify })
3726							// deferred.done(function() { bind to newDefer or newDefer.resolve })
3727							// deferred.fail(function() { bind to newDefer or newDefer.reject })
3728							deferred[ tuple[ 1 ] ]( function() {
3729								var returned = fn && fn.apply( this, arguments );
3730								if ( returned && isFunction( returned.promise ) ) {
3731									returned.promise()
3732										.progress( newDefer.notify )
3733										.done( newDefer.resolve )
3734										.fail( newDefer.reject );
3735								} else {
3736									newDefer[ tuple[ 0 ] + "With" ](
3737										this,
3738										fn ? [ returned ] : arguments
3739									);
3740								}
3741							} );
3742						} );
3743						fns = null;
3744					} ).promise();
3745				},
3746				then: function( onFulfilled, onRejected, onProgress ) {
3747					var maxDepth = 0;
3748					function resolve( depth, deferred, handler, special ) {
3749						return function() {
3750							var that = this,
3751								args = arguments,
3752								mightThrow = function() {
3753									var returned, then;
3754
3755									// Support: Promises/A+ section 2.3.3.3.3
3756									// https://promisesaplus.com/#point-59
3757									// Ignore double-resolution attempts
3758									if ( depth < maxDepth ) {
3759										return;
3760									}
3761
3762									returned = handler.apply( that, args );
3763
3764									// Support: Promises/A+ section 2.3.1
3765									// https://promisesaplus.com/#point-48
3766									if ( returned === deferred.promise() ) {
3767										throw new TypeError( "Thenable self-resolution" );
3768									}
3769
3770									// Support: Promises/A+ sections 2.3.3.1, 3.5
3771									// https://promisesaplus.com/#point-54
3772									// https://promisesaplus.com/#point-75
3773									// Retrieve `then` only once
3774									then = returned &&
3775
3776										// Support: Promises/A+ section 2.3.4
3777										// https://promisesaplus.com/#point-64
3778										// Only check objects and functions for thenability
3779										( typeof returned === "object" ||
3780											typeof returned === "function" ) &&
3781										returned.then;
3782
3783									// Handle a returned thenable
3784									if ( isFunction( then ) ) {
3785
3786										// Special processors (notify) just wait for resolution
3787										if ( special ) {
3788											then.call(
3789												returned,
3790												resolve( maxDepth, deferred, Identity, special ),
3791												resolve( maxDepth, deferred, Thrower, special )
3792											);
3793
3794										// Normal processors (resolve) also hook into progress
3795										} else {
3796
3797											// ...and disregard older resolution values
3798											maxDepth++;
3799
3800											then.call(
3801												returned,
3802												resolve( maxDepth, deferred, Identity, special ),
3803												resolve( maxDepth, deferred, Thrower, special ),
3804												resolve( maxDepth, deferred, Identity,
3805													deferred.notifyWith )
3806											);
3807										}
3808
3809									// Handle all other returned values
3810									} else {
3811
3812										// Only substitute handlers pass on context
3813										// and multiple values (non-spec behavior)
3814										if ( handler !== Identity ) {
3815											that = undefined;
3816											args = [ returned ];
3817										}
3818
3819										// Process the value(s)
3820										// Default process is resolve
3821										( special || deferred.resolveWith )( that, args );
3822									}
3823								},
3824
3825								// Only normal processors (resolve) catch and reject exceptions
3826								process = special ?
3827									mightThrow :
3828									function() {
3829										try {
3830											mightThrow();
3831										} catch ( e ) {
3832
3833											if ( jQuery.Deferred.exceptionHook ) {
3834												jQuery.Deferred.exceptionHook( e,
3835													process.stackTrace );
3836											}
3837
3838											// Support: Promises/A+ section 2.3.3.3.4.1
3839											// https://promisesaplus.com/#point-61
3840											// Ignore post-resolution exceptions
3841											if ( depth + 1 >= maxDepth ) {
3842
3843												// Only substitute handlers pass on context
3844												// and multiple values (non-spec behavior)
3845												if ( handler !== Thrower ) {
3846													that = undefined;
3847													args = [ e ];
3848												}
3849
3850												deferred.rejectWith( that, args );
3851											}
3852										}
3853									};
3854
vendor: 7,865 bytes, lines 3855-4173
3855							// Support: Promises/A+ section 2.3.3.3.1
3856							// https://promisesaplus.com/#point-57
3857							// Re-resolve promises immediately to dodge false rejection from
3858							// subsequent errors
3859							if ( depth ) {
3860								process();
3861							} else {
3862
3863								// Call an optional hook to record the stack, in case of exception
3864								// since it's otherwise lost when execution goes async
3865								if ( jQuery.Deferred.getStackHook ) {
3866									process.stackTrace = jQuery.Deferred.getStackHook();
3867								}
3868								window.setTimeout( process );
3869							}
3870						};
3871					}
3872
3873					return jQuery.Deferred( function( newDefer ) {
3874
3875						// progress_handlers.add( ... )
3876						tuples[ 0 ][ 3 ].add(
3877							resolve(
3878								0,
3879								newDefer,
3880								isFunction( onProgress ) ?
3881									onProgress :
3882									Identity,
3883								newDefer.notifyWith
3884							)
3885						);
3886
3887						// fulfilled_handlers.add( ... )
3888						tuples[ 1 ][ 3 ].add(
3889							resolve(
3890								0,
3891								newDefer,
3892								isFunction( onFulfilled ) ?
3893									onFulfilled :
3894									Identity
3895							)
3896						);
3897
3898						// rejected_handlers.add( ... )
3899						tuples[ 2 ][ 3 ].add(
3900							resolve(
3901								0,
3902								newDefer,
3903								isFunction( onRejected ) ?
3904									onRejected :
3905									Thrower
3906							)
3907						);
3908					} ).promise();
3909				},
3910
3911				// Get a promise for this deferred
3912				// If obj is provided, the promise aspect is added to the object
3913				promise: function( obj ) {
3914					return obj != null ? jQuery.extend( obj, promise ) : promise;
3915				}
3916			},
3917			deferred = {};
3918
3919		// Add list-specific methods
3920		jQuery.each( tuples, function( i, tuple ) {
3921			var list = tuple[ 2 ],
3922				stateString = tuple[ 5 ];
3923
3924			// promise.progress = list.add
3925			// promise.done = list.add
3926			// promise.fail = list.add
3927			promise[ tuple[ 1 ] ] = list.add;
3928
3929			// Handle state
3930			if ( stateString ) {
3931				list.add(
3932					function() {
3933
3934						// state = "resolved" (i.e., fulfilled)
3935						// state = "rejected"
3936						state = stateString;
3937					},
3938
3939					// rejected_callbacks.disable
3940					// fulfilled_callbacks.disable
3941					tuples[ 3 - i ][ 2 ].disable,
3942
3943					// rejected_handlers.disable
3944					// fulfilled_handlers.disable
3945					tuples[ 3 - i ][ 3 ].disable,
3946
3947					// progress_callbacks.lock
3948					tuples[ 0 ][ 2 ].lock,
3949
3950					// progress_handlers.lock
3951					tuples[ 0 ][ 3 ].lock
3952				);
3953			}
3954
3955			// progress_handlers.fire
3956			// fulfilled_handlers.fire
3957			// rejected_handlers.fire
3958			list.add( tuple[ 3 ].fire );
3959
3960			// deferred.notify = function() { deferred.notifyWith(...) }
3961			// deferred.resolve = function() { deferred.resolveWith(...) }
3962			// deferred.reject = function() { deferred.rejectWith(...) }
3963			deferred[ tuple[ 0 ] ] = function() {
3964				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
3965				return this;
3966			};
3967
3968			// deferred.notifyWith = list.fireWith
3969			// deferred.resolveWith = list.fireWith
3970			// deferred.rejectWith = list.fireWith
3971			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
3972		} );
3973
3974		// Make the deferred a promise
3975		promise.promise( deferred );
3976
3977		// Call given func if any
3978		if ( func ) {
3979			func.call( deferred, deferred );
3980		}
3981
3982		// All done!
3983		return deferred;
3984	},
3985
3986	// Deferred helper
3987	when: function( singleValue ) {
3988		var
3989
3990			// count of uncompleted subordinates
3991			remaining = arguments.length,
3992
3993			// count of unprocessed arguments
3994			i = remaining,
3995
3996			// subordinate fulfillment data
3997			resolveContexts = Array( i ),
3998			resolveValues = slice.call( arguments ),
3999
4000			// the master Deferred
4001			master = jQuery.Deferred(),
4002
4003			// subordinate callback factory
4004			updateFunc = function( i ) {
4005				return function( value ) {
4006					resolveContexts[ i ] = this;
4007					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
4008					if ( !( --remaining ) ) {
4009						master.resolveWith( resolveContexts, resolveValues );
4010					}
4011				};
4012			};
4013
4014		// Single- and empty arguments are adopted like Promise.resolve
4015		if ( remaining <= 1 ) {
4016			adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
4017				!remaining );
4018
4019			// Use .then() to unwrap secondary thenables (cf. gh-3000)
4020			if ( master.state() === "pending" ||
4021				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
4022
4023				return master.then();
4024			}
4025		}
4026
4027		// Multiple arguments are aggregated like Promise.all array elements
4028		while ( i-- ) {
4029			adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
4030		}
4031
4032		return master.promise();
4033	}
4034} );
4035
4036
4037// These usually indicate a programmer mistake during development,
4038// warn about them ASAP rather than swallowing them by default.
4039var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
4040
4041jQuery.Deferred.exceptionHook = function( error, stack ) {
4042
4043	// Support: IE 8 - 9 only
4044	// Console exists when dev tools are open, which can happen at any time
4045	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
4046		window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
4047	}
4048};
4049
4050
4051
4052
4053jQuery.readyException = function( error ) {
4054	window.setTimeout( function() {
4055		throw error;
4056	} );
4057};
4058
4059
4060
4061
4062// The deferred used on DOM ready
4063var readyList = jQuery.Deferred();
4064
4065jQuery.fn.ready = function( fn ) {
4066
4067	readyList
4068		.then( fn )
4069
4070		// Wrap jQuery.readyException in a function so that the lookup
4071		// happens at the time of error handling instead of callback
4072		// registration.
4073		.catch( function( error ) {
4074			jQuery.readyException( error );
4075		} );
4076
4077	return this;
4078};
4079
4080jQuery.extend( {
4081
4082	// Is the DOM ready to be used? Set to true once it occurs.
4083	isReady: false,
4084
4085	// A counter to track how many items to wait for before
4086	// the ready event fires. See #6781
4087	readyWait: 1,
4088
4089	// Handle when the DOM is ready
4090	ready: function( wait ) {
4091
4092		// Abort if there are pending holds or we're already ready
4093		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
4094			return;
4095		}
4096
4097		// Remember that the DOM is ready
4098		jQuery.isReady = true;
4099
4100		// If a normal DOM Ready event fired, decrement, and wait if need be
4101		if ( wait !== true && --jQuery.readyWait > 0 ) {
4102			return;
4103		}
4104
4105		// If there are functions bound, to execute
4106		readyList.resolveWith( document, [ jQuery ] );
4107	}
4108} );
4109
4110jQuery.ready.then = readyList.then;
4111
4112// The ready event handler and self cleanup method
4113function completed() {
4114	document.removeEventListener( "DOMContentLoaded", completed );
4115	window.removeEventListener( "load", completed );
4116	jQuery.ready();
4117}
4118
4119// Catch cases where $(document).ready() is called
4120// after the browser event has already occurred.
4121// Support: IE <=9 - 10 only
4122// Older IE sometimes signals "interactive" too soon
4123if ( document.readyState === "complete" ||
4124	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
4125
4126	// Handle it asynchronously to allow scripts the opportunity to delay ready
4127	window.setTimeout( jQuery.ready );
4128
4129} else {
4130
4131	// Use the handy event callback
4132	document.addEventListener( "DOMContentLoaded", completed );
4133
4134	// A fallback to window.onload, that will always work
4135	window.addEventListener( "load", completed );
4136}
4137
4138
4139
4140
4141// Multifunctional method to get and set values of a collection
4142// The value/s can optionally be executed if it's a function
4143var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
4144	var i = 0,
4145		len = elems.length,
4146		bulk = key == null;
4147
4148	// Sets many values
4149	if ( toType( key ) === "object" ) {
4150		chainable = true;
4151		for ( i in key ) {
4152			access( elems, fn, i, key[ i ], true, emptyGet, raw );
4153		}
4154
4155	// Sets one value
4156	} else if ( value !== undefined ) {
4157		chainable = true;
4158
4159		if ( !isFunction( value ) ) {
4160			raw = true;
4161		}
4162
4163		if ( bulk ) {
4164
4165			// Bulk operations run against the entire set
4166			if ( raw ) {
4167				fn.call( elems, value );
4168				fn = null;
4169
4170			// ...except when executing function values
4171			} else {
4172				bulk = fn;
4173				fn = function( elem, 
4173_key, value ) {
4174					return bulk.call( jQuery( elem ), value );
4175				};
4176			}
4177		}
4178
4179		if ( fn ) {
4180			for ( ; i < len; i++ ) {
4181				fn(
4182					elems[ i ], key, raw ?
4183					value :
vendor: 22,305 bytes, lines 4184-5092
4184					value.call( elems[ i ], i, fn( elems[ i ], key ) )
4185				);
4186			}
4187		}
4188	}
4189
4190	if ( chainable ) {
4191		return elems;
4192	}
4193
4194	// Gets
4195	if ( bulk ) {
4196		return fn.call( elems );
4197	}
4198
4199	return len ? fn( elems[ 0 ], key ) : emptyGet;
4200};
4201
4202
4203// Matches dashed string for camelizing
4204var rmsPrefix = /^-ms-/,
4205	rdashAlpha = /-([a-z])/g;
4206
4207// Used by camelCase as callback to replace()
4208function fcamelCase( _all, letter ) {
4209	return letter.toUpperCase();
4210}
4211
4212// Convert dashed to camelCase; used by the css and data modules
4213// Support: IE <=9 - 11, Edge 12 - 15
4214// Microsoft forgot to hump their vendor prefix (#9572)
4215function camelCase( string ) {
4216	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
4217}
4218var acceptData = function( owner ) {
4219
4220	// Accepts only:
4221	//  - Node
4222	//    - Node.ELEMENT_NODE
4223	//    - Node.DOCUMENT_NODE
4224	//  - Object
4225	//    - Any
4226	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
4227};
4228
4229
4230
4231
4232function Data() {
4233	this.expando = jQuery.expando + Data.uid++;
4234}
4235
4236Data.uid = 1;
4237
4238Data.prototype = {
4239
4240	cache: function( owner ) {
4241
4242		// Check if the owner object already has a cache
4243		var value = owner[ this.expando ];
4244
4245		// If not, create one
4246		if ( !value ) {
4247			value = {};
4248
4249			// We can accept data for non-element nodes in modern browsers,
4250			// but we should not, see #8335.
4251			// Always return an empty object.
4252			if ( acceptData( owner ) ) {
4253
4254				// If it is a node unlikely to be stringify-ed or looped over
4255				// use plain assignment
4256				if ( owner.nodeType ) {
4257					owner[ this.expando ] = value;
4258
4259				// Otherwise secure it in a non-enumerable property
4260				// configurable must be true to allow the property to be
4261				// deleted when data is removed
4262				} else {
4263					Object.defineProperty( owner, this.expando, {
4264						value: value,
4265						configurable: true
4266					} );
4267				}
4268			}
4269		}
4270
4271		return value;
4272	},
4273	set: function( owner, data, value ) {
4274		var prop,
4275			cache = this.cache( owner );
4276
4277		// Handle: [ owner, key, value ] args
4278		// Always use camelCase key (gh-2257)
4279		if ( typeof data === "string" ) {
4280			cache[ camelCase( data ) ] = value;
4281
4282		// Handle: [ owner, { properties } ] args
4283		} else {
4284
4285			// Copy the properties one-by-one to the cache object
4286			for ( prop in data ) {
4287				cache[ camelCase( prop ) ] = data[ prop ];
4288			}
4289		}
4290		return cache;
4291	},
4292	get: function( owner, key ) {
4293		return key === undefined ?
4294			this.cache( owner ) :
4295
4296			// Always use camelCase key (gh-2257)
4297			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
4298	},
4299	access: function( owner, key, value ) {
4300
4301		// In cases where either:
4302		//
4303		//   1. No key was specified
4304		//   2. A string key was specified, but no value provided
4305		//
4306		// Take the "read" path and allow the get method to determine
4307		// which value to return, respectively either:
4308		//
4309		//   1. The entire cache object
4310		//   2. The data stored at the key
4311		//
4312		if ( key === undefined ||
4313				( ( key && typeof key === "string" ) && value === undefined ) ) {
4314
4315			return this.get( owner, key );
4316		}
4317
4318		// When the key is not a string, or both a key and value
4319		// are specified, set or extend (existing objects) with either:
4320		//
4321		//   1. An object of properties
4322		//   2. A key and value
4323		//
4324		this.set( owner, key, value );
4325
4326		// Since the "set" path can have two possible entry points
4327		// return the expected data based on which path was taken[*]
4328		return value !== undefined ? value : key;
4329	},
4330	remove: function( owner, key ) {
4331		var i,
4332			cache = owner[ this.expando ];
4333
4334		if ( cache === undefined ) {
4335			return;
4336		}
4337
4338		if ( key !== undefined ) {
4339
4340			// Support array or space separated string of keys
4341			if ( Array.isArray( key ) ) {
4342
4343				// If key is an array of keys...
4344				// We always set camelCase keys, so remove that.
4345				key = key.map( camelCase );
4346			} else {
4347				key = camelCase( key );
4348
4349				// If a key with the spaces exists, use it.
4350				// Otherwise, create an array by matching non-whitespace
4351				key = key in cache ?
4352					[ key ] :
4353					( key.match( rnothtmlwhite ) || [] );
4354			}
4355
4356			i = key.length;
4357
4358			while ( i-- ) {
4359				delete cache[ key[ i ] ];
4360			}
4361		}
4362
4363		// Remove the expando if there's no more data
4364		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
4365
4366			// Support: Chrome <=35 - 45
4367			// Webkit & Blink performance suffers when deleting properties
4368			// from DOM nodes, so set to undefined instead
4369			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
4370			if ( owner.nodeType ) {
4371				owner[ this.expando ] = undefined;
4372			} else {
4373				delete owner[ this.expando ];
4374			}
4375		}
4376	},
4377	hasData: function( owner ) {
4378		var cache = owner[ this.expando ];
4379		return cache !== undefined && !jQuery.isEmptyObject( cache );
4380	}
4381};
4382var dataPriv = new Data();
4383
4384var dataUser = new Data();
4385
4386
4387
4388//	Implementation Summary
4389//
4390//	1. Enforce API surface and semantic compatibility with 1.9.x branch
4391//	2. Improve the module's maintainability by reducing the storage
4392//		paths to a single mechanism.
4393//	3. Use the same single mechanism to support "private" and "user" data.
4394//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4395//	5. Avoid exposing implementation details on user objects (eg. expando properties)
4396//	6. Provide a clear path for implementation upgrade to WeakMap in 2014
4397
4398var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4399	rmultiDash = /[A-Z]/g;
4400
4401function getData( data ) {
4402	if ( data === "true" ) {
4403		return true;
4404	}
4405
4406	if ( data === "false" ) {
4407		return false;
4408	}
4409
4410	if ( data === "null" ) {
4411		return null;
4412	}
4413
4414	// Only convert to a number if it doesn't change the string
4415	if ( data === +data + "" ) {
4416		return +data;
4417	}
4418
4419	if ( rbrace.test( data ) ) {
4420		return JSON.parse( data );
4421	}
4422
4423	return data;
4424}
4425
4426function dataAttr( elem, key, data ) {
4427	var name;
4428
4429	// If nothing was found internally, try to fetch any
4430	// data from the HTML5 data-* attribute
4431	if ( data === undefined && elem.nodeType === 1 ) {
4432		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
4433		data = elem.getAttribute( name );
4434
4435		if ( typeof data === "string" ) {
4436			try {
4437				data = getData( data );
4438			} catch ( e ) {}
4439
4440			// Make sure we set the data so it isn't changed later
4441			dataUser.set( elem, key, data );
4442		} else {
4443			data = undefined;
4444		}
4445	}
4446	return data;
4447}
4448
4449jQuery.extend( {
4450	hasData: function( elem ) {
4451		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
4452	},
4453
4454	data: function( elem, name, data ) {
4455		return dataUser.access( elem, name, data );
4456	},
4457
4458	removeData: function( elem, name ) {
4459		dataUser.remove( elem, name );
4460	},
4461
4462	// TODO: Now that all calls to _data and _removeData have been replaced
4463	// with direct calls to dataPriv methods, these can be deprecated.
4464	_data: function( elem, name, data ) {
4465		return dataPriv.access( elem, name, data );
4466	},
4467
4468	_removeData: function( elem, name ) {
4469		dataPriv.remove( elem, name );
4470	}
4471} );
4472
4473jQuery.fn.extend( {
4474	data: function( key, value ) {
4475		var i, name, data,
4476			elem = this[ 0 ],
4477			attrs = elem && elem.attributes;
4478
4479		// Gets all values
4480		if ( key === undefined ) {
4481			if ( this.length ) {
4482				data = dataUser.get( elem );
4483
4484				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
4485					i = attrs.length;
4486					while ( i-- ) {
4487
4488						// Support: IE 11 only
4489						// The attrs elements can be null (#14894)
4490						if ( attrs[ i ] ) {
4491							name = attrs[ i ].name;
4492							if ( name.indexOf( "data-" ) === 0 ) {
4493								name = camelCase( name.slice( 5 ) );
4494								dataAttr( elem, name, data[ name ] );
4495							}
4496						}
4497					}
4498					dataPriv.set( elem, "hasDataAttrs", true );
4499				}
4500			}
4501
4502			return data;
4503		}
4504
4505		// Sets multiple values
4506		if ( typeof key === "object" ) {
4507			return this.each( function() {
4508				dataUser.set( this, key );
4509			} );
4510		}
4511
4512		return access( this, function( value ) {
4513			var data;
4514
4515			// The calling jQuery object (element matches) is not empty
4516			// (and therefore has an element appears at this[ 0 ]) and the
4517			// `value` parameter was not undefined. An empty jQuery object
4518			// will result in `undefined` for elem = this[ 0 ] which will
4519			// throw an exception if an attempt to read a data cache is made.
4520			if ( elem && value === undefined ) {
4521
4522				// Attempt to get data from the cache
4523				// The key will always be camelCased in Data
4524				data = dataUser.get( elem, key );
4525				if ( data !== undefined ) {
4526					return data;
4527				}
4528
4529				// Attempt to "discover" the data in
4530				// HTML5 custom data-* attrs
4531				data = dataAttr( elem, key );
4532				if ( data !== undefined ) {
4533					return data;
4534				}
4535
4536				// We tried really hard, but the data doesn't exist.
4537				return;
4538			}
4539
4540			// Set the data...
4541			this.each( function() {
4542
4543				// We always store the camelCased key
4544				dataUser.set( this, key, value );
4545			} );
4546		}, null, value, arguments.length > 1, null, true );
4547	},
4548
4549	removeData: function( key ) {
4550		return this.each( function() {
4551			dataUser.remove( this, key );
4552		} );
4553	}
4554} );
4555
4556
4557jQuery.extend( {
4558	queue: function( elem, type, data ) {
4559		var queue;
4560
4561		if ( elem ) {
4562			type = ( type || "fx" ) + "queue";
4563			queue = dataPriv.get( elem, type );
4564
4565			// Speed up dequeue by getting out quickly if this is just a lookup
4566			if ( data ) {
4567				if ( !queue || Array.isArray( data ) ) {
4568					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
4569				} else {
4570					queue.push( data );
4571				}
4572			}
4573			return queue || [];
4574		}
4575	},
4576
4577	dequeue: function( elem, type ) {
4578		type = type || "fx";
4579
4580		var queue = jQuery.queue( elem, type ),
4581			startLength = queue.length,
4582			fn = queue.shift(),
4583			hooks = jQuery._queueHooks( elem, type ),
4584			next = function() {
4585				jQuery.dequeue( elem, type );
4586			};
4587
4588		// If the fx queue is dequeued, always remove the progress sentinel
4589		if ( fn === "inprogress" ) {
4590			fn = queue.shift();
4591			startLength--;
4592		}
4593
4594		if ( fn ) {
4595
4596			// Add a progress sentinel to prevent the fx queue from being
4597			// automatically dequeued
4598			if ( type === "fx" ) {
4599				queue.unshift( "inprogress" );
4600			}
4601
4602			// Clear up the last queue stop function
4603			delete hooks.stop;
4604			fn.call( elem, next, hooks );
4605		}
4606
4607		if ( !startLength && hooks ) {
4608			hooks.empty.fire();
4609		}
4610	},
4611
4612	// Not public - generate a queueHooks object, or return the current one
4613	_queueHooks: function( elem, type ) {
4614		var key = type + "queueHooks";
4615		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
4616			empty: jQuery.Callbacks( "once memory" ).add( function() {
4617				dataPriv.remove( elem, [ type + "queue", key ] );
4618			} )
4619		} );
4620	}
4621} );
4622
4623jQuery.fn.extend( {
4624	queue: function( type, data ) {
4625		var setter = 2;
4626
4627		if ( typeof type !== "string" ) {
4628			data = type;
4629			type = "fx";
4630			setter--;
4631		}
4632
4633		if ( arguments.length < setter ) {
4634			return jQuery.queue( this[ 0 ], type );
4635		}
4636
4637		return data === undefined ?
4638			this :
4639			this.each( function() {
4640				var queue = jQuery.queue( this, type, data );
4641
4642				// Ensure a hooks for this queue
4643				jQuery._queueHooks( this, type );
4644
4645				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
4646					jQuery.dequeue( this, type );
4647				}
4648			} );
4649	},
4650	dequeue: function( type ) {
4651		return this.each( function() {
4652			jQuery.dequeue( this, type );
4653		} );
4654	},
4655	clearQueue: function( type ) {
4656		return this.queue( type || "fx", [] );
4657	},
4658
4659	// Get a promise resolved when queues of a certain type
4660	// are emptied (fx is the type by default)
4661	promise: function( type, obj ) {
4662		var tmp,
4663			count = 1,
4664			defer = jQuery.Deferred(),
4665			elements = this,
4666			i = this.length,
4667			resolve = function() {
4668				if ( !( --count ) ) {
4669					defer.resolveWith( elements, [ elements ] );
4670				}
4671			};
4672
4673		if ( typeof type !== "string" ) {
4674			obj = type;
4675			type = undefined;
4676		}
4677		type = type || "fx";
4678
4679		while ( i-- ) {
4680			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
4681			if ( tmp && tmp.empty ) {
4682				count++;
4683				tmp.empty.add( resolve );
4684			}
4685		}
4686		resolve();
4687		return defer.promise( obj );
4688	}
4689} );
4690var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
4691
4692var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
4693
4694
4695var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
4696
4697var documentElement = document.documentElement;
4698
4699
4700
4701	var isAttached = function( elem ) {
4702			return jQuery.contains( elem.ownerDocument, elem );
4703		},
4704		composed = { composed: true };
4705
4706	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
4707	// Check attachment across shadow DOM boundaries when possible (gh-3504)
4708	// Support: iOS 10.0-10.2 only
4709	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
4710	// leading to errors. We need to check for `getRootNode`.
4711	if ( documentElement.getRootNode ) {
4712		isAttached = function( elem ) {
4713			return jQuery.contains( elem.ownerDocument, elem ) ||
4714				elem.getRootNode( composed ) === elem.ownerDocument;
4715		};
4716	}
4717var isHiddenWithinTree = function( elem, el ) {
4718
4719		// isHiddenWithinTree might be called from jQuery#filter function;
4720		// in that case, element will be second argument
4721		elem = el || elem;
4722
4723		// Inline style trumps all
4724		return elem.style.display === "none" ||
4725			elem.style.display === "" &&
4726
4727			// Otherwise, check computed style
4728			// Support: Firefox <=43 - 45
4729			// Disconnected elements can have computed display: none, so first confirm that elem is
4730			// in the document.
4731			isAttached( elem ) &&
4732
4733			jQuery.css( elem, "display" ) === "none";
4734	};
4735
4736
4737
4738function adjustCSS( elem, prop, valueParts, tween ) {
4739	var adjusted, scale,
4740		maxIterations = 20,
4741		currentValue = tween ?
4742			function() {
4743				return tween.cur();
4744			} :
4745			function() {
4746				return jQuery.css( elem, prop, "" );
4747			},
4748		initial = currentValue(),
4749		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
4750
4751		// Starting value computation is required for potential unit mismatches
4752		initialInUnit = elem.nodeType &&
4753			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
4754			rcssNum.exec( jQuery.css( elem, prop ) );
4755
4756	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
4757
4758		// Support: Firefox <=54
4759		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4760		initial = initial / 2;
4761
4762		// Trust units reported by jQuery.css
4763		unit = unit || initialInUnit[ 3 ];
4764
4765		// Iteratively approximate from a nonzero starting point
4766		initialInUnit = +initial || 1;
4767
4768		while ( maxIterations-- ) {
4769
4770			// Evaluate and update our best guess (doubling guesses that zero out).
4771			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4772			jQuery.style( elem, prop, initialInUnit + unit );
4773			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
4774				maxIterations = 0;
4775			}
4776			initialInUnit = initialInUnit / scale;
4777
4778		}
4779
4780		initialInUnit = initialInUnit * 2;
4781		jQuery.style( elem, prop, initialInUnit + unit );
4782
4783		// Make sure we update the tween properties later on
4784		valueParts = valueParts || [];
4785	}
4786
4787	if ( valueParts ) {
4788		initialInUnit = +initialInUnit || +initial || 0;
4789
4790		// Apply relative offset (+=/-=) if specified
4791		adjusted = valueParts[ 1 ] ?
4792			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
4793			+valueParts[ 2 ];
4794		if ( tween ) {
4795			tween.unit = unit;
4796			tween.start = initialInUnit;
4797			tween.end = adjusted;
4798		}
4799	}
4800	return adjusted;
4801}
4802
4803
4804var defaultDisplayMap = {};
4805
4806function getDefaultDisplay( elem ) {
4807	var temp,
4808		doc = elem.ownerDocument,
4809		nodeName = elem.nodeName,
4810		display = defaultDisplayMap[ nodeName ];
4811
4812	if ( display ) {
4813		return display;
4814	}
4815
4816	temp = doc.body.appendChild( doc.createElement( nodeName ) );
4817	display = jQuery.css( temp, "display" );
4818
4819	temp.parentNode.removeChild( temp );
4820
4821	if ( display === "none" ) {
4822		display = "block";
4823	}
4824	defaultDisplayMap[ nodeName ] = display;
4825
4826	return display;
4827}
4828
4829function showHide( elements, show ) {
4830	var display, elem,
4831		values = [],
4832		index = 0,
4833		length = elements.length;
4834
4835	// Determine new display value for elements that need to change
4836	for ( ; index < length; index++ ) {
4837		elem = elements[ index ];
4838		if ( !elem.style ) {
4839			continue;
4840		}
4841
4842		display = elem.style.display;
4843		if ( show ) {
4844
4845			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4846			// check is required in this first loop unless we have a nonempty display value (either
4847			// inline or about-to-be-restored)
4848			if ( display === "none" ) {
4849				values[ index ] = dataPriv.get( elem, "display" ) || null;
4850				if ( !values[ index ] ) {
4851					elem.style.display = "";
4852				}
4853			}
4854			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
4855				values[ index ] = getDefaultDisplay( elem );
4856			}
4857		} else {
4858			if ( display !== "none" ) {
4859				values[ index ] = "none";
4860
4861				// Remember what we're overwriting
4862				dataPriv.set( elem, "display", display );
4863			}
4864		}
4865	}
4866
4867	// Set the display of the elements in a second loop to avoid constant reflow
4868	for ( index = 0; index < length; index++ ) {
4869		if ( values[ index ] != null ) {
4870			elements[ index ].style.display = values[ index ];
4871		}
4872	}
4873
4874	return elements;
4875}
4876
4877jQuery.fn.extend( {
4878	show: function() {
4879		return showHide( this, true );
4880	},
4881	hide: function() {
4882		return showHide( this );
4883	},
4884	toggle: function( state ) {
4885		if ( typeof state === "boolean" ) {
4886			return state ? this.show() : this.hide();
4887		}
4888
4889		return this.each( function() {
4890			if ( isHiddenWithinTree( this ) ) {
4891				jQuery( this ).show();
4892			} else {
4893				jQuery( this ).hide();
4894			}
4895		} );
4896	}
4897} );
4898var rcheckableType = ( /^(?:checkbox|radio)$/i );
4899
4900var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
4901
4902var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
4903
4904
4905
4906( function() {
4907	var fragment = document.createDocumentFragment(),
4908		div = fragment.appendChild( document.createElement( "div" ) ),
4909		input = document.createElement( "input" );
4910
4911	// Support: Android 4.0 - 4.3 only
4912	// Check state lost if the name is set (#11217)
4913	// Support: Windows Web Apps (WWA)
4914	// `name` and `type` must use .setAttribute for WWA (#14901)
4915	input.setAttribute( "type", "radio" );
4916	input.setAttribute( "checked", "checked" );
4917	input.setAttribute( "name", "t" );
4918
4919	div.appendChild( input );
4920
4921	// Support: Android <=4.1 only
4922	// Older WebKit doesn't clone checked state correctly in fragments
4923	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
4924
4925	// Support: IE <=11 only
4926	// Make sure textarea (and checkbox) defaultValue is properly cloned
4927	div.innerHTML = "<textarea>x</textarea>";
4928	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
4929
4930	// Support: IE <=9 only
4931	// IE <=9 replaces <option> tags with their contents when inserted outside of
4932	// the select element.
4933	div.innerHTML = "<option></option>";
4934	support.option = !!div.lastChild;
4935} )();
4936
4937
4938// We have to close these tags to support XHTML (#13200)
4939var wrapMap = {
4940
4941	// XHTML parsers do not magically insert elements in the
4942	// same way that tag soup parsers do. So we cannot shorten
4943	// this by omitting <tbody> or other required elements.
4944	thead: [ 1, "<table>", "</table>" ],
4945	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
4946	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
4947	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
4948
4949	_default: [ 0, "", "" ]
4950};
4951
4952wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
4953wrapMap.th = wrapMap.td;
4954
4955// Support: IE <=9 only
4956if ( !support.option ) {
4957	wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
4958}
4959
4960
4961function getAll( context, tag ) {
4962
4963	// Support: IE <=9 - 11 only
4964	// Use typeof to avoid zero-argument method invocation on host objects (#15151)
4965	var ret;
4966
4967	if ( typeof context.getElementsByTagName !== "undefined" ) {
4968		ret = context.getElementsByTagName( tag || "*" );
4969
4970	} else if ( typeof context.querySelectorAll !== "undefined" ) {
4971		ret = context.querySelectorAll( tag || "*" );
4972
4973	} else {
4974		ret = [];
4975	}
4976
4977	if ( tag === undefined || tag && nodeName( context, tag ) ) {
4978		return jQuery.merge( [ context ], ret );
4979	}
4980
4981	return ret;
4982}
4983
4984
4985// Mark scripts as having already been evaluated
4986function setGlobalEval( elems, refElements ) {
4987	var i = 0,
4988		l = elems.length;
4989
4990	for ( ; i < l; i++ ) {
4991		dataPriv.set(
4992			elems[ i ],
4993			"globalEval",
4994			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
4995		);
4996	}
4997}
4998
4999
5000var rhtml = /<|&#?\w+;/;
5001
5002function buildFragment( elems, context, scripts, selection, ignored ) {
5003	var elem, tmp, tag, wrap, attached, j,
5004		fragment = context.createDocumentFragment(),
5005		nodes = [],
5006		i = 0,
5007		l = elems.length;
5008
5009	for ( ; i < l; i++ ) {
5010		elem = elems[ i ];
5011
5012		if ( elem || elem === 0 ) {
5013
5014			// Add nodes directly
5015			if ( toType( elem ) === "object" ) {
5016
5017				// Support: Android <=4.0 only, PhantomJS 1 only
5018				// push.apply(_, arraylike) throws on ancient WebKit
5019				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
5020
5021			// Convert non-html into a text node
5022			} else if ( !rhtml.test( elem ) ) {
5023				nodes.push( context.createTextNode( elem ) );
5024
5025			// Convert html into DOM nodes
5026			} else {
5027				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
5028
5029				// Deserialize a standard representation
5030				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
5031				wrap = wrapMap[ tag ] || wrapMap._default;
5032				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
5033
5034				// Descend through wrappers to the right content
5035				j = wrap[ 0 ];
5036				while ( j-- ) {
5037					tmp = tmp.lastChild;
5038				}
5039
5040				// Support: Android <=4.0 only, PhantomJS 1 only
5041				// push.apply(_, arraylike) throws on ancient WebKit
5042				jQuery.merge( nodes, tmp.childNodes );
5043
5044				// Remember the top-level container
5045				tmp = fragment.firstChild;
5046
5047				// Ensure the created nodes are orphaned (#12392)
5048				tmp.textContent = "";
5049			}
5050		}
5051	}
5052
5053	// Remove wrapper from fragment
5054	fragment.textContent = "";
5055
5056	i = 0;
5057	while ( ( elem = nodes[ i++ ] ) ) {
5058
5059		// Skip elements already in the context collection (trac-4087)
5060		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
5061			if ( ignored ) {
5062				ignored.push( elem );
5063			}
5064			continue;
5065		}
5066
5067		attached = isAttached( elem );
5068
5069		// Append to fragment
5070		tmp = getAll( fragment.appendChild( elem ), "script" );
5071
5072		// Preserve script evaluation history
5073		if ( attached ) {
5074			setGlobalEval( tmp );
5075		}
5076
5077		// Capture executables
5078		if ( scripts ) {
5079			j = 0;
5080			while ( ( elem = tmp[ j++ ] ) ) {
5081				if ( rscriptType.test( elem.type || "" ) ) {
5082					scripts.push( elem );
5083				}
5084			}
5085		}
5086	}
5087
5088	return fragment;
5089}
5090
5091
5092var
5092
vendor: 6,183 bytes, lines 5093-5318
5093	rkeyEvent = /^key/,
5094	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
5095	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
5096
5097function returnTrue() {
5098	return true;
5099}
5100
5101function returnFalse() {
5102	return false;
5103}
5104
5105// Support: IE <=9 - 11+
5106// focus() and blur() are asynchronous, except when they are no-op.
5107// So expect focus to be synchronous when the element is already active,
5108// and blur to be synchronous when the element is not already active.
5109// (focus and blur are always synchronous in other supported browsers,
5110// this just defines when we can count on it).
5111function expectSync( elem, type ) {
5112	return ( elem === safeActiveElement() ) === ( type === "focus" );
5113}
5114
5115// Support: IE <=9 only
5116// Accessing document.activeElement can throw unexpectedly
5117// https://bugs.jquery.com/ticket/13393
5118function safeActiveElement() {
5119	try {
5120		return document.activeElement;
5121	} catch ( err ) { }
5122}
5123
5124function on( elem, types, selector, data, fn, one ) {
5125	var origFn, type;
5126
5127	// Types can be a map of types/handlers
5128	if ( typeof types === "object" ) {
5129
5130		// ( types-Object, selector, data )
5131		if ( typeof selector !== "string" ) {
5132
5133			// ( types-Object, data )
5134			data = data || selector;
5135			selector = undefined;
5136		}
5137		for ( type in types ) {
5138			on( elem, type, selector, data, types[ type ], one );
5139		}
5140		return elem;
5141	}
5142
5143	if ( data == null && fn == null ) {
5144
5145		// ( types, fn )
5146		fn = selector;
5147		data = selector = undefined;
5148	} else if ( fn == null ) {
5149		if ( typeof selector === "string" ) {
5150
5151			// ( types, selector, fn )
5152			fn = data;
5153			data = undefined;
5154		} else {
5155
5156			// ( types, data, fn )
5157			fn = data;
5158			data = selector;
5159			selector = undefined;
5160		}
5161	}
5162	if ( fn === false ) {
5163		fn = returnFalse;
5164	} else if ( !fn ) {
5165		return elem;
5166	}
5167
5168	if ( one === 1 ) {
5169		origFn = fn;
5170		fn = function( event ) {
5171
5172			// Can use an empty set, since event contains the info
5173			jQuery().off( event );
5174			return origFn.apply( this, arguments );
5175		};
5176
5177		// Use same guid so caller can remove using origFn
5178		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5179	}
5180	return elem.each( function() {
5181		jQuery.event.add( this, types, fn, data, selector );
5182	} );
5183}
5184
5185/*
5186 * Helper functions for managing events -- not part of the public interface.
5187 * Props to Dean Edwards' addEvent library for many of the ideas.
5188 */
5189jQuery.event = {
5190
5191	global: {},
5192
5193	add: function( elem, types, handler, data, selector ) {
5194
5195		var handleObjIn, eventHandle, tmp,
5196			events, t, handleObj,
5197			special, handlers, type, namespaces, origType,
5198			elemData = dataPriv.get( elem );
5199
5200		// Only attach events to objects that accept data
5201		if ( !acceptData( elem ) ) {
5202			return;
5203		}
5204
5205		// Caller can pass in an object of custom data in lieu of the handler
5206		if ( handler.handler ) {
5207			handleObjIn = handler;
5208			handler = handleObjIn.handler;
5209			selector = handleObjIn.selector;
5210		}
5211
5212		// Ensure that invalid selectors throw exceptions at attach time
5213		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
5214		if ( selector ) {
5215			jQuery.find.matchesSelector( documentElement, selector );
5216		}
5217
5218		// Make sure that the handler has a unique ID, used to find/remove it later
5219		if ( !handler.guid ) {
5220			handler.guid = jQuery.guid++;
5221		}
5222
5223		// Init the element's event structure and main handler, if this is the first
5224		if ( !( events = elemData.events ) ) {
5225			events = elemData.events = Object.create( null );
5226		}
5227		if ( !( eventHandle = elemData.handle ) ) {
5228			eventHandle = elemData.handle = function( e ) {
5229
5230				// Discard the second event of a jQuery.event.trigger() and
5231				// when an event is called after a page has unloaded
5232				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
5233					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
5234			};
5235		}
5236
5237		// Handle multiple events separated by a space
5238		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5239		t = types.length;
5240		while ( t-- ) {
5241			tmp = rtypenamespace.exec( types[ t ] ) || [];
5242			type = origType = tmp[ 1 ];
5243			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5244
5245			// There *must* be a type, no attaching namespace-only handlers
5246			if ( !type ) {
5247				continue;
5248			}
5249
5250			// If event changes its type, use the special event handlers for the changed type
5251			special = jQuery.event.special[ type ] || {};
5252
5253			// If selector defined, determine special event api type, otherwise given type
5254			type = ( selector ? special.delegateType : special.bindType ) || type;
5255
5256			// Update special based on newly reset type
5257			special = jQuery.event.special[ type ] || {};
5258
5259			// handleObj is passed to all event handlers
5260			handleObj = jQuery.extend( {
5261				type: type,
5262				origType: origType,
5263				data: data,
5264				handler: handler,
5265				guid: handler.guid,
5266				selector: selector,
5267				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
5268				namespace: namespaces.join( "." )
5269			}, handleObjIn );
5270
5271			// Init the event handler queue if we're the first
5272			if ( !( handlers = events[ type ] ) ) {
5273				handlers = events[ type ] = [];
5274				handlers.delegateCount = 0;
5275
5276				// Only use addEventListener if the special events handler returns false
5277				if ( !special.setup ||
5278					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
5279
5280					if ( elem.addEventListener ) {
5281						elem.addEventListener( type, eventHandle );
5282					}
5283				}
5284			}
5285
5286			if ( special.add ) {
5287				special.add.call( elem, handleObj );
5288
5289				if ( !handleObj.handler.guid ) {
5290					handleObj.handler.guid = handler.guid;
5291				}
5292			}
5293
5294			// Add to the element's handler list, delegates in front
5295			if ( selector ) {
5296				handlers.splice( handlers.delegateCount++, 0, handleObj );
5297			} else {
5298				handlers.push( handleObj );
5299			}
5300
5301			// Keep track of which events have ever been used, for event optimization
5302			jQuery.event.global[ type ] = true;
5303		}
5304
5305	},
5306
5307	// Detach an event or set of events from an element
5308	remove: function( elem, types, handler, selector, mappedTypes ) {
5309
5310		var j, origCount, tmp,
5311			events, t, handleObj,
5312			special, handlers, type, namespaces, origType,
5313			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
5314
5315		if ( !elemData || !( events = elemData.events ) ) {
5316			return;
5317		}
5318
vendor: 4,199 bytes, lines 5319-5457
5319		// Once for each type.namespace in types; type may be omitted
5320		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5321		t = types.length;
5322		while ( t-- ) {
5323			tmp = rtypenamespace.exec( types[ t ] ) || [];
5324			type = origType = tmp[ 1 ];
5325			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5326
5327			// Unbind all events (on this namespace, if provided) for the element
5328			if ( !type ) {
5329				for ( type in events ) {
5330					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
5331				}
5332				continue;
5333			}
5334
5335			special = jQuery.event.special[ type ] || {};
5336			type = ( selector ? special.delegateType : special.bindType ) || type;
5337			handlers = events[ type ] || [];
5338			tmp = tmp[ 2 ] &&
5339				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
5340
5341			// Remove matching events
5342			origCount = j = handlers.length;
5343			while ( j-- ) {
5344				handleObj = handlers[ j ];
5345
5346				if ( ( mappedTypes || origType === handleObj.origType ) &&
5347					( !handler || handler.guid === handleObj.guid ) &&
5348					( !tmp || tmp.test( handleObj.namespace ) ) &&
5349					( !selector || selector === handleObj.selector ||
5350						selector === "**" && handleObj.selector ) ) {
5351					handlers.splice( j, 1 );
5352
5353					if ( handleObj.selector ) {
5354						handlers.delegateCount--;
5355					}
5356					if ( special.remove ) {
5357						special.remove.call( elem, handleObj );
5358					}
5359				}
5360			}
5361
5362			// Remove generic event handler if we removed something and no more handlers exist
5363			// (avoids potential for endless recursion during removal of special event handlers)
5364			if ( origCount && !handlers.length ) {
5365				if ( !special.teardown ||
5366					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
5367
5368					jQuery.removeEvent( elem, type, elemData.handle );
5369				}
5370
5371				delete events[ type ];
5372			}
5373		}
5374
5375		// Remove data and the expando if it's no longer used
5376		if ( jQuery.isEmptyObject( events ) ) {
5377			dataPriv.remove( elem, "handle events" );
5378		}
5379	},
5380
5381	dispatch: function( nativeEvent ) {
5382
5383		var i, j, ret, matched, handleObj, handlerQueue,
5384			args = new Array( arguments.length ),
5385
5386			// Make a writable jQuery.Event from the native event object
5387			event = jQuery.event.fix( nativeEvent ),
5388
5389			handlers = (
5390					dataPriv.get( this, "events" ) || Object.create( null )
5391				)[ event.type ] || [],
5392			special = jQuery.event.special[ event.type ] || {};
5393
5394		// Use the fix-ed jQuery.Event rather than the (read-only) native event
5395		args[ 0 ] = event;
5396
5397		for ( i = 1; i < arguments.length; i++ ) {
5398			args[ i ] = arguments[ i ];
5399		}
5400
5401		event.delegateTarget = this;
5402
5403		// Call the preDispatch hook for the mapped type, and let it bail if desired
5404		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
5405			return;
5406		}
5407
5408		// Determine handlers
5409		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
5410
5411		// Run delegates first; they may want to stop propagation beneath us
5412		i = 0;
5413		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
5414			event.currentTarget = matched.elem;
5415
5416			j = 0;
5417			while ( ( handleObj = matched.handlers[ j++ ] ) &&
5418				!event.isImmediatePropagationStopped() ) {
5419
5420				// If the event is namespaced, then each handler is only invoked if it is
5421				// specially universal or its namespaces are a superset of the event's.
5422				if ( !event.rnamespace || handleObj.namespace === false ||
5423					event.rnamespace.test( handleObj.namespace ) ) {
5424
5425					event.handleObj = handleObj;
5426					event.data = handleObj.data;
5427
5428					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
5429						handleObj.handler ).apply( matched.elem, args );
5430
5431					if ( ret !== undefined ) {
5432						if ( ( event.result = ret ) === false ) {
5433							event.preventDefault();
5434							event.stopPropagation();
5435						}
5436					}
5437				}
5438			}
5439		}
5440
5441		// Call the postDispatch hook for the mapped type
5442		if ( special.postDispatch ) {
5443			special.postDispatch.call( this, event );
5444		}
5445
5446		return event.result;
5447	},
5448
5449	handlers: function( event, handlers ) {
5450		var i, handleObj, sel, matchedHandlers, matchedSelectors,
5451			handlerQueue = [],
5452			delegateCount = handlers.delegateCount,
5453			cur = event.target;
5454
5455		// Find delegate handlers
5456		if ( delegateCount &&
5457
vendor: 5,718 bytes, lines 5458-5643
5458			// Support: IE <=9
5459			// Black-hole SVG <use> instance trees (trac-13180)
5460			cur.nodeType &&
5461
5462			// Support: Firefox <=42
5463			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5464			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5465			// Support: IE 11 only
5466			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5467			!( event.type === "click" && event.button >= 1 ) ) {
5468
5469			for ( ; cur !== this; cur = cur.parentNode || this ) {
5470
5471				// Don't check non-elements (#13208)
5472				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5473				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
5474					matchedHandlers = [];
5475					matchedSelectors = {};
5476					for ( i = 0; i < delegateCount; i++ ) {
5477						handleObj = handlers[ i ];
5478
5479						// Don't conflict with Object.prototype properties (#13203)
5480						sel = handleObj.selector + " ";
5481
5482						if ( matchedSelectors[ sel ] === undefined ) {
5483							matchedSelectors[ sel ] = handleObj.needsContext ?
5484								jQuery( sel, this ).index( cur ) > -1 :
5485								jQuery.find( sel, this, null, [ cur ] ).length;
5486						}
5487						if ( matchedSelectors[ sel ] ) {
5488							matchedHandlers.push( handleObj );
5489						}
5490					}
5491					if ( matchedHandlers.length ) {
5492						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
5493					}
5494				}
5495			}
5496		}
5497
5498		// Add the remaining (directly-bound) handlers
5499		cur = this;
5500		if ( delegateCount < handlers.length ) {
5501			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
5502		}
5503
5504		return handlerQueue;
5505	},
5506
5507	addProp: function( name, hook ) {
5508		Object.defineProperty( jQuery.Event.prototype, name, {
5509			enumerable: true,
5510			configurable: true,
5511
5512			get: isFunction( hook ) ?
5513				function() {
5514					if ( this.originalEvent ) {
5515							return hook( this.originalEvent );
5516					}
5517				} :
5518				function() {
5519					if ( this.originalEvent ) {
5520							return this.originalEvent[ name ];
5521					}
5522				},
5523
5524			set: function( value ) {
5525				Object.defineProperty( this, name, {
5526					enumerable: true,
5527					configurable: true,
5528					writable: true,
5529					value: value
5530				} );
5531			}
5532		} );
5533	},
5534
5535	fix: function( originalEvent ) {
5536		return originalEvent[ jQuery.expando ] ?
5537			originalEvent :
5538			new jQuery.Event( originalEvent );
5539	},
5540
5541	special: {
5542		load: {
5543
5544			// Prevent triggered image.load events from bubbling to window.load
5545			noBubble: true
5546		},
5547		click: {
5548
5549			// Utilize native event to ensure correct state for checkable inputs
5550			setup: function( data ) {
5551
5552				// For mutual compressibility with _default, replace `this` access with a local var.
5553				// `|| data` is dead code meant only to preserve the variable through minification.
5554				var el = this || data;
5555
5556				// Claim the first handler
5557				if ( rcheckableType.test( el.type ) &&
5558					el.click && nodeName( el, "input" ) ) {
5559
5560					// dataPriv.set( el, "click", ... )
5561					leverageNative( el, "click", returnTrue );
5562				}
5563
5564				// Return false to allow normal processing in the caller
5565				return false;
5566			},
5567			trigger: function( data ) {
5568
5569				// For mutual compressibility with _default, replace `this` access with a local var.
5570				// `|| data` is dead code meant only to preserve the variable through minification.
5571				var el = this || data;
5572
5573				// Force setup before triggering a click
5574				if ( rcheckableType.test( el.type ) &&
5575					el.click && nodeName( el, "input" ) ) {
5576
5577					leverageNative( el, "click" );
5578				}
5579
5580				// Return non-false to allow normal event-path propagation
5581				return true;
5582			},
5583
5584			// For cross-browser consistency, suppress native .click() on links
5585			// Also prevent it if we're currently inside a leveraged native-event stack
5586			_default: function( event ) {
5587				var target = event.target;
5588				return rcheckableType.test( target.type ) &&
5589					target.click && nodeName( target, "input" ) &&
5590					dataPriv.get( target, "click" ) ||
5591					nodeName( target, "a" );
5592			}
5593		},
5594
5595		beforeunload: {
5596			postDispatch: function( event ) {
5597
5598				// Support: Firefox 20+
5599				// Firefox doesn't alert if the returnValue field is not set.
5600				if ( event.result !== undefined && event.originalEvent ) {
5601					event.originalEvent.returnValue = event.result;
5602				}
5603			}
5604		}
5605	}
5606};
5607
5608// Ensure the presence of an event listener that handles manually-triggered
5609// synthetic events by interrupting progress until reinvoked in response to
5610// *native* events that it fires directly, ensuring that state changes have
5611// already occurred before other listeners are invoked.
5612function leverageNative( el, type, expectSync ) {
5613
5614	// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
5615	if ( !expectSync ) {
5616		if ( dataPriv.get( el, type ) === undefined ) {
5617			jQuery.event.add( el, type, returnTrue );
5618		}
5619		return;
5620	}
5621
5622	// Register the controller as a special universal handler for all event namespaces
5623	dataPriv.set( el, type, false );
5624	jQuery.event.add( el, type, {
5625		namespace: false,
5626		handler: function( event ) {
5627			var notAsync, result,
5628				saved = dataPriv.get( this, type );
5629
5630			if ( ( event.isTrigger & 1 ) && this[ type ] ) {
5631
5632				// Interrupt processing of the outer synthetic .trigger()ed event
5633				// Saved data should be false in such cases, but might be a leftover capture object
5634				// from an async native handler (gh-4350)
5635				if ( !saved.length ) {
5636
5637					// Store arguments for use when handling the inner native event
5638					// There will always be at least one argument (an event object), so this array
5639					// will not be confused with a leftover capture object.
5640					saved = slice.call( arguments );
5641					dataPriv.set( this, type, saved );
5642
5643					// Trigger the native event and capture its result
5644					// Support: IE <=9 - 11+
5645					// focus() and blur() are asynchronous
5646					notAsync = expectSync( this, type );
5647					this[ type ]();
5648					result = dataPriv.get( this, type );
5649					if ( saved !== result || notAsync ) {
5650						dataPriv.set( this, type, false );
5651					} else {
5652						result = {};
5653					}
5654					if ( saved !== result ) {
5655
5656						// Cancel the outer synthetic event
5657						event.stopImmediatePropagation();
5658						event.preventDefault();
5659						return result.value;
5660					}
5661
5662				// If this is an inner synthetic event for an event with a bubbling surrogate
5663				// (focus or blur), assume that the surrogate already propagated from triggering the
5664				// native event and prevent that from happening again here.
5665				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
5666				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
5667				// less bad than duplication.
5668				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
5669					event.stopPropagation();
5670				}
5671
5672			// If this is a native event triggered above, everything is now in order
5673			// Fire an inner synthetic event with the original arguments
5674			} else if ( saved.length ) {
5675
5676				// ...and capture the result
5677				dataPriv.set( this, type, {
5678					value: jQuery.event.trigger(
5679
5680						// Support: IE <=9 - 11+
5681						// Extend with the prototype to reset the above stopImmediatePropagation()
5682						jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
5683						saved.slice( 1 ),
5684						this
5685					)
5686				} );
5687
5688				// Abort handling of the native event
5689				event.stopImmediatePropagation();
5690			}
5691		}
5692	} );
5693}
5694
5695jQuery.removeEvent = function( elem, type, handle ) {
5696
5697	// This "if" is needed for plain objects
5698	if ( elem.removeEventListener ) {
5699		elem.removeEventListener( type, handle );
5700	}
5701};
5702
5703jQuery.Event = function( src, props ) {
5704
5705	// Allow instantiation without the 'new' keyword
5706	if ( !( this instanceof jQuery.Event ) ) {
5707		return new jQuery.Event( src, props );
5708	}
5709
5710	// Event object
5711	if ( src && src.type ) {
5712		this.originalEvent = src;
5713		this.type = src.type;
5714
5715		// Events bubbling up the document may have been marked as prevented
5716		// by a handler lower down the tree; reflect the correct value.
5717		this.isDefaultPrevented = src.defaultPrevented ||
5718				src.defaultPrevented === undefined &&
5719
5720				// Support: Android <=2.3 only
5721				src.returnValue === false ?
5722			returnTrue :
5723			returnFalse;
5724
5725		// Create target properties
5726		// Support: Safari <=6 - 7 only
5727		// Target should not be a text node (#504, #13143)
5728		this.target = ( src.target && src.target.nodeType === 3 ) ?
5729			src.target.parentNode :
5730			src.target;
5731
5732		this.currentTarget = src.currentTarget;
5733		this.relatedTarget = src.relatedTarget;
5734
5735	// Event type
5736	} else {
5737		this.type = src;
5738	}
5739
5740	// Put explicitly provided properties onto the event object
5741	if ( props ) {
5742		jQuery.extend( this, props );
5743	}
5744
5745	// Create a timestamp if incoming event doesn't have one
5746	this.timeStamp = src && src.timeStamp || Date.now();
5747
5748	// Mark it as fixed
5749	this[ jQuery.expando ] = true;
5750};
5751
5752// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5753// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5754jQuery.Event.prototype = {
5755	constructor: jQuery.Event,
5756	isDefaultPrevented: returnFalse,
5757	isPropagationStopped: returnFalse,
5758	isImmediatePropagationStopped: returnFalse,
5759	isSimulated: false,
5760
5761	preventDefault: function() {
5762		var e = this.originalEvent;
5763
5764		this.isDefaultPrevented = returnTrue;
5765
5766		if ( e && !this.isSimulated ) {
5767			e.preventDefault();
5768		}
5769	},
5770	stopPropagation: function() {
5771		var e = this.originalEvent;
5772
5773		this.isPropagationStopped = returnTrue;
5774
5775		if ( e && !this.isSimulated ) {
5776			e.stopPropagation();
5777		}
5778	},
5779	stopImmediatePropagation: function() {
5780		var e = this.originalEvent;
5781
5782		this.isImmediatePropagationStopped = returnTrue;
5783
5784		if ( e && !this.isSimulated ) {
5785			e.stopImmediatePropagation();
5786		}
5787
5788		this.stopPropagation();
5789	}
5790};
5791
5792// Includes all common event props including KeyEvent and MouseEvent specific props
5793jQuery.each( {
5794	altKey: true,
5795	bubbles: true,
5796	cancelable: true,
5797	changedTouches: true,
5798	ctrlKey: true,
5799	detail: true,
5800	eventPhase: true,
5801	metaKey: true,
5802	pageX: true,
5803	pageY: true,
5804	shiftKey: true,
5805	view: true,
5806	"char": true,
5807	code: true,
5808	charCode: true,
5809	key: true,
5810	keyCode: true,
5811	button: true,
5812	buttons: true,
5813	clientX: true,
5814	clientY: true,
5815	offsetX: true,
5816	offsetY: true,
5817	pointerId: true,
5818	pointerType: true,
5819	screenX: true,
5820	screenY: true,
5821	targetTouches: true,
5822	toElement: true,
5823	touches: true,
5824
5825	which: function( event ) {
5826		var button = event.button;
5827
5828		// Add which for key events
5829		if ( event.which == null && rkeyEvent.test( event.type ) ) {
5830			return event.charCode != null ? event.charCode : event.keyCode;
5831		}
5832
5833		// Add which for click: 1 === left; 2 === middle; 3 === right
5834		if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
5835			if ( button & 1 ) {
5836				return 1;
5837			}
5838
5839			if ( button & 2 ) {
5840				return 3;
5841			}
5842
5843			if ( button & 4 ) {
5844				return 2;
5845			}
5846
5847			return 0;
5848		}
5849
5850		return event.which;
5851	}
5852}, jQuery.event.addProp );
5853
5854jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
5855	jQuery.event.special[ type ] = {
5856
5857		// Utilize native event if possible so blur/focus sequence is correct
5858		setup: function() {
5859
5860			// Claim the first handler
5861			// dataPriv.set( this, "focus", ... )
5862			// dataPriv.set( this, "blur", ... )
5863			leverageNative( this, type, expectSync );
5864
5865			// Return false to allow normal processing in the caller
5866			return false;
5867		},
5868		trigger: function() {
5869
5870			// Force setup before trigger
5871			leverageNative( this, type );
5872
5873			// Return non-false to allow normal event-path propagation
vendor: 17,941 bytes, lines 5873-6544
5873
5874			return true;
5875		},
5876
5877		delegateType: delegateType
5878	};
5879} );
5880
5881// Create mouseenter/leave events using mouseover/out and event-time checks
5882// so that event delegation works in jQuery.
5883// Do the same for pointerenter/pointerleave and pointerover/pointerout
5884//
5885// Support: Safari 7 only
5886// Safari sends mouseenter too often; see:
5887// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5888// for the description of the bug (it existed in older Chrome versions as well).
5889jQuery.each( {
5890	mouseenter: "mouseover",
5891	mouseleave: "mouseout",
5892	pointerenter: "pointerover",
5893	pointerleave: "pointerout"
5894}, function( orig, fix ) {
5895	jQuery.event.special[ orig ] = {
5896		delegateType: fix,
5897		bindType: fix,
5898
5899		handle: function( event ) {
5900			var ret,
5901				target = this,
5902				related = event.relatedTarget,
5903				handleObj = event.handleObj;
5904
5905			// For mouseenter/leave call the handler if related is outside the target.
5906			// NB: No relatedTarget if the mouse left/entered the browser window
5907			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
5908				event.type = handleObj.origType;
5909				ret = handleObj.handler.apply( this, arguments );
5910				event.type = fix;
5911			}
5912			return ret;
5913		}
5914	};
5915} );
5916
5917jQuery.fn.extend( {
5918
5919	on: function( types, selector, data, fn ) {
5920		return on( this, types, selector, data, fn );
5921	},
5922	one: function( types, selector, data, fn ) {
5923		return on( this, types, selector, data, fn, 1 );
5924	},
5925	off: function( types, selector, fn ) {
5926		var handleObj, type;
5927		if ( types && types.preventDefault && types.handleObj ) {
5928
5929			// ( event )  dispatched jQuery.Event
5930			handleObj = types.handleObj;
5931			jQuery( types.delegateTarget ).off(
5932				handleObj.namespace ?
5933					handleObj.origType + "." + handleObj.namespace :
5934					handleObj.origType,
5935				handleObj.selector,
5936				handleObj.handler
5937			);
5938			return this;
5939		}
5940		if ( typeof types === "object" ) {
5941
5942			// ( types-object [, selector] )
5943			for ( type in types ) {
5944				this.off( type, selector, types[ type ] );
5945			}
5946			return this;
5947		}
5948		if ( selector === false || typeof selector === "function" ) {
5949
5950			// ( types [, fn] )
5951			fn = selector;
5952			selector = undefined;
5953		}
5954		if ( fn === false ) {
5955			fn = returnFalse;
5956		}
5957		return this.each( function() {
5958			jQuery.event.remove( this, types, fn, selector );
5959		} );
5960	}
5961} );
5962
5963
5964var
5965
5966	// Support: IE <=10 - 11, Edge 12 - 13 only
5967	// In IE/Edge using regex groups here causes severe slowdowns.
5968	// See https://connect.microsoft.com/IE/feedback/details/1736512/
5969	rnoInnerhtml = /<script|<style|<link/i,
5970
5971	// checked="checked" or checked
5972	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5973	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5974
5975// Prefer a tbody over its parent table for containing new rows
5976function manipulationTarget( elem, content ) {
5977	if ( nodeName( elem, "table" ) &&
5978		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
5979
5980		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
5981	}
5982
5983	return elem;
5984}
5985
5986// Replace/restore the type attribute of script elements for safe DOM manipulation
5987function disableScript( elem ) {
5988	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
5989	return elem;
5990}
5991function restoreScript( elem ) {
5992	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
5993		elem.type = elem.type.slice( 5 );
5994	} else {
5995		elem.removeAttribute( "type" );
5996	}
5997
5998	return elem;
5999}
6000
6001function cloneCopyEvent( src, dest ) {
6002	var i, l, type, pdataOld, udataOld, udataCur, events;
6003
6004	if ( dest.nodeType !== 1 ) {
6005		return;
6006	}
6007
6008	// 1. Copy private data: events, handlers, etc.
6009	if ( dataPriv.hasData( src ) ) {
6010		pdataOld = dataPriv.get( src );
6011		events = pdataOld.events;
6012
6013		if ( events ) {
6014			dataPriv.remove( dest, "handle events" );
6015
6016			for ( type in events ) {
6017				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6018					jQuery.event.add( dest, type, events[ type ][ i ] );
6019				}
6020			}
6021		}
6022	}
6023
6024	// 2. Copy user data
6025	if ( dataUser.hasData( src ) ) {
6026		udataOld = dataUser.access( src );
6027		udataCur = jQuery.extend( {}, udataOld );
6028
6029		dataUser.set( dest, udataCur );
6030	}
6031}
6032
6033// Fix IE bugs, see support tests
6034function fixInput( src, dest ) {
6035	var nodeName = dest.nodeName.toLowerCase();
6036
6037	// Fails to persist the checked state of a cloned checkbox or radio button.
6038	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
6039		dest.checked = src.checked;
6040
6041	// Fails to return the selected option to the default selected state when cloning options
6042	} else if ( nodeName === "input" || nodeName === "textarea" ) {
6043		dest.defaultValue = src.defaultValue;
6044	}
6045}
6046
6047function domManip( collection, args, callback, ignored ) {
6048
6049	// Flatten any nested arrays
6050	args = flat( args );
6051
6052	var fragment, first, scripts, hasScripts, node, doc,
6053		i = 0,
6054		l = collection.length,
6055		iNoClone = l - 1,
6056		value = args[ 0 ],
6057		valueIsFunction = isFunction( value );
6058
6059	// We can't cloneNode fragments that contain checked, in WebKit
6060	if ( valueIsFunction ||
6061			( l > 1 && typeof value === "string" &&
6062				!support.checkClone && rchecked.test( value ) ) ) {
6063		return collection.each( function( index ) {
6064			var self = collection.eq( index );
6065			if ( valueIsFunction ) {
6066				args[ 0 ] = value.call( this, index, self.html() );
6067			}
6068			domManip( self, args, callback, ignored );
6069		} );
6070	}
6071
6072	if ( l ) {
6073		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
6074		first = fragment.firstChild;
6075
6076		if ( fragment.childNodes.length === 1 ) {
6077			fragment = first;
6078		}
6079
6080		// Require either new content or an interest in ignored elements to invoke the callback
6081		if ( first || ignored ) {
6082			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
6083			hasScripts = scripts.length;
6084
6085			// Use the original fragment for the last item
6086			// instead of the first because it can end up
6087			// being emptied incorrectly in certain situations (#8070).
6088			for ( ; i < l; i++ ) {
6089				node = fragment;
6090
6091				if ( i !== iNoClone ) {
6092					node = jQuery.clone( node, true, true );
6093
6094					// Keep references to cloned scripts for later restoration
6095					if ( hasScripts ) {
6096
6097						// Support: Android <=4.0 only, PhantomJS 1 only
6098						// push.apply(_, arraylike) throws on ancient WebKit
6099						jQuery.merge( scripts, getAll( node, "script" ) );
6100					}
6101				}
6102
6103				callback.call( collection[ i ], node, i );
6104			}
6105
6106			if ( hasScripts ) {
6107				doc = scripts[ scripts.length - 1 ].ownerDocument;
6108
6109				// Reenable scripts
6110				jQuery.map( scripts, restoreScript );
6111
6112				// Evaluate executable scripts on first document insertion
6113				for ( i = 0; i < hasScripts; i++ ) {
6114					node = scripts[ i ];
6115					if ( rscriptType.test( node.type || "" ) &&
6116						!dataPriv.access( node, "globalEval" ) &&
6117						jQuery.contains( doc, node ) ) {
6118
6119						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {
6120
6121							// Optional AJAX dependency, but won't run scripts if not present
6122							if ( jQuery._evalUrl && !node.noModule ) {
6123								jQuery._evalUrl( node.src, {
6124									nonce: node.nonce || node.getAttribute( "nonce" )
6125								}, doc );
6126							}
6127						} else {
6128							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
6129						}
6130					}
6131				}
6132			}
6133		}
6134	}
6135
6136	return collection;
6137}
6138
6139function remove( elem, selector, keepData ) {
6140	var node,
6141		nodes = selector ? jQuery.filter( selector, elem ) : elem,
6142		i = 0;
6143
6144	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
6145		if ( !keepData && node.nodeType === 1 ) {
6146			jQuery.cleanData( getAll( node ) );
6147		}
6148
6149		if ( node.parentNode ) {
6150			if ( keepData && isAttached( node ) ) {
6151				setGlobalEval( getAll( node, "script" ) );
6152			}
6153			node.parentNode.removeChild( node );
6154		}
6155	}
6156
6157	return elem;
6158}
6159
6160jQuery.extend( {
6161	htmlPrefilter: function( html ) {
6162		return html;
6163	},
6164
6165	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
6166		var i, l, srcElements, destElements,
6167			clone = elem.cloneNode( true ),
6168			inPage = isAttached( elem );
6169
6170		// Fix IE cloning issues
6171		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
6172				!jQuery.isXMLDoc( elem ) ) {
6173
6174			// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
6175			destElements = getAll( clone );
6176			srcElements = getAll( elem );
6177
6178			for ( i = 0, l = srcElements.length; i < l; i++ ) {
6179				fixInput( srcElements[ i ], destElements[ i ] );
6180			}
6181		}
6182
6183		// Copy the events from the original to the clone
6184		if ( dataAndEvents ) {
6185			if ( deepDataAndEvents ) {
6186				srcElements = srcElements || getAll( elem );
6187				destElements = destElements || getAll( clone );
6188
6189				for ( i = 0, l = srcElements.length; i < l; i++ ) {
6190					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
6191				}
6192			} else {
6193				cloneCopyEvent( elem, clone );
6194			}
6195		}
6196
6197		// Preserve script evaluation history
6198		destElements = getAll( clone, "script" );
6199		if ( destElements.length > 0 ) {
6200			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
6201		}
6202
6203		// Return the cloned set
6204		return clone;
6205	},
6206
6207	cleanData: function( elems ) {
6208		var data, elem, type,
6209			special = jQuery.event.special,
6210			i = 0;
6211
6212		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
6213			if ( acceptData( elem ) ) {
6214				if ( ( data = elem[ dataPriv.expando ] ) ) {
6215					if ( data.events ) {
6216						for ( type in data.events ) {
6217							if ( special[ type ] ) {
6218								jQuery.event.remove( elem, type );
6219
6220							// This is a shortcut to avoid jQuery.event.remove's overhead
6221							} else {
6222								jQuery.removeEvent( elem, type, data.handle );
6223							}
6224						}
6225					}
6226
6227					// Support: Chrome <=35 - 45+
6228					// Assign undefined instead of using delete, see Data#remove
6229					elem[ dataPriv.expando ] = undefined;
6230				}
6231				if ( elem[ dataUser.expando ] ) {
6232
6233					// Support: Chrome <=35 - 45+
6234					// Assign undefined instead of using delete, see Data#remove
6235					elem[ dataUser.expando ] = undefined;
6236				}
6237			}
6238		}
6239	}
6240} );
6241
6242jQuery.fn.extend( {
6243	detach: function( selector ) {
6244		return remove( this, selector, true );
6245	},
6246
6247	remove: function( selector ) {
6248		return remove( this, selector );
6249	},
6250
6251	text: function( value ) {
6252		return access( this, function( value ) {
6253			return value === undefined ?
6254				jQuery.text( this ) :
6255				this.empty().each( function() {
6256					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6257						this.textContent = value;
6258					}
6259				} );
6260		}, null, value, arguments.length );
6261	},
6262
6263	append: function() {
6264		return domManip( this, arguments, function( elem ) {
6265			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6266				var target = manipulationTarget( this, elem );
6267				target.appendChild( elem );
6268			}
6269		} );
6270	},
6271
6272	prepend: function() {
6273		return domManip( this, arguments, function( elem ) {
6274			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6275				var target = manipulationTarget( this, elem );
6276				target.insertBefore( elem, target.firstChild );
6277			}
6278		} );
6279	},
6280
6281	before: function() {
6282		return domManip( this, arguments, function( elem ) {
6283			if ( this.parentNode ) {
6284				this.parentNode.insertBefore( elem, this );
6285			}
6286		} );
6287	},
6288
6289	after: function() {
6290		return domManip( this, arguments, function( elem ) {
6291			if ( this.parentNode ) {
6292				this.parentNode.insertBefore( elem, this.nextSibling );
6293			}
6294		} );
6295	},
6296
6297	empty: function() {
6298		var elem,
6299			i = 0;
6300
6301		for ( ; ( elem = this[ i ] ) != null; i++ ) {
6302			if ( elem.nodeType === 1 ) {
6303
6304				// Prevent memory leaks
6305				jQuery.cleanData( getAll( elem, false ) );
6306
6307				// Remove any remaining nodes
6308				elem.textContent = "";
6309			}
6310		}
6311
6312		return this;
6313	},
6314
6315	clone: function( dataAndEvents, deepDataAndEvents ) {
6316		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6317		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6318
6319		return this.map( function() {
6320			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
6321		} );
6322	},
6323
6324	html: function( value ) {
6325		return access( this, function( value ) {
6326			var elem = this[ 0 ] || {},
6327				i = 0,
6328				l = this.length;
6329
6330			if ( value === undefined && elem.nodeType === 1 ) {
6331				return elem.innerHTML;
6332			}
6333
6334			// See if we can take a shortcut and just use innerHTML
6335			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
6336				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
6337
6338				value = jQuery.htmlPrefilter( value );
6339
6340				try {
6341					for ( ; i < l; i++ ) {
6342						elem = this[ i ] || {};
6343
6344						// Remove element nodes and prevent memory leaks
6345						if ( elem.nodeType === 1 ) {
6346							jQuery.cleanData( getAll( elem, false ) );
6347							elem.innerHTML = value;
6348						}
6349					}
6350
6351					elem = 0;
6352
6353				// If using innerHTML throws an exception, use the fallback method
6354				} catch ( e ) {}
6355			}
6356
6357			if ( elem ) {
6358				this.empty().append( value );
6359			}
6360		}, null, value, arguments.length );
6361	},
6362
6363	replaceWith: function() {
6364		var ignored = [];
6365
6366		// Make the changes, replacing each non-ignored context element with the new content
6367		return domManip( this, arguments, function( elem ) {
6368			var parent = this.parentNode;
6369
6370			if ( jQuery.inArray( this, ignored ) < 0 ) {
6371				jQuery.cleanData( getAll( this ) );
6372				if ( parent ) {
6373					parent.replaceChild( elem, this );
6374				}
6375			}
6376
6377		// Force callback invocation
6378		}, ignored );
6379	}
6380} );
6381
6382jQuery.each( {
6383	appendTo: "append",
6384	prependTo: "prepend",
6385	insertBefore: "before",
6386	insertAfter: "after",
6387	replaceAll: "replaceWith"
6388}, function( name, original ) {
6389	jQuery.fn[ name ] = function( selector ) {
6390		var elems,
6391			ret = [],
6392			insert = jQuery( selector ),
6393			last = insert.length - 1,
6394			i = 0;
6395
6396		for ( ; i <= last; i++ ) {
6397			elems = i === last ? this : this.clone( true );
6398			jQuery( insert[ i ] )[ original ]( elems );
6399
6400			// Support: Android <=4.0 only, PhantomJS 1 only
6401			// .get() because push.apply(_, arraylike) throws on ancient WebKit
6402			push.apply( ret, elems.get() );
6403		}
6404
6405		return this.pushStack( ret );
6406	};
6407} );
6408var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
6409
6410var getStyles = function( elem ) {
6411
6412		// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
6413		// IE throws on elements created in popups
6414		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6415		var view = elem.ownerDocument.defaultView;
6416
6417		if ( !view || !view.opener ) {
6418			view = window;
6419		}
6420
6421		return view.getComputedStyle( elem );
6422	};
6423
6424var swap = function( elem, options, callback ) {
6425	var ret, name,
6426		old = {};
6427
6428	// Remember the old values, and insert the new ones
6429	for ( name in options ) {
6430		old[ name ] = elem.style[ name ];
6431		elem.style[ name ] = options[ name ];
6432	}
6433
6434	ret = callback.call( elem );
6435
6436	// Revert the old values
6437	for ( name in options ) {
6438		elem.style[ name ] = old[ name ];
6439	}
6440
6441	return ret;
6442};
6443
6444
6445var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
6446
6447
6448
6449( function() {
6450
6451	// Executing both pixelPosition & boxSizingReliable tests require only one layout
6452	// so they're executed at the same time to save the second computation.
6453	function computeStyleTests() {
6454
6455		// This is a singleton, we need to execute it only once
6456		if ( !div ) {
6457			return;
6458		}
6459
6460		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
6461			"margin-top:1px;padding:0;border:0";
6462		div.style.cssText =
6463			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
6464			"margin:auto;border:1px;padding:1px;" +
6465			"width:60%;top:1%";
6466		documentElement.appendChild( container ).appendChild( div );
6467
6468		var divStyle = window.getComputedStyle( div );
6469		pixelPositionVal = divStyle.top !== "1%";
6470
6471		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
6472		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
6473
6474		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
6475		// Some styles come back with percentage values, even though they shouldn't
6476		div.style.right = "60%";
6477		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
6478
6479		// Support: IE 9 - 11 only
6480		// Detect misreporting of content dimensions for box-sizing:border-box elements
6481		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
6482
6483		// Support: IE 9 only
6484		// Detect overflow:scroll screwiness (gh-3699)
6485		// Support: Chrome <=64
6486		// Don't get tricked when zoom affects offsetWidth (gh-4029)
6487		div.style.position = "absolute";
6488		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;
6489
6490		documentElement.removeChild( container );
6491
6492		// Nullify the div so it wouldn't be stored in the memory and
6493		// it will also be a sign that checks already performed
6494		div = null;
6495	}
6496
6497	function roundPixelMeasures( measure ) {
6498		return Math.round( parseFloat( measure ) );
6499	}
6500
6501	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
6502		reliableTrDimensionsVal, reliableMarginLeftVal,
6503		container = document.createElement( "div" ),
6504		div = document.createElement( "div" );
6505
6506	// Finish early in limited (non-browser) environments
6507	if ( !div.style ) {
6508		return;
6509	}
6510
6511	// Support: IE <=9 - 11 only
6512	// Style of cloned element affects source element cloned (#8908)
6513	div.style.backgroundClip = "content-box";
6514	div.cloneNode( true ).style.backgroundClip = "";
6515	support.clearCloneStyle = div.style.backgroundClip === "content-box";
6516
6517	jQuery.extend( support, {
6518		boxSizingReliable: function() {
6519			computeStyleTests();
6520			return boxSizingReliableVal;
6521		},
6522		pixelBoxStyles: function() {
6523			computeStyleTests();
6524			return pixelBoxStylesVal;
6525		},
6526		pixelPosition: function() {
6527			computeStyleTests();
6528			return pixelPositionVal;
6529		},
6530		reliableMarginLeft: function() {
6531			computeStyleTests();
6532			return reliableMarginLeftVal;
6533		},
6534		scrollboxSize: function() {
6535			computeStyleTests();
6536			return scrollboxSizeVal;
6537		},
6538
6539		// Support: IE 9 - 11+, Edge 15 - 18+
6540		// IE/Edge misreport `getComputedStyle` of table rows with width/height
6541		// set in CSS while `offset*` properties report correct values.
6542		// Behavior in IE 9 is more subtle than in newer versions & it passes
6543		// some versions of this test; make sure not to make it pass there!
6544		
6544reliableTrDimensions: function() {
6545			var table, tr, trChild, trStyle;
6546			if ( reliableTrDimensionsVal == null ) {
6547				table = document.createElement( "table" );
6548				tr = document.createElement( "tr" );
6549				trChild = document.createElement( "div" );
6550
6551				table.style.cssText = "position:absolute;left:-11111px";
6552				tr.style.height = "1px";
6553				trChild.style.height = "9px";
6554
6555				documentElement
6556					.appendChild( table )
6557					.appendChild( tr )
6558					.appendChild( trChild );
6559
6560				trStyle = window.getComputedStyle( tr );
6561				reliableTrDimensionsVal = parseInt( trStyle.height ) > 3
vendor: 13,297 bytes, lines 6561-7025
6561;
6562
6563				documentElement.removeChild( table );
6564			}
6565			return reliableTrDimensionsVal;
6566		}
6567	} );
6568} )();
6569
6570
6571function curCSS( elem, name, computed ) {
6572	var width, minWidth, maxWidth, ret,
6573
6574		// Support: Firefox 51+
6575		// Retrieving style before computed somehow
6576		// fixes an issue with getting wrong values
6577		// on detached elements
6578		style = elem.style;
6579
6580	computed = computed || getStyles( elem );
6581
6582	// getPropertyValue is needed for:
6583	//   .css('filter') (IE 9 only, #12537)
6584	//   .css('--customProperty) (#3144)
6585	if ( computed ) {
6586		ret = computed.getPropertyValue( name ) || computed[ name ];
6587
6588		if ( ret === "" && !isAttached( elem ) ) {
6589			ret = jQuery.style( elem, name );
6590		}
6591
6592		// A tribute to the "awesome hack by Dean Edwards"
6593		// Android Browser returns percentage for some values,
6594		// but width seems to be reliably pixels.
6595		// This is against the CSSOM draft spec:
6596		// https://drafts.csswg.org/cssom/#resolved-values
6597		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
6598
6599			// Remember the original values
6600			width = style.width;
6601			minWidth = style.minWidth;
6602			maxWidth = style.maxWidth;
6603
6604			// Put in the new values to get a computed value out
6605			style.minWidth = style.maxWidth = style.width = ret;
6606			ret = computed.width;
6607
6608			// Revert the changed values
6609			style.width = width;
6610			style.minWidth = minWidth;
6611			style.maxWidth = maxWidth;
6612		}
6613	}
6614
6615	return ret !== undefined ?
6616
6617		// Support: IE <=9 - 11 only
6618		// IE returns zIndex value as an integer.
6619		ret + "" :
6620		ret;
6621}
6622
6623
6624function addGetHookIf( conditionFn, hookFn ) {
6625
6626	// Define the hook, we'll check on the first run if it's really needed.
6627	return {
6628		get: function() {
6629			if ( conditionFn() ) {
6630
6631				// Hook not needed (or it's not possible to use it due
6632				// to missing dependency), remove it.
6633				delete this.get;
6634				return;
6635			}
6636
6637			// Hook needed; redefine it so that the support test is not executed again.
6638			return ( this.get = hookFn ).apply( this, arguments );
6639		}
6640	};
6641}
6642
6643
6644var cssPrefixes = [ "Webkit", "Moz", "ms" ],
6645	emptyStyle = document.createElement( "div" ).style,
6646	vendorProps = {};
6647
6648// Return a vendor-prefixed property or undefined
6649function vendorPropName( name ) {
6650
6651	// Check for vendor prefixed names
6652	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
6653		i = cssPrefixes.length;
6654
6655	while ( i-- ) {
6656		name = cssPrefixes[ i ] + capName;
6657		if ( name in emptyStyle ) {
6658			return name;
6659		}
6660	}
6661}
6662
6663// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
6664function finalPropName( name ) {
6665	var final = jQuery.cssProps[ name ] || vendorProps[ name ];
6666
6667	if ( final ) {
6668		return final;
6669	}
6670	if ( name in emptyStyle ) {
6671		return name;
6672	}
6673	return vendorProps[ name ] = vendorPropName( name ) || name;
6674}
6675
6676
6677var
6678
6679	// Swappable if display is none or starts with table
6680	// except "table", "table-cell", or "table-caption"
6681	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6682	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6683	rcustomProp = /^--/,
6684	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6685	cssNormalTransform = {
6686		letterSpacing: "0",
6687		fontWeight: "400"
6688	};
6689
6690function setPositiveNumber( _elem, value, subtract ) {
6691
6692	// Any relative (+/-) values have already been
6693	// normalized at this point
6694	var matches = rcssNum.exec( value );
6695	return matches ?
6696
6697		// Guard against undefined "subtract", e.g., when used as in cssHooks
6698		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
6699		value;
6700}
6701
6702function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
6703	var i = dimension === "width" ? 1 : 0,
6704		extra = 0,
6705		delta = 0;
6706
6707	// Adjustment may not be necessary
6708	if ( box === ( isBorderBox ? "border" : "content" ) ) {
6709		return 0;
6710	}
6711
6712	for ( ; i < 4; i += 2 ) {
6713
6714		// Both box models exclude margin
6715		if ( box === "margin" ) {
6716			delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
6717		}
6718
6719		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6720		if ( !isBorderBox ) {
6721
6722			// Add padding
6723			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6724
6725			// For "border" or "margin", add border
6726			if ( box !== "padding" ) {
6727				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6728
6729			// But still keep track of it otherwise
6730			} else {
6731				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6732			}
6733
6734		// If we get here with a border-box (content + padding + border), we're seeking "content" or
6735		// "padding" or "margin"
6736		} else {
6737
6738			// For "content", subtract padding
6739			if ( box === "content" ) {
6740				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6741			}
6742
6743			// For "content" or "padding", subtract border
6744			if ( box !== "margin" ) {
6745				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6746			}
6747		}
6748	}
6749
6750	// Account for positive content-box scroll gutter when requested by providing computedVal
6751	if ( !isBorderBox && computedVal >= 0 ) {
6752
6753		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6754		// Assuming integer scroll gutter, subtract the rest and round down
6755		delta += Math.max( 0, Math.ceil(
6756			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
6757			computedVal -
6758			delta -
6759			extra -
6760			0.5
6761
6762		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
6763		// Use an explicit zero to avoid NaN (gh-3964)
6764		) ) || 0;
6765	}
6766
6767	return delta;
6768}
6769
6770function getWidthOrHeight( elem, dimension, extra ) {
6771
6772	// Start with computed style
6773	var styles = getStyles( elem ),
6774
6775		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
6776		// Fake content-box until we know it's needed to know the true value.
6777		boxSizingNeeded = !support.boxSizingReliable() || extra,
6778		isBorderBox = boxSizingNeeded &&
6779			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
6780		valueIsBorderBox = isBorderBox,
6781
6782		val = curCSS( elem, dimension, styles ),
6783		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
6784
6785	// Support: Firefox <=54
6786	// Return a confounding non-pixel value or feign ignorance, as appropriate.
6787	if ( rnumnonpx.test( val ) ) {
6788		if ( !extra ) {
6789			return val;
6790		}
6791		val = "auto";
6792	}
6793
6794
6795	// Support: IE 9 - 11 only
6796	// Use offsetWidth/offsetHeight for when box sizing is unreliable.
6797	// In those cases, the computed value can be trusted to be border-box.
6798	if ( ( !support.boxSizingReliable() && isBorderBox ||
6799
6800		// Support: IE 10 - 11+, Edge 15 - 18+
6801		// IE/Edge misreport `getComputedStyle` of table rows with width/height
6802		// set in CSS while `offset*` properties report correct values.
6803		// Interestingly, in some cases IE 9 doesn't suffer from this issue.
6804		!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
6805
6806		// Fall back to offsetWidth/offsetHeight when value is "auto"
6807		// This happens for inline elements with no explicit setting (gh-3571)
6808		val === "auto" ||
6809
6810		// Support: Android <=4.1 - 4.3 only
6811		// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6812		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
6813
6814		// Make sure the element is visible & connected
6815		elem.getClientRects().length ) {
6816
6817		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
6818
6819		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
6820		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
6821		// retrieved value as a content box dimension.
6822		valueIsBorderBox = offsetProp in elem;
6823		if ( valueIsBorderBox ) {
6824			val = elem[ offsetProp ];
6825		}
6826	}
6827
6828	// Normalize "" and auto
6829	val = parseFloat( val ) || 0;
6830
6831	// Adjust for the element's box model
6832	return ( val +
6833		boxModelAdjustment(
6834			elem,
6835			dimension,
6836			extra || ( isBorderBox ? "border" : "content" ),
6837			valueIsBorderBox,
6838			styles,
6839
6840			// Provide the current computed size to request scroll gutter calculation (gh-3589)
6841			val
6842		)
6843	) + "px";
6844}
6845
6846jQuery.extend( {
6847
6848	// Add in style property hooks for overriding the default
6849	// behavior of getting and setting a style property
6850	cssHooks: {
6851		opacity: {
6852			get: function( elem, computed ) {
6853				if ( computed ) {
6854
6855					// We should always get a number back from opacity
6856					var ret = curCSS( elem, "opacity" );
6857					return ret === "" ? "1" : ret;
6858				}
6859			}
6860		}
6861	},
6862
6863	// Don't automatically add "px" to these possibly-unitless properties
6864	cssNumber: {
6865		"animationIterationCount": true,
6866		"columnCount": true,
6867		"fillOpacity": true,
6868		"flexGrow": true,
6869		"flexShrink": true,
6870		"fontWeight": true,
6871		"gridArea": true,
6872		"gridColumn": true,
6873		"gridColumnEnd": true,
6874		"gridColumnStart": true,
6875		"gridRow": true,
6876		"gridRowEnd": true,
6877		"gridRowStart": true,
6878		"lineHeight": true,
6879		"opacity": true,
6880		"order": true,
6881		"orphans": true,
6882		"widows": true,
6883		"zIndex": true,
6884		"zoom": true
6885	},
6886
6887	// Add in properties whose names you wish to fix before
6888	// setting or getting the value
6889	cssProps: {},
6890
6891	// Get and set the style property on a DOM Node
6892	style: function( elem, name, value, extra ) {
6893
6894		// Don't set styles on text and comment nodes
6895		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6896			return;
6897		}
6898
6899		// Make sure that we're working with the right name
6900		var ret, type, hooks,
6901			origName = camelCase( name ),
6902			isCustomProp = rcustomProp.test( name ),
6903			style = elem.style;
6904
6905		// Make sure that we're working with the right name. We don't
6906		// want to query the value if it is a CSS custom property
6907		// since they are user-defined.
6908		if ( !isCustomProp ) {
6909			name = finalPropName( origName );
6910		}
6911
6912		// Gets hook for the prefixed version, then unprefixed version
6913		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6914
6915		// Check if we're setting a value
6916		if ( value !== undefined ) {
6917			type = typeof value;
6918
6919			// Convert "+=" or "-=" to relative numbers (#7345)
6920			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
6921				value = adjustCSS( elem, name, ret );
6922
6923				// Fixes bug #9237
6924				type = "number";
6925			}
6926
6927			// Make sure that null and NaN values aren't set (#7116)
6928			if ( value == null || value !== value ) {
6929				return;
6930			}
6931
6932			// If a number was passed in, add the unit (except for certain CSS properties)
6933			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
6934			// "px" to a few hardcoded values.
6935			if ( type === "number" && !isCustomProp ) {
6936				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
6937			}
6938
6939			// background-* props affect original clone's values
6940			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
6941				style[ name ] = "inherit";
6942			}
6943
6944			// If a hook was provided, use that value, otherwise just set the specified value
6945			if ( !hooks || !( "set" in hooks ) ||
6946				( value = hooks.set( elem, value, extra ) ) !== undefined ) {
6947
6948				if ( isCustomProp ) {
6949					style.setProperty( name, value );
6950				} else {
6951					style[ name ] = value;
6952				}
6953			}
6954
6955		} else {
6956
6957			// If a hook was provided get the non-computed value from there
6958			if ( hooks && "get" in hooks &&
6959				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
6960
6961				return ret;
6962			}
6963
6964			// Otherwise just get the value from the style object
6965			return style[ name ];
6966		}
6967	},
6968
6969	css: function( elem, name, extra, styles ) {
6970		var val, num, hooks,
6971			origName = camelCase( name ),
6972			isCustomProp = rcustomProp.test( name );
6973
6974		// Make sure that we're working with the right name. We don't
6975		// want to modify the value if it is a CSS custom property
6976		// since they are user-defined.
6977		if ( !isCustomProp ) {
6978			name = finalPropName( origName );
6979		}
6980
6981		// Try prefixed name followed by the unprefixed name
6982		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6983
6984		// If a hook was provided get the computed value from there
6985		if ( hooks && "get" in hooks ) {
6986			val = hooks.get( elem, true, extra );
6987		}
6988
6989		// Otherwise, if a way to get the computed value exists, use that
6990		if ( val === undefined ) {
6991			val = curCSS( elem, name, styles );
6992		}
6993
6994		// Convert "normal" to computed value
6995		if ( val === "normal" && name in cssNormalTransform ) {
6996			val = cssNormalTransform[ name ];
6997		}
6998
6999		// Make numeric if forced or a qualifier was provided and val looks numeric
7000		if ( extra === "" || extra ) {
7001			num = parseFloat( val );
7002			return extra === true || isFinite( num ) ? num || 0 : val;
7003		}
7004
7005		return val;
7006	}
7007} );
7008
7009jQuery.each( [ "height", "width" ], function( _i, dimension ) {
7010	jQuery.cssHooks[ dimension ] = {
7011		get: function( elem, computed, extra ) {
7012			if ( computed ) {
7013
7014				// Certain elements can have dimension info if we invisibly show them
7015				// but it must have a current display style that would benefit
7016				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
7017
7018					// Support: Safari 8+
7019					// Table columns in Safari have non-zero offsetWidth & zero
7020					// getBoundingClientRect().width unless display is changed.
7021					// Support: IE <=11 only
7022					// Running getBoundingClientRect on a disconnected node
7023					// in IE throws an error.
7024					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
7025					
vendor: 5,577 bytes, lines 7025-7227
7025	swap( elem, cssShow, function() {
7026							return getWidthOrHeight( elem, dimension, extra );
7027						} ) :
7028						getWidthOrHeight( elem, dimension, extra );
7029			}
7030		},
7031
7032		set: function( elem, value, extra ) {
7033			var matches,
7034				styles = getStyles( elem ),
7035
7036				// Only read styles.position if the test has a chance to fail
7037				// to avoid forcing a reflow.
7038				scrollboxSizeBuggy = !support.scrollboxSize() &&
7039					styles.position === "absolute",
7040
7041				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
7042				boxSizingNeeded = scrollboxSizeBuggy || extra,
7043				isBorderBox = boxSizingNeeded &&
7044					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
7045				subtract = extra ?
7046					boxModelAdjustment(
7047						elem,
7048						dimension,
7049						extra,
7050						isBorderBox,
7051						styles
7052					) :
7053					0;
7054
7055			// Account for unreliable border-box dimensions by comparing offset* to computed and
7056			// faking a content-box to get border and padding (gh-3699)
7057			if ( isBorderBox && scrollboxSizeBuggy ) {
7058				subtract -= Math.ceil(
7059					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
7060					parseFloat( styles[ dimension ] ) -
7061					boxModelAdjustment( elem, dimension, "border", false, styles ) -
7062					0.5
7063				);
7064			}
7065
7066			// Convert to pixels if value adjustment is needed
7067			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
7068				( matches[ 3 ] || "px" ) !== "px" ) {
7069
7070				elem.style[ dimension ] = value;
7071				value = jQuery.css( elem, dimension );
7072			}
7073
7074			return setPositiveNumber( elem, value, subtract );
7075		}
7076	};
7077} );
7078
7079jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
7080	function( elem, computed ) {
7081		if ( computed ) {
7082			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
7083				elem.getBoundingClientRect().left -
7084					swap( elem, { marginLeft: 0 }, function() {
7085						return elem.getBoundingClientRect().left;
7086					} )
7087				) + "px";
7088		}
7089	}
7090);
7091
7092// These hooks are used by animate to expand properties
7093jQuery.each( {
7094	margin: "",
7095	padding: "",
7096	border: "Width"
7097}, function( prefix, suffix ) {
7098	jQuery.cssHooks[ prefix + suffix ] = {
7099		expand: function( value ) {
7100			var i = 0,
7101				expanded = {},
7102
7103				// Assumes a single number if not a string
7104				parts = typeof value === "string" ? value.split( " " ) : [ value ];
7105
7106			for ( ; i < 4; i++ ) {
7107				expanded[ prefix + cssExpand[ i ] + suffix ] =
7108					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
7109			}
7110
7111			return expanded;
7112		}
7113	};
7114
7115	if ( prefix !== "margin" ) {
7116		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
7117	}
7118} );
7119
7120jQuery.fn.extend( {
7121	css: function( name, value ) {
7122		return access( this, function( elem, name, value ) {
7123			var styles, len,
7124				map = {},
7125				i = 0;
7126
7127			if ( Array.isArray( name ) ) {
7128				styles = getStyles( elem );
7129				len = name.length;
7130
7131				for ( ; i < len; i++ ) {
7132					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
7133				}
7134
7135				return map;
7136			}
7137
7138			return value !== undefined ?
7139				jQuery.style( elem, name, value ) :
7140				jQuery.css( elem, name );
7141		}, name, value, arguments.length > 1 );
7142	}
7143} );
7144
7145
7146function Tween( elem, options, prop, end, easing ) {
7147	return new Tween.prototype.init( elem, options, prop, end, easing );
7148}
7149jQuery.Tween = Tween;
7150
7151Tween.prototype = {
7152	constructor: Tween,
7153	init: function( elem, options, prop, end, easing, unit ) {
7154		this.elem = elem;
7155		this.prop = prop;
7156		this.easing = easing || jQuery.easing._default;
7157		this.options = options;
7158		this.start = this.now = this.cur();
7159		this.end = end;
7160		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
7161	},
7162	cur: function() {
7163		var hooks = Tween.propHooks[ this.prop ];
7164
7165		return hooks && hooks.get ?
7166			hooks.get( this ) :
7167			Tween.propHooks._default.get( this );
7168	},
7169	run: function( percent ) {
7170		var eased,
7171			hooks = Tween.propHooks[ this.prop ];
7172
7173		if ( this.options.duration ) {
7174			this.pos = eased = jQuery.easing[ this.easing ](
7175				percent, this.options.duration * percent, 0, 1, this.options.duration
7176			);
7177		} else {
7178			this.pos = eased = percent;
7179		}
7180		this.now = ( this.end - this.start ) * eased + this.start;
7181
7182		if ( this.options.step ) {
7183			this.options.step.call( this.elem, this.now, this );
7184		}
7185
7186		if ( hooks && hooks.set ) {
7187			hooks.set( this );
7188		} else {
7189			Tween.propHooks._default.set( this );
7190		}
7191		return this;
7192	}
7193};
7194
7195Tween.prototype.init.prototype = Tween.prototype;
7196
7197Tween.propHooks = {
7198	_default: {
7199		get: function( tween ) {
7200			var result;
7201
7202			// Use a property on the element directly when it is not a DOM element,
7203			// or when there is no matching style property that exists.
7204			if ( tween.elem.nodeType !== 1 ||
7205				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
7206				return tween.elem[ tween.prop ];
7207			}
7208
7209			// Passing an empty string as a 3rd parameter to .css will automatically
7210			// attempt a parseFloat and fallback to a string if the parse fails.
7211			// Simple values such as "10px" are parsed to Float;
7212			// complex values such as "rotate(1rad)" are returned as-is.
7213			result = jQuery.css( tween.elem, tween.prop, "" );
7214
7215			// Empty strings, null, undefined and "auto" are converted to 0.
7216			return !result || result === "auto" ? 0 : result;
7217		},
7218		set: function( tween ) {
7219
7220			// Use step hook for back compat.
7221			// Use cssHook if its there.
7222			// Use .style if available and use plain properties where available.
7223			if ( jQuery.fx.step[ tween.prop ] ) {
7224				jQuery.fx.step[ tween.prop ]( tween );
7225			} else if ( tween.elem.nodeType === 1 && (
7226					jQuery.cssHooks[ tween.prop ] ||
7227					tween.elem.style[ finalPropName( tween.prop ) ] != null
vendor: 14,002 bytes, lines 7227-7782
7227 ) ) {
7228				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
7229			} else {
7230				tween.elem[ tween.prop ] = tween.now;
7231			}
7232		}
7233	}
7234};
7235
7236// Support: IE <=9 only
7237// Panic based approach to setting things on disconnected nodes
7238Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
7239	set: function( tween ) {
7240		if ( tween.elem.nodeType && tween.elem.parentNode ) {
7241			tween.elem[ tween.prop ] = tween.now;
7242		}
7243	}
7244};
7245
7246jQuery.easing = {
7247	linear: function( p ) {
7248		return p;
7249	},
7250	swing: function( p ) {
7251		return 0.5 - Math.cos( p * Math.PI ) / 2;
7252	},
7253	_default: "swing"
7254};
7255
7256jQuery.fx = Tween.prototype.init;
7257
7258// Back compat <1.8 extension point
7259jQuery.fx.step = {};
7260
7261
7262
7263
7264var
7265	fxNow, inProgress,
7266	rfxtypes = /^(?:toggle|show|hide)$/,
7267	rrun = /queueHooks$/;
7268
7269function schedule() {
7270	if ( inProgress ) {
7271		if ( document.hidden === false && window.requestAnimationFrame ) {
7272			window.requestAnimationFrame( schedule );
7273		} else {
7274			window.setTimeout( schedule, jQuery.fx.interval );
7275		}
7276
7277		jQuery.fx.tick();
7278	}
7279}
7280
7281// Animations created synchronously will run synchronously
7282function createFxNow() {
7283	window.setTimeout( function() {
7284		fxNow = undefined;
7285	} );
7286	return ( fxNow = Date.now() );
7287}
7288
7289// Generate parameters to create a standard animation
7290function genFx( type, includeWidth ) {
7291	var which,
7292		i = 0,
7293		attrs = { height: type };
7294
7295	// If we include width, step value is 1 to do all cssExpand values,
7296	// otherwise step value is 2 to skip over Left and Right
7297	includeWidth = includeWidth ? 1 : 0;
7298	for ( ; i < 4; i += 2 - includeWidth ) {
7299		which = cssExpand[ i ];
7300		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
7301	}
7302
7303	if ( includeWidth ) {
7304		attrs.opacity = attrs.width = type;
7305	}
7306
7307	return attrs;
7308}
7309
7310function createTween( value, prop, animation ) {
7311	var tween,
7312		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
7313		index = 0,
7314		length = collection.length;
7315	for ( ; index < length; index++ ) {
7316		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
7317
7318			// We're done with this property
7319			return tween;
7320		}
7321	}
7322}
7323
7324function defaultPrefilter( elem, props, opts ) {
7325	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
7326		isBox = "width" in props || "height" in props,
7327		anim = this,
7328		orig = {},
7329		style = elem.style,
7330		hidden = elem.nodeType && isHiddenWithinTree( elem ),
7331		dataShow = dataPriv.get( elem, "fxshow" );
7332
7333	// Queue-skipping animations hijack the fx hooks
7334	if ( !opts.queue ) {
7335		hooks = jQuery._queueHooks( elem, "fx" );
7336		if ( hooks.unqueued == null ) {
7337			hooks.unqueued = 0;
7338			oldfire = hooks.empty.fire;
7339			hooks.empty.fire = function() {
7340				if ( !hooks.unqueued ) {
7341					oldfire();
7342				}
7343			};
7344		}
7345		hooks.unqueued++;
7346
7347		anim.always( function() {
7348
7349			// Ensure the complete handler is called before this completes
7350			anim.always( function() {
7351				hooks.unqueued--;
7352				if ( !jQuery.queue( elem, "fx" ).length ) {
7353					hooks.empty.fire();
7354				}
7355			} );
7356		} );
7357	}
7358
7359	// Detect show/hide animations
7360	for ( prop in props ) {
7361		value = props[ prop ];
7362		if ( rfxtypes.test( value ) ) {
7363			delete props[ prop ];
7364			toggle = toggle || value === "toggle";
7365			if ( value === ( hidden ? "hide" : "show" ) ) {
7366
7367				// Pretend to be hidden if this is a "show" and
7368				// there is still data from a stopped show/hide
7369				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
7370					hidden = true;
7371
7372				// Ignore all other no-op show/hide data
7373				} else {
7374					continue;
7375				}
7376			}
7377			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
7378		}
7379	}
7380
7381	// Bail out if this is a no-op like .hide().hide()
7382	propTween = !jQuery.isEmptyObject( props );
7383	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
7384		return;
7385	}
7386
7387	// Restrict "overflow" and "display" styles during box animations
7388	if ( isBox && elem.nodeType === 1 ) {
7389
7390		// Support: IE <=9 - 11, Edge 12 - 15
7391		// Record all 3 overflow attributes because IE does not infer the shorthand
7392		// from identically-valued overflowX and overflowY and Edge just mirrors
7393		// the overflowX value there.
7394		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
7395
7396		// Identify a display type, preferring old show/hide data over the CSS cascade
7397		restoreDisplay = dataShow && dataShow.display;
7398		if ( restoreDisplay == null ) {
7399			restoreDisplay = dataPriv.get( elem, "display" );
7400		}
7401		display = jQuery.css( elem, "display" );
7402		if ( display === "none" ) {
7403			if ( restoreDisplay ) {
7404				display = restoreDisplay;
7405			} else {
7406
7407				// Get nonempty value(s) by temporarily forcing visibility
7408				showHide( [ elem ], true );
7409				restoreDisplay = elem.style.display || restoreDisplay;
7410				display = jQuery.css( elem, "display" );
7411				showHide( [ elem ] );
7412			}
7413		}
7414
7415		// Animate inline elements as inline-block
7416		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
7417			if ( jQuery.css( elem, "float" ) === "none" ) {
7418
7419				// Restore the original display value at the end of pure show/hide animations
7420				if ( !propTween ) {
7421					anim.done( function() {
7422						style.display = restoreDisplay;
7423					} );
7424					if ( restoreDisplay == null ) {
7425						display = style.display;
7426						restoreDisplay = display === "none" ? "" : display;
7427					}
7428				}
7429				style.display = "inline-block";
7430			}
7431		}
7432	}
7433
7434	if ( opts.overflow ) {
7435		style.overflow = "hidden";
7436		anim.always( function() {
7437			style.overflow = opts.overflow[ 0 ];
7438			style.overflowX = opts.overflow[ 1 ];
7439			style.overflowY = opts.overflow[ 2 ];
7440		} );
7441	}
7442
7443	// Implement show/hide animations
7444	propTween = false;
7445	for ( prop in orig ) {
7446
7447		// General show/hide setup for this element animation
7448		if ( !propTween ) {
7449			if ( dataShow ) {
7450				if ( "hidden" in dataShow ) {
7451					hidden = dataShow.hidden;
7452				}
7453			} else {
7454				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
7455			}
7456
7457			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
7458			if ( toggle ) {
7459				dataShow.hidden = !hidden;
7460			}
7461
7462			// Show elements before animating them
7463			if ( hidden ) {
7464				showHide( [ elem ], true );
7465			}
7466
7467			/* eslint-disable no-loop-func */
7468
7469			anim.done( function() {
7470
7471			/* eslint-enable no-loop-func */
7472
7473				// The final step of a "hide" animation is actually hiding the element
7474				if ( !hidden ) {
7475					showHide( [ elem ] );
7476				}
7477				dataPriv.remove( elem, "fxshow" );
7478				for ( prop in orig ) {
7479					jQuery.style( elem, prop, orig[ prop ] );
7480				}
7481			} );
7482		}
7483
7484		// Per-property setup
7485		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
7486		if ( !( prop in dataShow ) ) {
7487			dataShow[ prop ] = propTween.start;
7488			if ( hidden ) {
7489				propTween.end = propTween.start;
7490				propTween.start = 0;
7491			}
7492		}
7493	}
7494}
7495
7496function propFilter( props, specialEasing ) {
7497	var index, name, easing, value, hooks;
7498
7499	// camelCase, specialEasing and expand cssHook pass
7500	for ( index in props ) {
7501		name = camelCase( index );
7502		easing = specialEasing[ name ];
7503		value = props[ index ];
7504		if ( Array.isArray( value ) ) {
7505			easing = value[ 1 ];
7506			value = props[ index ] = value[ 0 ];
7507		}
7508
7509		if ( index !== name ) {
7510			props[ name ] = value;
7511			delete props[ index ];
7512		}
7513
7514		hooks = jQuery.cssHooks[ name ];
7515		if ( hooks && "expand" in hooks ) {
7516			value = hooks.expand( value );
7517			delete props[ name ];
7518
7519			// Not quite $.extend, this won't overwrite existing keys.
7520			// Reusing 'index' because we have the correct "name"
7521			for ( index in value ) {
7522				if ( !( index in props ) ) {
7523					props[ index ] = value[ index ];
7524					specialEasing[ index ] = easing;
7525				}
7526			}
7527		} else {
7528			specialEasing[ name ] = easing;
7529		}
7530	}
7531}
7532
7533function Animation( elem, properties, options ) {
7534	var result,
7535		stopped,
7536		index = 0,
7537		length = Animation.prefilters.length,
7538		deferred = jQuery.Deferred().always( function() {
7539
7540			// Don't match elem in the :animated selector
7541			delete tick.elem;
7542		} ),
7543		tick = function() {
7544			if ( stopped ) {
7545				return false;
7546			}
7547			var currentTime = fxNow || createFxNow(),
7548				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7549
7550				// Support: Android 2.3 only
7551				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7552				temp = remaining / animation.duration || 0,
7553				percent = 1 - temp,
7554				index = 0,
7555				length = animation.tweens.length;
7556
7557			for ( ; index < length; index++ ) {
7558				animation.tweens[ index ].run( percent );
7559			}
7560
7561			deferred.notifyWith( elem, [ animation, percent, remaining ] );
7562
7563			// If there's more to do, yield
7564			if ( percent < 1 && length ) {
7565				return remaining;
7566			}
7567
7568			// If this was an empty animation, synthesize a final progress notification
7569			if ( !length ) {
7570				deferred.notifyWith( elem, [ animation, 1, 0 ] );
7571			}
7572
7573			// Resolve the animation and report its conclusion
7574			deferred.resolveWith( elem, [ animation ] );
7575			return false;
7576		},
7577		animation = deferred.promise( {
7578			elem: elem,
7579			props: jQuery.extend( {}, properties ),
7580			opts: jQuery.extend( true, {
7581				specialEasing: {},
7582				easing: jQuery.easing._default
7583			}, options ),
7584			originalProperties: properties,
7585			originalOptions: options,
7586			startTime: fxNow || createFxNow(),
7587			duration: options.duration,
7588			tweens: [],
7589			createTween: function( prop, end ) {
7590				var tween = jQuery.Tween( elem, animation.opts, prop, end,
7591						animation.opts.specialEasing[ prop ] || animation.opts.easing );
7592				animation.tweens.push( tween );
7593				return tween;
7594			},
7595			stop: function( gotoEnd ) {
7596				var index = 0,
7597
7598					// If we are going to the end, we want to run all the tweens
7599					// otherwise we skip this part
7600					length = gotoEnd ? animation.tweens.length : 0;
7601				if ( stopped ) {
7602					return this;
7603				}
7604				stopped = true;
7605				for ( ; index < length; index++ ) {
7606					animation.tweens[ index ].run( 1 );
7607				}
7608
7609				// Resolve when we played the last frame; otherwise, reject
7610				if ( gotoEnd ) {
7611					deferred.notifyWith( elem, [ animation, 1, 0 ] );
7612					deferred.resolveWith( elem, [ animation, gotoEnd ] );
7613				} else {
7614					deferred.rejectWith( elem, [ animation, gotoEnd ] );
7615				}
7616				return this;
7617			}
7618		} ),
7619		props = animation.props;
7620
7621	propFilter( props, animation.opts.specialEasing );
7622
7623	for ( ; index < length; index++ ) {
7624		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
7625		if ( result ) {
7626			if ( isFunction( result.stop ) ) {
7627				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
7628					result.stop.bind( result );
7629			}
7630			return result;
7631		}
7632	}
7633
7634	jQuery.map( props, createTween, animation );
7635
7636	if ( isFunction( animation.opts.start ) ) {
7637		animation.opts.start.call( elem, animation );
7638	}
7639
7640	// Attach callbacks from options
7641	animation
7642		.progress( animation.opts.progress )
7643		.done( animation.opts.done, animation.opts.complete )
7644		.fail( animation.opts.fail )
7645		.always( animation.opts.always );
7646
7647	jQuery.fx.timer(
7648		jQuery.extend( tick, {
7649			elem: elem,
7650			anim: animation,
7651			queue: animation.opts.queue
7652		} )
7653	);
7654
7655	return animation;
7656}
7657
7658jQuery.Animation = jQuery.extend( Animation, {
7659
7660	tweeners: {
7661		"*": [ function( prop, value ) {
7662			var tween = this.createTween( prop, value );
7663			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
7664			return tween;
7665		} ]
7666	},
7667
7668	tweener: function( props, callback ) {
7669		if ( isFunction( props ) ) {
7670			callback = props;
7671			props = [ "*" ];
7672		} else {
7673			props = props.match( rnothtmlwhite );
7674		}
7675
7676		var prop,
7677			index = 0,
7678			length = props.length;
7679
7680		for ( ; index < length; index++ ) {
7681			prop = props[ index ];
7682			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
7683			Animation.tweeners[ prop ].unshift( callback );
7684		}
7685	},
7686
7687	prefilters: [ defaultPrefilter ],
7688
7689	prefilter: function( callback, prepend ) {
7690		if ( prepend ) {
7691			Animation.prefilters.unshift( callback );
7692		} else {
7693			Animation.prefilters.push( callback );
7694		}
7695	}
7696} );
7697
7698jQuery.speed = function( speed, easing, fn ) {
7699	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
7700		complete: fn || !fn && easing ||
7701			isFunction( speed ) && speed,
7702		duration: speed,
7703		easing: fn && easing || easing && !isFunction( easing ) && easing
7704	};
7705
7706	// Go to the end state if fx are off
7707	if ( jQuery.fx.off ) {
7708		opt.duration = 0;
7709
7710	} else {
7711		if ( typeof opt.duration !== "number" ) {
7712			if ( opt.duration in jQuery.fx.speeds ) {
7713				opt.duration = jQuery.fx.speeds[ opt.duration ];
7714
7715			} else {
7716				opt.duration = jQuery.fx.speeds._default;
7717			}
7718		}
7719	}
7720
7721	// Normalize opt.queue - true/undefined/null -> "fx"
7722	if ( opt.queue == null || opt.queue === true ) {
7723		opt.queue = "fx";
7724	}
7725
7726	// Queueing
7727	opt.old = opt.complete;
7728
7729	opt.complete = function() {
7730		if ( isFunction( opt.old ) ) {
7731			opt.old.call( this );
7732		}
7733
7734		if ( opt.queue ) {
7735			jQuery.dequeue( this, opt.queue );
7736		}
7737	};
7738
7739	return opt;
7740};
7741
7742jQuery.fn.extend( {
7743	fadeTo: function( speed, to, easing, callback ) {
7744
7745		// Show any hidden elements after setting opacity to 0
7746		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
7747
7748			// Animate to the value specified
7749			.end().animate( { opacity: to }, speed, easing, callback );
7750	},
7751	animate: function( prop, speed, easing, callback ) {
7752		var empty = jQuery.isEmptyObject( prop ),
7753			optall = jQuery.speed( speed, easing, callback ),
7754			doAnimation = function() {
7755
7756				// Operate on a copy of prop so per-property easing won't be lost
7757				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
7758
7759				// Empty animations, or finishing resolves immediately
7760				if ( empty || dataPriv.get( this, "finish" ) ) {
7761					anim.stop( true );
7762				}
7763			};
7764			doAnimation.finish = doAnimation;
7765
7766		return empty || optall.queue === false ?
7767			this.each( doAnimation ) :
7768			this.queue( optall.queue, doAnimation );
7769	},
7770	stop: function( type, clearQueue, gotoEnd ) {
7771		var stopQueue = function( hooks ) {
7772			var stop = hooks.stop;
7773			delete hooks.stop;
7774			stop( gotoEnd );
7775		};
7776
7777		if ( typeof type !== "string" ) {
7778			gotoEnd = clearQueue;
7779			clearQueue = type;
7780			type = undefined;
7781		}
7782		if ( clearQueue 
vendor: 3,719 bytes, lines 7782-7940
7782) {
7783			this.queue( type || "fx", [] );
7784		}
7785
7786		return this.each( function() {
7787			var dequeue = true,
7788				index = type != null && type + "queueHooks",
7789				timers = jQuery.timers,
7790				data = dataPriv.get( this );
7791
7792			if ( index ) {
7793				if ( data[ index ] && data[ index ].stop ) {
7794					stopQueue( data[ index ] );
7795				}
7796			} else {
7797				for ( index in data ) {
7798					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
7799						stopQueue( data[ index ] );
7800					}
7801				}
7802			}
7803
7804			for ( index = timers.length; index--; ) {
7805				if ( timers[ index ].elem === this &&
7806					( type == null || timers[ index ].queue === type ) ) {
7807
7808					timers[ index ].anim.stop( gotoEnd );
7809					dequeue = false;
7810					timers.splice( index, 1 );
7811				}
7812			}
7813
7814			// Start the next in the queue if the last step wasn't forced.
7815			// Timers currently will call their complete callbacks, which
7816			// will dequeue but only if they were gotoEnd.
7817			if ( dequeue || !gotoEnd ) {
7818				jQuery.dequeue( this, type );
7819			}
7820		} );
7821	},
7822	finish: function( type ) {
7823		if ( type !== false ) {
7824			type = type || "fx";
7825		}
7826		return this.each( function() {
7827			var index,
7828				data = dataPriv.get( this ),
7829				queue = data[ type + "queue" ],
7830				hooks = data[ type + "queueHooks" ],
7831				timers = jQuery.timers,
7832				length = queue ? queue.length : 0;
7833
7834			// Enable finishing flag on private data
7835			data.finish = true;
7836
7837			// Empty the queue first
7838			jQuery.queue( this, type, [] );
7839
7840			if ( hooks && hooks.stop ) {
7841				hooks.stop.call( this, true );
7842			}
7843
7844			// Look for any active animations, and finish them
7845			for ( index = timers.length; index--; ) {
7846				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
7847					timers[ index ].anim.stop( true );
7848					timers.splice( index, 1 );
7849				}
7850			}
7851
7852			// Look for any animations in the old queue and finish them
7853			for ( index = 0; index < length; index++ ) {
7854				if ( queue[ index ] && queue[ index ].finish ) {
7855					queue[ index ].finish.call( this );
7856				}
7857			}
7858
7859			// Turn off finishing flag
7860			delete data.finish;
7861		} );
7862	}
7863} );
7864
7865jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
7866	var cssFn = jQuery.fn[ name ];
7867	jQuery.fn[ name ] = function( speed, easing, callback ) {
7868		return speed == null || typeof speed === "boolean" ?
7869			cssFn.apply( this, arguments ) :
7870			this.animate( genFx( name, true ), speed, easing, callback );
7871	};
7872} );
7873
7874// Generate shortcuts for custom animations
7875jQuery.each( {
7876	slideDown: genFx( "show" ),
7877	slideUp: genFx( "hide" ),
7878	slideToggle: genFx( "toggle" ),
7879	fadeIn: { opacity: "show" },
7880	fadeOut: { opacity: "hide" },
7881	fadeToggle: { opacity: "toggle" }
7882}, function( name, props ) {
7883	jQuery.fn[ name ] = function( speed, easing, callback ) {
7884		return this.animate( props, speed, easing, callback );
7885	};
7886} );
7887
7888jQuery.timers = [];
7889jQuery.fx.tick = function() {
7890	var timer,
7891		i = 0,
7892		timers = jQuery.timers;
7893
7894	fxNow = Date.now();
7895
7896	for ( ; i < timers.length; i++ ) {
7897		timer = timers[ i ];
7898
7899		// Run the timer and safely remove it when done (allowing for external removal)
7900		if ( !timer() && timers[ i ] === timer ) {
7901			timers.splice( i--, 1 );
7902		}
7903	}
7904
7905	if ( !timers.length ) {
7906		jQuery.fx.stop();
7907	}
7908	fxNow = undefined;
7909};
7910
7911jQuery.fx.timer = function( timer ) {
7912	jQuery.timers.push( timer );
7913	jQuery.fx.start();
7914};
7915
7916jQuery.fx.interval = 13;
7917jQuery.fx.start = function() {
7918	if ( inProgress ) {
7919		return;
7920	}
7921
7922	inProgress = true;
7923	schedule();
7924};
7925
7926jQuery.fx.stop = function() {
7927	inProgress = null;
7928};
7929
7930jQuery.fx.speeds = {
7931	slow: 600,
7932	fast: 200,
7933
7934	// Default speed
7935	_default: 400
7936};
7937
7938
7939// Based off of the plugin by Clint Helfers, with permission.
7940// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 5,177 bytes, lines 7941-8161
7941jQuery.fn.delay = function( time, type ) {
7942	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
7943	type = type || "fx";
7944
7945	return this.queue( type, function( next, hooks ) {
7946		var timeout = window.setTimeout( next, time );
7947		hooks.stop = function() {
7948			window.clearTimeout( timeout );
7949		};
7950	} );
7951};
7952
7953
7954( function() {
7955	var input = document.createElement( "input" ),
7956		select = document.createElement( "select" ),
7957		opt = select.appendChild( document.createElement( "option" ) );
7958
7959	input.type = "checkbox";
7960
7961	// Support: Android <=4.3 only
7962	// Default value for a checkbox should be "on"
7963	support.checkOn = input.value !== "";
7964
7965	// Support: IE <=11 only
7966	// Must access selectedIndex to make default options select
7967	support.optSelected = opt.selected;
7968
7969	// Support: IE <=11 only
7970	// An input loses its value after becoming a radio
7971	input = document.createElement( "input" );
7972	input.value = "t";
7973	input.type = "radio";
7974	support.radioValue = input.value === "t";
7975} )();
7976
7977
7978var boolHook,
7979	attrHandle = jQuery.expr.attrHandle;
7980
7981jQuery.fn.extend( {
7982	attr: function( name, value ) {
7983		return access( this, jQuery.attr, name, value, arguments.length > 1 );
7984	},
7985
7986	removeAttr: function( name ) {
7987		return this.each( function() {
7988			jQuery.removeAttr( this, name );
7989		} );
7990	}
7991} );
7992
7993jQuery.extend( {
7994	attr: function( elem, name, value ) {
7995		var ret, hooks,
7996			nType = elem.nodeType;
7997
7998		// Don't get/set attributes on text, comment and attribute nodes
7999		if ( nType === 3 || nType === 8 || nType === 2 ) {
8000			return;
8001		}
8002
8003		// Fallback to prop when attributes are not supported
8004		if ( typeof elem.getAttribute === "undefined" ) {
8005			return jQuery.prop( elem, name, value );
8006		}
8007
8008		// Attribute hooks are determined by the lowercase version
8009		// Grab necessary hook if one is defined
8010		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8011			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
8012				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
8013		}
8014
8015		if ( value !== undefined ) {
8016			if ( value === null ) {
8017				jQuery.removeAttr( elem, name );
8018				return;
8019			}
8020
8021			if ( hooks && "set" in hooks &&
8022				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8023				return ret;
8024			}
8025
8026			elem.setAttribute( name, value + "" );
8027			return value;
8028		}
8029
8030		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8031			return ret;
8032		}
8033
8034		ret = jQuery.find.attr( elem, name );
8035
8036		// Non-existent attributes return null, we normalize to undefined
8037		return ret == null ? undefined : ret;
8038	},
8039
8040	attrHooks: {
8041		type: {
8042			set: function( elem, value ) {
8043				if ( !support.radioValue && value === "radio" &&
8044					nodeName( elem, "input" ) ) {
8045					var val = elem.value;
8046					elem.setAttribute( "type", value );
8047					if ( val ) {
8048						elem.value = val;
8049					}
8050					return value;
8051				}
8052			}
8053		}
8054	},
8055
8056	removeAttr: function( elem, value ) {
8057		var name,
8058			i = 0,
8059
8060			// Attribute names can contain non-HTML whitespace characters
8061			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
8062			attrNames = value && value.match( rnothtmlwhite );
8063
8064		if ( attrNames && elem.nodeType === 1 ) {
8065			while ( ( name = attrNames[ i++ ] ) ) {
8066				elem.removeAttribute( name );
8067			}
8068		}
8069	}
8070} );
8071
8072// Hooks for boolean attributes
8073boolHook = {
8074	set: function( elem, value, name ) {
8075		if ( value === false ) {
8076
8077			// Remove boolean attributes when set to false
8078			jQuery.removeAttr( elem, name );
8079		} else {
8080			elem.setAttribute( name, name );
8081		}
8082		return name;
8083	}
8084};
8085
8086jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
8087	var getter = attrHandle[ name ] || jQuery.find.attr;
8088
8089	attrHandle[ name ] = function( elem, name, isXML ) {
8090		var ret, handle,
8091			lowercaseName = name.toLowerCase();
8092
8093		if ( !isXML ) {
8094
8095			// Avoid an infinite loop by temporarily removing this function from the getter
8096			handle = attrHandle[ lowercaseName ];
8097			attrHandle[ lowercaseName ] = ret;
8098			ret = getter( elem, name, isXML ) != null ?
8099				lowercaseName :
8100				null;
8101			attrHandle[ lowercaseName ] = handle;
8102		}
8103		return ret;
8104	};
8105} );
8106
8107
8108
8109
8110var rfocusable = /^(?:input|select|textarea|button)$/i,
8111	rclickable = /^(?:a|area)$/i;
8112
8113jQuery.fn.extend( {
8114	prop: function( name, value ) {
8115		return access( this, jQuery.prop, name, value, arguments.length > 1 );
8116	},
8117
8118	removeProp: function( name ) {
8119		return this.each( function() {
8120			delete this[ jQuery.propFix[ name ] || name ];
8121		} );
8122	}
8123} );
8124
8125jQuery.extend( {
8126	prop: function( elem, name, value ) {
8127		var ret, hooks,
8128			nType = elem.nodeType;
8129
8130		// Don't get/set properties on text, comment and attribute nodes
8131		if ( nType === 3 || nType === 8 || nType === 2 ) {
8132			return;
8133		}
8134
8135		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
8136
8137			// Fix name and attach hooks
8138			name = jQuery.propFix[ name ] || name;
8139			hooks = jQuery.propHooks[ name ];
8140		}
8141
8142		if ( value !== undefined ) {
8143			if ( hooks && "set" in hooks &&
8144				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
8145				return ret;
8146			}
8147
8148			return ( elem[ name ] = value );
8149		}
8150
8151		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
8152			return ret;
8153		}
8154
8155		return elem[ name ];
8156	},
8157
8158	propHooks: {
8159		tabIndex: {
8160			get: function( elem ) {
8161
vendor: 6,193 bytes, lines 8162-8424
8162				// Support: IE <=9 - 11 only
8163				// elem.tabIndex doesn't always return the
8164				// correct value when it hasn't been explicitly set
8165				// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
8166				// Use proper attribute retrieval(#12072)
8167				var tabindex = jQuery.find.attr( elem, "tabindex" );
8168
8169				if ( tabindex ) {
8170					return parseInt( tabindex, 10 );
8171				}
8172
8173				if (
8174					rfocusable.test( elem.nodeName ) ||
8175					rclickable.test( elem.nodeName ) &&
8176					elem.href
8177				) {
8178					return 0;
8179				}
8180
8181				return -1;
8182			}
8183		}
8184	},
8185
8186	propFix: {
8187		"for": "htmlFor",
8188		"class": "className"
8189	}
8190} );
8191
8192// Support: IE <=11 only
8193// Accessing the selectedIndex property
8194// forces the browser to respect setting selected
8195// on the option
8196// The getter ensures a default option is selected
8197// when in an optgroup
8198// eslint rule "no-unused-expressions" is disabled for this code
8199// since it considers such accessions noop
8200if ( !support.optSelected ) {
8201	jQuery.propHooks.selected = {
8202		get: function( elem ) {
8203
8204			/* eslint no-unused-expressions: "off" */
8205
8206			var parent = elem.parentNode;
8207			if ( parent && parent.parentNode ) {
8208				parent.parentNode.selectedIndex;
8209			}
8210			return null;
8211		},
8212		set: function( elem ) {
8213
8214			/* eslint no-unused-expressions: "off" */
8215
8216			var parent = elem.parentNode;
8217			if ( parent ) {
8218				parent.selectedIndex;
8219
8220				if ( parent.parentNode ) {
8221					parent.parentNode.selectedIndex;
8222				}
8223			}
8224		}
8225	};
8226}
8227
8228jQuery.each( [
8229	"tabIndex",
8230	"readOnly",
8231	"maxLength",
8232	"cellSpacing",
8233	"cellPadding",
8234	"rowSpan",
8235	"colSpan",
8236	"useMap",
8237	"frameBorder",
8238	"contentEditable"
8239], function() {
8240	jQuery.propFix[ this.toLowerCase() ] = this;
8241} );
8242
8243
8244
8245
8246	// Strip and collapse whitespace according to HTML spec
8247	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
8248	function stripAndCollapse( value ) {
8249		var tokens = value.match( rnothtmlwhite ) || [];
8250		return tokens.join( " " );
8251	}
8252
8253
8254function getClass( elem ) {
8255	return elem.getAttribute && elem.getAttribute( "class" ) || "";
8256}
8257
8258function classesToArray( value ) {
8259	if ( Array.isArray( value ) ) {
8260		return value;
8261	}
8262	if ( typeof value === "string" ) {
8263		return value.match( rnothtmlwhite ) || [];
8264	}
8265	return [];
8266}
8267
8268jQuery.fn.extend( {
8269	addClass: function( value ) {
8270		var classes, elem, cur, curValue, clazz, j, finalValue,
8271			i = 0;
8272
8273		if ( isFunction( value ) ) {
8274			return this.each( function( j ) {
8275				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
8276			} );
8277		}
8278
8279		classes = classesToArray( value );
8280
8281		if ( classes.length ) {
8282			while ( ( elem = this[ i++ ] ) ) {
8283				curValue = getClass( elem );
8284				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8285
8286				if ( cur ) {
8287					j = 0;
8288					while ( ( clazz = classes[ j++ ] ) ) {
8289						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
8290							cur += clazz + " ";
8291						}
8292					}
8293
8294					// Only assign if different to avoid unneeded rendering.
8295					finalValue = stripAndCollapse( cur );
8296					if ( curValue !== finalValue ) {
8297						elem.setAttribute( "class", finalValue );
8298					}
8299				}
8300			}
8301		}
8302
8303		return this;
8304	},
8305
8306	removeClass: function( value ) {
8307		var classes, elem, cur, curValue, clazz, j, finalValue,
8308			i = 0;
8309
8310		if ( isFunction( value ) ) {
8311			return this.each( function( j ) {
8312				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
8313			} );
8314		}
8315
8316		if ( !arguments.length ) {
8317			return this.attr( "class", "" );
8318		}
8319
8320		classes = classesToArray( value );
8321
8322		if ( classes.length ) {
8323			while ( ( elem = this[ i++ ] ) ) {
8324				curValue = getClass( elem );
8325
8326				// This expression is here for better compressibility (see addClass)
8327				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8328
8329				if ( cur ) {
8330					j = 0;
8331					while ( ( clazz = classes[ j++ ] ) ) {
8332
8333						// Remove *all* instances
8334						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
8335							cur = cur.replace( " " + clazz + " ", " " );
8336						}
8337					}
8338
8339					// Only assign if different to avoid unneeded rendering.
8340					finalValue = stripAndCollapse( cur );
8341					if ( curValue !== finalValue ) {
8342						elem.setAttribute( "class", finalValue );
8343					}
8344				}
8345			}
8346		}
8347
8348		return this;
8349	},
8350
8351	toggleClass: function( value, stateVal ) {
8352		var type = typeof value,
8353			isValidValue = type === "string" || Array.isArray( value );
8354
8355		if ( typeof stateVal === "boolean" && isValidValue ) {
8356			return stateVal ? this.addClass( value ) : this.removeClass( value );
8357		}
8358
8359		if ( isFunction( value ) ) {
8360			return this.each( function( i ) {
8361				jQuery( this ).toggleClass(
8362					value.call( this, i, getClass( this ), stateVal ),
8363					stateVal
8364				);
8365			} );
8366		}
8367
8368		return this.each( function() {
8369			var className, i, self, classNames;
8370
8371			if ( isValidValue ) {
8372
8373				// Toggle individual class names
8374				i = 0;
8375				self = jQuery( this );
8376				classNames = classesToArray( value );
8377
8378				while ( ( className = classNames[ i++ ] ) ) {
8379
8380					// Check each className given, space separated list
8381					if ( self.hasClass( className ) ) {
8382						self.removeClass( className );
8383					} else {
8384						self.addClass( className );
8385					}
8386				}
8387
8388			// Toggle whole class name
8389			} else if ( value === undefined || type === "boolean" ) {
8390				className = getClass( this );
8391				if ( className ) {
8392
8393					// Store className if set
8394					dataPriv.set( this, "__className__", className );
8395				}
8396
8397				// If the element has a class name or if we're passed `false`,
8398				// then remove the whole classname (if there was one, the above saved it).
8399				// Otherwise bring back whatever was previously saved (if anything),
8400				// falling back to the empty string if nothing was stored.
8401				if ( this.setAttribute ) {
8402					this.setAttribute( "class",
8403						className || value === false ?
8404						"" :
8405						dataPriv.get( this, "__className__" ) || ""
8406					);
8407				}
8408			}
8409		} );
8410	},
8411
8412	hasClass: function( selector ) {
8413		var className, elem,
8414			i = 0;
8415
8416		className = " " + selector + " ";
8417		while ( ( elem = this[ i++ ] ) ) {
8418			if ( elem.nodeType === 1 &&
8419				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
8420					return true;
8421			}
8422		}
8423
8424		return false;
vendor: 7,091 bytes, lines 8425-8710
8425	}
8426} );
8427
8428
8429
8430
8431var rreturn = /\r/g;
8432
8433jQuery.fn.extend( {
8434	val: function( value ) {
8435		var hooks, ret, valueIsFunction,
8436			elem = this[ 0 ];
8437
8438		if ( !arguments.length ) {
8439			if ( elem ) {
8440				hooks = jQuery.valHooks[ elem.type ] ||
8441					jQuery.valHooks[ elem.nodeName.toLowerCase() ];
8442
8443				if ( hooks &&
8444					"get" in hooks &&
8445					( ret = hooks.get( elem, "value" ) ) !== undefined
8446				) {
8447					return ret;
8448				}
8449
8450				ret = elem.value;
8451
8452				// Handle most common string cases
8453				if ( typeof ret === "string" ) {
8454					return ret.replace( rreturn, "" );
8455				}
8456
8457				// Handle cases where value is null/undef or number
8458				return ret == null ? "" : ret;
8459			}
8460
8461			return;
8462		}
8463
8464		valueIsFunction = isFunction( value );
8465
8466		return this.each( function( i ) {
8467			var val;
8468
8469			if ( this.nodeType !== 1 ) {
8470				return;
8471			}
8472
8473			if ( valueIsFunction ) {
8474				val = value.call( this, i, jQuery( this ).val() );
8475			} else {
8476				val = value;
8477			}
8478
8479			// Treat null/undefined as ""; convert numbers to string
8480			if ( val == null ) {
8481				val = "";
8482
8483			} else if ( typeof val === "number" ) {
8484				val += "";
8485
8486			} else if ( Array.isArray( val ) ) {
8487				val = jQuery.map( val, function( value ) {
8488					return value == null ? "" : value + "";
8489				} );
8490			}
8491
8492			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
8493
8494			// If set returns undefined, fall back to normal setting
8495			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
8496				this.value = val;
8497			}
8498		} );
8499	}
8500} );
8501
8502jQuery.extend( {
8503	valHooks: {
8504		option: {
8505			get: function( elem ) {
8506
8507				var val = jQuery.find.attr( elem, "value" );
8508				return val != null ?
8509					val :
8510
8511					// Support: IE <=10 - 11 only
8512					// option.text throws exceptions (#14686, #14858)
8513					// Strip and collapse whitespace
8514					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8515					stripAndCollapse( jQuery.text( elem ) );
8516			}
8517		},
8518		select: {
8519			get: function( elem ) {
8520				var value, option, i,
8521					options = elem.options,
8522					index = elem.selectedIndex,
8523					one = elem.type === "select-one",
8524					values = one ? null : [],
8525					max = one ? index + 1 : options.length;
8526
8527				if ( index < 0 ) {
8528					i = max;
8529
8530				} else {
8531					i = one ? index : 0;
8532				}
8533
8534				// Loop through all the selected options
8535				for ( ; i < max; i++ ) {
8536					option = options[ i ];
8537
8538					// Support: IE <=9 only
8539					// IE8-9 doesn't update selected after form reset (#2551)
8540					if ( ( option.selected || i === index ) &&
8541
8542							// Don't return options that are disabled or in a disabled optgroup
8543							!option.disabled &&
8544							( !option.parentNode.disabled ||
8545								!nodeName( option.parentNode, "optgroup" ) ) ) {
8546
8547						// Get the specific value for the option
8548						value = jQuery( option ).val();
8549
8550						// We don't need an array for one selects
8551						if ( one ) {
8552							return value;
8553						}
8554
8555						// Multi-Selects return an array
8556						values.push( value );
8557					}
8558				}
8559
8560				return values;
8561			},
8562
8563			set: function( elem, value ) {
8564				var optionSet, option,
8565					options = elem.options,
8566					values = jQuery.makeArray( value ),
8567					i = options.length;
8568
8569				while ( i-- ) {
8570					option = options[ i ];
8571
8572					/* eslint-disable no-cond-assign */
8573
8574					if ( option.selected =
8575						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
8576					) {
8577						optionSet = true;
8578					}
8579
8580					/* eslint-enable no-cond-assign */
8581				}
8582
8583				// Force browsers to behave consistently when non-matching value is set
8584				if ( !optionSet ) {
8585					elem.selectedIndex = -1;
8586				}
8587				return values;
8588			}
8589		}
8590	}
8591} );
8592
8593// Radios and checkboxes getter/setter
8594jQuery.each( [ "radio", "checkbox" ], function() {
8595	jQuery.valHooks[ this ] = {
8596		set: function( elem, value ) {
8597			if ( Array.isArray( value ) ) {
8598				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
8599			}
8600		}
8601	};
8602	if ( !support.checkOn ) {
8603		jQuery.valHooks[ this ].get = function( elem ) {
8604			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
8605		};
8606	}
8607} );
8608
8609
8610
8611
8612// Return jQuery for attributes-only inclusion
8613
8614
8615support.focusin = "onfocusin" in window;
8616
8617
8618var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
8619	stopPropagationCallback = function( e ) {
8620		e.stopPropagation();
8621	};
8622
8623jQuery.extend( jQuery.event, {
8624
8625	trigger: function( event, data, elem, onlyHandlers ) {
8626
8627		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
8628			eventPath = [ elem || document ],
8629			type = hasOwn.call( event, "type" ) ? event.type : event,
8630			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
8631
8632		cur = lastElement = tmp = elem = elem || document;
8633
8634		// Don't do events on text and comment nodes
8635		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
8636			return;
8637		}
8638
8639		// focus/blur morphs to focusin/out; ensure we're not firing them right now
8640		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
8641			return;
8642		}
8643
8644		if ( type.indexOf( "." ) > -1 ) {
8645
8646			// Namespaced trigger; create a regexp to match event type in handle()
8647			namespaces = type.split( "." );
8648			type = namespaces.shift();
8649			namespaces.sort();
8650		}
8651		ontype = type.indexOf( ":" ) < 0 && "on" + type;
8652
8653		// Caller can pass in a jQuery.Event object, Object, or just an event type string
8654		event = event[ jQuery.expando ] ?
8655			event :
8656			new jQuery.Event( type, typeof event === "object" && event );
8657
8658		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
8659		event.isTrigger = onlyHandlers ? 2 : 3;
8660		event.namespace = namespaces.join( "." );
8661		event.rnamespace = event.namespace ?
8662			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
8663			null;
8664
8665		// Clean up the event in case it is being reused
8666		event.result = undefined;
8667		if ( !event.target ) {
8668			event.target = elem;
8669		}
8670
8671		// Clone any incoming data and prepend the event, creating the handler arg list
8672		data = data == null ?
8673			[ event ] :
8674			jQuery.makeArray( data, [ event ] );
8675
8676		// Allow special events to draw outside the lines
8677		special = jQuery.event.special[ type ] || {};
8678		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
8679			return;
8680		}
8681
8682		// Determine event propagation path in advance, per W3C events spec (#9951)
8683		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
8684		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
8685
8686			bubbleType = special.delegateType || type;
8687			if ( !rfocusMorph.test( bubbleType + type ) ) {
8688				cur = cur.parentNode;
8689			}
8690			for ( ; cur; cur = cur.parentNode ) {
8691				eventPath.push( cur );
8692				tmp = cur;
8693			}
8694
8695			// Only add window if we got to document (e.g., not plain obj or detached DOM)
8696			if ( tmp === ( elem.ownerDocument || document ) ) {
8697				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
8698			}
8699		}
8700
8701		// Fire handlers on the event path
8702		i = 0;
8703		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
8704			lastElement = cur;
8705			event.type = i > 1 ?
8706				bubbleType :
8707				special.bindType || type;
8708
8709			// jQuery handler
8710			handle = (
vendor: 2,548 bytes, lines 8710-8811
8710
8711					dataPriv.get( cur, "events" ) || Object.create( null )
8712				)[ event.type ] &&
8713				dataPriv.get( cur, "handle" );
8714			if ( handle ) {
8715				handle.apply( cur, data );
8716			}
8717
8718			// Native handler
8719			handle = ontype && cur[ ontype ];
8720			if ( handle && handle.apply && acceptData( cur ) ) {
8721				event.result = handle.apply( cur, data );
8722				if ( event.result === false ) {
8723					event.preventDefault();
8724				}
8725			}
8726		}
8727		event.type = type;
8728
8729		// If nobody prevented the default action, do it now
8730		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
8731
8732			if ( ( !special._default ||
8733				special._default.apply( eventPath.pop(), data ) === false ) &&
8734				acceptData( elem ) ) {
8735
8736				// Call a native DOM method on the target with the same name as the event.
8737				// Don't do default actions on window, that's where global variables be (#6170)
8738				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
8739
8740					// Don't re-trigger an onFOO event when we call its FOO() method
8741					tmp = elem[ ontype ];
8742
8743					if ( tmp ) {
8744						elem[ ontype ] = null;
8745					}
8746
8747					// Prevent re-triggering of the same event, since we already bubbled it above
8748					jQuery.event.triggered = type;
8749
8750					if ( event.isPropagationStopped() ) {
8751						lastElement.addEventListener( type, stopPropagationCallback );
8752					}
8753
8754					elem[ type ]();
8755
8756					if ( event.isPropagationStopped() ) {
8757						lastElement.removeEventListener( type, stopPropagationCallback );
8758					}
8759
8760					jQuery.event.triggered = undefined;
8761
8762					if ( tmp ) {
8763						elem[ ontype ] = tmp;
8764					}
8765				}
8766			}
8767		}
8768
8769		return event.result;
8770	},
8771
8772	// Piggyback on a donor event to simulate a different one
8773	// Used only for `focus(in | out)` events
8774	simulate: function( type, elem, event ) {
8775		var e = jQuery.extend(
8776			new jQuery.Event(),
8777			event,
8778			{
8779				type: type,
8780				isSimulated: true
8781			}
8782		);
8783
8784		jQuery.event.trigger( e, null, elem );
8785	}
8786
8787} );
8788
8789jQuery.fn.extend( {
8790
8791	trigger: function( type, data ) {
8792		return this.each( function() {
8793			jQuery.event.trigger( type, data, this );
8794		} );
8795	},
8796	triggerHandler: function( type, data ) {
8797		var elem = this[ 0 ];
8798		if ( elem ) {
8799			return jQuery.event.trigger( type, data, elem, true );
8800		}
8801	}
8802} );
8803
8804
8805// Support: Firefox <=44
8806// Firefox doesn't have focus(in | out) events
8807// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
8808//
8809// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
8810// focus(in | out) events fire after focus & blur events,
8811// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
vendor: 4,078 bytes, lines 8812-8977
8812// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
8813if ( !support.focusin ) {
8814	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
8815
8816		// Attach a single capturing handler on the document while someone wants focusin/focusout
8817		var handler = function( event ) {
8818			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
8819		};
8820
8821		jQuery.event.special[ fix ] = {
8822			setup: function() {
8823
8824				// Handle: regular nodes (via `this.ownerDocument`), window
8825				// (via `this.document`) & document (via `this`).
8826				var doc = this.ownerDocument || this.document || this,
8827					attaches = dataPriv.access( doc, fix );
8828
8829				if ( !attaches ) {
8830					doc.addEventListener( orig, handler, true );
8831				}
8832				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
8833			},
8834			teardown: function() {
8835				var doc = this.ownerDocument || this.document || this,
8836					attaches = dataPriv.access( doc, fix ) - 1;
8837
8838				if ( !attaches ) {
8839					doc.removeEventListener( orig, handler, true );
8840					dataPriv.remove( doc, fix );
8841
8842				} else {
8843					dataPriv.access( doc, fix, attaches );
8844				}
8845			}
8846		};
8847	} );
8848}
8849var location = window.location;
8850
8851var nonce = { guid: Date.now() };
8852
8853var rquery = ( /\?/ );
8854
8855
8856
8857// Cross-browser xml parsing
8858jQuery.parseXML = function( data ) {
8859	var xml;
8860	if ( !data || typeof data !== "string" ) {
8861		return null;
8862	}
8863
8864	// Support: IE 9 - 11 only
8865	// IE throws on parseFromString with invalid input.
8866	try {
8867		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
8868	} catch ( e ) {
8869		xml = undefined;
8870	}
8871
8872	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
8873		jQuery.error( "Invalid XML: " + data );
8874	}
8875	return xml;
8876};
8877
8878
8879var
8880	rbracket = /\[\]$/,
8881	rCRLF = /\r?\n/g,
8882	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8883	rsubmittable = /^(?:input|select|textarea|keygen)/i;
8884
8885function buildParams( prefix, obj, traditional, add ) {
8886	var name;
8887
8888	if ( Array.isArray( obj ) ) {
8889
8890		// Serialize array item.
8891		jQuery.each( obj, function( i, v ) {
8892			if ( traditional || rbracket.test( prefix ) ) {
8893
8894				// Treat each array item as a scalar.
8895				add( prefix, v );
8896
8897			} else {
8898
8899				// Item is non-scalar (array or object), encode its numeric index.
8900				buildParams(
8901					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
8902					v,
8903					traditional,
8904					add
8905				);
8906			}
8907		} );
8908
8909	} else if ( !traditional && toType( obj ) === "object" ) {
8910
8911		// Serialize object item.
8912		for ( name in obj ) {
8913			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
8914		}
8915
8916	} else {
8917
8918		// Serialize scalar item.
8919		add( prefix, obj );
8920	}
8921}
8922
8923// Serialize an array of form elements or a set of
8924// key/values into a query string
8925jQuery.param = function( a, traditional ) {
8926	var prefix,
8927		s = [],
8928		add = function( key, valueOrFunction ) {
8929
8930			// If value is a function, invoke it and use its return value
8931			var value = isFunction( valueOrFunction ) ?
8932				valueOrFunction() :
8933				valueOrFunction;
8934
8935			s[ s.length ] = encodeURIComponent( key ) + "=" +
8936				encodeURIComponent( value == null ? "" : value );
8937		};
8938
8939	if ( a == null ) {
8940		return "";
8941	}
8942
8943	// If an array was passed in, assume that it is an array of form elements.
8944	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
8945
8946		// Serialize the form elements
8947		jQuery.each( a, function() {
8948			add( this.name, this.value );
8949		} );
8950
8951	} else {
8952
8953		// If traditional, encode the "old" way (the way 1.3.2 or older
8954		// did it), otherwise encode params recursively.
8955		for ( prefix in a ) {
8956			buildParams( prefix, a[ prefix ], traditional, add );
8957		}
8958	}
8959
8960	// Return the resulting serialization
8961	return s.join( "&" );
8962};
8963
8964jQuery.fn.extend( {
8965	serialize: function() {
8966		return jQuery.param( this.serializeArray() );
8967	},
8968	serializeArray: function() {
8969		return this.map( function() {
8970
8971			// Can add propHook for "elements" to filter or add form elements
8972			var elements = jQuery.prop( this, "elements" );
8973			return elements ? jQuery.makeArray( elements ) : this;
8974		} )
8975		.filter( function() {
8976			var type = this.type;
8977
vendor: 4,933 bytes, lines 8978-9150
8978			// Use .is( ":disabled" ) so that fieldset[disabled] works
8979			return this.name && !jQuery( this ).is( ":disabled" ) &&
8980				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
8981				( this.checked || !rcheckableType.test( type ) );
8982		} )
8983		.map( function( _i, elem ) {
8984			var val = jQuery( this ).val();
8985
8986			if ( val == null ) {
8987				return null;
8988			}
8989
8990			if ( Array.isArray( val ) ) {
8991				return jQuery.map( val, function( val ) {
8992					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8993				} );
8994			}
8995
8996			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8997		} ).get();
8998	}
8999} );
9000
9001
9002var
9003	r20 = /%20/g,
9004	rhash = /#.*$/,
9005	rantiCache = /([?&])_=[^&]*/,
9006	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
9007
9008	// #7653, #8125, #8152: local protocol detection
9009	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
9010	rnoContent = /^(?:GET|HEAD)$/,
9011	rprotocol = /^\/\//,
9012
9013	/* Prefilters
9014	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
9015	 * 2) These are called:
9016	 *    - BEFORE asking for a transport
9017	 *    - AFTER param serialization (s.data is a string if s.processData is true)
9018	 * 3) key is the dataType
9019	 * 4) the catchall symbol "*" can be used
9020	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
9021	 */
9022	prefilters = {},
9023
9024	/* Transports bindings
9025	 * 1) key is the dataType
9026	 * 2) the catchall symbol "*" can be used
9027	 * 3) selection will start with transport dataType and THEN go to "*" if needed
9028	 */
9029	transports = {},
9030
9031	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
9032	allTypes = "*/".concat( "*" ),
9033
9034	// Anchor tag for parsing the document origin
9035	originAnchor = document.createElement( "a" );
9036	originAnchor.href = location.href;
9037
9038// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
9039function addToPrefiltersOrTransports( structure ) {
9040
9041	// dataTypeExpression is optional and defaults to "*"
9042	return function( dataTypeExpression, func ) {
9043
9044		if ( typeof dataTypeExpression !== "string" ) {
9045			func = dataTypeExpression;
9046			dataTypeExpression = "*";
9047		}
9048
9049		var dataType,
9050			i = 0,
9051			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
9052
9053		if ( isFunction( func ) ) {
9054
9055			// For each dataType in the dataTypeExpression
9056			while ( ( dataType = dataTypes[ i++ ] ) ) {
9057
9058				// Prepend if requested
9059				if ( dataType[ 0 ] === "+" ) {
9060					dataType = dataType.slice( 1 ) || "*";
9061					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
9062
9063				// Otherwise append
9064				} else {
9065					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
9066				}
9067			}
9068		}
9069	};
9070}
9071
9072// Base inspection function for prefilters and transports
9073function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
9074
9075	var inspected = {},
9076		seekingTransport = ( structure === transports );
9077
9078	function inspect( dataType ) {
9079		var selected;
9080		inspected[ dataType ] = true;
9081		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
9082			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
9083			if ( typeof dataTypeOrTransport === "string" &&
9084				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
9085
9086				options.dataTypes.unshift( dataTypeOrTransport );
9087				inspect( dataTypeOrTransport );
9088				return false;
9089			} else if ( seekingTransport ) {
9090				return !( selected = dataTypeOrTransport );
9091			}
9092		} );
9093		return selected;
9094	}
9095
9096	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
9097}
9098
9099// A special extend for ajax options
9100// that takes "flat" options (not to be deep extended)
9101// Fixes #9887
9102function ajaxExtend( target, src ) {
9103	var key, deep,
9104		flatOptions = jQuery.ajaxSettings.flatOptions || {};
9105
9106	for ( key in src ) {
9107		if ( src[ key ] !== undefined ) {
9108			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
9109		}
9110	}
9111	if ( deep ) {
9112		jQuery.extend( true, target, deep );
9113	}
9114
9115	return target;
9116}
9117
9118/* Handles responses to an ajax request:
9119 * - finds the right dataType (mediates between content-type and expected dataType)
9120 * - returns the corresponding response
9121 */
9122function ajaxHandleResponses( s, jqXHR, responses ) {
9123
9124	var ct, type, finalDataType, firstDataType,
9125		contents = s.contents,
9126		dataTypes = s.dataTypes;
9127
9128	// Remove auto dataType and get content-type in the process
9129	while ( dataTypes[ 0 ] === "*" ) {
9130		dataTypes.shift();
9131		if ( ct === undefined ) {
9132			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
9133		}
9134	}
9135
9136	// Check if we're dealing with a known content-type
9137	if ( ct ) {
9138		for ( type in contents ) {
9139			if ( contents[ type ] && contents[ type ].test( ct ) ) {
9140				dataTypes.unshift( type );
9141				break;
9142			}
9143		}
9144	}
9145
9146	// Check to see if we have a response for the expected dataType
9147	if ( dataTypes[ 0 ] in responses ) {
9148		finalDataType = dataTypes[ 0 ];
9149	} else {
9150
vendor: 6,163 bytes, lines 9151-9418
9151		// Try convertible dataTypes
9152		for ( type in responses ) {
9153			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
9154				finalDataType = type;
9155				break;
9156			}
9157			if ( !firstDataType ) {
9158				firstDataType = type;
9159			}
9160		}
9161
9162		// Or just use first one
9163		finalDataType = finalDataType || firstDataType;
9164	}
9165
9166	// If we found a dataType
9167	// We add the dataType to the list if needed
9168	// and return the corresponding response
9169	if ( finalDataType ) {
9170		if ( finalDataType !== dataTypes[ 0 ] ) {
9171			dataTypes.unshift( finalDataType );
9172		}
9173		return responses[ finalDataType ];
9174	}
9175}
9176
9177/* Chain conversions given the request and the original response
9178 * Also sets the responseXXX fields on the jqXHR instance
9179 */
9180function ajaxConvert( s, response, jqXHR, isSuccess ) {
9181	var conv2, current, conv, tmp, prev,
9182		converters = {},
9183
9184		// Work with a copy of dataTypes in case we need to modify it for conversion
9185		dataTypes = s.dataTypes.slice();
9186
9187	// Create converters map with lowercased keys
9188	if ( dataTypes[ 1 ] ) {
9189		for ( conv in s.converters ) {
9190			converters[ conv.toLowerCase() ] = s.converters[ conv ];
9191		}
9192	}
9193
9194	current = dataTypes.shift();
9195
9196	// Convert to each sequential dataType
9197	while ( current ) {
9198
9199		if ( s.responseFields[ current ] ) {
9200			jqXHR[ s.responseFields[ current ] ] = response;
9201		}
9202
9203		// Apply the dataFilter if provided
9204		if ( !prev && isSuccess && s.dataFilter ) {
9205			response = s.dataFilter( response, s.dataType );
9206		}
9207
9208		prev = current;
9209		current = dataTypes.shift();
9210
9211		if ( current ) {
9212
9213			// There's only work to do if current dataType is non-auto
9214			if ( current === "*" ) {
9215
9216				current = prev;
9217
9218			// Convert response if prev dataType is non-auto and differs from current
9219			} else if ( prev !== "*" && prev !== current ) {
9220
9221				// Seek a direct converter
9222				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
9223
9224				// If none found, seek a pair
9225				if ( !conv ) {
9226					for ( conv2 in converters ) {
9227
9228						// If conv2 outputs current
9229						tmp = conv2.split( " " );
9230						if ( tmp[ 1 ] === current ) {
9231
9232							// If prev can be converted to accepted input
9233							conv = converters[ prev + " " + tmp[ 0 ] ] ||
9234								converters[ "* " + tmp[ 0 ] ];
9235							if ( conv ) {
9236
9237								// Condense equivalence converters
9238								if ( conv === true ) {
9239									conv = converters[ conv2 ];
9240
9241								// Otherwise, insert the intermediate dataType
9242								} else if ( converters[ conv2 ] !== true ) {
9243									current = tmp[ 0 ];
9244									dataTypes.unshift( tmp[ 1 ] );
9245								}
9246								break;
9247							}
9248						}
9249					}
9250				}
9251
9252				// Apply converter (if not an equivalence)
9253				if ( conv !== true ) {
9254
9255					// Unless errors are allowed to bubble, catch and return them
9256					if ( conv && s.throws ) {
9257						response = conv( response );
9258					} else {
9259						try {
9260							response = conv( response );
9261						} catch ( e ) {
9262							return {
9263								state: "parsererror",
9264								error: conv ? e : "No conversion from " + prev + " to " + current
9265							};
9266						}
9267					}
9268				}
9269			}
9270		}
9271	}
9272
9273	return { state: "success", data: response };
9274}
9275
9276jQuery.extend( {
9277
9278	// Counter for holding the number of active queries
9279	active: 0,
9280
9281	// Last-Modified header cache for next request
9282	lastModified: {},
9283	etag: {},
9284
9285	ajaxSettings: {
9286		url: location.href,
9287		type: "GET",
9288		isLocal: rlocalProtocol.test( location.protocol ),
9289		global: true,
9290		processData: true,
9291		async: true,
9292		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9293
9294		/*
9295		timeout: 0,
9296		data: null,
9297		dataType: null,
9298		username: null,
9299		password: null,
9300		cache: null,
9301		throws: false,
9302		traditional: false,
9303		headers: {},
9304		*/
9305
9306		accepts: {
9307			"*": allTypes,
9308			text: "text/plain",
9309			html: "text/html",
9310			xml: "application/xml, text/xml",
9311			json: "application/json, text/javascript"
9312		},
9313
9314		contents: {
9315			xml: /\bxml\b/,
9316			html: /\bhtml/,
9317			json: /\bjson\b/
9318		},
9319
9320		responseFields: {
9321			xml: "responseXML",
9322			text: "responseText",
9323			json: "responseJSON"
9324		},
9325
9326		// Data converters
9327		// Keys separate source (or catchall "*") and destination types with a single space
9328		converters: {
9329
9330			// Convert anything to text
9331			"* text": String,
9332
9333			// Text to html (true = no transformation)
9334			"text html": true,
9335
9336			// Evaluate text as a json expression
9337			"text json": JSON.parse,
9338
9339			// Parse text as xml
9340			"text xml": jQuery.parseXML
9341		},
9342
9343		// For options that shouldn't be deep extended:
9344		// you can add your own custom options here if
9345		// and when you create one that shouldn't be
9346		// deep extended (see ajaxExtend)
9347		flatOptions: {
9348			url: true,
9349			context: true
9350		}
9351	},
9352
9353	// Creates a full fledged settings object into target
9354	// with both ajaxSettings and settings fields.
9355	// If target is omitted, writes into ajaxSettings.
9356	ajaxSetup: function( target, settings ) {
9357		return settings ?
9358
9359			// Building a settings object
9360			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
9361
9362			// Extending ajaxSettings
9363			ajaxExtend( jQuery.ajaxSettings, target );
9364	},
9365
9366	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
9367	ajaxTransport: addToPrefiltersOrTransports( transports ),
9368
9369	// Main method
9370	ajax: function( url, options ) {
9371
9372		// If url is an object, simulate pre-1.5 signature
9373		if ( typeof url === "object" ) {
9374			options = url;
9375			url = undefined;
9376		}
9377
9378		// Force options to be an object
9379		options = options || {};
9380
9381		var transport,
9382
9383			// URL without anti-cache param
9384			cacheURL,
9385
9386			// Response headers
9387			responseHeadersString,
9388			responseHeaders,
9389
9390			// timeout handle
9391			timeoutTimer,
9392
9393			// Url cleanup var
9394			urlAnchor,
9395
9396			// Request state (becomes false upon send and true upon completion)
9397			completed,
9398
9399			// To know if global events are to be dispatched
9400			fireGlobals,
9401
9402			// Loop variable
9403			i,
9404
9405			// uncached part of the url
9406			uncached,
9407
9408			// Create the final options object
9409			s = jQuery.ajaxSetup( {}, options ),
9410
9411			// Callbacks context
9412			callbackContext = s.context || s,
9413
9414			// Context for global events is callbackContext if it is a DOM node or jQuery collection
9415			globalEventContext = s.context &&
9416				( callbackContext.nodeType || callbackContext.jquery ) ?
9417					jQuery( callbackContext ) :
9418	
vendor: 8,850 bytes, lines 9418-9730
9418				jQuery.event,
9419
9420			// Deferreds
9421			deferred = jQuery.Deferred(),
9422			completeDeferred = jQuery.Callbacks( "once memory" ),
9423
9424			// Status-dependent callbacks
9425			statusCode = s.statusCode || {},
9426
9427			// Headers (they are sent all at once)
9428			requestHeaders = {},
9429			requestHeadersNames = {},
9430
9431			// Default abort message
9432			strAbort = "canceled",
9433
9434			// Fake xhr
9435			jqXHR = {
9436				readyState: 0,
9437
9438				// Builds headers hashtable if needed
9439				getResponseHeader: function( key ) {
9440					var match;
9441					if ( completed ) {
9442						if ( !responseHeaders ) {
9443							responseHeaders = {};
9444							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
9445								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
9446									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
9447										.concat( match[ 2 ] );
9448							}
9449						}
9450						match = responseHeaders[ key.toLowerCase() + " " ];
9451					}
9452					return match == null ? null : match.join( ", " );
9453				},
9454
9455				// Raw string
9456				getAllResponseHeaders: function() {
9457					return completed ? responseHeadersString : null;
9458				},
9459
9460				// Caches the header
9461				setRequestHeader: function( name, value ) {
9462					if ( completed == null ) {
9463						name = requestHeadersNames[ name.toLowerCase() ] =
9464							requestHeadersNames[ name.toLowerCase() ] || name;
9465						requestHeaders[ name ] = value;
9466					}
9467					return this;
9468				},
9469
9470				// Overrides response content-type header
9471				overrideMimeType: function( type ) {
9472					if ( completed == null ) {
9473						s.mimeType = type;
9474					}
9475					return this;
9476				},
9477
9478				// Status-dependent callbacks
9479				statusCode: function( map ) {
9480					var code;
9481					if ( map ) {
9482						if ( completed ) {
9483
9484							// Execute the appropriate callbacks
9485							jqXHR.always( map[ jqXHR.status ] );
9486						} else {
9487
9488							// Lazy-add the new callbacks in a way that preserves old ones
9489							for ( code in map ) {
9490								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9491							}
9492						}
9493					}
9494					return this;
9495				},
9496
9497				// Cancel the request
9498				abort: function( statusText ) {
9499					var finalText = statusText || strAbort;
9500					if ( transport ) {
9501						transport.abort( finalText );
9502					}
9503					done( 0, finalText );
9504					return this;
9505				}
9506			};
9507
9508		// Attach deferreds
9509		deferred.promise( jqXHR );
9510
9511		// Add protocol if not provided (prefilters might expect it)
9512		// Handle falsy url in the settings object (#10093: consistency with old signature)
9513		// We also use the url parameter if available
9514		s.url = ( ( url || s.url || location.href ) + "" )
9515			.replace( rprotocol, location.protocol + "//" );
9516
9517		// Alias method option to type as per ticket #12004
9518		s.type = options.method || options.type || s.method || s.type;
9519
9520		// Extract dataTypes list
9521		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
9522
9523		// A cross-domain request is in order when the origin doesn't match the current origin.
9524		if ( s.crossDomain == null ) {
9525			urlAnchor = document.createElement( "a" );
9526
9527			// Support: IE <=8 - 11, Edge 12 - 15
9528			// IE throws exception on accessing the href property if url is malformed,
9529			// e.g. http://example.com:80x/
9530			try {
9531				urlAnchor.href = s.url;
9532
9533				// Support: IE <=8 - 11 only
9534				// Anchor's host property isn't correctly set when s.url is relative
9535				urlAnchor.href = urlAnchor.href;
9536				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
9537					urlAnchor.protocol + "//" + urlAnchor.host;
9538			} catch ( e ) {
9539
9540				// If there is an error parsing the URL, assume it is crossDomain,
9541				// it can be rejected by the transport if it is invalid
9542				s.crossDomain = true;
9543			}
9544		}
9545
9546		// Convert data if not already a string
9547		if ( s.data && s.processData && typeof s.data !== "string" ) {
9548			s.data = jQuery.param( s.data, s.traditional );
9549		}
9550
9551		// Apply prefilters
9552		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9553
9554		// If request was aborted inside a prefilter, stop there
9555		if ( completed ) {
9556			return jqXHR;
9557		}
9558
9559		// We can fire global events as of now if asked to
9560		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
9561		fireGlobals = jQuery.event && s.global;
9562
9563		// Watch for a new set of requests
9564		if ( fireGlobals && jQuery.active++ === 0 ) {
9565			jQuery.event.trigger( "ajaxStart" );
9566		}
9567
9568		// Uppercase the type
9569		s.type = s.type.toUpperCase();
9570
9571		// Determine if request has content
9572		s.hasContent = !rnoContent.test( s.type );
9573
9574		// Save the URL in case we're toying with the If-Modified-Since
9575		// and/or If-None-Match header later on
9576		// Remove hash to simplify url manipulation
9577		cacheURL = s.url.replace( rhash, "" );
9578
9579		// More options handling for requests with no content
9580		if ( !s.hasContent ) {
9581
9582			// Remember the hash so we can put it back
9583			uncached = s.url.slice( cacheURL.length );
9584
9585			// If data is available and should be processed, append data to url
9586			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
9587				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
9588
9589				// #9682: remove data so that it's not used in an eventual retry
9590				delete s.data;
9591			}
9592
9593			// Add or update anti-cache param if needed
9594			if ( s.cache === false ) {
9595				cacheURL = cacheURL.replace( rantiCache, "$1" );
9596				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
9597					uncached;
9598			}
9599
9600			// Put hash and anti-cache on the URL that will be requested (gh-1732)
9601			s.url = cacheURL + uncached;
9602
9603		// Change '%20' to '+' if this is encoded form body content (gh-2658)
9604		} else if ( s.data && s.processData &&
9605			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
9606			s.data = s.data.replace( r20, "+" );
9607		}
9608
9609		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9610		if ( s.ifModified ) {
9611			if ( jQuery.lastModified[ cacheURL ] ) {
9612				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9613			}
9614			if ( jQuery.etag[ cacheURL ] ) {
9615				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9616			}
9617		}
9618
9619		// Set the correct header, if data is being sent
9620		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9621			jqXHR.setRequestHeader( "Content-Type", s.contentType );
9622		}
9623
9624		// Set the Accepts header for the server, depending on the dataType
9625		jqXHR.setRequestHeader(
9626			"Accept",
9627			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
9628				s.accepts[ s.dataTypes[ 0 ] ] +
9629					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9630				s.accepts[ "*" ]
9631		);
9632
9633		// Check for headers option
9634		for ( i in s.headers ) {
9635			jqXHR.setRequestHeader( i, s.headers[ i ] );
9636		}
9637
9638		// Allow custom headers/mimetypes and early abort
9639		if ( s.beforeSend &&
9640			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
9641
9642			// Abort if not done already and return
9643			return jqXHR.abort();
9644		}
9645
9646		// Aborting is no longer a cancellation
9647		strAbort = "abort";
9648
9649		// Install callbacks on deferreds
9650		completeDeferred.add( s.complete );
9651		jqXHR.done( s.success );
9652		jqXHR.fail( s.error );
9653
9654		// Get transport
9655		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9656
9657		// If no transport, we auto-abort
9658		if ( !transport ) {
9659			done( -1, "No Transport" );
9660		} else {
9661			jqXHR.readyState = 1;
9662
9663			// Send global event
9664			if ( fireGlobals ) {
9665				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9666			}
9667
9668			// If request was aborted inside ajaxSend, stop there
9669			if ( completed ) {
9670				return jqXHR;
9671			}
9672
9673			// Timeout
9674			if ( s.async && s.timeout > 0 ) {
9675				timeoutTimer = window.setTimeout( function() {
9676					jqXHR.abort( "timeout" );
9677				}, s.timeout );
9678			}
9679
9680			try {
9681				completed = false;
9682				transport.send( requestHeaders, done );
9683			} catch ( e ) {
9684
9685				// Rethrow post-completion exceptions
9686				if ( completed ) {
9687					throw e;
9688				}
9689
9690				// Propagate others as results
9691				done( -1, e );
9692			}
9693		}
9694
9695		// Callback for when everything is done
9696		function done( status, nativeStatusText, responses, headers ) {
9697			var isSuccess, success, error, response, modified,
9698				statusText = nativeStatusText;
9699
9700			// Ignore repeat invocations
9701			if ( completed ) {
9702				return;
9703			}
9704
9705			completed = true;
9706
9707			// Clear timeout if it exists
9708			if ( timeoutTimer ) {
9709				window.clearTimeout( timeoutTimer );
9710			}
9711
9712			// Dereference transport for early garbage collection
9713			// (no matter how long the jqXHR object will be used)
9714			transport = undefined;
9715
9716			// Cache response headers
9717			responseHeadersString = headers || "";
9718
9719			// Set readyState
9720			jqXHR.readyState = status > 0 ? 4 : 0;
9721
9722			// Determine if successful
9723			isSuccess = status >= 200 && status < 300 || status === 304;
9724
9725			// Get response data
9726			if ( responses ) {
9727				response = ajaxHandleResponses( s, jqXHR, responses );
9728			}
9729
9730			// Use a noop converter for missing script
9730
9731			if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1
vendor: 18,647 bytes, lines 9731-10469
9731 ) {
9732				s.converters[ "text script" ] = function() {};
9733			}
9734
9735			// Convert no matter what (that way responseXXX fields are always set)
9736			response = ajaxConvert( s, response, jqXHR, isSuccess );
9737
9738			// If successful, handle type chaining
9739			if ( isSuccess ) {
9740
9741				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9742				if ( s.ifModified ) {
9743					modified = jqXHR.getResponseHeader( "Last-Modified" );
9744					if ( modified ) {
9745						jQuery.lastModified[ cacheURL ] = modified;
9746					}
9747					modified = jqXHR.getResponseHeader( "etag" );
9748					if ( modified ) {
9749						jQuery.etag[ cacheURL ] = modified;
9750					}
9751				}
9752
9753				// if no content
9754				if ( status === 204 || s.type === "HEAD" ) {
9755					statusText = "nocontent";
9756
9757				// if not modified
9758				} else if ( status === 304 ) {
9759					statusText = "notmodified";
9760
9761				// If we have data, let's convert it
9762				} else {
9763					statusText = response.state;
9764					success = response.data;
9765					error = response.error;
9766					isSuccess = !error;
9767				}
9768			} else {
9769
9770				// Extract error from statusText and normalize for non-aborts
9771				error = statusText;
9772				if ( status || !statusText ) {
9773					statusText = "error";
9774					if ( status < 0 ) {
9775						status = 0;
9776					}
9777				}
9778			}
9779
9780			// Set data for the fake xhr object
9781			jqXHR.status = status;
9782			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9783
9784			// Success/Error
9785			if ( isSuccess ) {
9786				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9787			} else {
9788				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9789			}
9790
9791			// Status-dependent callbacks
9792			jqXHR.statusCode( statusCode );
9793			statusCode = undefined;
9794
9795			if ( fireGlobals ) {
9796				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9797					[ jqXHR, s, isSuccess ? success : error ] );
9798			}
9799
9800			// Complete
9801			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9802
9803			if ( fireGlobals ) {
9804				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9805
9806				// Handle the global AJAX counter
9807				if ( !( --jQuery.active ) ) {
9808					jQuery.event.trigger( "ajaxStop" );
9809				}
9810			}
9811		}
9812
9813		return jqXHR;
9814	},
9815
9816	getJSON: function( url, data, callback ) {
9817		return jQuery.get( url, data, callback, "json" );
9818	},
9819
9820	getScript: function( url, callback ) {
9821		return jQuery.get( url, undefined, callback, "script" );
9822	}
9823} );
9824
9825jQuery.each( [ "get", "post" ], function( _i, method ) {
9826	jQuery[ method ] = function( url, data, callback, type ) {
9827
9828		// Shift arguments if data argument was omitted
9829		if ( isFunction( data ) ) {
9830			type = type || callback;
9831			callback = data;
9832			data = undefined;
9833		}
9834
9835		// The url can be an options object (which then must have .url)
9836		return jQuery.ajax( jQuery.extend( {
9837			url: url,
9838			type: method,
9839			dataType: type,
9840			data: data,
9841			success: callback
9842		}, jQuery.isPlainObject( url ) && url ) );
9843	};
9844} );
9845
9846jQuery.ajaxPrefilter( function( s ) {
9847	var i;
9848	for ( i in s.headers ) {
9849		if ( i.toLowerCase() === "content-type" ) {
9850			s.contentType = s.headers[ i ] || "";
9851		}
9852	}
9853} );
9854
9855
9856jQuery._evalUrl = function( url, options, doc ) {
9857	return jQuery.ajax( {
9858		url: url,
9859
9860		// Make this explicit, since user can override this through ajaxSetup (#11264)
9861		type: "GET",
9862		dataType: "script",
9863		cache: true,
9864		async: false,
9865		global: false,
9866
9867		// Only evaluate the response if it is successful (gh-4126)
9868		// dataFilter is not invoked for failure responses, so using it instead
9869		// of the default converter is kludgy but it works.
9870		converters: {
9871			"text script": function() {}
9872		},
9873		dataFilter: function( response ) {
9874			jQuery.globalEval( response, options, doc );
9875		}
9876	} );
9877};
9878
9879
9880jQuery.fn.extend( {
9881	wrapAll: function( html ) {
9882		var wrap;
9883
9884		if ( this[ 0 ] ) {
9885			if ( isFunction( html ) ) {
9886				html = html.call( this[ 0 ] );
9887			}
9888
9889			// The elements to wrap the target around
9890			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
9891
9892			if ( this[ 0 ].parentNode ) {
9893				wrap.insertBefore( this[ 0 ] );
9894			}
9895
9896			wrap.map( function() {
9897				var elem = this;
9898
9899				while ( elem.firstElementChild ) {
9900					elem = elem.firstElementChild;
9901				}
9902
9903				return elem;
9904			} ).append( this );
9905		}
9906
9907		return this;
9908	},
9909
9910	wrapInner: function( html ) {
9911		if ( isFunction( html ) ) {
9912			return this.each( function( i ) {
9913				jQuery( this ).wrapInner( html.call( this, i ) );
9914			} );
9915		}
9916
9917		return this.each( function() {
9918			var self = jQuery( this ),
9919				contents = self.contents();
9920
9921			if ( contents.length ) {
9922				contents.wrapAll( html );
9923
9924			} else {
9925				self.append( html );
9926			}
9927		} );
9928	},
9929
9930	wrap: function( html ) {
9931		var htmlIsFunction = isFunction( html );
9932
9933		return this.each( function( i ) {
9934			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
9935		} );
9936	},
9937
9938	unwrap: function( selector ) {
9939		this.parent( selector ).not( "body" ).each( function() {
9940			jQuery( this ).replaceWith( this.childNodes );
9941		} );
9942		return this;
9943	}
9944} );
9945
9946
9947jQuery.expr.pseudos.hidden = function( elem ) {
9948	return !jQuery.expr.pseudos.visible( elem );
9949};
9950jQuery.expr.pseudos.visible = function( elem ) {
9951	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
9952};
9953
9954
9955
9956
9957jQuery.ajaxSettings.xhr = function() {
9958	try {
9959		return new window.XMLHttpRequest();
9960	} catch ( e ) {}
9961};
9962
9963var xhrSuccessStatus = {
9964
9965		// File protocol always yields status code 0, assume 200
9966		0: 200,
9967
9968		// Support: IE <=9 only
9969		// #1450: sometimes IE returns 1223 when it should be 204
9970		1223: 204
9971	},
9972	xhrSupported = jQuery.ajaxSettings.xhr();
9973
9974support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
9975support.ajax = xhrSupported = !!xhrSupported;
9976
9977jQuery.ajaxTransport( function( options ) {
9978	var callback, errorCallback;
9979
9980	// Cross domain only allowed if supported through XMLHttpRequest
9981	if ( support.cors || xhrSupported && !options.crossDomain ) {
9982		return {
9983			send: function( headers, complete ) {
9984				var i,
9985					xhr = options.xhr();
9986
9987				xhr.open(
9988					options.type,
9989					options.url,
9990					options.async,
9991					options.username,
9992					options.password
9993				);
9994
9995				// Apply custom fields if provided
9996				if ( options.xhrFields ) {
9997					for ( i in options.xhrFields ) {
9998						xhr[ i ] = options.xhrFields[ i ];
9999					}
10000				}
10001
10002				// Override mime type if needed
10003				if ( options.mimeType && xhr.overrideMimeType ) {
10004					xhr.overrideMimeType( options.mimeType );
10005				}
10006
10007				// X-Requested-With header
10008				// For cross-domain requests, seeing as conditions for a preflight are
10009				// akin to a jigsaw puzzle, we simply never set it to be sure.
10010				// (it can always be set on a per-request basis or even using ajaxSetup)
10011				// For same-domain requests, won't change header if already provided.
10012				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
10013					headers[ "X-Requested-With" ] = "XMLHttpRequest";
10014				}
10015
10016				// Set headers
10017				for ( i in headers ) {
10018					xhr.setRequestHeader( i, headers[ i ] );
10019				}
10020
10021				// Callback
10022				callback = function( type ) {
10023					return function() {
10024						if ( callback ) {
10025							callback = errorCallback = xhr.onload =
10026								xhr.onerror = xhr.onabort = xhr.ontimeout =
10027									xhr.onreadystatechange = null;
10028
10029							if ( type === "abort" ) {
10030								xhr.abort();
10031							} else if ( type === "error" ) {
10032
10033								// Support: IE <=9 only
10034								// On a manual native abort, IE9 throws
10035								// errors on any property access that is not readyState
10036								if ( typeof xhr.status !== "number" ) {
10037									complete( 0, "error" );
10038								} else {
10039									complete(
10040
10041										// File: protocol always yields status 0; see #8605, #14207
10042										xhr.status,
10043										xhr.statusText
10044									);
10045								}
10046							} else {
10047								complete(
10048									xhrSuccessStatus[ xhr.status ] || xhr.status,
10049									xhr.statusText,
10050
10051									// Support: IE <=9 only
10052									// IE9 has no XHR2 but throws on binary (trac-11426)
10053									// For XHR2 non-text, let the caller handle it (gh-2498)
10054									( xhr.responseType || "text" ) !== "text"  ||
10055									typeof xhr.responseText !== "string" ?
10056										{ binary: xhr.response } :
10057										{ text: xhr.responseText },
10058									xhr.getAllResponseHeaders()
10059								);
10060							}
10061						}
10062					};
10063				};
10064
10065				// Listen to events
10066				xhr.onload = callback();
10067				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
10068
10069				// Support: IE 9 only
10070				// Use onreadystatechange to replace onabort
10071				// to handle uncaught aborts
10072				if ( xhr.onabort !== undefined ) {
10073					xhr.onabort = errorCallback;
10074				} else {
10075					xhr.onreadystatechange = function() {
10076
10077						// Check readyState before timeout as it changes
10078						if ( xhr.readyState === 4 ) {
10079
10080							// Allow onerror to be called first,
10081							// but that will not handle a native abort
10082							// Also, save errorCallback to a variable
10083							// as xhr.onerror cannot be accessed
10084							window.setTimeout( function() {
10085								if ( callback ) {
10086									errorCallback();
10087								}
10088							} );
10089						}
10090					};
10091				}
10092
10093				// Create the abort callback
10094				callback = callback( "abort" );
10095
10096				try {
10097
10098					// Do send the request (this may raise an exception)
10099					xhr.send( options.hasContent && options.data || null );
10100				} catch ( e ) {
10101
10102					// #14683: Only rethrow if this hasn't been notified as an error yet
10103					if ( callback ) {
10104						throw e;
10105					}
10106				}
10107			},
10108
10109			abort: function() {
10110				if ( callback ) {
10111					callback();
10112				}
10113			}
10114		};
10115	}
10116} );
10117
10118
10119
10120
10121// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
10122jQuery.ajaxPrefilter( function( s ) {
10123	if ( s.crossDomain ) {
10124		s.contents.script = false;
10125	}
10126} );
10127
10128// Install script dataType
10129jQuery.ajaxSetup( {
10130	accepts: {
10131		script: "text/javascript, application/javascript, " +
10132			"application/ecmascript, application/x-ecmascript"
10133	},
10134	contents: {
10135		script: /\b(?:java|ecma)script\b/
10136	},
10137	converters: {
10138		"text script": function( text ) {
10139			jQuery.globalEval( text );
10140			return text;
10141		}
10142	}
10143} );
10144
10145// Handle cache's special case and crossDomain
10146jQuery.ajaxPrefilter( "script", function( s ) {
10147	if ( s.cache === undefined ) {
10148		s.cache = false;
10149	}
10150	if ( s.crossDomain ) {
10151		s.type = "GET";
10152	}
10153} );
10154
10155// Bind script tag hack transport
10156jQuery.ajaxTransport( "script", function( s ) {
10157
10158	// This transport only deals with cross domain or forced-by-attrs requests
10159	if ( s.crossDomain || s.scriptAttrs ) {
10160		var script, callback;
10161		return {
10162			send: function( _, complete ) {
10163				script = jQuery( "<script>" )
10164					.attr( s.scriptAttrs || {} )
10165					.prop( { charset: s.scriptCharset, src: s.url } )
10166					.on( "load error", callback = function( evt ) {
10167						script.remove();
10168						callback = null;
10169						if ( evt ) {
10170							complete( evt.type === "error" ? 404 : 200, evt.type );
10171						}
10172					} );
10173
10174				// Use native DOM manipulation to avoid our domManip AJAX trickery
10175				document.head.appendChild( script[ 0 ] );
10176			},
10177			abort: function() {
10178				if ( callback ) {
10179					callback();
10180				}
10181			}
10182		};
10183	}
10184} );
10185
10186
10187
10188
10189var oldCallbacks = [],
10190	rjsonp = /(=)\?(?=&|$)|\?\?/;
10191
10192// Default jsonp settings
10193jQuery.ajaxSetup( {
10194	jsonp: "callback",
10195	jsonpCallback: function() {
10196		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
10197		this[ callback ] = true;
10198		return callback;
10199	}
10200} );
10201
10202// Detect, normalize options and install callbacks for jsonp requests
10203jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
10204
10205	var callbackName, overwritten, responseContainer,
10206		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
10207			"url" :
10208			typeof s.data === "string" &&
10209				( s.contentType || "" )
10210					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
10211				rjsonp.test( s.data ) && "data"
10212		);
10213
10214	// Handle iff the expected data type is "jsonp" or we have a parameter to set
10215	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
10216
10217		// Get callback name, remembering preexisting value associated with it
10218		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
10219			s.jsonpCallback() :
10220			s.jsonpCallback;
10221
10222		// Insert callback into url or form data
10223		if ( jsonProp ) {
10224			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
10225		} else if ( s.jsonp !== false ) {
10226			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
10227		}
10228
10229		// Use data converter to retrieve json after script execution
10230		s.converters[ "script json" ] = function() {
10231			if ( !responseContainer ) {
10232				jQuery.error( callbackName + " was not called" );
10233			}
10234			return responseContainer[ 0 ];
10235		};
10236
10237		// Force json dataType
10238		s.dataTypes[ 0 ] = "json";
10239
10240		// Install callback
10241		overwritten = window[ callbackName ];
10242		window[ callbackName ] = function() {
10243			responseContainer = arguments;
10244		};
10245
10246		// Clean-up function (fires after converters)
10247		jqXHR.always( function() {
10248
10249			// If previous value didn't exist - remove it
10250			if ( overwritten === undefined ) {
10251				jQuery( window ).removeProp( callbackName );
10252
10253			// Otherwise restore preexisting value
10254			} else {
10255				window[ callbackName ] = overwritten;
10256			}
10257
10258			// Save back as free
10259			if ( s[ callbackName ] ) {
10260
10261				// Make sure that re-using the options doesn't screw things around
10262				s.jsonpCallback = originalSettings.jsonpCallback;
10263
10264				// Save the callback name for future use
10265				oldCallbacks.push( callbackName );
10266			}
10267
10268			// Call if it was a function and we have a response
10269			if ( responseContainer && isFunction( overwritten ) ) {
10270				overwritten( responseContainer[ 0 ] );
10271			}
10272
10273			responseContainer = overwritten = undefined;
10274		} );
10275
10276		// Delegate to script
10277		return "script";
10278	}
10279} );
10280
10281
10282
10283
10284// Support: Safari 8 only
10285// In Safari 8 documents created via document.implementation.createHTMLDocument
10286// collapse sibling forms: the second one becomes a child of the first one.
10287// Because of that, this security measure has to be disabled in Safari 8.
10288// https://bugs.webkit.org/show_bug.cgi?id=137337
10289support.createHTMLDocument = ( function() {
10290	var body = document.implementation.createHTMLDocument( "" ).body;
10291	body.innerHTML = "<form></form><form></form>";
10292	return body.childNodes.length === 2;
10293} )();
10294
10295
10296// Argument "data" should be string of html
10297// context (optional): If specified, the fragment will be created in this context,
10298// defaults to document
10299// keepScripts (optional): If true, will include scripts passed in the html string
10300jQuery.parseHTML = function( data, context, keepScripts ) {
10301	if ( typeof data !== "string" ) {
10302		return [];
10303	}
10304	if ( typeof context === "boolean" ) {
10305		keepScripts = context;
10306		context = false;
10307	}
10308
10309	var base, parsed, scripts;
10310
10311	if ( !context ) {
10312
10313		// Stop scripts or inline event handlers from being executed immediately
10314		// by using document.implementation
10315		if ( support.createHTMLDocument ) {
10316			context = document.implementation.createHTMLDocument( "" );
10317
10318			// Set the base href for the created document
10319			// so any parsed elements with URLs
10320			// are based on the document's URL (gh-2965)
10321			base = context.createElement( "base" );
10322			base.href = document.location.href;
10323			context.head.appendChild( base );
10324		} else {
10325			context = document;
10326		}
10327	}
10328
10329	parsed = rsingleTag.exec( data );
10330	scripts = !keepScripts && [];
10331
10332	// Single tag
10333	if ( parsed ) {
10334		return [ context.createElement( parsed[ 1 ] ) ];
10335	}
10336
10337	parsed = buildFragment( [ data ], context, scripts );
10338
10339	if ( scripts && scripts.length ) {
10340		jQuery( scripts ).remove();
10341	}
10342
10343	return jQuery.merge( [], parsed.childNodes );
10344};
10345
10346
10347/**
10348 * Load a url into a page
10349 */
10350jQuery.fn.load = function( url, params, callback ) {
10351	var selector, type, response,
10352		self = this,
10353		off = url.indexOf( " " );
10354
10355	if ( off > -1 ) {
10356		selector = stripAndCollapse( url.slice( off ) );
10357		url = url.slice( 0, off );
10358	}
10359
10360	// If it's a function
10361	if ( isFunction( params ) ) {
10362
10363		// We assume that it's the callback
10364		callback = params;
10365		params = undefined;
10366
10367	// Otherwise, build a param string
10368	} else if ( params && typeof params === "object" ) {
10369		type = "POST";
10370	}
10371
10372	// If we have elements to modify, make the request
10373	if ( self.length > 0 ) {
10374		jQuery.ajax( {
10375			url: url,
10376
10377			// If "type" variable is undefined, then "GET" method will be used.
10378			// Make value of this field explicit since
10379			// user can override it through ajaxSetup method
10380			type: type || "GET",
10381			dataType: "html",
10382			data: params
10383		} ).done( function( responseText ) {
10384
10385			// Save response for use in complete callback
10386			response = arguments;
10387
10388			self.html( selector ?
10389
10390				// If a selector was specified, locate the right elements in a dummy div
10391				// Exclude scripts to avoid IE 'Permission Denied' errors
10392				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
10393
10394				// Otherwise use the full result
10395				responseText );
10396
10397		// If the request succeeds, this function gets "data", "status", "jqXHR"
10398		// but they are ignored because response was set above.
10399		// If it fails, this function gets "jqXHR", "status", "error"
10400		} ).always( callback && function( jqXHR, status ) {
10401			self.each( function() {
10402				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
10403			} );
10404		} );
10405	}
10406
10407	return this;
10408};
10409
10410
10411
10412
10413jQuery.expr.pseudos.animated = function( elem ) {
10414	return jQuery.grep( jQuery.timers, function( fn ) {
10415		return elem === fn.elem;
10416	} ).length;
10417};
10418
10419
10420
10421
10422jQuery.offset = {
10423	setOffset: function( elem, options, i ) {
10424		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10425			position = jQuery.css( elem, "position" ),
10426			curElem = jQuery( elem ),
10427			props = {};
10428
10429		// Set position first, in-case top/left are set even on static elem
10430		if ( position === "static" ) {
10431			elem.style.position = "relative";
10432		}
10433
10434		curOffset = curElem.offset();
10435		curCSSTop = jQuery.css( elem, "top" );
10436		curCSSLeft = jQuery.css( elem, "left" );
10437		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
10438			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
10439
10440		// Need to be able to calculate position if either
10441		// top or left is auto and position is either absolute or fixed
10442		if ( calculatePosition ) {
10443			curPosition = curElem.position();
10444			curTop = curPosition.top;
10445			curLeft = curPosition.left;
10446
10447		} else {
10448			curTop = parseFloat( curCSSTop ) || 0;
10449			curLeft = parseFloat( curCSSLeft ) || 0;
10450		}
10451
10452		if ( isFunction( options ) ) {
10453
10454			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
10455			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
10456		}
10457
10458		if ( options.top != null ) {
10459			props.top = ( options.top - curOffset.top ) + curTop;
10460		}
10461		if ( options.left != null ) {
10462			props.left = ( options.left - curOffset.left ) + curLeft;
10463		}
10464
10465		if ( "using" in options ) {
10466			options.using.call( elem, props );
10467
10468		} else {
10469			
vendor: 2,160 bytes, lines 10469-10547
10469if ( typeof props.top === "number" ) {
10470				props.top += "px";
10471			}
10472			if ( typeof props.left === "number" ) {
10473				props.left += "px";
10474			}
10475			curElem.css( props );
10476		}
10477	}
10478};
10479
10480jQuery.fn.extend( {
10481
10482	// offset() relates an element's border box to the document origin
10483	offset: function( options ) {
10484
10485		// Preserve chaining for setter
10486		if ( arguments.length ) {
10487			return options === undefined ?
10488				this :
10489				this.each( function( i ) {
10490					jQuery.offset.setOffset( this, options, i );
10491				} );
10492		}
10493
10494		var rect, win,
10495			elem = this[ 0 ];
10496
10497		if ( !elem ) {
10498			return;
10499		}
10500
10501		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
10502		// Support: IE <=11 only
10503		// Running getBoundingClientRect on a
10504		// disconnected node in IE throws an error
10505		if ( !elem.getClientRects().length ) {
10506			return { top: 0, left: 0 };
10507		}
10508
10509		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
10510		rect = elem.getBoundingClientRect();
10511		win = elem.ownerDocument.defaultView;
10512		return {
10513			top: rect.top + win.pageYOffset,
10514			left: rect.left + win.pageXOffset
10515		};
10516	},
10517
10518	// position() relates an element's margin box to its offset parent's padding box
10519	// This corresponds to the behavior of CSS absolute positioning
10520	position: function() {
10521		if ( !this[ 0 ] ) {
10522			return;
10523		}
10524
10525		var offsetParent, offset, doc,
10526			elem = this[ 0 ],
10527			parentOffset = { top: 0, left: 0 };
10528
10529		// position:fixed elements are offset from the viewport, which itself always has zero offset
10530		if ( jQuery.css( elem, "position" ) === "fixed" ) {
10531
10532			// Assume position:fixed implies availability of getBoundingClientRect
10533			offset = elem.getBoundingClientRect();
10534
10535		} else {
10536			offset = this.offset();
10537
10538			// Account for the *real* offset parent, which can be the document or its root element
10539			// when a statically positioned element is identified
10540			doc = elem.ownerDocument;
10541			offsetParent = elem.offsetParent || doc.documentElement;
10542			while ( offsetParent &&
10543				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
10544				jQuery.css( offsetParent, "position" ) === "static" ) {
10545
10546				offsetParent = offsetParent.parentNode;
10547			}
vendor: 7,719 bytes, lines 10548-10813
10548			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
10549
10550				// Incorporate borders into its offset, since they are outside its content origin
10551				parentOffset = jQuery( offsetParent ).offset();
10552				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
10553				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
10554			}
10555		}
10556
10557		// Subtract parent offsets and element margins
10558		return {
10559			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
10560			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
10561		};
10562	},
10563
10564	// This method will return documentElement in the following cases:
10565	// 1) For the element inside the iframe without offsetParent, this method will return
10566	//    documentElement of the parent window
10567	// 2) For the hidden or detached element
10568	// 3) For body or html element, i.e. in case of the html node - it will return itself
10569	//
10570	// but those exceptions were never presented as a real life use-cases
10571	// and might be considered as more preferable results.
10572	//
10573	// This logic, however, is not guaranteed and can change at any point in the future
10574	offsetParent: function() {
10575		return this.map( function() {
10576			var offsetParent = this.offsetParent;
10577
10578			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
10579				offsetParent = offsetParent.offsetParent;
10580			}
10581
10582			return offsetParent || documentElement;
10583		} );
10584	}
10585} );
10586
10587// Create scrollLeft and scrollTop methods
10588jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
10589	var top = "pageYOffset" === prop;
10590
10591	jQuery.fn[ method ] = function( val ) {
10592		return access( this, function( elem, method, val ) {
10593
10594			// Coalesce documents and windows
10595			var win;
10596			if ( isWindow( elem ) ) {
10597				win = elem;
10598			} else if ( elem.nodeType === 9 ) {
10599				win = elem.defaultView;
10600			}
10601
10602			if ( val === undefined ) {
10603				return win ? win[ prop ] : elem[ method ];
10604			}
10605
10606			if ( win ) {
10607				win.scrollTo(
10608					!top ? val : win.pageXOffset,
10609					top ? val : win.pageYOffset
10610				);
10611
10612			} else {
10613				elem[ method ] = val;
10614			}
10615		}, method, val, arguments.length );
10616	};
10617} );
10618
10619// Support: Safari <=7 - 9.1, Chrome <=37 - 49
10620// Add the top/left cssHooks using jQuery.fn.position
10621// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10622// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
10623// getComputedStyle returns percent when specified for top/left/bottom/right;
10624// rather than make the css module depend on the offset module, just check for it here
10625jQuery.each( [ "top", "left" ], function( _i, prop ) {
10626	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
10627		function( elem, computed ) {
10628			if ( computed ) {
10629				computed = curCSS( elem, prop );
10630
10631				// If curCSS returns percentage, fallback to offset
10632				return rnumnonpx.test( computed ) ?
10633					jQuery( elem ).position()[ prop ] + "px" :
10634					computed;
10635			}
10636		}
10637	);
10638} );
10639
10640
10641// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10642jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
10643	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
10644		function( defaultExtra, funcName ) {
10645
10646		// Margin is only for outerHeight, outerWidth
10647		jQuery.fn[ funcName ] = function( margin, value ) {
10648			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
10649				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
10650
10651			return access( this, function( elem, type, value ) {
10652				var doc;
10653
10654				if ( isWindow( elem ) ) {
10655
10656					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
10657					return funcName.indexOf( "outer" ) === 0 ?
10658						elem[ "inner" + name ] :
10659						elem.document.documentElement[ "client" + name ];
10660				}
10661
10662				// Get document width or height
10663				if ( elem.nodeType === 9 ) {
10664					doc = elem.documentElement;
10665
10666					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
10667					// whichever is greatest
10668					return Math.max(
10669						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
10670						elem.body[ "offset" + name ], doc[ "offset" + name ],
10671						doc[ "client" + name ]
10672					);
10673				}
10674
10675				return value === undefined ?
10676
10677					// Get width or height on the element, requesting but not forcing parseFloat
10678					jQuery.css( elem, type, extra ) :
10679
10680					// Set width or height on the element
10681					jQuery.style( elem, type, value, extra );
10682			}, type, chainable ? margin : undefined, chainable );
10683		};
10684	} );
10685} );
10686
10687
10688jQuery.each( [
10689	"ajaxStart",
10690	"ajaxStop",
10691	"ajaxComplete",
10692	"ajaxError",
10693	"ajaxSuccess",
10694	"ajaxSend"
10695], function( _i, type ) {
10696	jQuery.fn[ type ] = function( fn ) {
10697		return this.on( type, fn );
10698	};
10699} );
10700
10701
10702
10703
10704jQuery.fn.extend( {
10705
10706	bind: function( types, data, fn ) {
10707		return this.on( types, null, data, fn );
10708	},
10709	unbind: function( types, fn ) {
10710		return this.off( types, null, fn );
10711	},
10712
10713	delegate: function( selector, types, data, fn ) {
10714		return this.on( types, selector, data, fn );
10715	},
10716	undelegate: function( selector, types, fn ) {
10717
10718		// ( namespace ) or ( selector, types [, fn] )
10719		return arguments.length === 1 ?
10720			this.off( selector, "**" ) :
10721			this.off( types, selector || "**", fn );
10722	},
10723
10724	hover: function( fnOver, fnOut ) {
10725		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
10726	}
10727} );
10728
10729jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
10730	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
10731	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
10732	function( _i, name ) {
10733
10734		// Handle event binding
10735		jQuery.fn[ name ] = function( data, fn ) {
10736			return arguments.length > 0 ?
10737				this.on( name, null, data, fn ) :
10738				this.trigger( name );
10739		};
10740	} );
10741
10742
10743
10744
10745// Support: Android <=4.0 only
10746// Make sure we trim BOM and NBSP
10747var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
10748
10749// Bind a function to a context, optionally partially applying any
10750// arguments.
10751// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
10752// However, it is not slated for removal any time soon
10753jQuery.proxy = function( fn, context ) {
10754	var tmp, args, proxy;
10755
10756	if ( typeof context === "string" ) {
10757		tmp = fn[ context ];
10758		context = fn;
10759		fn = tmp;
10760	}
10761
10762	// Quick check to determine if target is callable, in the spec
10763	// this throws a TypeError, but we will just return undefined.
10764	if ( !isFunction( fn ) ) {
10765		return undefined;
10766	}
10767
10768	// Simulated bind
10769	args = slice.call( arguments, 2 );
10770	proxy = function() {
10771		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
10772	};
10773
10774	// Set the guid of unique handler to the same of original handler, so it can be removed
10775	proxy.guid = fn.guid = fn.guid || jQuery.guid++;
10776
10777	return proxy;
10778};
10779
10780jQuery.holdReady = function( hold ) {
10781	if ( hold ) {
10782		jQuery.readyWait++;
10783	} else {
10784		jQuery.ready( true );
10785	}
10786};
10787jQuery.isArray = Array.isArray;
10788jQuery.parseJSON = JSON.parse;
10789jQuery.nodeName = nodeName;
10790jQuery.isFunction = isFunction;
10791jQuery.isWindow = isWindow;
10792jQuery.camelCase = camelCase;
10793jQuery.type = toType;
10794
10795jQuery.now = Date.now;
10796
10797jQuery.isNumeric = function( obj ) {
10798
10799	// As of jQuery 3.0, isNumeric is limited to
10800	// strings and numbers (primitives or objects)
10801	// that can be coerced to finite numbers (gh-2662)
10802	var type = jQuery.type( obj );
10803	return ( type === "number" || type === "string" ) &&
10804
10805		// parseFloat NaNs numeric-cast false positives ("")
10806		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
10807		// subtraction forces infinities to NaN
10808		!isNaN( obj - parseFloat( obj ) );
10809};
10810
10811jQuery.trim = function( text ) {
10812	return text == null ?
10813		"" :
10814		( text + "" ).replace( rtrim, "" );
10815};
10816
10817
10818
10819// Register as a named AMD module, since jQuery can be concatenated with other
10820// files that may use define, but not via a proper concatenation script that
10821// understands anonymous AMD modules. A named AMD is safest and most robust
10822// way to register. Lowercase jquery is used because AMD module names are
10823// derived from file names, and jQuery is normally delivered in a lowercase
10824// file name. Do this after creating the global so that if an AMD module wants
10825// to call noConflict to hide this version of jQuery, it will work.
10826
10827// Note that for maximum portability, libraries that are not jQuery should
10828// declare themselves as anonymous modules, and avoid setting a global if an
10829// AMD loader is present. jQuery is a special case. For more information, see
10830// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10831
10832if ( typeof define === "function" && define.amd ) {
10833	define( "jquery", [], function() {
10834		return jQuery;
10835	} );
10836}
10837
10838
10839
10840
10841var
10842
10843	// Map over jQuery in case of overwrite
10844	_jQuery = window.jQuery,
10845
10846	// Map over the $ in case of overwrite
10847	_$ = window.$;
10848
10849jQuery.noConflict = function( deep ) {
10850	if ( window.$ === jQuery ) {
10851		window.$ = _$;
10852	}
10853
10854	if ( deep && window.jQuery === jQuery ) {
10855		window.jQuery = _jQuery;
10856	}
10857
10858	return jQuery;
10859};
10860
10861// Expose jQuery and $ identifiers, even in AMD
10862// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10863// and CommonJS for browser emulators (#13566)
10864if ( typeof noGlobal === "undefined" ) {
10865	window.jQuery = window.$ = jQuery;
10866}
10867
10868
10869
10870
10871return jQuery;
10872} );
10873
10874;/**!
10875 * @fileOverview Kickass library to create and place poppers near their reference elements.
10876 * @version 1.16.1
10877 * @license
10878 * Copyright (c) 2016 Federico Zivolo and contributors
10879 *
10880 * Permission is hereby granted, free of charge, to any person obtaining a copy
10881 * of this software and associated documentation files (the "Software"), to deal
10882 * in the Software without restriction, including without limitation the rights
10883 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10884 * copies of the Software, and to permit persons to whom the Software is
10885 * furnished to do so, subject to the following conditions:
10886 *
10887 * The above copyright notice and this permission notice shall be included in all
10888 * copies or substantial portions of the Software.
10889 *
10890 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10891 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10892 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10893 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10894 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10895 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
10896 * SOFTWARE.
10897 */
10898(function (global, factory) {
10899	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
10900	typeof define === 'function' && define.amd ? define(factory) :
10901	(global.Popper = factory());
10902}(this, (function () { 'use strict';
vendor: 12,004 bytes, lines 10903-11327
10903
10904var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
10905
10906var timeoutDuration = function () {
10907  var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
10908  for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
10909    if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
10910      return 1;
10911    }
10912  }
10913  return 0;
10914}();
10915
10916function microtaskDebounce(fn) {
10917  var called = false;
10918  return function () {
10919    if (called) {
10920      return;
10921    }
10922    called = true;
10923    window.Promise.resolve().then(function () {
10924      called = false;
10925      fn();
10926    });
10927  };
10928}
10929
10930function taskDebounce(fn) {
10931  var scheduled = false;
10932  return function () {
10933    if (!scheduled) {
10934      scheduled = true;
10935      setTimeout(function () {
10936        scheduled = false;
10937        fn();
10938      }, timeoutDuration);
10939    }
10940  };
10941}
10942
10943var supportsMicroTasks = isBrowser && window.Promise;
10944
10945/**
10946* Create a debounced version of a method, that's asynchronously deferred
10947* but called in the minimum time possible.
10948*
10949* @method
10950* @memberof Popper.Utils
10951* @argument {Function} fn
10952* @returns {Function}
10953*/
10954var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
10955
10956/**
10957 * Check if the given variable is a function
10958 * @method
10959 * @memberof Popper.Utils
10960 * @argument {Any} functionToCheck - variable to check
10961 * @returns {Boolean} answer to: is a function?
10962 */
10963function isFunction(functionToCheck) {
10964  var getType = {};
10965  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
10966}
10967
10968/**
10969 * Get CSS computed property of the given element
10970 * @method
10971 * @memberof Popper.Utils
10972 * @argument {Eement} element
10973 * @argument {String} property
10974 */
10975function getStyleComputedProperty(element, property) {
10976  if (element.nodeType !== 1) {
10977    return [];
10978  }
10979  // NOTE: 1 DOM access here
10980  var window = element.ownerDocument.defaultView;
10981  var css = window.getComputedStyle(element, null);
10982  return property ? css[property] : css;
10983}
10984
10985/**
10986 * Returns the parentNode or the host of the element
10987 * @method
10988 * @memberof Popper.Utils
10989 * @argument {Element} element
10990 * @returns {Element} parent
10991 */
10992function getParentNode(element) {
10993  if (element.nodeName === 'HTML') {
10994    return element;
10995  }
10996  return element.parentNode || element.host;
10997}
10998
10999/**
11000 * Returns the scrolling parent of the given element
11001 * @method
11002 * @memberof Popper.Utils
11003 * @argument {Element} element
11004 * @returns {Element} scroll parent
11005 */
11006function getScrollParent(element) {
11007  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
11008  if (!element) {
11009    return document.body;
11010  }
11011
11012  switch (element.nodeName) {
11013    case 'HTML':
11014    case 'BODY':
11015      return element.ownerDocument.body;
11016    case '#document':
11017      return element.body;
11018  }
11019
11020  // Firefox want us to check `-x` and `-y` variations as well
11021
11022  var _getStyleComputedProp = getStyleComputedProperty(element),
11023      overflow = _getStyleComputedProp.overflow,
11024      overflowX = _getStyleComputedProp.overflowX,
11025      overflowY = _getStyleComputedProp.overflowY;
11026
11027  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
11028    return element;
11029  }
11030
11031  return getScrollParent(getParentNode(element));
11032}
11033
11034/**
11035 * Returns the reference node of the reference object, or the reference object itself.
11036 * @method
11037 * @memberof Popper.Utils
11038 * @param {Element|Object} reference - the reference element (the popper will be relative to this)
11039 * @returns {Element} parent
11040 */
11041function getReferenceNode(reference) {
11042  return reference && reference.referenceNode ? reference.referenceNode : reference;
11043}
11044
11045var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
11046var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
11047
11048/**
11049 * Determines if the browser is Internet Explorer
11050 * @method
11051 * @memberof Popper.Utils
11052 * @param {Number} version to check
11053 * @returns {Boolean} isIE
11054 */
11055function isIE(version) {
11056  if (version === 11) {
11057    return isIE11;
11058  }
11059  if (version === 10) {
11060    return isIE10;
11061  }
11062  return isIE11 || isIE10;
11063}
11064
11065/**
11066 * Returns the offset parent of the given element
11067 * @method
11068 * @memberof Popper.Utils
11069 * @argument {Element} element
11070 * @returns {Element} offset parent
11071 */
11072function getOffsetParent(element) {
11073  if (!element) {
11074    return document.documentElement;
11075  }
11076
11077  var noOffsetParent = isIE(10) ? document.body : null;
11078
11079  // NOTE: 1 DOM access here
11080  var offsetParent = element.offsetParent || null;
11081  // Skip hidden elements which don't have an offsetParent
11082  while (offsetParent === noOffsetParent && element.nextElementSibling) {
11083    offsetParent = (element = element.nextElementSibling).offsetParent;
11084  }
11085
11086  var nodeName = offsetParent && offsetParent.nodeName;
11087
11088  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
11089    return element ? element.ownerDocument.documentElement : document.documentElement;
11090  }
11091
11092  // .offsetParent will return the closest TH, TD or TABLE in case
11093  // no offsetParent is present, I hate this job...
11094  if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
11095    return getOffsetParent(offsetParent);
11096  }
11097
11098  return offsetParent;
11099}
11100
11101function isOffsetContainer(element) {
11102  var nodeName = element.nodeName;
11103
11104  if (nodeName === 'BODY') {
11105    return false;
11106  }
11107  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
11108}
11109
11110/**
11111 * Finds the root node (document, shadowDOM root) of the given element
11112 * @method
11113 * @memberof Popper.Utils
11114 * @argument {Element} node
11115 * @returns {Element} root node
11116 */
11117function getRoot(node) {
11118  if (node.parentNode !== null) {
11119    return getRoot(node.parentNode);
11120  }
11121
11122  return node;
11123}
11124
11125/**
11126 * Finds the offset parent common to the two provided nodes
11127 * @method
11128 * @memberof Popper.Utils
11129 * @argument {Element} element1
11130 * @argument {Element} element2
11131 * @returns {Element} common offset parent
11132 */
11133function findCommonOffsetParent(element1, element2) {
11134  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
11135  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
11136    return document.documentElement;
11137  }
11138
11139  // Here we make sure to give as "start" the element that comes first in the DOM
11140  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
11141  var start = order ? element1 : element2;
11142  var end = order ? element2 : element1;
11143
11144  // Get common ancestor container
11145  var range = document.createRange();
11146  range.setStart(start, 0);
11147  range.setEnd(end, 0);
11148  var commonAncestorContainer = range.commonAncestorContainer;
11149
11150  // Both nodes are inside #document
11151
11152  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
11153    if (isOffsetContainer(commonAncestorContainer)) {
11154      return commonAncestorContainer;
11155    }
11156
11157    return getOffsetParent(commonAncestorContainer);
11158  }
11159
11160  // one of the nodes is inside shadowDOM, find which one
11161  var element1root = getRoot(element1);
11162  if (element1root.host) {
11163    return findCommonOffsetParent(element1root.host, element2);
11164  } else {
11165    return findCommonOffsetParent(element1, getRoot(element2).host);
11166  }
11167}
11168
11169/**
11170 * Gets the scroll value of the given element in the given side (top and left)
11171 * @method
11172 * @memberof Popper.Utils
11173 * @argument {Element} element
11174 * @argument {String} side `top` or `left`
11175 * @returns {number} amount of scrolled pixels
11176 */
11177function getScroll(element) {
11178  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
11179
11180  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
11181  var nodeName = element.nodeName;
11182
11183  if (nodeName === 'BODY' || nodeName === 'HTML') {
11184    var html = element.ownerDocument.documentElement;
11185    var scrollingElement = element.ownerDocument.scrollingElement || html;
11186    return scrollingElement[upperSide];
11187  }
11188
11189  return element[upperSide];
11190}
11191
11192/*
11193 * Sum or subtract the element scroll values (left and top) from a given rect object
11194 * @method
11195 * @memberof Popper.Utils
11196 * @param {Object} rect - Rect object you want to change
11197 * @param {HTMLElement} element - The element from the function reads the scroll values
11198 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
11199 * @return {Object} rect - The modifier rect object
11200 */
11201function includeScroll(rect, element) {
11202  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
11203
11204  var scrollTop = getScroll(element, 'top');
11205  var scrollLeft = getScroll(element, 'left');
11206  var modifier = subtract ? -1 : 1;
11207  rect.top += scrollTop * modifier;
11208  rect.bottom += scrollTop * modifier;
11209  rect.left += scrollLeft * modifier;
11210  rect.right += scrollLeft * modifier;
11211  return rect;
11212}
11213
11214/*
11215 * Helper to detect borders of a given element
11216 * @method
11217 * @memberof Popper.Utils
11218 * @param {CSSStyleDeclaration} styles
11219 * Result of `getStyleComputedProperty` on the given element
11220 * @param {String} axis - `x` or `y`
11221 * @return {number} borders - The borders size of the given axis
11222 */
11223
11224function getBordersSize(styles, axis) {
11225  var sideA = axis === 'x' ? 'Left' : 'Top';
11226  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
11227
11228  return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
11229}
11230
11231function getSize(axis, body, html, computedStyle) {
11232  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
11233}
11234
11235function getWindowSizes(document) {
11236  var body = document.body;
11237  var html = document.documentElement;
11238  var computedStyle = isIE(10) && getComputedStyle(html);
11239
11240  return {
11241    height: getSize('Height', body, html, computedStyle),
11242    width: getSize('Width', body, html, computedStyle)
11243  };
11244}
11245
11246var classCallCheck = function (instance, Constructor) {
11247  if (!(instance instanceof Constructor)) {
11248    throw new TypeError("Cannot call a class as a function");
11249  }
11250};
11251
11252var createClass = function () {
11253  function defineProperties(target, props) {
11254    for (var i = 0; i < props.length; i++) {
11255      var descriptor = props[i];
11256      descriptor.enumerable = descriptor.enumerable || false;
11257      descriptor.configurable = true;
11258      if ("value" in descriptor) descriptor.writable = true;
11259      Object.defineProperty(target, descriptor.key, descriptor);
11260    }
11261  }
11262
11263  return function (Constructor, protoProps, staticProps) {
11264    if (protoProps) defineProperties(Constructor.prototype, protoProps);
11265    if (staticProps) defineProperties(Constructor, staticProps);
11266    return Constructor;
11267  };
11268}();
11269
11270
11271
11272
11273
11274var defineProperty = function (obj, key, value) {
11275  if (key in obj) {
11276    Object.defineProperty(obj, key, {
11277      value: value,
11278      enumerable: true,
11279      configurable: true,
11280      writable: true
11281    });
11282  } else {
11283    obj[key] = value;
11284  }
11285
11286  return obj;
11287};
11288
11289var _extends = Object.assign || function (target) {
11290  for (var i = 1; i < arguments.length; i++) {
11291    var source = arguments[i];
11292
11293    for (var key in source) {
11294      if (Object.prototype.hasOwnProperty.call(source, key)) {
11295        target[key] = source[key];
11296      }
11297    }
11298  }
11299
11300  return target;
11301};
11302
11303/**
11304 * Given element offsets, generate an output similar to getBoundingClientRect
11305 * @method
11306 * @memberof Popper.Utils
11307 * @argument {Object} offsets
11308 * @returns {Object} ClientRect like output
11309 */
11310function getClientRect(offsets) {
11311  return _extends({}, offsets, {
11312    right: offsets.left + offsets.width,
11313    bottom: offsets.top + offsets.height
11314  });
11315}
11316
11317/**
11318 * Get bounding client rect of given element
11319 * @method
11320 * @memberof Popper.Utils
11321 * @param {HTMLElement} element
11322 * @return {Object} client rect
11323 */
11324function getBoundingClientRect(element) {
11325  var rect = {};
11326
11327  // IE10 10 FIX: Please, don't ask, the element isn't
vendor: 4,625 bytes, lines 11328-11457
11328  // considered in DOM in some circumstances...
11329  // This isn't reproducible in IE10 compatibility mode of IE11
11330  try {
11331    if (isIE(10)) {
11332      rect = element.getBoundingClientRect();
11333      var scrollTop = getScroll(element, 'top');
11334      var scrollLeft = getScroll(element, 'left');
11335      rect.top += scrollTop;
11336      rect.left += scrollLeft;
11337      rect.bottom += scrollTop;
11338      rect.right += scrollLeft;
11339    } else {
11340      rect = element.getBoundingClientRect();
11341    }
11342  } catch (e) {}
11343
11344  var result = {
11345    left: rect.left,
11346    top: rect.top,
11347    width: rect.right - rect.left,
11348    height: rect.bottom - rect.top
11349  };
11350
11351  // subtract scrollbar size from sizes
11352  var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
11353  var width = sizes.width || element.clientWidth || result.width;
11354  var height = sizes.height || element.clientHeight || result.height;
11355
11356  var horizScrollbar = element.offsetWidth - width;
11357  var vertScrollbar = element.offsetHeight - height;
11358
11359  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
11360  // we make this check conditional for performance reasons
11361  if (horizScrollbar || vertScrollbar) {
11362    var styles = getStyleComputedProperty(element);
11363    horizScrollbar -= getBordersSize(styles, 'x');
11364    vertScrollbar -= getBordersSize(styles, 'y');
11365
11366    result.width -= horizScrollbar;
11367    result.height -= vertScrollbar;
11368  }
11369
11370  return getClientRect(result);
11371}
11372
11373function getOffsetRectRelativeToArbitraryNode(children, parent) {
11374  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
11375
11376  var isIE10 = isIE(10);
11377  var isHTML = parent.nodeName === 'HTML';
11378  var childrenRect = getBoundingClientRect(children);
11379  var parentRect = getBoundingClientRect(parent);
11380  var scrollParent = getScrollParent(children);
11381
11382  var styles = getStyleComputedProperty(parent);
11383  var borderTopWidth = parseFloat(styles.borderTopWidth);
11384  var borderLeftWidth = parseFloat(styles.borderLeftWidth);
11385
11386  // In cases where the parent is fixed, we must ignore negative scroll in offset calc
11387  if (fixedPosition && isHTML) {
11388    parentRect.top = Math.max(parentRect.top, 0);
11389    parentRect.left = Math.max(parentRect.left, 0);
11390  }
11391  var offsets = getClientRect({
11392    top: childrenRect.top - parentRect.top - borderTopWidth,
11393    left: childrenRect.left - parentRect.left - borderLeftWidth,
11394    width: childrenRect.width,
11395    height: childrenRect.height
11396  });
11397  offsets.marginTop = 0;
11398  offsets.marginLeft = 0;
11399
11400  // Subtract margins of documentElement in case it's being used as parent
11401  // we do this only on HTML because it's the only element that behaves
11402  // differently when margins are applied to it. The margins are included in
11403  // the box of the documentElement, in the other cases not.
11404  if (!isIE10 && isHTML) {
11405    var marginTop = parseFloat(styles.marginTop);
11406    var marginLeft = parseFloat(styles.marginLeft);
11407
11408    offsets.top -= borderTopWidth - marginTop;
11409    offsets.bottom -= borderTopWidth - marginTop;
11410    offsets.left -= borderLeftWidth - marginLeft;
11411    offsets.right -= borderLeftWidth - marginLeft;
11412
11413    // Attach marginTop and marginLeft because in some circumstances we may need them
11414    offsets.marginTop = marginTop;
11415    offsets.marginLeft = marginLeft;
11416  }
11417
11418  if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
11419    offsets = includeScroll(offsets, parent);
11420  }
11421
11422  return offsets;
11423}
11424
11425function getViewportOffsetRectRelativeToArtbitraryNode(element) {
11426  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11427
11428  var html = element.ownerDocument.documentElement;
11429  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
11430  var width = Math.max(html.clientWidth, window.innerWidth || 0);
11431  var height = Math.max(html.clientHeight, window.innerHeight || 0);
11432
11433  var scrollTop = !excludeScroll ? getScroll(html) : 0;
11434  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
11435
11436  var offset = {
11437    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
11438    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
11439    width: width,
11440    height: height
11441  };
11442
11443  return getClientRect(offset);
11444}
11445
11446/**
11447 * Check if the given element is fixed or is inside a fixed parent
11448 * @method
11449 * @memberof Popper.Utils
11450 * @argument {Element} element
11451 * @argument {Element} customContainer
11452 * @returns {Boolean} answer to "isFixed?"
11453 */
11454function isFixed(element) {
11455  var nodeName = element.nodeName;
11456  if (nodeName === 'BODY' || nodeName === 'HTML') {
11457    return false;
vendor: 16,186 bytes, lines 11458-11967
11458  }
11459  if (getStyleComputedProperty(element, 'position') === 'fixed') {
11460    return true;
11461  }
11462  var parentNode = getParentNode(element);
11463  if (!parentNode) {
11464    return false;
11465  }
11466  return isFixed(parentNode);
11467}
11468
11469/**
11470 * Finds the first parent of an element that has a transformed property defined
11471 * @method
11472 * @memberof Popper.Utils
11473 * @argument {Element} element
11474 * @returns {Element} first transformed parent or documentElement
11475 */
11476
11477function getFixedPositionOffsetParent(element) {
11478  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
11479  if (!element || !element.parentElement || isIE()) {
11480    return document.documentElement;
11481  }
11482  var el = element.parentElement;
11483  while (el && getStyleComputedProperty(el, 'transform') === 'none') {
11484    el = el.parentElement;
11485  }
11486  return el || document.documentElement;
11487}
11488
11489/**
11490 * Computed the boundaries limits and return them
11491 * @method
11492 * @memberof Popper.Utils
11493 * @param {HTMLElement} popper
11494 * @param {HTMLElement} reference
11495 * @param {number} padding
11496 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
11497 * @param {Boolean} fixedPosition - Is in fixed position mode
11498 * @returns {Object} Coordinates of the boundaries
11499 */
11500function getBoundaries(popper, reference, padding, boundariesElement) {
11501  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
11502
11503  // NOTE: 1 DOM access here
11504
11505  var boundaries = { top: 0, left: 0 };
11506  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
11507
11508  // Handle viewport case
11509  if (boundariesElement === 'viewport') {
11510    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
11511  } else {
11512    // Handle other cases based on DOM element used as boundaries
11513    var boundariesNode = void 0;
11514    if (boundariesElement === 'scrollParent') {
11515      boundariesNode = getScrollParent(getParentNode(reference));
11516      if (boundariesNode.nodeName === 'BODY') {
11517        boundariesNode = popper.ownerDocument.documentElement;
11518      }
11519    } else if (boundariesElement === 'window') {
11520      boundariesNode = popper.ownerDocument.documentElement;
11521    } else {
11522      boundariesNode = boundariesElement;
11523    }
11524
11525    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
11526
11527    // In case of HTML, we need a different computation
11528    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
11529      var _getWindowSizes = getWindowSizes(popper.ownerDocument),
11530          height = _getWindowSizes.height,
11531          width = _getWindowSizes.width;
11532
11533      boundaries.top += offsets.top - offsets.marginTop;
11534      boundaries.bottom = height + offsets.top;
11535      boundaries.left += offsets.left - offsets.marginLeft;
11536      boundaries.right = width + offsets.left;
11537    } else {
11538      // for all the other DOM elements, this one is good
11539      boundaries = offsets;
11540    }
11541  }
11542
11543  // Add paddings
11544  padding = padding || 0;
11545  var isPaddingNumber = typeof padding === 'number';
11546  boundaries.left += isPaddingNumber ? padding : padding.left || 0;
11547  boundaries.top += isPaddingNumber ? padding : padding.top || 0;
11548  boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
11549  boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
11550
11551  return boundaries;
11552}
11553
11554function getArea(_ref) {
11555  var width = _ref.width,
11556      height = _ref.height;
11557
11558  return width * height;
11559}
11560
11561/**
11562 * Utility used to transform the `auto` placement to the placement with more
11563 * available space.
11564 * @method
11565 * @memberof Popper.Utils
11566 * @argument {Object} data - The data object generated by update method
11567 * @argument {Object} options - Modifiers configuration and options
11568 * @returns {Object} The data object, properly modified
11569 */
11570function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
11571  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
11572
11573  if (placement.indexOf('auto') === -1) {
11574    return placement;
11575  }
11576
11577  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
11578
11579  var rects = {
11580    top: {
11581      width: boundaries.width,
11582      height: refRect.top - boundaries.top
11583    },
11584    right: {
11585      width: boundaries.right - refRect.right,
11586      height: boundaries.height
11587    },
11588    bottom: {
11589      width: boundaries.width,
11590      height: boundaries.bottom - refRect.bottom
11591    },
11592    left: {
11593      width: refRect.left - boundaries.left,
11594      height: boundaries.height
11595    }
11596  };
11597
11598  var sortedAreas = Object.keys(rects).map(function (key) {
11599    return _extends({
11600      key: key
11601    }, rects[key], {
11602      area: getArea(rects[key])
11603    });
11604  }).sort(function (a, b) {
11605    return b.area - a.area;
11606  });
11607
11608  var filteredAreas = sortedAreas.filter(function (_ref2) {
11609    var width = _ref2.width,
11610        height = _ref2.height;
11611    return width >= popper.clientWidth && height >= popper.clientHeight;
11612  });
11613
11614  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
11615
11616  var variation = placement.split('-')[1];
11617
11618  return computedPlacement + (variation ? '-' + variation : '');
11619}
11620
11621/**
11622 * Get offsets to the reference element
11623 * @method
11624 * @memberof Popper.Utils
11625 * @param {Object} state
11626 * @param {Element} popper - the popper element
11627 * @param {Element} reference - the reference element (the popper will be relative to this)
11628 * @param {Element} fixedPosition - is in fixed position mode
11629 * @returns {Object} An object containing the offsets which will be applied to the popper
11630 */
11631function getReferenceOffsets(state, popper, reference) {
11632  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
11633
11634  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
11635  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
11636}
11637
11638/**
11639 * Get the outer sizes of the given element (offset size + margins)
11640 * @method
11641 * @memberof Popper.Utils
11642 * @argument {Element} element
11643 * @returns {Object} object containing width and height properties
11644 */
11645function getOuterSizes(element) {
11646  var window = element.ownerDocument.defaultView;
11647  var styles = window.getComputedStyle(element);
11648  var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
11649  var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
11650  var result = {
11651    width: element.offsetWidth + y,
11652    height: element.offsetHeight + x
11653  };
11654  return result;
11655}
11656
11657/**
11658 * Get the opposite placement of the given one
11659 * @method
11660 * @memberof Popper.Utils
11661 * @argument {String} placement
11662 * @returns {String} flipped placement
11663 */
11664function getOppositePlacement(placement) {
11665  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
11666  return placement.replace(/left|right|bottom|top/g, function (matched) {
11667    return hash[matched];
11668  });
11669}
11670
11671/**
11672 * Get offsets to the popper
11673 * @method
11674 * @memberof Popper.Utils
11675 * @param {Object} position - CSS position the Popper will get applied
11676 * @param {HTMLElement} popper - the popper element
11677 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
11678 * @param {String} placement - one of the valid placement options
11679 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
11680 */
11681function getPopperOffsets(popper, referenceOffsets, placement) {
11682  placement = placement.split('-')[0];
11683
11684  // Get popper node sizes
11685  var popperRect = getOuterSizes(popper);
11686
11687  // Add position, width and height to our offsets object
11688  var popperOffsets = {
11689    width: popperRect.width,
11690    height: popperRect.height
11691  };
11692
11693  // depending by the popper placement we have to compute its offsets slightly differently
11694  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
11695  var mainSide = isHoriz ? 'top' : 'left';
11696  var secondarySide = isHoriz ? 'left' : 'top';
11697  var measurement = isHoriz ? 'height' : 'width';
11698  var secondaryMeasurement = !isHoriz ? 'height' : 'width';
11699
11700  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
11701  if (placement === secondarySide) {
11702    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
11703  } else {
11704    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
11705  }
11706
11707  return popperOffsets;
11708}
11709
11710/**
11711 * Mimics the `find` method of Array
11712 * @method
11713 * @memberof Popper.Utils
11714 * @argument {Array} arr
11715 * @argument prop
11716 * @argument value
11717 * @returns index or -1
11718 */
11719function find(arr, check) {
11720  // use native find if supported
11721  if (Array.prototype.find) {
11722    return arr.find(check);
11723  }
11724
11725  // use `filter` to obtain the same behavior of `find`
11726  return arr.filter(check)[0];
11727}
11728
11729/**
11730 * Return the index of the matching object
11731 * @method
11732 * @memberof Popper.Utils
11733 * @argument {Array} arr
11734 * @argument prop
11735 * @argument value
11736 * @returns index or -1
11737 */
11738function findIndex(arr, prop, value) {
11739  // use native findIndex if supported
11740  if (Array.prototype.findIndex) {
11741    return arr.findIndex(function (cur) {
11742      return cur[prop] === value;
11743    });
11744  }
11745
11746  // use `find` + `indexOf` if `findIndex` isn't supported
11747  var match = find(arr, function (obj) {
11748    return obj[prop] === value;
11749  });
11750  return arr.indexOf(match);
11751}
11752
11753/**
11754 * Loop trough the list of modifiers and run them in order,
11755 * each of them will then edit the data object.
11756 * @method
11757 * @memberof Popper.Utils
11758 * @param {dataObject} data
11759 * @param {Array} modifiers
11760 * @param {String} ends - Optional modifier name used as stopper
11761 * @returns {dataObject}
11762 */
11763function runModifiers(modifiers, data, ends) {
11764  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
11765
11766  modifiersToRun.forEach(function (modifier) {
11767    if (modifier['function']) {
11768      // eslint-disable-line dot-notation
11769      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
11770    }
11771    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
11772    if (modifier.enabled && isFunction(fn)) {
11773      // Add properties to offsets to make them a complete clientRect object
11774      // we do this before each modifier to make sure the previous one doesn't
11775      // mess with these values
11776      data.offsets.popper = getClientRect(data.offsets.popper);
11777      data.offsets.reference = getClientRect(data.offsets.reference);
11778
11779      data = fn(data, modifier);
11780    }
11781  });
11782
11783  return data;
11784}
11785
11786/**
11787 * Updates the position of the popper, computing the new offsets and applying
11788 * the new style.<br />
11789 * Prefer `scheduleUpdate` over `update` because of performance reasons.
11790 * @method
11791 * @memberof Popper
11792 */
11793function update() {
11794  // if popper is destroyed, don't perform any further update
11795  if (this.state.isDestroyed) {
11796    return;
11797  }
11798
11799  var data = {
11800    instance: this,
11801    styles: {},
11802    arrowStyles: {},
11803    attributes: {},
11804    flipped: false,
11805    offsets: {}
11806  };
11807
11808  // compute reference element offsets
11809  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
11810
11811  // compute auto placement, store placement inside the data object,
11812  // modifiers will be able to edit `placement` if needed
11813  // and refer to originalPlacement to know the original value
11814  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
11815
11816  // store the computed placement inside `originalPlacement`
11817  data.originalPlacement = data.placement;
11818
11819  data.positionFixed = this.options.positionFixed;
11820
11821  // compute the popper offsets
11822  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
11823
11824  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
11825
11826  // run the modifiers
11827  data = runModifiers(this.modifiers, data);
11828
11829  // the first `update` will call `onCreate` callback
11830  // the other ones will call `onUpdate` callback
11831  if (!this.state.isCreated) {
11832    this.state.isCreated = true;
11833    this.options.onCreate(data);
11834  } else {
11835    this.options.onUpdate(data);
11836  }
11837}
11838
11839/**
11840 * Helper used to know if the given modifier is enabled.
11841 * @method
11842 * @memberof Popper.Utils
11843 * @returns {Boolean}
11844 */
11845function isModifierEnabled(modifiers, modifierName) {
11846  return modifiers.some(function (_ref) {
11847    var name = _ref.name,
11848        enabled = _ref.enabled;
11849    return enabled && name === modifierName;
11850  });
11851}
11852
11853/**
11854 * Get the prefixed supported property name
11855 * @method
11856 * @memberof Popper.Utils
11857 * @argument {String} property (camelCase)
11858 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
11859 */
11860function getSupportedPropertyName(property) {
11861  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
11862  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
11863
11864  for (var i = 0; i < prefixes.length; i++) {
11865    var prefix = prefixes[i];
11866    var toCheck = prefix ? '' + prefix + upperProp : property;
11867    if (typeof document.body.style[toCheck] !== 'undefined') {
11868      return toCheck;
11869    }
11870  }
11871  return null;
11872}
11873
11874/**
11875 * Destroys the popper.
11876 * @method
11877 * @memberof Popper
11878 */
11879function destroy() {
11880  this.state.isDestroyed = true;
11881
11882  // touch DOM only if `applyStyle` modifier is enabled
11883  if (isModifierEnabled(this.modifiers, 'applyStyle')) {
11884    this.popper.removeAttribute('x-placement');
11885    this.popper.style.position = '';
11886    this.popper.style.top = '';
11887    this.popper.style.left = '';
11888    this.popper.style.right = '';
11889    this.popper.style.bottom = '';
11890    this.popper.style.willChange = '';
11891    this.popper.style[getSupportedPropertyName('transform')] = '';
11892  }
11893
11894  this.disableEventListeners();
11895
11896  // remove the popper if user explicitly asked for the deletion on destroy
11897  // do not use `remove` because IE11 doesn't support it
11898  if (this.options.removeOnDestroy) {
11899    this.popper.parentNode.removeChild(this.popper);
11900  }
11901  return this;
11902}
11903
11904/**
11905 * Get the window associated with the element
11906 * @argument {Element} element
11907 * @returns {Window}
11908 */
11909function getWindow(element) {
11910  var ownerDocument = element.ownerDocument;
11911  return ownerDocument ? ownerDocument.defaultView : window;
11912}
11913
11914function attachToScrollParents(scrollParent, event, callback, scrollParents) {
11915  var isBody = scrollParent.nodeName === 'BODY';
11916  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
11917  target.addEventListener(event, callback, { passive: true });
11918
11919  if (!isBody) {
11920    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
11921  }
11922  scrollParents.push(target);
11923}
11924
11925/**
11926 * Setup needed event listeners used to update the popper position
11927 * @method
11928 * @memberof Popper.Utils
11929 * @private
11930 */
11931function setupEventListeners(reference, options, state, updateBound) {
11932  // Resize event listener on window
11933  state.updateBound = updateBound;
11934  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
11935
11936  // Scroll event listener on scroll parents
11937  var scrollElement = getScrollParent(reference);
11938  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
11939  state.scrollElement = scrollElement;
11940  state.eventsEnabled = true;
11941
11942  return state;
11943}
11944
11945/**
11946 * It will add resize/scroll events and start recalculating
11947 * position of the popper element when they are triggered.
11948 * @method
11949 * @memberof Popper
11950 */
11951function enableEventListeners() {
11952  if (!this.state.eventsEnabled) {
11953    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
11954  }
11955}
11956
11957/**
11958 * Remove event listeners used to update the popper position
11959 * @method
11960 * @memberof Popper.Utils
11961 * @private
11962 */
11963function removeEventListeners(reference, state) {
11964  // Remove resize event listener on window
11965  getWindow(reference).removeEventListener('resize', state.updateBound);
11966
11967  // Remove scroll event listener on scroll parents
vendor: 12,824 bytes, lines 11968-12329
11968  state.scrollParents.forEach(function (target) {
11969    target.removeEventListener('scroll', state.updateBound);
11970  });
11971
11972  // Reset state
11973  state.updateBound = null;
11974  state.scrollParents = [];
11975  state.scrollElement = null;
11976  state.eventsEnabled = false;
11977  return state;
11978}
11979
11980/**
11981 * It will remove resize/scroll events and won't recalculate popper position
11982 * when they are triggered. It also won't trigger `onUpdate` callback anymore,
11983 * unless you call `update` method manually.
11984 * @method
11985 * @memberof Popper
11986 */
11987function disableEventListeners() {
11988  if (this.state.eventsEnabled) {
11989    cancelAnimationFrame(this.scheduleUpdate);
11990    this.state = removeEventListeners(this.reference, this.state);
11991  }
11992}
11993
11994/**
11995 * Tells if a given input is a number
11996 * @method
11997 * @memberof Popper.Utils
11998 * @param {*} input to check
11999 * @return {Boolean}
12000 */
12001function isNumeric(n) {
12002  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
12003}
12004
12005/**
12006 * Set the style to the given popper
12007 * @method
12008 * @memberof Popper.Utils
12009 * @argument {Element} element - Element to apply the style to
12010 * @argument {Object} styles
12011 * Object with a list of properties and values which will be applied to the element
12012 */
12013function setStyles(element, styles) {
12014  Object.keys(styles).forEach(function (prop) {
12015    var unit = '';
12016    // add unit if the value is numeric and is one of the following
12017    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
12018      unit = 'px';
12019    }
12020    element.style[prop] = styles[prop] + unit;
12021  });
12022}
12023
12024/**
12025 * Set the attributes to the given popper
12026 * @method
12027 * @memberof Popper.Utils
12028 * @argument {Element} element - Element to apply the attributes to
12029 * @argument {Object} styles
12030 * Object with a list of properties and values which will be applied to the element
12031 */
12032function setAttributes(element, attributes) {
12033  Object.keys(attributes).forEach(function (prop) {
12034    var value = attributes[prop];
12035    if (value !== false) {
12036      element.setAttribute(prop, attributes[prop]);
12037    } else {
12038      element.removeAttribute(prop);
12039    }
12040  });
12041}
12042
12043/**
12044 * @function
12045 * @memberof Modifiers
12046 * @argument {Object} data - The data object generated by `update` method
12047 * @argument {Object} data.styles - List of style properties - values to apply to popper element
12048 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
12049 * @argument {Object} options - Modifiers configuration and options
12050 * @returns {Object} The same data object
12051 */
12052function applyStyle(data) {
12053  // any property present in `data.styles` will be applied to the popper,
12054  // in this way we can make the 3rd party modifiers add custom styles to it
12055  // Be aware, modifiers could override the properties defined in the previous
12056  // lines of this modifier!
12057  setStyles(data.instance.popper, data.styles);
12058
12059  // any property present in `data.attributes` will be applied to the popper,
12060  // they will be set as HTML attributes of the element
12061  setAttributes(data.instance.popper, data.attributes);
12062
12063  // if arrowElement is defined and arrowStyles has some properties
12064  if (data.arrowElement && Object.keys(data.arrowStyles).length) {
12065    setStyles(data.arrowElement, data.arrowStyles);
12066  }
12067
12068  return data;
12069}
12070
12071/**
12072 * Set the x-placement attribute before everything else because it could be used
12073 * to add margins to the popper margins needs to be calculated to get the
12074 * correct popper offsets.
12075 * @method
12076 * @memberof Popper.modifiers
12077 * @param {HTMLElement} reference - The reference element used to position the popper
12078 * @param {HTMLElement} popper - The HTML element used as popper
12079 * @param {Object} options - Popper.js options
12080 */
12081function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
12082  // compute reference element offsets
12083  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
12084
12085  // compute auto placement, store placement inside the data object,
12086  // modifiers will be able to edit `placement` if needed
12087  // and refer to originalPlacement to know the original value
12088  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
12089
12090  popper.setAttribute('x-placement', placement);
12091
12092  // Apply `position` to popper before anything else because
12093  // without the position applied we can't guarantee correct computations
12094  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
12095
12096  return options;
12097}
12098
12099/**
12100 * @function
12101 * @memberof Popper.Utils
12102 * @argument {Object} data - The data object generated by `update` method
12103 * @argument {Boolean} shouldRound - If the offsets should be rounded at all
12104 * @returns {Object} The popper's position offsets rounded
12105 *
12106 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
12107 * good as it can be within reason.
12108 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
12109 *
12110 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
12111 * as well on High DPI screens).
12112 *
12113 * Firefox prefers no rounding for positioning and does not have blurriness on
12114 * high DPI screens.
12115 *
12116 * Only horizontal placement and left/right values need to be considered.
12117 */
12118function getRoundedOffsets(data, shouldRound) {
12119  var _data$offsets = data.offsets,
12120      popper = _data$offsets.popper,
12121      reference = _data$offsets.reference;
12122  var round = Math.round,
12123      floor = Math.floor;
12124
12125  var noRound = function noRound(v) {
12126    return v;
12127  };
12128
12129  var referenceWidth = round(reference.width);
12130  var popperWidth = round(popper.width);
12131
12132  var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
12133  var isVariation = data.placement.indexOf('-') !== -1;
12134  var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
12135  var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
12136
12137  var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
12138  var verticalToInteger = !shouldRound ? noRound : round;
12139
12140  return {
12141    left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
12142    top: verticalToInteger(popper.top),
12143    bottom: verticalToInteger(popper.bottom),
12144    right: horizontalToInteger(popper.right)
12145  };
12146}
12147
12148var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
12149
12150/**
12151 * @function
12152 * @memberof Modifiers
12153 * @argument {Object} data - The data object generated by `update` method
12154 * @argument {Object} options - Modifiers configuration and options
12155 * @returns {Object} The data object, properly modified
12156 */
12157function computeStyle(data, options) {
12158  var x = options.x,
12159      y = options.y;
12160  var popper = data.offsets.popper;
12161
12162  // Remove this legacy support in Popper.js v2
12163
12164  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
12165    return modifier.name === 'applyStyle';
12166  }).gpuAcceleration;
12167  if (legacyGpuAccelerationOption !== undefined) {
12168    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
12169  }
12170  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
12171
12172  var offsetParent = getOffsetParent(data.instance.popper);
12173  var offsetParentRect = getBoundingClientRect(offsetParent);
12174
12175  // Styles
12176  var styles = {
12177    position: popper.position
12178  };
12179
12180  var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
12181
12182  var sideA = x === 'bottom' ? 'top' : 'bottom';
12183  var sideB = y === 'right' ? 'left' : 'right';
12184
12185  // if gpuAcceleration is set to `true` and transform is supported,
12186  //  we use `translate3d` to apply the position to the popper we
12187  // automatically use the supported prefixed version if needed
12188  var prefixedProperty = getSupportedPropertyName('transform');
12189
12190  // now, let's make a step back and look at this code closely (wtf?)
12191  // If the content of the popper grows once it's been positioned, it
12192  // may happen that the popper gets misplaced because of the new content
12193  // overflowing its reference element
12194  // To avoid this problem, we provide two options (x and y), which allow
12195  // the consumer to define the offset origin.
12196  // If we position a popper on top of a reference element, we can set
12197  // `x` to `top` to make the popper grow towards its top instead of
12198  // its bottom.
12199  var left = void 0,
12200      top = void 0;
12201  if (sideA === 'bottom') {
12202    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
12203    // and not the bottom of the html element
12204    if (offsetParent.nodeName === 'HTML') {
12205      top = -offsetParent.clientHeight + offsets.bottom;
12206    } else {
12207      top = -offsetParentRect.height + offsets.bottom;
12208    }
12209  } else {
12210    top = offsets.top;
12211  }
12212  if (sideB === 'right') {
12213    if (offsetParent.nodeName === 'HTML') {
12214      left = -offsetParent.clientWidth + offsets.right;
12215    } else {
12216      left = -offsetParentRect.width + offsets.right;
12217    }
12218  } else {
12219    left = offsets.left;
12220  }
12221  if (gpuAcceleration && prefixedProperty) {
12222    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
12223    styles[sideA] = 0;
12224    styles[sideB] = 0;
12225    styles.willChange = 'transform';
12226  } else {
12227    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
12228    var invertTop = sideA === 'bottom' ? -1 : 1;
12229    var invertLeft = sideB === 'right' ? -1 : 1;
12230    styles[sideA] = top * invertTop;
12231    styles[sideB] = left * invertLeft;
12232    styles.willChange = sideA + ', ' + sideB;
12233  }
12234
12235  // Attributes
12236  var attributes = {
12237    'x-placement': data.placement
12238  };
12239
12240  // Update `data` attributes, styles and arrowStyles
12241  data.attributes = _extends({}, attributes, data.attributes);
12242  data.styles = _extends({}, styles, data.styles);
12243  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
12244
12245  return data;
12246}
12247
12248/**
12249 * Helper used to know if the given modifier depends from another one.<br />
12250 * It checks if the needed modifier is listed and enabled.
12251 * @method
12252 * @memberof Popper.Utils
12253 * @param {Array} modifiers - list of modifiers
12254 * @param {String} requestingName - name of requesting modifier
12255 * @param {String} requestedName - name of requested modifier
12256 * @returns {Boolean}
12257 */
12258function isModifierRequired(modifiers, requestingName, requestedName) {
12259  var requesting = find(modifiers, function (_ref) {
12260    var name = _ref.name;
12261    return name === requestingName;
12262  });
12263
12264  var isRequired = !!requesting && modifiers.some(function (modifier) {
12265    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
12266  });
12267
12268  if (!isRequired) {
12269    var _requesting = '`' + requestingName + '`';
12270    var requested = '`' + requestedName + '`';
12271    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
12272  }
12273  return isRequired;
12274}
12275
12276/**
12277 * @function
12278 * @memberof Modifiers
12279 * @argument {Object} data - The data object generated by update method
12280 * @argument {Object} options - Modifiers configuration and options
12281 * @returns {Object} The data object, properly modified
12282 */
12283function arrow(data, options) {
12284  var _data$offsets$arrow;
12285
12286  // arrow depends on keepTogether in order to work
12287  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
12288    return data;
12289  }
12290
12291  var arrowElement = options.element;
12292
12293  // if arrowElement is a string, suppose it's a CSS selector
12294  if (typeof arrowElement === 'string') {
12295    arrowElement = data.instance.popper.querySelector(arrowElement);
12296
12297    // if arrowElement is not found, don't run the modifier
12298    if (!arrowElement) {
12299      return data;
12300    }
12301  } else {
12302    // if the arrowElement isn't a query selector we must check that the
12303    // provided DOM node is child of its popper node
12304    if (!data.instance.popper.contains(arrowElement)) {
12305      console.warn('WARNING: `arrow.element` must be child of its popper element!');
12306      return data;
12307    }
12308  }
12309
12310  var placement = data.placement.split('-')[0];
12311  var _data$offsets = data.offsets,
12312      popper = _data$offsets.popper,
12313      reference = _data$offsets.reference;
12314
12315  var isVertical = ['left', 'right'].indexOf(placement) !== -1;
12316
12317  var len = isVertical ? 'height' : 'width';
12318  var sideCapitalized = isVertical ? 'Top' : 'Left';
12319  var side = sideCapitalized.toLowerCase();
12320  var altSide = isVertical ? 'left' : 'top';
12321  var opSide = isVertical ? 'bottom' : 'right';
12322  var arrowElementSize = getOuterSizes(arrowElement)[len];
12323
12324  //
12325  // extends keepTogether behavior making sure the popper and its
12326  // reference have enough pixels in conjunction
12327  //
12328
12329  // top/left side
vendor: 5,392 bytes, lines 12330-12485
12330  if (reference[opSide] - arrowElementSize < popper[side]) {
12331    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
12332  }
12333  // bottom/right side
12334  if (reference[side] + arrowElementSize > popper[opSide]) {
12335    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
12336  }
12337  data.offsets.popper = getClientRect(data.offsets.popper);
12338
12339  // compute center of the popper
12340  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
12341
12342  // Compute the sideValue using the updated popper offsets
12343  // take popper margin in account because we don't have this info available
12344  var css = getStyleComputedProperty(data.instance.popper);
12345  var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
12346  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
12347  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
12348
12349  // prevent arrowElement from being placed not contiguously to its popper
12350  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
12351
12352  data.arrowElement = arrowElement;
12353  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
12354
12355  return data;
12356}
12357
12358/**
12359 * Get the opposite placement variation of the given one
12360 * @method
12361 * @memberof Popper.Utils
12362 * @argument {String} placement variation
12363 * @returns {String} flipped placement variation
12364 */
12365function getOppositeVariation(variation) {
12366  if (variation === 'end') {
12367    return 'start';
12368  } else if (variation === 'start') {
12369    return 'end';
12370  }
12371  return variation;
12372}
12373
12374/**
12375 * List of accepted placements to use as values of the `placement` option.<br />
12376 * Valid placements are:
12377 * - `auto`
12378 * - `top`
12379 * - `right`
12380 * - `bottom`
12381 * - `left`
12382 *
12383 * Each placement can have a variation from this list:
12384 * - `-start`
12385 * - `-end`
12386 *
12387 * Variations are interpreted easily if you think of them as the left to right
12388 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
12389 * is right.<br />
12390 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
12391 *
12392 * Some valid examples are:
12393 * - `top-end` (on top of reference, right aligned)
12394 * - `right-start` (on right of reference, top aligned)
12395 * - `bottom` (on bottom, centered)
12396 * - `auto-end` (on the side with more space available, alignment depends by placement)
12397 *
12398 * @static
12399 * @type {Array}
12400 * @enum {String}
12401 * @readonly
12402 * @method placements
12403 * @memberof Popper
12404 */
12405var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
12406
12407// Get rid of `auto` `auto-start` and `auto-end`
12408var validPlacements = placements.slice(3);
12409
12410/**
12411 * Given an initial placement, returns all the subsequent placements
12412 * clockwise (or counter-clockwise).
12413 *
12414 * @method
12415 * @memberof Popper.Utils
12416 * @argument {String} placement - A valid placement (it accepts variations)
12417 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
12418 * @returns {Array} placements including their variations
12419 */
12420function clockwise(placement) {
12421  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
12422
12423  var index = validPlacements.indexOf(placement);
12424  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
12425  return counter ? arr.reverse() : arr;
12426}
12427
12428var BEHAVIORS = {
12429  FLIP: 'flip',
12430  CLOCKWISE: 'clockwise',
12431  COUNTERCLOCKWISE: 'counterclockwise'
12432};
12433
12434/**
12435 * @function
12436 * @memberof Modifiers
12437 * @argument {Object} data - The data object generated by update method
12438 * @argument {Object} options - Modifiers configuration and options
12439 * @returns {Object} The data object, properly modified
12440 */
12441function flip(data, options) {
12442  // if `inner` modifier is enabled, we can't use the `flip` modifier
12443  if (isModifierEnabled(data.instance.modifiers, 'inner')) {
12444    return data;
12445  }
12446
12447  if (data.flipped && data.placement === data.originalPlacement) {
12448    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
12449    return data;
12450  }
12451
12452  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
12453
12454  var placement = data.placement.split('-')[0];
12455  var placementOpposite = getOppositePlacement(placement);
12456  var variation = data.placement.split('-')[1] || '';
12457
12458  var flipOrder = [];
12459
12460  switch (options.behavior) {
12461    case BEHAVIORS.FLIP:
12462      flipOrder = [placement, placementOpposite];
12463      break;
12464    case BEHAVIORS.CLOCKWISE:
12465      flipOrder = clockwise(placement);
12466      break;
12467    case BEHAVIORS.COUNTERCLOCKWISE:
12468      flipOrder = clockwise(placement, true);
12469      break;
12470    default:
12471      flipOrder = options.behavior;
12472  }
12473
12474  flipOrder.forEach(function (step, index) {
12475    if (placement !== step || flipOrder.length === index + 1) {
12476      return data;
12477    }
12478
12479    placement = data.placement.split('-')[0];
12480    placementOpposite = getOppositePlacement(placement);
12481
12482    var popperOffsets = data.offsets.popper;
12483    var refOffsets = data.offsets.reference;
12484
12485    // using floor because the reference offsets may contain decimals we are not going to consider here
vendor: 36,190 bytes, lines 12486-13498
12486    var floor = Math.floor;
12487    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
12488
12489    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
12490    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
12491    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
12492    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
12493
12494    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
12495
12496    // flip the variation if required
12497    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
12498
12499    // flips variation if reference element overflows boundaries
12500    var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
12501
12502    // flips variation if popper content overflows boundaries
12503    var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
12504
12505    var flippedVariation = flippedVariationByRef || flippedVariationByContent;
12506
12507    if (overlapsRef || overflowsBoundaries || flippedVariation) {
12508      // this boolean to detect any flip loop
12509      data.flipped = true;
12510
12511      if (overlapsRef || overflowsBoundaries) {
12512        placement = flipOrder[index + 1];
12513      }
12514
12515      if (flippedVariation) {
12516        variation = getOppositeVariation(variation);
12517      }
12518
12519      data.placement = placement + (variation ? '-' + variation : '');
12520
12521      // this object contains `position`, we want to preserve it along with
12522      // any additional property we may add in the future
12523      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
12524
12525      data = runModifiers(data.instance.modifiers, data, 'flip');
12526    }
12527  });
12528  return data;
12529}
12530
12531/**
12532 * @function
12533 * @memberof Modifiers
12534 * @argument {Object} data - The data object generated by update method
12535 * @argument {Object} options - Modifiers configuration and options
12536 * @returns {Object} The data object, properly modified
12537 */
12538function keepTogether(data) {
12539  var _data$offsets = data.offsets,
12540      popper = _data$offsets.popper,
12541      reference = _data$offsets.reference;
12542
12543  var placement = data.placement.split('-')[0];
12544  var floor = Math.floor;
12545  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
12546  var side = isVertical ? 'right' : 'bottom';
12547  var opSide = isVertical ? 'left' : 'top';
12548  var measurement = isVertical ? 'width' : 'height';
12549
12550  if (popper[side] < floor(reference[opSide])) {
12551    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
12552  }
12553  if (popper[opSide] > floor(reference[side])) {
12554    data.offsets.popper[opSide] = floor(reference[side]);
12555  }
12556
12557  return data;
12558}
12559
12560/**
12561 * Converts a string containing value + unit into a px value number
12562 * @function
12563 * @memberof {modifiers~offset}
12564 * @private
12565 * @argument {String} str - Value + unit string
12566 * @argument {String} measurement - `height` or `width`
12567 * @argument {Object} popperOffsets
12568 * @argument {Object} referenceOffsets
12569 * @returns {Number|String}
12570 * Value in pixels, or original string if no values were extracted
12571 */
12572function toValue(str, measurement, popperOffsets, referenceOffsets) {
12573  // separate value from unit
12574  var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
12575  var value = +split[1];
12576  var unit = split[2];
12577
12578  // If it's not a number it's an operator, I guess
12579  if (!value) {
12580    return str;
12581  }
12582
12583  if (unit.indexOf('%') === 0) {
12584    var element = void 0;
12585    switch (unit) {
12586      case '%p':
12587        element = popperOffsets;
12588        break;
12589      case '%':
12590      case '%r':
12591      default:
12592        element = referenceOffsets;
12593    }
12594
12595    var rect = getClientRect(element);
12596    return rect[measurement] / 100 * value;
12597  } else if (unit === 'vh' || unit === 'vw') {
12598    // if is a vh or vw, we calculate the size based on the viewport
12599    var size = void 0;
12600    if (unit === 'vh') {
12601      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
12602    } else {
12603      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
12604    }
12605    return size / 100 * value;
12606  } else {
12607    // if is an explicit pixel unit, we get rid of the unit and keep the value
12608    // if is an implicit unit, it's px, and we return just the value
12609    return value;
12610  }
12611}
12612
12613/**
12614 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
12615 * @function
12616 * @memberof {modifiers~offset}
12617 * @private
12618 * @argument {String} offset
12619 * @argument {Object} popperOffsets
12620 * @argument {Object} referenceOffsets
12621 * @argument {String} basePlacement
12622 * @returns {Array} a two cells array with x and y offsets in numbers
12623 */
12624function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
12625  var offsets = [0, 0];
12626
12627  // Use height if placement is left or right and index is 0 otherwise use width
12628  // in this way the first offset will use an axis and the second one
12629  // will use the other one
12630  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
12631
12632  // Split the offset string to obtain a list of values and operands
12633  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
12634  var fragments = offset.split(/(\+|\-)/).map(function (frag) {
12635    return frag.trim();
12636  });
12637
12638  // Detect if the offset string contains a pair of values or a single one
12639  // they could be separated by comma or space
12640  var divider = fragments.indexOf(find(fragments, function (frag) {
12641    return frag.search(/,|\s/) !== -1;
12642  }));
12643
12644  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
12645    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
12646  }
12647
12648  // If divider is found, we divide the list of values and operands to divide
12649  // them by ofset X and Y.
12650  var splitRegex = /\s*,\s*|\s+/;
12651  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
12652
12653  // Convert the values with units to absolute pixels to allow our computations
12654  ops = ops.map(function (op, index) {
12655    // Most of the units rely on the orientation of the popper
12656    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
12657    var mergeWithPrevious = false;
12658    return op
12659    // This aggregates any `+` or `-` sign that aren't considered operators
12660    // e.g.: 10 + +5 => [10, +, +5]
12661    .reduce(function (a, b) {
12662      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
12663        a[a.length - 1] = b;
12664        mergeWithPrevious = true;
12665        return a;
12666      } else if (mergeWithPrevious) {
12667        a[a.length - 1] += b;
12668        mergeWithPrevious = false;
12669        return a;
12670      } else {
12671        return a.concat(b);
12672      }
12673    }, [])
12674    // Here we convert the string values into number values (in px)
12675    .map(function (str) {
12676      return toValue(str, measurement, popperOffsets, referenceOffsets);
12677    });
12678  });
12679
12680  // Loop trough the offsets arrays and execute the operations
12681  ops.forEach(function (op, index) {
12682    op.forEach(function (frag, index2) {
12683      if (isNumeric(frag)) {
12684        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
12685      }
12686    });
12687  });
12688  return offsets;
12689}
12690
12691/**
12692 * @function
12693 * @memberof Modifiers
12694 * @argument {Object} data - The data object generated by update method
12695 * @argument {Object} options - Modifiers configuration and options
12696 * @argument {Number|String} options.offset=0
12697 * The offset value as described in the modifier description
12698 * @returns {Object} The data object, properly modified
12699 */
12700function offset(data, _ref) {
12701  var offset = _ref.offset;
12702  var placement = data.placement,
12703      _data$offsets = data.offsets,
12704      popper = _data$offsets.popper,
12705      reference = _data$offsets.reference;
12706
12707  var basePlacement = placement.split('-')[0];
12708
12709  var offsets = void 0;
12710  if (isNumeric(+offset)) {
12711    offsets = [+offset, 0];
12712  } else {
12713    offsets = parseOffset(offset, popper, reference, basePlacement);
12714  }
12715
12716  if (basePlacement === 'left') {
12717    popper.top += offsets[0];
12718    popper.left -= offsets[1];
12719  } else if (basePlacement === 'right') {
12720    popper.top += offsets[0];
12721    popper.left += offsets[1];
12722  } else if (basePlacement === 'top') {
12723    popper.left += offsets[0];
12724    popper.top -= offsets[1];
12725  } else if (basePlacement === 'bottom') {
12726    popper.left += offsets[0];
12727    popper.top += offsets[1];
12728  }
12729
12730  data.popper = popper;
12731  return data;
12732}
12733
12734/**
12735 * @function
12736 * @memberof Modifiers
12737 * @argument {Object} data - The data object generated by `update` method
12738 * @argument {Object} options - Modifiers configuration and options
12739 * @returns {Object} The data object, properly modified
12740 */
12741function preventOverflow(data, options) {
12742  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
12743
12744  // If offsetParent is the reference element, we really want to
12745  // go one step up and use the next offsetParent as reference to
12746  // avoid to make this modifier completely useless and look like broken
12747  if (data.instance.reference === boundariesElement) {
12748    boundariesElement = getOffsetParent(boundariesElement);
12749  }
12750
12751  // NOTE: DOM access here
12752  // resets the popper's position so that the document size can be calculated excluding
12753  // the size of the popper element itself
12754  var transformProp = getSupportedPropertyName('transform');
12755  var popperStyles = data.instance.popper.style; // assignment to help minification
12756  var top = popperStyles.top,
12757      left = popperStyles.left,
12758      transform = popperStyles[transformProp];
12759
12760  popperStyles.top = '';
12761  popperStyles.left = '';
12762  popperStyles[transformProp] = '';
12763
12764  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
12765
12766  // NOTE: DOM access here
12767  // restores the original style properties after the offsets have been computed
12768  popperStyles.top = top;
12769  popperStyles.left = left;
12770  popperStyles[transformProp] = transform;
12771
12772  options.boundaries = boundaries;
12773
12774  var order = options.priority;
12775  var popper = data.offsets.popper;
12776
12777  var check = {
12778    primary: function primary(placement) {
12779      var value = popper[placement];
12780      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
12781        value = Math.max(popper[placement], boundaries[placement]);
12782      }
12783      return defineProperty({}, placement, value);
12784    },
12785    secondary: function secondary(placement) {
12786      var mainSide = placement === 'right' ? 'left' : 'top';
12787      var value = popper[mainSide];
12788      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
12789        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
12790      }
12791      return defineProperty({}, mainSide, value);
12792    }
12793  };
12794
12795  order.forEach(function (placement) {
12796    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
12797    popper = _extends({}, popper, check[side](placement));
12798  });
12799
12800  data.offsets.popper = popper;
12801
12802  return data;
12803}
12804
12805/**
12806 * @function
12807 * @memberof Modifiers
12808 * @argument {Object} data - The data object generated by `update` method
12809 * @argument {Object} options - Modifiers configuration and options
12810 * @returns {Object} The data object, properly modified
12811 */
12812function shift(data) {
12813  var placement = data.placement;
12814  var basePlacement = placement.split('-')[0];
12815  var shiftvariation = placement.split('-')[1];
12816
12817  // if shift shiftvariation is specified, run the modifier
12818  if (shiftvariation) {
12819    var _data$offsets = data.offsets,
12820        reference = _data$offsets.reference,
12821        popper = _data$offsets.popper;
12822
12823    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
12824    var side = isVertical ? 'left' : 'top';
12825    var measurement = isVertical ? 'width' : 'height';
12826
12827    var shiftOffsets = {
12828      start: defineProperty({}, side, reference[side]),
12829      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
12830    };
12831
12832    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
12833  }
12834
12835  return data;
12836}
12837
12838/**
12839 * @function
12840 * @memberof Modifiers
12841 * @argument {Object} data - The data object generated by update method
12842 * @argument {Object} options - Modifiers configuration and options
12843 * @returns {Object} The data object, properly modified
12844 */
12845function hide(data) {
12846  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
12847    return data;
12848  }
12849
12850  var refRect = data.offsets.reference;
12851  var bound = find(data.instance.modifiers, function (modifier) {
12852    return modifier.name === 'preventOverflow';
12853  }).boundaries;
12854
12855  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
12856    // Avoid unnecessary DOM access if visibility hasn't changed
12857    if (data.hide === true) {
12858      return data;
12859    }
12860
12861    data.hide = true;
12862    data.attributes['x-out-of-boundaries'] = '';
12863  } else {
12864    // Avoid unnecessary DOM access if visibility hasn't changed
12865    if (data.hide === false) {
12866      return data;
12867    }
12868
12869    data.hide = false;
12870    data.attributes['x-out-of-boundaries'] = false;
12871  }
12872
12873  return data;
12874}
12875
12876/**
12877 * @function
12878 * @memberof Modifiers
12879 * @argument {Object} data - The data object generated by `update` method
12880 * @argument {Object} options - Modifiers configuration and options
12881 * @returns {Object} The data object, properly modified
12882 */
12883function inner(data) {
12884  var placement = data.placement;
12885  var basePlacement = placement.split('-')[0];
12886  var _data$offsets = data.offsets,
12887      popper = _data$offsets.popper,
12888      reference = _data$offsets.reference;
12889
12890  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
12891
12892  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
12893
12894  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
12895
12896  data.placement = getOppositePlacement(placement);
12897  data.offsets.popper = getClientRect(popper);
12898
12899  return data;
12900}
12901
12902/**
12903 * Modifier function, each modifier can have a function of this type assigned
12904 * to its `fn` property.<br />
12905 * These functions will be called on each update, this means that you must
12906 * make sure they are performant enough to avoid performance bottlenecks.
12907 *
12908 * @function ModifierFn
12909 * @argument {dataObject} data - The data object generated by `update` method
12910 * @argument {Object} options - Modifiers configuration and options
12911 * @returns {dataObject} The data object, properly modified
12912 */
12913
12914/**
12915 * Modifiers are plugins used to alter the behavior of your poppers.<br />
12916 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
12917 * needed by the library.
12918 *
12919 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
12920 * All the other properties are configurations that could be tweaked.
12921 * @namespace modifiers
12922 */
12923var modifiers = {
12924  /**
12925   * Modifier used to shift the popper on the start or end of its reference
12926   * element.<br />
12927   * It will read the variation of the `placement` property.<br />
12928   * It can be one either `-end` or `-start`.
12929   * @memberof modifiers
12930   * @inner
12931   */
12932  shift: {
12933    /** @prop {number} order=100 - Index used to define the order of execution */
12934    order: 100,
12935    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12936    enabled: true,
12937    /** @prop {ModifierFn} */
12938    fn: shift
12939  },
12940
12941  /**
12942   * The `offset` modifier can shift your popper on both its axis.
12943   *
12944   * It accepts the following units:
12945   * - `px` or unit-less, interpreted as pixels
12946   * - `%` or `%r`, percentage relative to the length of the reference element
12947   * - `%p`, percentage relative to the length of the popper element
12948   * - `vw`, CSS viewport width unit
12949   * - `vh`, CSS viewport height unit
12950   *
12951   * For length is intended the main axis relative to the placement of the popper.<br />
12952   * This means that if the placement is `top` or `bottom`, the length will be the
12953   * `width`. In case of `left` or `right`, it will be the `height`.
12954   *
12955   * You can provide a single value (as `Number` or `String`), or a pair of values
12956   * as `String` divided by a comma or one (or more) white spaces.<br />
12957   * The latter is a deprecated method because it leads to confusion and will be
12958   * removed in v2.<br />
12959   * Additionally, it accepts additions and subtractions between different units.
12960   * Note that multiplications and divisions aren't supported.
12961   *
12962   * Valid examples are:
12963   * ```
12964   * 10
12965   * '10%'
12966   * '10, 10'
12967   * '10%, 10'
12968   * '10 + 10%'
12969   * '10 - 5vh + 3%'
12970   * '-10px + 5vh, 5px - 6%'
12971   * ```
12972   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
12973   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
12974   * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
12975   *
12976   * @memberof modifiers
12977   * @inner
12978   */
12979  offset: {
12980    /** @prop {number} order=200 - Index used to define the order of execution */
12981    order: 200,
12982    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12983    enabled: true,
12984    /** @prop {ModifierFn} */
12985    fn: offset,
12986    /** @prop {Number|String} offset=0
12987     * The offset value as described in the modifier description
12988     */
12989    offset: 0
12990  },
12991
12992  /**
12993   * Modifier used to prevent the popper from being positioned outside the boundary.
12994   *
12995   * A scenario exists where the reference itself is not within the boundaries.<br />
12996   * We can say it has "escaped the boundaries" — or just "escaped".<br />
12997   * In this case we need to decide whether the popper should either:
12998   *
12999   * - detach from the reference and remain "trapped" in the boundaries, or
13000   * - if it should ignore the boundary and "escape with its reference"
13001   *
13002   * When `escapeWithReference` is set to`true` and reference is completely
13003   * outside its boundaries, the popper will overflow (or completely leave)
13004   * the boundaries in order to remain attached to the edge of the reference.
13005   *
13006   * @memberof modifiers
13007   * @inner
13008   */
13009  preventOverflow: {
13010    /** @prop {number} order=300 - Index used to define the order of execution */
13011    order: 300,
13012    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13013    enabled: true,
13014    /** @prop {ModifierFn} */
13015    fn: preventOverflow,
13016    /**
13017     * @prop {Array} [priority=['left','right','top','bottom']]
13018     * Popper will try to prevent overflow following these priorities by default,
13019     * then, it could overflow on the left and on top of the `boundariesElement`
13020     */
13021    priority: ['left', 'right', 'top', 'bottom'],
13022    /**
13023     * @prop {number} padding=5
13024     * Amount of pixel used to define a minimum distance between the boundaries
13025     * and the popper. This makes sure the popper always has a little padding
13026     * between the edges of its container
13027     */
13028    padding: 5,
13029    /**
13030     * @prop {String|HTMLElement} boundariesElement='scrollParent'
13031     * Boundaries used by the modifier. Can be `scrollParent`, `window`,
13032     * `viewport` or any DOM element.
13033     */
13034    boundariesElement: 'scrollParent'
13035  },
13036
13037  /**
13038   * Modifier used to make sure the reference and its popper stay near each other
13039   * without leaving any gap between the two. Especially useful when the arrow is
13040   * enabled and you want to ensure that it points to its reference element.
13041   * It cares only about the first axis. You can still have poppers with margin
13042   * between the popper and its reference element.
13043   * @memberof modifiers
13044   * @inner
13045   */
13046  keepTogether: {
13047    /** @prop {number} order=400 - Index used to define the order of execution */
13048    order: 400,
13049    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13050    enabled: true,
13051    /** @prop {ModifierFn} */
13052    fn: keepTogether
13053  },
13054
13055  /**
13056   * This modifier is used to move the `arrowElement` of the popper to make
13057   * sure it is positioned between the reference element and its popper element.
13058   * It will read the outer size of the `arrowElement` node to detect how many
13059   * pixels of conjunction are needed.
13060   *
13061   * It has no effect if no `arrowElement` is provided.
13062   * @memberof modifiers
13063   * @inner
13064   */
13065  arrow: {
13066    /** @prop {number} order=500 - Index used to define the order of execution */
13067    order: 500,
13068    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13069    enabled: true,
13070    /** @prop {ModifierFn} */
13071    fn: arrow,
13072    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
13073    element: '[x-arrow]'
13074  },
13075
13076  /**
13077   * Modifier used to flip the popper's placement when it starts to overlap its
13078   * reference element.
13079   *
13080   * Requires the `preventOverflow` modifier before it in order to work.
13081   *
13082   * **NOTE:** this modifier will interrupt the current update cycle and will
13083   * restart it if it detects the need to flip the placement.
13084   * @memberof modifiers
13085   * @inner
13086   */
13087  flip: {
13088    /** @prop {number} order=600 - Index used to define the order of execution */
13089    order: 600,
13090    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13091    enabled: true,
13092    /** @prop {ModifierFn} */
13093    fn: flip,
13094    /**
13095     * @prop {String|Array} behavior='flip'
13096     * The behavior used to change the popper's placement. It can be one of
13097     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
13098     * placements (with optional variations)
13099     */
13100    behavior: 'flip',
13101    /**
13102     * @prop {number} padding=5
13103     * The popper will flip if it hits the edges of the `boundariesElement`
13104     */
13105    padding: 5,
13106    /**
13107     * @prop {String|HTMLElement} boundariesElement='viewport'
13108     * The element which will define the boundaries of the popper position.
13109     * The popper will never be placed outside of the defined boundaries
13110     * (except if `keepTogether` is enabled)
13111     */
13112    boundariesElement: 'viewport',
13113    /**
13114     * @prop {Boolean} flipVariations=false
13115     * The popper will switch placement variation between `-start` and `-end` when
13116     * the reference element overlaps its boundaries.
13117     *
13118     * The original placement should have a set variation.
13119     */
13120    flipVariations: false,
13121    /**
13122     * @prop {Boolean} flipVariationsByContent=false
13123     * The popper will switch placement variation between `-start` and `-end` when
13124     * the popper element overlaps its reference boundaries.
13125     *
13126     * The original placement should have a set variation.
13127     */
13128    flipVariationsByContent: false
13129  },
13130
13131  /**
13132   * Modifier used to make the popper flow toward the inner of the reference element.
13133   * By default, when this modifier is disabled, the popper will be placed outside
13134   * the reference element.
13135   * @memberof modifiers
13136   * @inner
13137   */
13138  inner: {
13139    /** @prop {number} order=700 - Index used to define the order of execution */
13140    order: 700,
13141    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
13142    enabled: false,
13143    /** @prop {ModifierFn} */
13144    fn: inner
13145  },
13146
13147  /**
13148   * Modifier used to hide the popper when its reference element is outside of the
13149   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
13150   * be used to hide with a CSS selector the popper when its reference is
13151   * out of boundaries.
13152   *
13153   * Requires the `preventOverflow` modifier before it in order to work.
13154   * @memberof modifiers
13155   * @inner
13156   */
13157  hide: {
13158    /** @prop {number} order=800 - Index used to define the order of execution */
13159    order: 800,
13160    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13161    enabled: true,
13162    /** @prop {ModifierFn} */
13163    fn: hide
13164  },
13165
13166  /**
13167   * Computes the style that will be applied to the popper element to gets
13168   * properly positioned.
13169   *
13170   * Note that this modifier will not touch the DOM, it just prepares the styles
13171   * so that `applyStyle` modifier can apply it. This separation is useful
13172   * in case you need to replace `applyStyle` with a custom implementation.
13173   *
13174   * This modifier has `850` as `order` value to maintain backward compatibility
13175   * with previous versions of Popper.js. Expect the modifiers ordering method
13176   * to change in future major versions of the library.
13177   *
13178   * @memberof modifiers
13179   * @inner
13180   */
13181  computeStyle: {
13182    /** @prop {number} order=850 - Index used to define the order of execution */
13183    order: 850,
13184    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13185    enabled: true,
13186    /** @prop {ModifierFn} */
13187    fn: computeStyle,
13188    /**
13189     * @prop {Boolean} gpuAcceleration=true
13190     * If true, it uses the CSS 3D transformation to position the popper.
13191     * Otherwise, it will use the `top` and `left` properties
13192     */
13193    gpuAcceleration: true,
13194    /**
13195     * @prop {string} [x='bottom']
13196     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
13197     * Change this if your popper should grow in a direction different from `bottom`
13198     */
13199    x: 'bottom',
13200    /**
13201     * @prop {string} [x='left']
13202     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
13203     * Change this if your popper should grow in a direction different from `right`
13204     */
13205    y: 'right'
13206  },
13207
13208  /**
13209   * Applies the computed styles to the popper element.
13210   *
13211   * All the DOM manipulations are limited to this modifier. This is useful in case
13212   * you want to integrate Popper.js inside a framework or view library and you
13213   * want to delegate all the DOM manipulations to it.
13214   *
13215   * Note that if you disable this modifier, you must make sure the popper element
13216   * has its position set to `absolute` before Popper.js can do its work!
13217   *
13218   * Just disable this modifier and define your own to achieve the desired effect.
13219   *
13220   * @memberof modifiers
13221   * @inner
13222   */
13223  applyStyle: {
13224    /** @prop {number} order=900 - Index used to define the order of execution */
13225    order: 900,
13226    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
13227    enabled: true,
13228    /** @prop {ModifierFn} */
13229    fn: applyStyle,
13230    /** @prop {Function} */
13231    onLoad: applyStyleOnLoad,
13232    /**
13233     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
13234     * @prop {Boolean} gpuAcceleration=true
13235     * If true, it uses the CSS 3D transformation to position the popper.
13236     * Otherwise, it will use the `top` and `left` properties
13237     */
13238    gpuAcceleration: undefined
13239  }
13240};
13241
13242/**
13243 * The `dataObject` is an object containing all the information used by Popper.js.
13244 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
13245 * @name dataObject
13246 * @property {Object} data.instance The Popper.js instance
13247 * @property {String} data.placement Placement applied to popper
13248 * @property {String} data.originalPlacement Placement originally defined on init
13249 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
13250 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
13251 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
13252 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
13253 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
13254 * @property {Object} data.boundaries Offsets of the popper boundaries
13255 * @property {Object} data.offsets The measurements of popper, reference and arrow elements
13256 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
13257 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
13258 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
13259 */
13260
13261/**
13262 * Default options provided to Popper.js constructor.<br />
13263 * These can be overridden using the `options` argument of Popper.js.<br />
13264 * To override an option, simply pass an object with the same
13265 * structure of the `options` object, as the 3rd argument. For example:
13266 * ```
13267 * new Popper(ref, pop, {
13268 *   modifiers: {
13269 *     preventOverflow: { enabled: false }
13270 *   }
13271 * })
13272 * ```
13273 * @type {Object}
13274 * @static
13275 * @memberof Popper
13276 */
13277var Defaults = {
13278  /**
13279   * Popper's placement.
13280   * @prop {Popper.placements} placement='bottom'
13281   */
13282  placement: 'bottom',
13283
13284  /**
13285   * Set this to true if you want popper to position it self in 'fixed' mode
13286   * @prop {Boolean} positionFixed=false
13287   */
13288  positionFixed: false,
13289
13290  /**
13291   * Whether events (resize, scroll) are initially enabled.
13292   * @prop {Boolean} eventsEnabled=true
13293   */
13294  eventsEnabled: true,
13295
13296  /**
13297   * Set to true if you want to automatically remove the popper when
13298   * you call the `destroy` method.
13299   * @prop {Boolean} removeOnDestroy=false
13300   */
13301  removeOnDestroy: false,
13302
13303  /**
13304   * Callback called when the popper is created.<br />
13305   * By default, it is set to no-op.<br />
13306   * Access Popper.js instance with `data.instance`.
13307   * @prop {onCreate}
13308   */
13309  onCreate: function onCreate() {},
13310
13311  /**
13312   * Callback called when the popper is updated. This callback is not called
13313   * on the initialization/creation of the popper, but only on subsequent
13314   * updates.<br />
13315   * By default, it is set to no-op.<br />
13316   * Access Popper.js instance with `data.instance`.
13317   * @prop {onUpdate}
13318   */
13319  onUpdate: function onUpdate() {},
13320
13321  /**
13322   * List of modifiers used to modify the offsets before they are applied to the popper.
13323   * They provide most of the functionalities of Popper.js.
13324   * @prop {modifiers}
13325   */
13326  modifiers: modifiers
13327};
13328
13329/**
13330 * @callback onCreate
13331 * @param {dataObject} data
13332 */
13333
13334/**
13335 * @callback onUpdate
13336 * @param {dataObject} data
13337 */
13338
13339// Utils
13340// Methods
13341var Popper = function () {
13342  /**
13343   * Creates a new Popper.js instance.
13344   * @class Popper
13345   * @param {Element|referenceObject} reference - The reference element used to position the popper
13346   * @param {Element} popper - The HTML / XML element used as the popper
13347   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
13348   * @return {Object} instance - The generated Popper.js instance
13349   */
13350  function Popper(reference, popper) {
13351    var _this = this;
13352
13353    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
13354    classCallCheck(this, Popper);
13355
13356    this.scheduleUpdate = function () {
13357      return requestAnimationFrame(_this.update);
13358    };
13359
13360    // make update() debounced, so that it only runs at most once-per-tick
13361    this.update = debounce(this.update.bind(this));
13362
13363    // with {} we create a new object with the options inside it
13364    this.options = _extends({}, Popper.Defaults, options);
13365
13366    // init state
13367    this.state = {
13368      isDestroyed: false,
13369      isCreated: false,
13370      scrollParents: []
13371    };
13372
13373    // get reference and popper elements (allow jQuery wrappers)
13374    this.reference = reference && reference.jquery ? reference[0] : reference;
13375    this.popper = popper && popper.jquery ? popper[0] : popper;
13376
13377    // Deep merge modifiers options
13378    this.options.modifiers = {};
13379    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
13380      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
13381    });
13382
13383    // Refactoring modifiers' list (Object => Array)
13384    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
13385      return _extends({
13386        name: name
13387      }, _this.options.modifiers[name]);
13388    })
13389    // sort the modifiers by order
13390    .sort(function (a, b) {
13391      return a.order - b.order;
13392    });
13393
13394    // modifiers have the ability to execute arbitrary code when Popper.js get inited
13395    // such code is executed in the same order of its modifier
13396    // they could add new properties to their options configuration
13397    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
13398    this.modifiers.forEach(function (modifierOptions) {
13399      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
13400        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
13401      }
13402    });
13403
13404    // fire the first update to position the popper in the right place
13405    this.update();
13406
13407    var eventsEnabled = this.options.eventsEnabled;
13408    if (eventsEnabled) {
13409      // setup event listeners, they will take care of update the position in specific situations
13410      this.enableEventListeners();
13411    }
13412
13413    this.state.eventsEnabled = eventsEnabled;
13414  }
13415
13416  // We can't use class properties because they don't get listed in the
13417  // class prototype and break stuff like Sinon stubs
13418
13419
13420  createClass(Popper, [{
13421    key: 'update',
13422    value: function update$$1() {
13423      return update.call(this);
13424    }
13425  }, {
13426    key: 'destroy',
13427    value: function destroy$$1() {
13428      return destroy.call(this);
13429    }
13430  }, {
13431    key: 'enableEventListeners',
13432    value: function enableEventListeners$$1() {
13433      return enableEventListeners.call(this);
13434    }
13435  }, {
13436    key: 'disableEventListeners',
13437    value: function disableEventListeners$$1() {
13438      return disableEventListeners.call(this);
13439    }
13440
13441    /**
13442     * Schedules an update. It will run on the next UI update available.
13443     * @method scheduleUpdate
13444     * @memberof Popper
13445     */
13446
13447
13448    /**
13449     * Collection of utilities useful when writing custom modifiers.
13450     * Starting from version 1.7, this method is available only if you
13451     * include `popper-utils.js` before `popper.js`.
13452     *
13453     * **DEPRECATION**: This way to access PopperUtils is deprecated
13454     * and will be removed in v2! Use the PopperUtils module directly instead.
13455     * Due to the high instability of the methods contained in Utils, we can't
13456     * guarantee them to follow semver. Use them at your own risk!
13457     * @static
13458     * @private
13459     * @type {Object}
13460     * @deprecated since version 1.8
13461     * @member Utils
13462     * @memberof Popper
13463     */
13464
13465  }]);
13466  return Popper;
13467}();
13468
13469/**
13470 * The `referenceObject` is an object that provides an interface compatible with Popper.js
13471 * and lets you use it as replacement of a real DOM node.<br />
13472 * You can use this method to position a popper relatively to a set of coordinates
13473 * in case you don't have a DOM node to use as reference.
13474 *
13475 * ```
13476 * new Popper(referenceObject, popperNode);
13477 * ```
13478 *
13479 * NB: This feature isn't supported in Internet Explorer 10.
13480 * @name referenceObject
13481 * @property {Function} data.getBoundingClientRect
13482 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
13483 * @property {number} data.clientWidth
13484 * An ES6 getter that will return the width of the virtual reference element.
13485 * @property {number} data.clientHeight
13486 * An ES6 getter that will return the height of the virtual reference element.
13487 */
13488
13489
13490Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
13491Popper.placements = placements;
13492Popper.Defaults = Defaults;
13493
13494return Popper;
13495
13496})));
13497//# sourceMappingURL=popper.js.map
13498
13499;/*!
13500  * Bootstrap v4.5.2 (https://getbootstrap.com/)
13501  * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
13502  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
13503  */
13504(function (global, factory) {
13505  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
13506  typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
13507  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
13508}(this, (function (exports, $, Popper) { 'use strict';
13509
13510  $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
13511  Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
13512
13513  function _defineProperties(target, props) {
13514    for (var i = 0; i < props.length; i++) {
13515      var descriptor = props[i];
13516      descriptor.enumerable = descriptor.enumerable || false;
13517      descriptor.configurable = true;
13518      if ("value" in descriptor) descriptor.writable = true;
13519      Object.defineProperty(target, descriptor.key, descriptor);
13520    }
13521  }
13522
13523  function _createClass(Constructor, protoProps, staticProps) {
13524    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
13525    if (staticProps) _defineProperties(Constructor, staticProps);
13526    return Constructor;
13527  }
13528
13529  function _extends() {
13530    _extends = Object.assign || function (target) {
13531      for (var i = 1; i < arguments.length; i++) {
13532        var source = arguments[i];
13533
13534        for (var key in source) {
13535          if (Object.prototype.hasOwnProperty.call(source, key)) {
13536            target[key] = source[key];
13537          }
13538        }
13539      }
13540
13541      return target;
13542    };
13543
13544    return _extends.apply(this, arguments);
13545  }
13546
13547  function _inheritsLoose(subClass, superClass) {
13548    subClass.prototype = Object.create(superClass.prototype);
13549    subClass.prototype.constructor = subClass;
13550    subClass.__proto__ = superClass;
13551  }
13552
13553  /**
13554   * --------------------------------------------------------------------------
13555   * Bootstrap (v4.5.2): util.js
13556   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
13557   * --------------------------------------------------------------------------
13558   */
13559  /**
13560   * ------------------------------------------------------------------------
13561   * Private TransitionEnd Helpers
13562   * ------------------------------------------------------------------------
13563   */
13564
13565  var TRANSITION_END = 'transitionend';
13566  var MAX_UID = 1000000;
13567  var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
13568
13569  function toType(obj) {
13570    if (obj === null || typeof obj === 'undefined') {
13571      return "" + obj;
13572    }
13573
13574    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
13575  }
13576
13577  function getSpecialTransitionEndEvent() {
13578    return {
13579      bindType: TRANSITION_END,
13580      delegateType: TRANSITION_END,
13581      handle: function handle(event) {
13582        if ($(event.target).is(this)) {
13583          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
13584        }
13585
13586        return undefined;
13587      }
13588    };
13589  }
13590
13591  function transitionEndEmulator(duration) {
13592    var _this = this;
13593
13594    var called = false;
vendor: 4,467 bytes, lines 13595-13721
13595    $(this).one(Util.TRANSITION_END, function () {
13596      called = true;
13597    });
13598    setTimeout(function () {
13599      if (!called) {
13600        Util.triggerTransitionEnd(_this);
13601      }
13602    }, duration);
13603    return this;
13604  }
13605
13606  function setTransitionEndSupport() {
13607    $.fn.emulateTransitionEnd = transitionEndEmulator;
13608    $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
13609  }
13610  /**
13611   * --------------------------------------------------------------------------
13612   * Public Util Api
13613   * --------------------------------------------------------------------------
13614   */
13615
13616
13617  var Util = {
13618    TRANSITION_END: 'bsTransitionEnd',
13619    getUID: function getUID(prefix) {
13620      do {
13621        // eslint-disable-next-line no-bitwise
13622        prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
13623      } while (document.getElementById(prefix));
13624
13625      return prefix;
13626    },
13627    getSelectorFromElement: function getSelectorFromElement(element) {
13628      var selector = element.getAttribute('data-target');
13629
13630      if (!selector || selector === '#') {
13631        var hrefAttr = element.getAttribute('href');
13632        selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
13633      }
13634
13635      try {
13636        return document.querySelector(selector) ? selector : null;
13637      } catch (err) {
13638        return null;
13639      }
13640    },
13641    getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
13642      if (!element) {
13643        return 0;
13644      } // Get transition-duration of the element
13645
13646
13647      var transitionDuration = $(element).css('transition-duration');
13648      var transitionDelay = $(element).css('transition-delay');
13649      var floatTransitionDuration = parseFloat(transitionDuration);
13650      var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
13651
13652      if (!floatTransitionDuration && !floatTransitionDelay) {
13653        return 0;
13654      } // If multiple durations are defined, take the first
13655
13656
13657      transitionDuration = transitionDuration.split(',')[0];
13658      transitionDelay = transitionDelay.split(',')[0];
13659      return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
13660    },
13661    reflow: function reflow(element) {
13662      return element.offsetHeight;
13663    },
13664    triggerTransitionEnd: function triggerTransitionEnd(element) {
13665      $(element).trigger(TRANSITION_END);
13666    },
13667    // TODO: Remove in v5
13668    supportsTransitionEnd: function supportsTransitionEnd() {
13669      return Boolean(TRANSITION_END);
13670    },
13671    isElement: function isElement(obj) {
13672      return (obj[0] || obj).nodeType;
13673    },
13674    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
13675      for (var property in configTypes) {
13676        if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
13677          var expectedTypes = configTypes[property];
13678          var value = config[property];
13679          var valueType = value && Util.isElement(value) ? 'element' : toType(value);
13680
13681          if (!new RegExp(expectedTypes).test(valueType)) {
13682            throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
13683          }
13684        }
13685      }
13686    },
13687    findShadowRoot: function findShadowRoot(element) {
13688      if (!document.documentElement.attachShadow) {
13689        return null;
13690      } // Can find the shadow root otherwise it'll return the document
13691
13692
13693      if (typeof element.getRootNode === 'function') {
13694        var root = element.getRootNode();
13695        return root instanceof ShadowRoot ? root : null;
13696      }
13697
13698      if (element instanceof ShadowRoot) {
13699        return element;
13700      } // when we don't find a shadow root
13701
13702
13703      if (!element.parentNode) {
13704        return null;
13705      }
13706
13707      return Util.findShadowRoot(element.parentNode);
13708    },
13709    jQueryDetection: function jQueryDetection() {
13710      if (typeof $ === 'undefined') {
13711        throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
13712      }
13713
13714      var version = $.fn.jquery.split(' ')[0].split('.');
13715      var minMajor = 1;
13716      var ltMajor = 2;
13717      var minMinor = 9;
13718      var minPatch = 1;
13719      var maxMajor = 4;
13720
13721      if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >
13721= maxMajor) {
13722        throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
13723      }
13724    }
13725  };
13726  Util.jQueryDetection();
13727  setTransitionEndSupport();
13728
13729  /**
13730   * ------------------------------------------------------------------------
13731   * Constants
13732   * ------------------------------------------------------------------------
13733   */
13734
13735  var NAME = 'alert';
13736  var VERSION = '4.5.2';
13737  var DATA_KEY = 'bs.alert';
13738  var EVENT_KEY = "." + DATA_KEY;
13739  var DATA_API_KEY = '.data-api';
13740  var JQUERY_NO_CONFLICT = $.fn[NAME];
13741  var SELECTOR_DISMISS = '[data-dismiss="alert"]';
13742  var EVENT_CLOSE = "close" + EVENT_KEY;
13743  var EVENT_CLOSED = "closed" + EVENT_KEY;
13744  var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
13745  var CLASS_NAME_ALERT = 'alert';
13746  var CLASS_NAME_FADE = 'fade';
13747  var CLASS_NAME_SHOW = 'show';
13748  /**
13749   * ------------------------------------------------------------------------
13750   * Class Definition
13751   * ------------------------------------------------------------------------
13752   */
13753
13754  var Alert = /*#__PURE__*/function () {
13755    function Alert(element) {
13756      this._element = element;
13757    } // Getters
13758
13759
13760    var _proto = Alert.prototype;
13761
13762    // Public
13763    _proto.close = function close(element) {
13764      var rootElement = this._element;
13765
13766      if (element) {
13767        rootElement = this._getRootElement(element);
13768      }
13769
13770      var customEvent = this._triggerCloseEvent(rootElement);
13771
13772      if (customEvent.isDefaultPrevented()) {
13773        return;
13774      }
13775
13776      this._removeElement(rootElement);
13777    };
13778
13779    _proto.dispose = function dispose() {
13780      $.removeData(this._element, DATA_KEY);
13781      this._element = null;
13782    } // Private
13783    ;
13784
13785    _proto._getRootElement = function _getRootElement(element) {
13786      var selector = Util.getSelectorFromElement(element);
13787      var parent = false;
13788
13789      if (selector) {
13790        parent = document.querySelector(selector);
13791      }
13792
13793      if (!parent) {
13794        parent = $(element).closest("." + CLASS_NAME_ALERT)[0];
13795      }
13796
13797      return parent;
13798    };
13799
13800    _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
13801      var closeEvent = $.Event(EVENT_CLOSE);
13802      $(element).trigger(closeEvent);
13803      return closeEvent;
13804    };
13805
13806    _proto._removeElement = function _removeElement(element) {
13807      var _this = this;
13808
13809      $(element).removeClass(CLASS_NAME_SHOW);
13810
13811      if (!$(element).hasClass(CLASS_NAME_FADE)) {
13812        this._destroyElement(element);
13813
13814        return;
13815      }
13816
13817      var transitionDuration = Util.getTransitionDurationFromElement(element);
13818      $(element).one(Util.TRANSITION_END, function (event) {
13819        return _this._destroyElement(element, event);
13820      }).emulateTransitionEnd(transitionDuration);
13821    };
13822
13823    _proto._destroyElement = function _destroyElement(element) {
13824      $(element).detach().trigger(EVENT_CLOSED).remove();
13825    } // Static
13826    ;
13827
13828    Alert._jQueryInterface = function _jQueryInterface(config) {
13829      return this.each(function () {
13830        var $element = $(this);
13831        var data = $element.data(DATA_KEY);
13832
13833        if (!data) {
13834          data = new Alert(this);
13835          $element.data(DATA_KEY, data);
13836        }
13837
13838        if (config === 'close') {
13839          data[config](this);
13840        }
13841      });
13842    };
13843
13844    Alert._handleDismiss = function _handleDismiss(alertInstance) {
13845      return function (event) {
13846        if (event) {
13847          event.preventDefault();
13848        }
13849
13850        alertInstance.close(this);
13851      };
13852    };
13853
13854    _createClass(Alert, null, [{
13855      key: "VERSION",
13856      get: function get() {
13857        return VERSION;
13858      }
13859    }]);
13860
13861    return Alert;
13862  }();
13863  /**
13864   * ------------------------------------------------------------------------
13865   * Data Api implementation
13866   * ------------------------------------------------------------------------
13867   */
13868
13869
13870  $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
13871  /**
13872   * ------------------------------------------------------------------------
13873   * jQuery
13874   * ------------------------------------------------------------------------
13875   */
13876
13877  $.fn[NAME] = Alert._jQueryInterface;
13878  $.fn[NAME].Constructor = Alert;
13879
13880  $.fn[NAME].noConflict = function () {
13881    $.fn[NAME] = JQUERY_NO_CONFLICT;
13882    return Alert._jQueryInterface;
13883  };
13884
13885  /**
13886   * ------------------------------------------------------------------------
13887   * Constants
13888   * ------------------------------------------------------------------------
13889   */
13890
13891  var NAME$1 = 'button';
13892  var VERSION$1 = '4.5.2';
13893  var DATA_KEY$1 = 'bs.button';
13894  var EVENT_KEY$1 = "." + DATA_KEY$1;
13895  var DATA_API_KEY$1 = '.data-api';
13896  var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
13897  var CLASS_NAME_ACTIVE = 'active';
13898  var CLASS_NAME_BUTTON = 'btn';
13899  var CLASS_NAME_FOCUS = 'focus';
13900  var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
13901  var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
13902  var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
13903  var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
13904  var SELECTOR_INPUT = 'input:not([type="hidden"])';
13905  var SELECTOR_ACTIVE = '.active';
13906  var SELECTOR_BUTTON = '.btn';
13907  var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1;
13908  var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1);
13909  var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$1 + DATA_API_KEY$1;
13910  /**
13911   * ------------------------------------------------------------------------
13912   * Class Definition
13913   * ------------------------------------------------------------------------
13914   */
13915
13916  var Button = /*#__PURE__*/function () {
13917    function Button(element) {
13918      this._element = element;
13919    } // Getters
13920
13921
13922    var _proto = Button.prototype;
13923
13924    // Public
13925    _proto.toggle = function toggle() {
13926      var triggerChangeEvent = true;
13927      var addAriaPressed = true;
13928      var rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0];
13929
13930      if (rootElement) {
13931        var input = this._element.querySelector(SELECTOR_INPUT);
13932
13933        if (input) {
13934          if (input.type === 'radio') {
13935            if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
13936              triggerChangeEvent = false;
13937            } else {
13938              var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
13939
13940              if (activeElement) {
13941                $(activeElement).removeClass(CLASS_NAME_ACTIVE);
13942              }
13943            }
13944          }
13945
13946          if (triggerChangeEvent) {
13947            // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
13948            if (input.type === 'checkbox' || input.type === 'radio') {
13949              input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
13950            }
13951
13952            $(input).trigger('change');
13953          }
13954
13955          input.focus();
13956          addAriaPressed = false;
13957        }
13958      }
13959
13960      if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
13961        if (addAriaPressed) {
13962          this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
13963        }
13964
13965        if (triggerChangeEvent) {
13966          $(this._element).toggleClass(CLASS_NAME_ACTIVE);
13967        }
13968      }
13969    };
13970
13971    _proto.dispose = function dispose() {
13972      $.removeData(this._element, DATA_KEY$1);
13973      this._element = null;
13974    } // Static
13975    ;
13976
13977    Button._jQueryInterface = function _jQueryInterface(config) {
13978      return this.each(function () {
13979        var data = $(this).data(DATA_KEY$1);
13980
13981        if (!data) {
13982          data = new Button(this);
13983          $(this).data(DATA_KEY$1, data);
13984        }
13985
13986        if (config === 'toggle') {
13987          data[config]();
13988        }
13989      });
13990    };
13991
13992    _createClass(Button, null, [{
13993      key: "VERSION",
13994      get: function get() {
13995        return VERSION$1;
13996      }
13997    }]);
13998
13999    return Button;
14000  }();
14001  /**
14002   * ------------------------------------------------------------------------
14003   * Data Api implementation
14004   * ------------------------------------------------------------------------
14005   */
14006
14007
14008  $(document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
14009    var button = event.target;
14010    var initialButton = button;
14011
14012    if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
14013      button = $(button).closest(SELECTOR_BUTTON)[0];
14014    }
14015
14016    if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
14017      event.preventDefault(); // work around Firefox bug #1540995
14018    } else {
14019      var inputBtn = button.querySelector(SELECTOR_INPUT);
14020
14021      if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
14022        event.preventDefault(); // work around Firefox bug #1540995
14023
14024        return;
14025      }
14026
14027      if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') {
14028        Button._jQueryInterface.call($(button), 'toggle');
14029      }
14030    }
14031  }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
14032    var button = $(event.target).closest(SELECTOR_BUTTON)[0];
14033    $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
14034  });
14035  $(window).on(EVENT_LOAD_DATA_API, function () {
14036    // ensure correct active class is set to match the controls' actual values/states
14037    // find all checkboxes/readio buttons inside data-toggle groups
14038    var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
14039
14040    for (var i = 0, len = buttons.length; i < len; i++) {
14041      var button = buttons[i];
14042      var input = button.querySelector(SELECTOR_INPUT);
14043
14044      if (input.checked || input.hasAttribute('checked')) {
14045        button.classList.add(CLASS_NAME_ACTIVE);
14046      } else {
14047        button.classList.remove(CLASS_NAME_ACTIVE);
14048      }
14049    } // find all button toggles
14050
14051
14052    buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
14053
14054    for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
14055      var _button = buttons[_i];
14056
14057      if (_button.getAttribute('aria-pressed') === 'true') {
14058        _button.classList.add(CLASS_NAME_ACTIVE);
14059      } else {
14060        _button.classList.remove(CLASS_NAME_ACTIVE);
14061      }
14062    }
14063  });
14064  /**
14065   * ------------------------------------------------------------------------
14066   * jQuery
14067   * ------------------------------------------------------------------------
14068   */
14069
14070  $.fn[NAME$1] = Button._jQueryInterface;
14071  $.fn[NAME$1].Constructor = Button;
14072
14073  $.fn[NAME$1].noConflict = function () {
14074    $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
14075    return Button._jQueryInterface;
14076  };
14077
14078  /**
14079   * ------------------------------------------------------------------------
14080   * Constants
14081   * ------------------------------------------------------------------------
14082   */
14083
14084  var NAME$2 = 'carousel';
14085  var VERSION$2 = '4.5.2';
14086  var DATA_KEY$2 = 'bs.carousel';
14087  var EVENT_KEY$2 = "." + DATA_KEY$2;
14088  var DATA_API_KEY$2 = '.data-api';
14089  var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
14090  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
14091
14092  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
14093
14094  var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
14095
14096  var SWIPE_THRESHOLD = 40;
14097  var Default = {
14098    interval: 5000,
14099    keyboard: true,
14100    slide: false,
14101    pause: 'hover',
14102    wrap: true,
14103    touch: true
14104  };
14105  var DefaultType = {
14106    interval: '(number|boolean)',
14107    keyboard: 'boolean',
14108    slide: '(boolean|string)',
14109    pause: '(string|boolean)',
14110    wrap: 'boolean',
14111    touch: 'boolean'
14112  };
14113  var DIRECTION_NEXT = 'next';
14114  var DIRECTION_PREV = 'prev';
14115  var DIRECTION_LEFT = 'left';
14116  var DIRECTION_RIGHT = 'right';
14117  var EVENT_SLIDE = "slide" + EVENT_KEY$2;
14118  var EVENT_SLID = "slid" + EVENT_KEY$2;
14119  var EVENT_KEYDOWN = "keydown" + EVENT_KEY$2;
14120  var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$2;
14121  var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$2;
14122  var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$2;
14123  var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$2;
14124  var EVENT_TOUCHEND = "touchend" + EVENT_KEY$2;
14125  var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2;
14126  var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2;
14127  var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2;
14128  var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
14129  var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2;
14130  var CLASS_NAME_CAROUSEL = 'carousel';
14131  var CLASS_NAME_ACTIVE$1 = 'active';
14132  var CLASS_NAME_SLIDE = 'slide';
14133  var CLASS_NAME_RIGHT = 'carousel-item-right';
14134  var CLASS_NAME_LEFT = 'carousel-item-left';
14135  var CLASS_NAME_NEXT = 'carousel-item-next';
14136  var CLASS_NAME_PREV = 'carousel-item-prev';
14137  var CLASS_NAME_POINTER_EVENT = 'pointer-event';
14138  var SELECTOR_ACTIVE$1 = '.active';
14139  var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
vendor: 11,025 bytes, lines 14140-14492
14140  var SELECTOR_ITEM = '.carousel-item';
14141  var SELECTOR_ITEM_IMG = '.carousel-item img';
14142  var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
14143  var SELECTOR_INDICATORS = '.carousel-indicators';
14144  var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
14145  var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
14146  var PointerType = {
14147    TOUCH: 'touch',
14148    PEN: 'pen'
14149  };
14150  /**
14151   * ------------------------------------------------------------------------
14152   * Class Definition
14153   * ------------------------------------------------------------------------
14154   */
14155
14156  var Carousel = /*#__PURE__*/function () {
14157    function Carousel(element, config) {
14158      this._items = null;
14159      this._interval = null;
14160      this._activeElement = null;
14161      this._isPaused = false;
14162      this._isSliding = false;
14163      this.touchTimeout = null;
14164      this.touchStartX = 0;
14165      this.touchDeltaX = 0;
14166      this._config = this._getConfig(config);
14167      this._element = element;
14168      this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
14169      this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
14170      this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
14171
14172      this._addEventListeners();
14173    } // Getters
14174
14175
14176    var _proto = Carousel.prototype;
14177
14178    // Public
14179    _proto.next = function next() {
14180      if (!this._isSliding) {
14181        this._slide(DIRECTION_NEXT);
14182      }
14183    };
14184
14185    _proto.nextWhenVisible = function nextWhenVisible() {
14186      // Don't call next when the page isn't visible
14187      // or the carousel or its parent isn't visible
14188      if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
14189        this.next();
14190      }
14191    };
14192
14193    _proto.prev = function prev() {
14194      if (!this._isSliding) {
14195        this._slide(DIRECTION_PREV);
14196      }
14197    };
14198
14199    _proto.pause = function pause(event) {
14200      if (!event) {
14201        this._isPaused = true;
14202      }
14203
14204      if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
14205        Util.triggerTransitionEnd(this._element);
14206        this.cycle(true);
14207      }
14208
14209      clearInterval(this._interval);
14210      this._interval = null;
14211    };
14212
14213    _proto.cycle = function cycle(event) {
14214      if (!event) {
14215        this._isPaused = false;
14216      }
14217
14218      if (this._interval) {
14219        clearInterval(this._interval);
14220        this._interval = null;
14221      }
14222
14223      if (this._config.interval && !this._isPaused) {
14224        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
14225      }
14226    };
14227
14228    _proto.to = function to(index) {
14229      var _this = this;
14230
14231      this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
14232
14233      var activeIndex = this._getItemIndex(this._activeElement);
14234
14235      if (index > this._items.length - 1 || index < 0) {
14236        return;
14237      }
14238
14239      if (this._isSliding) {
14240        $(this._element).one(EVENT_SLID, function () {
14241          return _this.to(index);
14242        });
14243        return;
14244      }
14245
14246      if (activeIndex === index) {
14247        this.pause();
14248        this.cycle();
14249        return;
14250      }
14251
14252      var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
14253
14254      this._slide(direction, this._items[index]);
14255    };
14256
14257    _proto.dispose = function dispose() {
14258      $(this._element).off(EVENT_KEY$2);
14259      $.removeData(this._element, DATA_KEY$2);
14260      this._items = null;
14261      this._config = null;
14262      this._element = null;
14263      this._interval = null;
14264      this._isPaused = null;
14265      this._isSliding = null;
14266      this._activeElement = null;
14267      this._indicatorsElement = null;
14268    } // Private
14269    ;
14270
14271    _proto._getConfig = function _getConfig(config) {
14272      config = _extends({}, Default, config);
14273      Util.typeCheckConfig(NAME$2, config, DefaultType);
14274      return config;
14275    };
14276
14277    _proto._handleSwipe = function _handleSwipe() {
14278      var absDeltax = Math.abs(this.touchDeltaX);
14279
14280      if (absDeltax <= SWIPE_THRESHOLD) {
14281        return;
14282      }
14283
14284      var direction = absDeltax / this.touchDeltaX;
14285      this.touchDeltaX = 0; // swipe left
14286
14287      if (direction > 0) {
14288        this.prev();
14289      } // swipe right
14290
14291
14292      if (direction < 0) {
14293        this.next();
14294      }
14295    };
14296
14297    _proto._addEventListeners = function _addEventListeners() {
14298      var _this2 = this;
14299
14300      if (this._config.keyboard) {
14301        $(this._element).on(EVENT_KEYDOWN, function (event) {
14302          return _this2._keydown(event);
14303        });
14304      }
14305
14306      if (this._config.pause === 'hover') {
14307        $(this._element).on(EVENT_MOUSEENTER, function (event) {
14308          return _this2.pause(event);
14309        }).on(EVENT_MOUSELEAVE, function (event) {
14310          return _this2.cycle(event);
14311        });
14312      }
14313
14314      if (this._config.touch) {
14315        this._addTouchEventListeners();
14316      }
14317    };
14318
14319    _proto._addTouchEventListeners = function _addTouchEventListeners() {
14320      var _this3 = this;
14321
14322      if (!this._touchSupported) {
14323        return;
14324      }
14325
14326      var start = function start(event) {
14327        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
14328          _this3.touchStartX = event.originalEvent.clientX;
14329        } else if (!_this3._pointerEvent) {
14330          _this3.touchStartX = event.originalEvent.touches[0].clientX;
14331        }
14332      };
14333
14334      var move = function move(event) {
14335        // ensure swiping with one touch and not pinching
14336        if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
14337          _this3.touchDeltaX = 0;
14338        } else {
14339          _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
14340        }
14341      };
14342
14343      var end = function end(event) {
14344        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
14345          _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
14346        }
14347
14348        _this3._handleSwipe();
14349
14350        if (_this3._config.pause === 'hover') {
14351          // If it's a touch-enabled device, mouseenter/leave are fired as
14352          // part of the mouse compatibility events on first tap - the carousel
14353          // would stop cycling until user tapped out of it;
14354          // here, we listen for touchend, explicitly pause the carousel
14355          // (as if it's the second time we tap on it, mouseenter compat event
14356          // is NOT fired) and after a timeout (to allow for mouse compatibility
14357          // events to fire) we explicitly restart cycling
14358          _this3.pause();
14359
14360          if (_this3.touchTimeout) {
14361            clearTimeout(_this3.touchTimeout);
14362          }
14363
14364          _this3.touchTimeout = setTimeout(function (event) {
14365            return _this3.cycle(event);
14366          }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
14367        }
14368      };
14369
14370      $(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
14371        return e.preventDefault();
14372      });
14373
14374      if (this._pointerEvent) {
14375        $(this._element).on(EVENT_POINTERDOWN, function (event) {
14376          return start(event);
14377        });
14378        $(this._element).on(EVENT_POINTERUP, function (event) {
14379          return end(event);
14380        });
14381
14382        this._element.classList.add(CLASS_NAME_POINTER_EVENT);
14383      } else {
14384        $(this._element).on(EVENT_TOUCHSTART, function (event) {
14385          return start(event);
14386        });
14387        $(this._element).on(EVENT_TOUCHMOVE, function (event) {
14388          return move(event);
14389        });
14390        $(this._element).on(EVENT_TOUCHEND, function (event) {
14391          return end(event);
14392        });
14393      }
14394    };
14395
14396    _proto._keydown = function _keydown(event) {
14397      if (/input|textarea/i.test(event.target.tagName)) {
14398        return;
14399      }
14400
14401      switch (event.which) {
14402        case ARROW_LEFT_KEYCODE:
14403          event.preventDefault();
14404          this.prev();
14405          break;
14406
14407        case ARROW_RIGHT_KEYCODE:
14408          event.preventDefault();
14409          this.next();
14410          break;
14411      }
14412    };
14413
14414    _proto._getItemIndex = function _getItemIndex(element) {
14415      this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
14416      return this._items.indexOf(element);
14417    };
14418
14419    _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
14420      var isNextDirection = direction === DIRECTION_NEXT;
14421      var isPrevDirection = direction === DIRECTION_PREV;
14422
14423      var activeIndex = this._getItemIndex(activeElement);
14424
14425      var lastItemIndex = this._items.length - 1;
14426      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
14427
14428      if (isGoingToWrap && !this._config.wrap) {
14429        return activeElement;
14430      }
14431
14432      var delta = direction === DIRECTION_PREV ? -1 : 1;
14433      var itemIndex = (activeIndex + delta) % this._items.length;
14434      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
14435    };
14436
14437    _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
14438      var targetIndex = this._getItemIndex(relatedTarget);
14439
14440      var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
14441
14442      var slideEvent = $.Event(EVENT_SLIDE, {
14443        relatedTarget: relatedTarget,
14444        direction: eventDirectionName,
14445        from: fromIndex,
14446        to: targetIndex
14447      });
14448      $(this._element).trigger(slideEvent);
14449      return slideEvent;
14450    };
14451
14452    _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
14453      if (this._indicatorsElement) {
14454        var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
14455        $(indicators).removeClass(CLASS_NAME_ACTIVE$1);
14456
14457        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
14458
14459        if (nextIndicator) {
14460          $(nextIndicator).addClass(CLASS_NAME_ACTIVE$1);
14461        }
14462      }
14463    };
14464
14465    _proto._slide = function _slide(direction, element) {
14466      var _this4 = this;
14467
14468      var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
14469
14470      var activeElementIndex = this._getItemIndex(activeElement);
14471
14472      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
14473
14474      var nextElementIndex = this._getItemIndex(nextElement);
14475
14476      var isCycling = Boolean(this._interval);
14477      var directionalClassName;
14478      var orderClassName;
14479      var eventDirectionName;
14480
14481      if (direction === DIRECTION_NEXT) {
14482        directionalClassName = CLASS_NAME_LEFT;
14483        orderClassName = CLASS_NAME_NEXT;
14484        eventDirectionName = DIRECTION_LEFT;
14485      } else {
14486        directionalClassName = CLASS_NAME_RIGHT;
14487        orderClassName = CLASS_NAME_PREV;
14488        eventDirectionName = DIRECTION_RIGHT;
14489      }
14490
14491      if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE$1)) {
14492        this._isSliding = false;
14493        return;
14494      }
14495
14496      var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
14497
14498      if (slideEvent.isDefaultPrevented()) {
14499        return;
14500      }
14501
14502      if (!activeElement || !nextElement) {
14503        // Some weirdness is happening, so we bail
14504        return;
14505      }
14506
14507      this._isSliding = true;
14508
14509      if (isCycling) {
14510        this.pause();
14511      }
14512
14513      this._setActiveIndicatorElement(nextElement);
14514
14515      var slidEvent = $.Event(EVENT_SLID, {
14516        relatedTarget: nextElement,
14517        direction: eventDirectionName,
14518        from: activeElementIndex,
14519        to: nextElementIndex
14520      });
14521
14522      if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
14523        $(nextElement).addClass(orderClassName);
14524        Util.reflow(nextElement);
14525        $(activeElement).addClass(directionalClassName);
14526        $(nextElement).addClass(directionalClassName);
14527        var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
14528
14529        if (nextElementInterval) {
14530          this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
14531          this._config.interval = nextElementInterval;
14532        } else {
14533          this._config.interval = this._config.defaultInterval || this._config.interval;
14534        }
14535
14536        var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
14537        $(activeElement).one(Util.TRANSITION_END, function () {
14538          $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$1);
14539          $(activeElement).removeClass(CLASS_NAME_ACTIVE$1 + " " + orderClassName + " " + directionalClassName);
14540          _this4._isSliding = false;
14541          setTimeout(function () {
14542            return $(_this4._element).trigger(slidEvent);
14543          }, 0);
14544        }).emulateTransitionEnd(transitionDuration);
14545      } else {
14546        $(activeElement).removeClass(CLASS_NAME_ACTIVE$1);
14547        $(nextElement).addClass(CLASS_NAME_ACTIVE$1);
14548        this._isSliding = false;
14549        $(this._element).trigger(slidEvent);
14550      }
14551
14552      if (isCycling) {
14553        this.cycle();
14554      }
14555    } // Static
14556    ;
14557
14558    Carousel._jQueryInterface = function _jQueryInterface(config) {
14559      return this.each(function () {
14560        var data = $(this).data(DATA_KEY$2);
14561
14562        var _config = _extends({}, Default, $(this).data());
14563
14564        if (typeof config === 'object') {
14565          _config = _extends({}, _config, config);
14566        }
14567
14568        var action = typeof config === 'string' ? config : _config.slide;
14569
14570        if (!data) {
14571          data = new Carousel(this, _config);
14572          $(this).data(DATA_KEY$2, data);
14573        }
14574
14575        if (typeof config === 'number') {
14576          data.to(config);
14577        } else if (typeof action === 'string') {
14578          if (typeof data[action] === 'undefined') {
14579            throw new TypeError("No method named \"" + action + "\"");
14580          }
14581
14582          data[action]();
14583        } else if (_config.interval && _config.ride) {
14584          data.pause();
14585          data.cycle();
14586        }
14587      });
14588    };
14589
14590    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
14591      var selector = Util.getSelectorFromElement(this);
14592
14593      if (!selector) {
14594        return;
14595      }
14596
14597      var target = $(selector)[0];
14598
14599      if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
14600        return;
14601      }
14602
14603      var config = _extends({}, $(target).data(), $(this).data());
14604
14605      var slideIndex = this.getAttribute('data-slide-to');
14606
14607      if (slideIndex) {
14608        config.interval = false;
14609      }
14610
14611      Carousel._jQueryInterface.call($(target), config);
14612
14613      if (slideIndex) {
14614        $(target).data(DATA_KEY$2).to(slideIndex);
14615      }
14616
14617      event.preventDefault();
14618    };
14619
14620    _createClass(Carousel, null, [{
14621      key: "VERSION",
14622      get: function get() {
14623        return VERSION$2;
14624      }
14625    }, {
14626      key: "Default",
14627      get: function get() {
14628        return Default;
14629      }
14630    }]);
14631
14632    return Carousel;
14633  }();
14634  /**
14635   * ------------------------------------------------------------------------
14636   * Data Api implementation
14637   * ------------------------------------------------------------------------
14638   */
14639
14640
14641  $(document).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
14642  $(window).on(EVENT_LOAD_DATA_API$1, function () {
14643    var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
14644
14645    for (var i = 0, len = carousels.length; i < len; i++) {
14646      var $carousel = $(carousels[i]);
14647
14648      Carousel._jQueryInterface.call($carousel, $carousel.data());
14649    }
14650  });
14651  /**
14652   * ------------------------------------------------------------------------
14653   * jQuery
14654   * ------------------------------------------------------------------------
14655   */
14656
14657  $.fn[NAME$2] = Carousel._jQueryInterface;
14658  $.fn[NAME$2].Constructor = Carousel;
14659
14660  $.fn[NAME$2].noConflict = function () {
14661    $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
14662    return Carousel._jQueryInterface;
14663  };
14664
14665  /**
14666   * ------------------------------------------------------------------------
14667   * Constants
14668   * ------------------------------------------------------------------------
14669   */
14670
14671  var NAME$3 = 'collapse';
14672  var VERSION$3 = '4.5.2';
14673  var DATA_KEY$3 = 'bs.collapse';
14674  var EVENT_KEY$3 = "." + DATA_KEY$3;
14675  var DATA_API_KEY$3 = '.data-api';
14676  var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
14677  var Default$1 = {
14678    toggle: true,
14679    parent: ''
14680  };
14681  var DefaultType$1 = {
14682    toggle: 'boolean',
14683    parent: '(string|element)'
14684  };
14685  var EVENT_SHOW = "show" + EVENT_KEY$3;
14686  var EVENT_SHOWN = "shown" + EVENT_KEY$3;
14687  var EVENT_HIDE = "hide" + EVENT_KEY$3;
14688  var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
14689  var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
14690  var CLASS_NAME_SHOW$1 = 'show';
14691  var CLASS_NAME_COLLAPSE = 'collapse';
14692  var CLASS_NAME_COLLAPSING = 'collapsing';
14693  var CLASS_NAME_COLLAPSED = 'collapsed';
14694  var DIMENSION_WIDTH = 'width';
14695  var DIMENSION_HEIGHT = 'height';
14696  var SELECTOR_ACTIVES = '.show, .collapsing';
14697  var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="collapse"]';
14698  /**
14699   * ------------------------------------------------------------------------
14700   * Class Definition
14701   * ------------------------------------------------------------------------
14702   */
14703
14704  var Collapse = /*#__PURE__*/function () {
14705    function Collapse(element, config) {
14706      this._isTransitioning = false;
14707      this._element = element;
14708      this._config = this._getConfig(config);
14709      this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
14710      var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$1));
14711
14712      for (var i = 0, len = toggleList.length; i < len; i++) {
14713        var elem = toggleList[i];
14714        var selector = Util.getSelectorFromElement(elem);
14715        var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
14716          return foundElem === element;
14717        });
14718
14719        if (selector !== null && filterElement.length > 0) {
14720          this._selector = selector;
14721
14722          this._triggerArray.push(elem);
14723        }
14724      }
14725
14726      this._parent = this._config.parent ? this._getParent() : null;
14727
14728      if (!this._config.parent) {
14729        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
14730      }
14731
14732      if (this._config.toggle) {
14733        this.toggle();
14734      }
14735    } // Getters
14736
14737
14738    var _proto = Collapse.prototype;
14739
14740    // Public
14741    _proto.toggle = function toggle() {
14742      if ($(this._element).hasClass(CLASS_NAME_SHOW$1)) {
14743        this.hide();
14744      } else {
14745        this.show();
14746      }
14747    };
14748
14749    _proto.show = function show() {
14750      var _this = this;
14751
14752      if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW$1)) {
14753        return;
14754      }
14755
14756      var actives;
14757      var activesData;
14758
14759      if (this._parent) {
14760        actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
14761          if (typeof _this._config.parent === 'string') {
14762            return elem.getAttribute('data-parent') === _this._config.parent;
14763          }
14764
14765          return elem.classList.contains(CLASS_NAME_COLLAPSE);
14766        });
14767
14768        if (actives.length === 0) {
14769          actives = null;
14770        }
14771      }
14772
14773      if (actives) {
14774        activesData = $(actives).not(this._selector).data(DATA_KEY$3);
14775
14776        if (activesData && activesData._isTransitioning) {
14777          return;
14778        }
14779      }
14780
14781      var startEvent = $.Event(EVENT_SHOW);
14782      $(this._element).trigger(startEvent);
14783
14784      if (startEvent.isDefaultPrevented()) {
14785        return;
14786      }
14787
14788      if (actives) {
14789        Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
14790
14791        if (!activesData) {
14792          $(actives).data(DATA_KEY$3, null);
14793        }
14794      }
14795
14796      var dimension = this._getDimension();
14797
14798      $(this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
14799      this._element.style[dimension] = 0;
14800
14801      if (this._triggerArray.length) {
14802        $(this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
14803      }
14804
14805      this.setTransitioning(true);
14806
14807      var complete = function complete() {
14808        $(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
14809        _this._element.style[dimension] = '';
14810
14811        _this.setTransitioning(false);
14812
14813        $(_this._element).trigger(EVENT_SHOWN);
14814      };
14815
14816      var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
14817      var scrollSize = "scroll" + capitalizedDimension;
14818      var transitionDuration = Util.getTransitionDurationFromElement(this._element);
14819      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
14820      this._element.style[dimension] = this._element[scrollSize] + "px";
14821    };
14822
14823    _proto.hide = function hide() {
14824      var _this2 = this;
14825
14826      if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW$1)) {
14827        return;
14828      }
14829
14830      var startEvent = $.Event(EVENT_HIDE);
14831      $(this._element).trigger(startEvent);
14832
14833      if (startEvent.isDefaultPrevented()) {
14834        return;
14835      }
14836
14837      var dimension = this._getDimension();
14838
14839      this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
14840      Util.reflow(this._element);
14841      $(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
14842      var triggerArrayLength = this._triggerArray.length;
14843
14844      if (triggerArrayLength > 0) {
14845        for (var i = 0; i < triggerArrayLength; i++) {
14846          var trigger = this._triggerArray[i];
14847          var selector = Util.getSelectorFromElement(trigger);
14848
14849          if (selector !== null) {
14850            var $elem = $([].slice.call(document.querySelectorAll(selector)));
14851
14852            if (!$elem.hasClass(CLASS_NAME_SHOW$1)) {
14853              $(trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
14854            }
14855          }
14856        }
14857      }
14858
14859      this.setTransitioning(true);
14860
14861      var complete = function complete() {
14862        _this2.setTransitioning(false);
14863
14864        $(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
14865      };
14866
14867      this._element.style[dimension] = '';
14868      var transitionDuration = Util.getTransitionDurationFromElement(this._element);
14869      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
14870    };
14871
14872    _proto.setTransitioning = function setTransitioning(isTransitioning) {
14873      this._isTransitioning = isTransitioning;
14874    };
14875
14876    _proto.dispose = function dispose() {
14877      $.removeData(this._element, DATA_KEY$3);
14878      this._config = null;
14879      this._parent = null;
14880      this._element = null;
14881      this._triggerArray = null;
14882      this._isTransitioning = null;
14883    } // Private
14884    ;
14885
14886    _proto._getConfig = function _getConfig(config) {
14887      config = _extends({}, Default$1, config);
14888      config.toggle = Boolean(config.toggle); // Coerce string values
14889
14890      Util.typeCheckConfig(NAME$3, config, DefaultType$1);
14891      return config;
14892    };
14893
14894    _proto._getDimension = function _getDimension() {
14895      var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH);
14896      return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
14897    };
14898
14899    _proto._getParent = function _getParent() {
14900      var _this3 = this;
14901
14902      var parent;
14903
14904      if (Util.isElement(this._config.parent)) {
14905        parent = this._config.parent; // It's a jQuery object
14906
14907        if (typeof this._config.parent.jquery !== 'undefined') {
14908          parent = this._config.parent[0];
14909        }
14910      } else {
14911        parent = document.querySelector(this._config.parent);
14912      }
14913
14914      var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
14915      var children = [].slice.call(parent.querySelectorAll(selector));
14916      $(children).each(function (i, element) {
14917        _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
14918      });
14919      return parent;
14920    };
14921
14922    _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
14923      var isOpen = $(element).hasClass(CLASS_NAME_SHOW$1);
14924
14925      if (triggerArray.length) {
14926        $(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
14927      }
14928    } // Static
14929    ;
14930
14931    Collapse._getTargetFromElement = function _getTargetFromElement(element) {
14932      var selector = Util.getSelectorFromElement(element);
14933      return selector ? document.querySelector(selector) : null;
14934    };
14935
14936    Collapse._jQueryInterface = function _jQueryInterface(config) {
14937      return this.each(function () {
14938        var $this = $(this);
14939        var data = $this.data(DATA_KEY$3);
14940
14941        var _config = _extends({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
14942
14943        if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
14944          _config.toggle = false;
14945        }
14946
14947        if (!data) {
14948          data = new Collapse(this, _config);
14949          $this.data(DATA_KEY$3, data);
14950        }
14951
14952        if (typeof config === 'string') {
14953          if (typeof data[config] === 'undefined') {
14954            throw new TypeError("No method named \"" + config + "\"");
14955          }
14956
14957          data[config]();
14958        }
14959      });
14960    };
14961
14962    _createClass(Collapse, null, [{
14963      key: "VERSION",
14964      get: function get() {
14965        return VERSION$3;
14966      }
14967    }, {
14968      key: "Default",
14969      get: function get() {
14970        return Default$1;
14971      }
14972    }]);
14973
14974    return Collapse;
14975  }();
14976  /**
14977   * ------------------------------------------------------------------------
14978   * Data Api implementation
14979   * ------------------------------------------------------------------------
14980   */
14981
14982
14983  $(document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
14984    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
14985    if (event.currentTarget.tagName === 'A') {
14986      event.preventDefault();
14987    }
14988
14989    var $trigger = $(this);
14990    var selector = Util.getSelectorFromElement(this);
14991    var selectors = [].slice.call(document.querySelectorAll(selector));
14992    $(selectors).each(function () {
14993      var $target = $(this);
14994      var data = $target.data(DATA_KEY$3);
14995      var config = data ? 'toggle' : $trigger.data();
14996
14997      Collapse._jQueryInterface.call($target, config);
14998    });
14999  });
15000  /**
15001   * ------------------------------------------------------------------------
15002   * jQuery
15003   * ------------------------------------------------------------------------
15004   */
15005
15006  $.fn[NAME$3] = Collapse._jQueryInterface;
15007  $.fn[NAME$3].Constructor = Collapse;
15008
15009  $.fn[NAME$3].noConflict = function () {
15010    $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
15011    return Collapse._jQueryInterface;
15012  };
15013
15014  /**
15015   * ------------------------------------------------------------------------
15016   * Constants
15017   * ------------------------------------------------------------------------
15018   */
15019
15020  var NAME$4 = 'dropdown';
15021  var VERSION$4 = '4.5.2';
15022  var DATA_KEY$4 = 'bs.dropdown';
15023  var EVENT_KEY$4 = "." + DATA_KEY$4;
15024  var DATA_API_KEY$4 = '.data-api';
15025  var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
15026  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
15027
15028  var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
15029
15030  var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
15031
15032  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
15033
15034  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
15035
15036  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
15037
15038  var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
15039  var EVENT_HIDE$1 = "hide" + EVENT_KEY$4;
15040  var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4;
15041  var EVENT_SHOW$1 = "show" + EVENT_KEY$4;
15042  var EVENT_SHOWN$1 = "shown" + EVENT_KEY$4;
15043  var EVENT_CLICK = "click" + EVENT_KEY$4;
15044  var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$4 + DATA_API_KEY$4;
15045  var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
15046  var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
15047  var CLASS_NAME_DISABLED = 'disabled';
15048  var CLASS_NAME_SHOW$2 = 'show';
15049  var CLASS_NAME_DROPUP = 'dropup';
15050  var CLASS_NAME_DROPRIGHT = 'dropright';
15051  var CLASS_NAME_DROPLEFT = 'dropleft';
15052  var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
15053  var CLASS_NAME_POSITION_STATIC = 'position-static';
15054  var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
15055  var SELECTOR_FORM_CHILD = '.dropdown form';
15056  var SELECTOR_MENU = '.dropdown-menu';
15057  var SELECTOR_NAVBAR_NAV = '.navbar-nav';
15058  var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
15059  var PLACEMENT_TOP = 'top-start';
15060  var PLACEMENT_TOPEND = 'top-end';
15061  var PLACEMENT_BOTTOM = 'bottom-start';
15062  var PLACEMENT_BOTTOMEND = 'bottom-end';
15063  var PLACEMENT_RIGHT = 'right-start';
15064  var PLACEMENT_LEFT = 'left-start';
15065  var Default$2 = {
15066    offset: 0,
15067    flip: true,
15068    boundary: 'scrollParent',
15069    reference: 'toggle',
15070    display: 'dynamic',
15071    popperConfig: null
15072  };
15073  var DefaultType$2 = {
15074    offset: '(number|string|function)',
15075    flip: 'boolean',
15076    boundary: '(string|element)',
15077    reference: '(string|element)',
15078    display: 'string',
15079    popperConfig: '(null|object)'
15080  };
15081  /**
15082   * ------------------------------------------------------------------------
15083   * Class Definition
15084   * ------------------------------------------------------------------------
15085   */
15086
15087  var Dropdown = /*#__PURE__*/function () {
15088    function Dropdown(element, config) {
15089      this._element = element;
15090      this._popper = null;
15091      this._config = this._getConfig(config);
15092      this._menu = this._getMenuElement();
15093      this._inNavbar = this._detectNavbar();
15094
15095      this._addEventListeners();
15096    } // Getters
15097
15098
15099    var _proto = Dropdown.prototype;
15100
15101    // Public
15102    _proto.toggle = function toggle() {
15103      if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
15104        return;
15105      }
15106
15107      var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW$2);
15108
15109      Dropdown._clearMenus();
15110
15111      if (isActive) {
15112        return;
15113      }
15114
15115      this.show(true);
15116    };
15117
15118    _proto.show = function show(usePopper) {
15119      if (usePopper === void 0) {
15120        usePopper = false;
15121      }
15122
15123      if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW$2)) {
15124        return;
15125      }
15126
15127      var relatedTarget = {
15128        relatedTarget: this._element
15129      };
15130      var showEvent = $.Event(EVENT_SHOW$1, relatedTarget);
15131
15132      var parent = Dropdown._getParentFromElement(this._element);
15133
15134      $(parent).trigger(showEvent);
15135
15136      if (showEvent.isDefaultPrevented()) {
15137        return;
15138      } // Disable totally Popper.js for Dropdown in Navbar
15139
15140
15141      if (!this._inNavbar && usePopper) {
15142        /**
15143         * Check for Popper dependency
15144         * Popper - https://popper.js.org
15145         */
15146        if (typeof Popper === 'undefined') {
15147          throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
15148        }
15149
15150        var referenceElement = this._element;
15151
15152        if (this._config.reference === 'parent') {
15153          referenceElement = parent;
15154        } else if (Util.isElement(this._config.reference)) {
15155          referenceElement = this._config.reference; // Check if it's jQuery element
15156
15157          if (typeof this._config.reference.jquery !== 'undefined') {
15158            referenceElement = this._config.reference[0];
15159          }
15160        } // If boundary is not `scrollParent`, then set position to `static`
15161        // to allow the menu to "escape" the scroll parent's boundaries
15162        // https://github.com/twbs/bootstrap/issues/24251
15163
15164
15165        if (this._config.boundary !== 'scrollParent') {
15166          $(parent).addClass(CLASS_NAME_POSITION_STATIC);
15167        }
15168
15169        this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
15170      } // If this is a touch-enabled device we add extra
15171      // empty mouseover listeners to the body's immediate children;
15172      // only needed because of broken event delegation on iOS
15173      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
15174
15175
15176      if ('ontouchstart' in document.documentElement && $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
15177        $(document.body).children().on('mouseover', null, $.noop);
15178      }
15179
15180      this._element.focus();
15181
15182      this._element.setAttribute('aria-expanded', true);
15183
15184      $(this._menu).toggleClass(CLASS_NAME_SHOW$2);
15185      $(parent).toggleClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_SHOWN$1, relatedTarget));
15186    };
15187
15188    _proto.hide = function hide() {
15189      if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW$2)) {
15190        return;
15191      }
15192
15193      var relatedTarget = {
15194        relatedTarget: this._element
15195      };
15196      var hideEvent = $.Event(EVENT_HIDE$1, relatedTarget);
15197
15198      var parent = Dropdown._getParentFromElement(this._element);
15199
15200      $(parent).trigger(hideEvent);
15201
15202      if (hideEvent.isDefaultPrevented()) {
15203        return;
15204      }
15205
15206      if (this._popper) {
15207        this._popper.destroy();
15208      }
15209
15210      $(this._menu).toggleClass(CLASS_NAME_SHOW$2);
15211      $(parent).toggleClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_HIDDEN$1, relatedTarget));
15212    };
15213
15214    _proto.dispose = function dispose() {
15215      $.removeData(this._element, DATA_KEY$4);
15216      $(this._element).off(EVENT_KEY$4);
15217      this._element = null;
15218      this._menu = null;
15219
15220      if (this._popper !== null) {
15221        this._popper.destroy();
15222
15223        this._popper = null;
15224      }
15225    };
15226
15227    _proto.update = function update() {
15228      this._inNavbar = this._detectNavbar();
15229
15230      if (this._popper !== null) {
15231        this._popper.scheduleUpdate();
15232      }
15233    } // Private
15234    ;
15235
15236    _proto._addEventListeners = function _addEventListeners() {
15237      var _this = this;
15238
15239      $(this._element).on(EVENT_CLICK, function (event) {
15240        event.preventDefault();
15241        event.stopPropagation();
15242
15243        _this.toggle();
15244      });
15245    };
15246
15247    _proto._getConfig = function _getConfig(config) {
15248      config = _extends({}, this.constructor.Default, $(this._element).data(), config);
15249      Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
15250      return config;
15251    };
15252
15253    _proto._getMenuElement = function _getMenuElement() {
15254      if (!this._menu) {
15255        var parent = Dropdown._getParentFromElement(this._element);
15256
15257        if (parent) {
15258          this._menu = parent.querySelector(SELECTOR_MENU);
15259        }
15260      }
15261
15262      return this._menu;
15263    };
15264
15265    _proto._getPlacement = function _getPlacement() {
15266      var $parentDropdown = $(this._element.parentNode);
15267      var placement = PLACEMENT_BOTTOM; // Handle dropup
15268
15269      if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
15270        placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
15271      } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
15272        placement = PLACEMENT_RIGHT;
15273      } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
15274        placement = PLACEMENT_LEFT;
15275      } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
15276        placement = PLACEMENT_BOTTOMEND;
15277      }
15278
15279      return placement;
15280    };
15281
15282    _proto._detectNavbar = function _detectNavbar() {
15283      return $(this._element).closest('.navbar').length > 0;
15284    };
15285
15286    _proto._getOffset = function _getOffset() {
15287      var _this2 = this;
15288
15289      var offset = {};
15290
15291      if (typeof this._config.offset === 'function') {
15292        offset.fn = function (data) {
15293          data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
15294          return data;
15295        };
15296      } else {
15297        offset.offset = this._config.offset;
15298      }
15299
15300      return offset;
15301    };
15302
15303    _proto._getPopperConfig = function _getPopperConfig() {
15304      var popperConfig = {
15305        placement: this._getPlacement(),
15306        modifiers: {
15307          offset: this._getOffset(),
15308          flip: {
15309            enabled: this._config.flip
15310          },
15311          preventOverflow: {
15312            boundariesElement: this._config.boundary
15313          }
15314        }
15315      }; // Disable Popper.js if we have a static display
15316
15317      if (this._config.display === 'static') {
15318        popperConfig.modifiers.applyStyle = {
15319          enabled: false
15320        };
15321      }
15322
15323      return _extends({}, popperConfig, this._config.popperConfig);
15324    } // Static
15325    ;
15326
15327    Dropdown._jQueryInterface = function _jQueryInterface(config) {
15328      return this.each(function () {
15329        var data = $(this).data(DATA_KEY$4);
15330
15331        var _config = typeof config === 'object' ? config : null;
15332
15333        if (!data) {
15334          data = new Dropdown(this, _config);
15335          $(this).data(DATA_KEY$4, data);
15336        }
15337
15338        if (typeof config === 'string') {
15339          if (typeof data[config] === 'undefined') {
15340            throw new TypeError("No method named \"" + config + "\"");
15341          }
15342
15343          data[config]();
15344        }
15345      });
15346    };
15347
15348    Dropdown._clearMenus = function _clearMenus(event) {
15349      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
15350        return;
15351      }
15352
15353      var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
15354
15355      for (var i = 0, len = toggles.length; i < len; i++) {
15356        var parent = Dropdown._getParentFromElement(toggles[i]);
15357
15358        var context = $(toggles[i]).data(DATA_KEY$4);
15359        var relatedTarget = {
15360          relatedTarget: toggles[i]
15361        };
15362
15363        if (event && event.type === 'click') {
15364          relatedTarget.clickEvent = event;
15365        }
15366
15367        if (!context) {
15368          continue;
15369        }
15370
15371        var dropdownMenu = context._menu;
15372
15373        if (!$(parent).hasClass(CLASS_NAME_SHOW$2)) {
15374          continue;
15375        }
15376
15377        if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
15378          continue;
15379        }
15380
15381        var hideEvent = $.Event(EVENT_HIDE$1, relatedTarget);
15382        $(parent).trigger(hideEvent);
15383
15384        if (hideEvent.isDefaultPrevented()) {
15385          continue;
15386        } // If this is a touch-enabled device we remove the extra
15387        // empty mouseover listeners we added for iOS support
15388
15389
15390        if ('ontouchstart' in document.documentElement) {
15391          $(document.body).children().off('mouseover', null, $.noop);
15392        }
15393
15394        toggles[i].setAttribute('aria-expanded', 'false');
15395
15396        if (context._popper) {
15397          context._popper.destroy();
15398        }
15399
15400        $(dropdownMenu).removeClass(CLASS_NAME_SHOW$2);
15401        $(parent).removeClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_HIDDEN$1, relatedTarget));
15402      }
15403    };
15404
15405    Dropdown._getParentFromElement = function _getParentFromElement(element) {
15406      var parent;
15407      var selector = Util.getSelectorFromElement(element);
15408
15409      if (selector) {
15410        parent = document.querySelector(selector);
15411      }
15412
15413      return parent || element.parentNode;
15414    } // eslint-disable-next-line complexity
15415    ;
15416
15417    Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
15418      // If not input/textarea:
15419      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
15420      // If input/textarea:
15421      //  - If space key => not a dropdown command
15422      //  - If key is other than escape
15423      //    - If key is not up or down => not a dropdown command
15424      //    - If trigger inside the menu => not a dropdown command
15425      if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
15426        return;
15427      }
15428
15429      if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
15430        return;
15431      }
15432
15433      var parent = Dropdown._getParentFromElement(this);
15434
15435      var isActive = $(parent).hasClass(CLASS_NAME_SHOW$2);
15436
15437      if (!isActive && event.which === ESCAPE_KEYCODE) {
15438        return;
15439      }
15440
15441      event.preventDefault();
15442      event.stopPropagation();
15443
15444      if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
15445        if (event.which === ESCAPE_KEYCODE) {
15446          $(parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
15447        }
15448
15449        $(this).trigger('click');
15450        return;
15451      }
15452
15453      var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
15454        return $(item).is(':visible');
15455      });
15456
15457      if (items.length === 0) {
15458        return;
15459      }
15460
15461      var index = items.indexOf(event.target);
15462
15463      if (event.which === ARROW_UP_KEYCODE && index > 0) {
15464        // Up
15465        index--;
15466      }
15467
15468      if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
15469        // Down
15470        index++;
15471      }
15472
15473      if (index < 0) {
15474        index = 0;
15475      }
15476
15477      items[index].focus();
15478    };
15479
15480    _createClass(Dropdown, null, [{
15481      key: "VERSION",
15482      get: function get() {
15483        return VERSION$4;
15484      }
15485    }, {
15486      key: "Default",
15487      get: function get() {
15488        return Default$2;
15489      }
15490    }, {
15491      key: "DefaultType",
15492      get: function get() {
15493        return DefaultType$2;
15494      }
15495    }]);
15496
15497    return Dropdown;
15498  }();
15499  /**
15500   * ------------------------------------------------------------------------
15501   * Data Api implementation
15502   * ------------------------------------------------------------------------
15503   */
15504
15505
15506  $(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$4 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
15507    event.preventDefault();
15508    event.stopPropagation();
15509
15510    Dropdown._jQueryInterface.call($(this), 'toggle');
15511  }).on(EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
15512    e.stopPropagation();
15513  });
15514  /**
15515   * ------------------------------------------------------------------------
15516   * jQuery
15517   * ------------------------------------------------------------------------
15518   */
15519
15520  $.fn[NAME$4] = Dropdown._jQueryInterface;
15521  $.fn[NAME$4].Constructor = Dropdown;
15522
15523  $.fn[NAME$4].noConflict = function () {
15524    $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
15525    return Dropdown._jQueryInterface;
15526  };
15527
15528  /**
15529   * ------------------------------------------------------------------------
15530   * Constants
15531   * ------------------------------------------------------------------------
15532   */
15533
15534  var NAME$5 = 'modal';
15535  var VERSION$5 = '4.5.2';
15536  var DATA_KEY$5 = 'bs.modal';
15537  var EVENT_KEY$5 = "." + DATA_KEY$5;
15538  var DATA_API_KEY$5 = '.data-api';
15539  var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
15540  var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
15541
15542  var Default$3 = {
15543    backdrop: true,
15544    keyboard: true,
15545    focus: true,
15546    show: true
15547  };
15548  var DefaultType$3 = {
15549    backdrop: '(boolean|string)',
15550    keyboard: 'boolean',
15551    focus: 'boolean',
15552    show: 'boolean'
15553  };
15554  var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
15555  var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
15556  var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
15557  var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
15558  var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
15559  var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
15560  var EVENT_RESIZE = "resize" + EVENT_KEY$5;
15561  var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$5;
15562  var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
15563  var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
15564  var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
15565  var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5;
15566  var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
15567  var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
15568  var CLASS_NAME_BACKDROP = 'modal-backdrop';
15569  var CLASS_NAME_OPEN = 'modal-open';
15570  var CLASS_NAME_FADE$1 = 'fade';
15571  var CLASS_NAME_SHOW$3 = 'show';
15572  var CLASS_NAME_STATIC = 'modal-static';
15573  var SELECTOR_DIALOG = '.modal-dialog';
15574  var SELECTOR_MODAL_BODY = '.modal-body';
15575  var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="modal"]';
15576  var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
15577  var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
15578  var SELECTOR_STICKY_CONTENT = '.sticky-top';
15579  /**
15580   * ------------------------------------------------------------------------
15581   * Class Definition
15582   * ------------------------------------------------------------------------
15583   */
15584
15585  var Modal = /*#__PURE__*/function () {
15586    function Modal(element, config) {
15587      this._config = this._getConfig(config);
15588      this._element = element;
15589      this._dialog = element.querySelector(SELECTOR_DIALOG);
15590      this._backdrop = null;
15591      this._isShown = false;
15592      this._isBodyOverflowing = false;
15593      this._ignoreBackdropClick = false;
15594      this._isTransitioning = false;
15595      this._scrollbarWidth = 0;
15596    } // Getters
15597
15598
15599    var _proto = Modal.prototype;
15600
15601    // Public
15602    _proto.toggle = function toggle(relatedTarget) {
15603      return this._isShown ? this.hide() : this.show(relatedTarget);
15604    };
15605
15606    _proto.show = function show(relatedTarget) {
15607      var _this = this;
15608
15609      if (this._isShown || this._isTransitioning) {
15610        return;
15611      }
15612
15613      if ($(this._element).hasClass(CLASS_NAME_FADE$1)) {
15614        this._isTransitioning = true;
15615      }
15616
15617      var showEvent = $.Event(EVENT_SHOW$2, {
15618        relatedTarget: relatedTarget
15619      });
15620      $(this._element).trigger(showEvent);
15621
15622      if (this._isShown || showEvent.isDefaultPrevented()) {
15623        return;
15624      }
15625
15626      this._isShown = true;
15627
15628      this._checkScrollbar();
15629
15630      this._setScrollbar();
15631
15632      this._adjustDialog();
15633
15634      this._setEscapeEvent();
15635
15636      this._setResizeEvent();
15637
15638      $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
15639        return _this.hide(event);
15640      });
15641      $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
15642        $(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
15643          if ($(event.target).is(_this._element)) {
15644            _this._ignoreBackdropClick = true;
15645          }
15646        });
15647      });
15648
15649      this._showBackdrop(function () {
15650        return _this._showElement(relatedTarget);
15651      });
15652    };
15653
15654    _proto.hide = function hide(event) {
15655      var _this2 = this;
15656
15657      if (event) {
15658        event.preventDefault();
15659      }
15660
15661      if (!this._isShown || this._isTransitioning) {
15662        return;
15663      }
15664
15665      var hideEvent = $.Event(EVENT_HIDE$2);
15666      $(this._element).trigger(hideEvent);
15667
15668      if (!this._isShown || hideEvent.isDefaultPrevented()) {
15669        return;
15670      }
15671
15672      this._isShown = false;
15673      var transition = $(this._element).hasClass(CLASS_NAME_FADE$1);
15674
15675      if (transition) {
15676        this._isTransitioning = true;
15677      }
15678
15679      this._setEscapeEvent();
15680
15681      this._setResizeEvent();
15682
15683      $(document).off(EVENT_FOCUSIN);
15684      $(this._element).removeClass(CLASS_NAME_SHOW$3);
15685      $(this._element).off(EVENT_CLICK_DISMISS);
15686      $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
15687
15688      if (transition) {
15689        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
15690        $(this._element).one(Util.TRANSITION_END, function (event) {
15691          return _this2._hideModal(event);
15692        }).emulateTransitionEnd(transitionDuration);
15693      } else {
15694        this._hideModal();
15695      }
15696    };
15697
15698    _proto.dispose = function dispose() {
15699      [window, this._element, this._dialog].forEach(function (htmlElement) {
15700        return $(htmlElement).off(EVENT_KEY$5);
15701      });
15702      /**
15703       * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
15704       * Do not move `document` in `htmlElements` array
15705       * It will remove `EVENT_CLICK_DATA_API` event that should remain
15706       */
15707
15708      $(document).off(EVENT_FOCUSIN);
15709      $.removeData(this._element, DATA_KEY$5);
15710      this._config = null;
15711      this._element = null;
15712      this._dialog = null;
15713      this._backdrop = null;
15714      this._isShown = null;
15715      this._isBodyOverflowing = null;
15716      this._ignoreBackdropClick = null;
15717      this._isTransitioning = null;
15718      this._scrollbarWidth = null;
15719    };
15720
15721    _proto.handleUpdate = function handleUpdate() {
15722      this._adjustDialog();
15723    } // Private
15724    ;
15725
15726    _proto._getConfig = function _getConfig(config) {
15727      config = _extends({}, Default$3, config);
15728      Util.typeCheckConfig(NAME$5, config, DefaultType$3);
15729      return config;
15730    };
15731
15732    _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
15733      var _this3 = this;
15734
15735      if (this._config.backdrop === 'static') {
15736        var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED);
15737        $(this._element).trigger(hideEventPrevented);
15738
15739        if (hideEventPrevented.defaultPrevented) {
15740          return;
15741        }
15742
15743        var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
15744
15745        if (!isModalOverflowing) {
15746          this._element.style.overflowY = 'hidden';
15747        }
15748
15749        this._element.classList.add(CLASS_NAME_STATIC);
15750
15751        var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
15752        $(this._element).off(Util.TRANSITION_END);
15753        $(this._element).one(Util.TRANSITION_END, function () {
15754          _this3._element.classList.remove(CLASS_NAME_STATIC);
15755
15756          if (!isModalOverflowing) {
15757            $(_this3._element).one(Util.TRANSITION_END, function () {
15758              _this3._element.style.overflowY = '';
15759            }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
15760          }
15761        }).emulateTransitionEnd(modalTransitionDuration);
15762
15763        this._element.focus();
15764      } else {
15765        this.hide();
15766      }
15767    };
15768
15769    _proto._showElement = function _showElement(relatedTarget) {
15770      var _this4 = this;
15771
15772      var transition = $(this._element).hasClass(CLASS_NAME_FADE$1);
15773      var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
15774
15775      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
15776        // Don't move modal's DOM position
15777        document.body.appendChild(this._element);
15778      }
15779
15780      this._element.style.display = 'block';
15781
15782      this._element.removeAttribute('aria-hidden');
15783
15784      this._element.setAttribute('aria-modal', true);
15785
15786      this._element.setAttribute('role', 'dialog');
15787
15788      if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
15789        modalBody.scrollTop = 0;
15790      } else {
15791        this._element.scrollTop = 0;
15792      }
15793
15794      if (transition) {
15795        Util.reflow(this._element);
15796      }
15797
15798      $(this._element).addClass(CLASS_NAME_SHOW$3);
15799
15800      if (this._config.focus) {
15801        this._enforceFocus();
15802      }
15803
15804      var shownEvent = $.Event(EVENT_SHOWN$2, {
15805        relatedTarget: relatedTarget
15806      });
15807
15808      var transitionComplete = function transitionComplete() {
15809        if (_this4._config.focus) {
15810          _this4._element.focus();
15811        }
15812
15813        _this4._isTransitioning = false;
15814        $(_this4._element).trigger(shownEvent);
15815      };
15816
15817      if (transition) {
15818        var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
15819        $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
15820      } else {
15821        transitionComplete();
15822      }
15823    };
15824
15825    _proto._enforceFocus = function _enforceFocus() {
15826      var _this5 = this;
15827
15828      $(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
15829      .on(EVENT_FOCUSIN, function (event) {
15830        if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
15831          _this5._element.focus();
15832        }
15833      });
15834    };
15835
15836    _proto._setEscapeEvent = function _setEscapeEvent() {
15837      var _this6 = this;
15838
15839      if (this._isShown) {
15840        $(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
15841          if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
15842            event.preventDefault();
15843
15844            _this6.hide();
15845          } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
15846            _this6._triggerBackdropTransition();
15847          }
15848        });
15849      } else if (!this._isShown) {
15850        $(this._element).off(EVENT_KEYDOWN_DISMISS);
15851      }
15852    };
15853
15854    _proto._setResizeEvent = function _setResizeEvent() {
15855      var _this7 = this;
15856
15857      if (this._isShown) {
15858        $(window).on(EVENT_RESIZE, function (event) {
15859          return _this7.handleUpdate(event);
15860        });
15861      } else {
15862        $(window).off(EVENT_RESIZE);
15863      }
15864    };
15865
15866    _proto._hideModal = function _hideModal() {
15867      var _this8 = this;
15868
15869      this._element.style.display = 'none';
15870
15871      this._element.setAttribute('aria-hidden', true);
15872
15873      this._element.removeAttribute('aria-modal');
15874
15875      this._element.removeAttribute('role');
15876
15877      this._isTransitioning = false;
15878
15879      this._showBackdrop(function () {
15880        $(document.body).removeClass(CLASS_NAME_OPEN);
15881
15882        _this8._resetAdjustments();
15883
15884        _this8._resetScrollbar();
15885
15886        $(_this8._element).trigger(EVENT_HIDDEN$2);
15887      });
15888    };
15889
15890    _proto._removeBackdrop = function _removeBackdrop() {
15891      if (this._backdrop) {
15892        $(this._backdrop).remove();
15893        this._backdrop = null;
15894      }
15895    };
15896
15897    _proto._showBackdrop = function _showBackdrop(callback) {
15898      var _this9 = this;
15899
15900      var animate = $(this._element).hasClass(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : '';
15901
15902      if (this._isShown && this._config.backdrop) {
15903        this._backdrop = document.createElement('div');
15904        this._backdrop.className = CLASS_NAME_BACKDROP;
15905
15906        if (animate) {
15907          this._backdrop.classList.add(animate);
15908        }
15909
15910        $(this._backdrop).appendTo(document.body);
15911        $(this._element).on(EVENT_CLICK_DISMISS, function (event) {
15912          if (_this9._ignoreBackdropClick) {
15913            _this9._ignoreBackdropClick = false;
15914            return;
15915          }
15916
15917          if (event.target !== event.currentTarget) {
15918            return;
15919          }
15920
15921          _this9._triggerBackdropTransition();
15922        });
15923
15924        if (animate) {
15925          Util.reflow(this._backdrop);
15926        }
15927
15928        $(this._backdrop).addClass(CLASS_NAME_SHOW$3);
15929
15930        if (!callback) {
15931          return;
15932        }
15933
15934        if (!animate) {
15935          callback();
15936          return;
15937        }
15938
15939        var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
15940        $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
15941      } else if (!this._isShown && this._backdrop) {
15942        $(this._backdrop).removeClass(CLASS_NAME_SHOW$3);
15943
15944        var callbackRemove = function callbackRemove() {
15945          _this9._removeBackdrop();
15946
15947          if (callback) {
15948            callback();
15949          }
15950        };
15951
15952        if ($(this._element).hasClass(CLASS_NAME_FADE$1)) {
15953          var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
15954
15955          $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
15956        } else {
15957          callbackRemove();
15958        }
15959      } else if (callback) {
15960        callback();
15961      }
15962    } // ----------------------------------------------------------------------
15963    // the following methods are used to handle overflowing modals
15964    // todo (fat): these should probably be refactored out of modal.js
15965    // ----------------------------------------------------------------------
15966    ;
15967
15968    _proto._adjustDialog = function _adjustDialog() {
15969      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
15970
15971      if (!this._isBodyOverflowing && isModalOverflowing) {
15972        this._element.style.paddingLeft = this._scrollbarWidth + "px";
15973      }
15974
15975      if (this._isBodyOverflowing && !isModalOverflowing) {
15976        this._element.style.paddingRight = this._scrollbarWidth + "px";
15977      }
15978    };
15979
15980    _proto._resetAdjustments = function _resetAdjustments() {
15981      this._element.style.paddingLeft = '';
15982      this._element.style.paddingRight = '';
15983    };
15984
15985    _proto._checkScrollbar = function _checkScrollbar() {
15986      var rect = document.body.getBoundingClientRect();
15987      this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
15988      this._scrollbarWidth = this._getScrollbarWidth();
15989    };
15990
15991    _proto._setScrollbar = function _setScrollbar() {
15992      var _this10 = this;
15993
15994      if (this._isBodyOverflowing) {
15995        // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
15996        //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
15997        var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
15998        var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
15999
16000        $(fixedContent).each(function (index, element) {
16001          var actualPadding = element.style.paddingRight;
16002          var calculatedPadding = $(element).css('padding-right');
16003          $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
16004        }); // Adjust sticky content margin
16005
16006        $(stickyContent).each(function (index, element) {
16007          var actualMargin = element.style.marginRight;
16008          var calculatedMargin = $(element).css('margin-right');
16009          $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
16010        }); // Adjust body padding
16011
16012        var actualPadding = document.body.style.paddingRight;
16013        var calculatedPadding = $(document.body).css('padding-right');
16014        $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
16015      }
16016
16017      $(document.body).addClass(CLASS_NAME_OPEN);
16018    };
16019
16020    _proto._resetScrollbar = function _resetScrollbar() {
16021      // Restore fixed content padding
16022      var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
16023      $(fixedContent).each(function (index, element) {
16024        var padding = $(element).data('padding-right');
16025        $(element).removeData('padding-right');
16026        element.style.paddingRight = padding ? padding : '';
16027      }); // Restore sticky content
16028
16029      var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
16030      $(elements).each(function (index, element) {
16031        var margin = $(element).data('margin-right');
16032
16033        if (typeof margin !== 'undefined') {
16034          $(element).css('margin-right', margin).removeData('margin-right');
16035        }
16036      }); // Restore body padding
16037
16038      var padding = $(document.body).data('padding-right');
16039      $(document.body).removeData('padding-right');
16040      document.body.style.paddingRight = padding ? padding : '';
16041    };
16042
16043    _proto._getScrollbarWidth = function _getScrollbarWidth() {
16044      // thx d.walsh
16045      var scrollDiv = document.createElement('div');
16046      scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
16047      document.body.appendChild(scrollDiv);
16048      var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
16049      document.body.removeChild(scrollDiv);
16050      return scrollbarWidth;
16051    } // Static
16052    ;
16053
16054    Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
16055      return this.each(function () {
16056        var data = $(this).data(DATA_KEY$5);
16057
16058        var _config = _extends({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
16059
16060        if (!data) {
16061          data = new Modal(this, _config);
16062          $(this).data(DATA_KEY$5, data);
16063        }
16064
16065        if (typeof config === 'string') {
16066          if (typeof data[config] === 'undefined') {
16067            throw new TypeError("No method named \"" + config + "\"");
16068          }
16069
16070          data[config](relatedTarget);
16071        } else if (_config.show) {
16072          data.show(relatedTarget);
16073        }
16074      });
16075    };
16076
16077    _createClass(Modal, null, [{
16078      key: "VERSION",
16079      get: function get() {
16080        return VERSION$5;
16081      }
16082    }, {
16083      key: "Default",
16084      get: function get() {
16085        return Default$3;
16086      }
16087    }]);
16088
16089    return Modal;
16090  }();
16091  /**
16092   * ------------------------------------------------------------------------
16093   * Data Api implementation
16094   * ------------------------------------------------------------------------
16095   */
16096
16097
16098  $(document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
16099    var _this11 = this;
16100
16101    var target;
16102    var selector = Util.getSelectorFromElement(this);
16103
16104    if (selector) {
16105      target = document.querySelector(selector);
16106    }
16107
16108    var config = $(target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
16109
16110    if (this.tagName === 'A' || this.tagName === 'AREA') {
16111      event.preventDefault();
16112    }
16113
16114    var $target = $(target).one(EVENT_SHOW$2, function (showEvent) {
16115      if (showEvent.isDefaultPrevented()) {
16116        // Only register focus restorer if modal will actually get shown
16117        return;
16118      }
16119
16120      $target.one(EVENT_HIDDEN$2, function () {
16121        if ($(_this11).is(':visible')) {
16122          _this11.focus();
16123        }
16124      });
16125    });
16126
16127    Modal._jQueryInterface.call($(target), config, this);
16128  });
16129  /**
16130   * ------------------------------------------------------------------------
16131   * jQuery
16132   * ------------------------------------------------------------------------
16133   */
16134
16135  $.fn[NAME$5] = Modal._jQueryInterface;
16136  $.fn[NAME$5].Constructor = Modal;
16137
16138  $.fn[NAME$5].noConflict = function () {
16139    $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
16140    return Modal._jQueryInterface;
16141  };
16142
16143  /**
16144   * --------------------------------------------------------------------------
16145   * Bootstrap (v4.5.2): tools/sanitizer.js
16146   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16147   * --------------------------------------------------------------------------
16148   */
16149  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
16150  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
16151  var DefaultWhitelist = {
16152    // Global attributes allowed on any supplied element below.
16153    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
16154    a: ['target', 'href', 'title', 'rel'],
16155    area: [],
16156    b: [],
16157    br: [],
16158    col: [],
16159    code: [],
16160    div: [],
16161    em: [],
16162    hr: [],
16163    h1: [],
16164    h2: [],
16165    h3: [],
16166    h4: [],
16167    h5: [],
16168    h6: [],
16169    i: [],
16170    img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
16171    li: [],
16172    ol: [],
16173    p: [],
16174    pre: [],
16175    s: [],
16176    small: [],
16177    span: [],
16178    sub: [],
16179    sup: [],
16180    strong: [],
16181    u: [],
16182    ul: []
16183  };
16184  /**
16185   * A pattern that recognizes a commonly useful subset of URLs that are safe.
16186   *
16187   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
16188   */
16189
16190  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
16191  /**
16192   * A pattern that matches safe data URLs. Only matches image, video and audio types.
16193   *
16194   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
16195   */
16196
16197  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
16198
16199  function allowedAttribute(attr, allowedAttributeList) {
16200    var attrName = attr.nodeName.toLowerCase();
16201
16202    if (allowedAttributeList.indexOf(attrName) !== -1) {
16203      if (uriAttrs.indexOf(attrName) !== -1) {
16204        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
16205      }
16206
16207      return true;
16208    }
16209
16210    var regExp = allowedAttributeList.filter(function (attrRegex) {
vendor: 4,874 bytes, lines 16211-16378
16211      return attrRegex instanceof RegExp;
16212    }); // Check if a regular expression validates the attribute.
16213
16214    for (var i = 0, len = regExp.length; i < len; i++) {
16215      if (attrName.match(regExp[i])) {
16216        return true;
16217      }
16218    }
16219
16220    return false;
16221  }
16222
16223  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
16224    if (unsafeHtml.length === 0) {
16225      return unsafeHtml;
16226    }
16227
16228    if (sanitizeFn && typeof sanitizeFn === 'function') {
16229      return sanitizeFn(unsafeHtml);
16230    }
16231
16232    var domParser = new window.DOMParser();
16233    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
16234    var whitelistKeys = Object.keys(whiteList);
16235    var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
16236
16237    var _loop = function _loop(i, len) {
16238      var el = elements[i];
16239      var elName = el.nodeName.toLowerCase();
16240
16241      if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
16242        el.parentNode.removeChild(el);
16243        return "continue";
16244      }
16245
16246      var attributeList = [].slice.call(el.attributes);
16247      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
16248      attributeList.forEach(function (attr) {
16249        if (!allowedAttribute(attr, whitelistedAttributes)) {
16250          el.removeAttribute(attr.nodeName);
16251        }
16252      });
16253    };
16254
16255    for (var i = 0, len = elements.length; i < len; i++) {
16256      var _ret = _loop(i);
16257
16258      if (_ret === "continue") continue;
16259    }
16260
16261    return createdDocument.body.innerHTML;
16262  }
16263
16264  /**
16265   * ------------------------------------------------------------------------
16266   * Constants
16267   * ------------------------------------------------------------------------
16268   */
16269
16270  var NAME$6 = 'tooltip';
16271  var VERSION$6 = '4.5.2';
16272  var DATA_KEY$6 = 'bs.tooltip';
16273  var EVENT_KEY$6 = "." + DATA_KEY$6;
16274  var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
16275  var CLASS_PREFIX = 'bs-tooltip';
16276  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
16277  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
16278  var DefaultType$4 = {
16279    animation: 'boolean',
16280    template: 'string',
16281    title: '(string|element|function)',
16282    trigger: 'string',
16283    delay: '(number|object)',
16284    html: 'boolean',
16285    selector: '(string|boolean)',
16286    placement: '(string|function)',
16287    offset: '(number|string|function)',
16288    container: '(string|element|boolean)',
16289    fallbackPlacement: '(string|array)',
16290    boundary: '(string|element)',
16291    sanitize: 'boolean',
16292    sanitizeFn: '(null|function)',
16293    whiteList: 'object',
16294    popperConfig: '(null|object)'
16295  };
16296  var AttachmentMap = {
16297    AUTO: 'auto',
16298    TOP: 'top',
16299    RIGHT: 'right',
16300    BOTTOM: 'bottom',
16301    LEFT: 'left'
16302  };
16303  var Default$4 = {
16304    animation: true,
16305    template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
16306    trigger: 'hover focus',
16307    title: '',
16308    delay: 0,
16309    html: false,
16310    selector: false,
16311    placement: 'top',
16312    offset: 0,
16313    container: false,
16314    fallbackPlacement: 'flip',
16315    boundary: 'scrollParent',
16316    sanitize: true,
16317    sanitizeFn: null,
16318    whiteList: DefaultWhitelist,
16319    popperConfig: null
16320  };
16321  var HOVER_STATE_SHOW = 'show';
16322  var HOVER_STATE_OUT = 'out';
16323  var Event = {
16324    HIDE: "hide" + EVENT_KEY$6,
16325    HIDDEN: "hidden" + EVENT_KEY$6,
16326    SHOW: "show" + EVENT_KEY$6,
16327    SHOWN: "shown" + EVENT_KEY$6,
16328    INSERTED: "inserted" + EVENT_KEY$6,
16329    CLICK: "click" + EVENT_KEY$6,
16330    FOCUSIN: "focusin" + EVENT_KEY$6,
16331    FOCUSOUT: "focusout" + EVENT_KEY$6,
16332    MOUSEENTER: "mouseenter" + EVENT_KEY$6,
16333    MOUSELEAVE: "mouseleave" + EVENT_KEY$6
16334  };
16335  var CLASS_NAME_FADE$2 = 'fade';
16336  var CLASS_NAME_SHOW$4 = 'show';
16337  var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
16338  var SELECTOR_ARROW = '.arrow';
16339  var TRIGGER_HOVER = 'hover';
16340  var TRIGGER_FOCUS = 'focus';
16341  var TRIGGER_CLICK = 'click';
16342  var TRIGGER_MANUAL = 'manual';
16343  /**
16344   * ------------------------------------------------------------------------
16345   * Class Definition
16346   * ------------------------------------------------------------------------
16347   */
16348
16349  var Tooltip = /*#__PURE__*/function () {
16350    function Tooltip(element, config) {
16351      if (typeof Popper === 'undefined') {
16352        throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
16353      } // private
16354
16355
16356      this._isEnabled = true;
16357      this._timeout = 0;
16358      this._hoverState = '';
16359      this._activeTrigger = {};
16360      this._popper = null; // Protected
16361
16362      this.element = element;
16363      this.config = this._getConfig(config);
16364      this.tip = null;
16365
16366      this._setListeners();
16367    } // Getters
16368
16369
16370    var _proto = Tooltip.prototype;
16371
16372    // Public
16373    _proto.enable = function enable() {
16374      this._isEnabled = true;
16375    };
16376
16377    _proto.disable = function disable() {
16378      this._isEnabled = false;
16379    };
16380
16381    _proto.toggleEnabled = function toggleEnabled() {
16382      this._isEnabled = !this._isEnabled;
16383    };
16384
16385    _proto.toggle = function toggle(event) {
16386      if (!this._isEnabled) {
16387        return;
16388      }
16389
16390      if (event) {
16391        var dataKey = this.constructor.DATA_KEY;
16392        var context = $(event.currentTarget).data(dataKey);
16393
16394        if (!context) {
16395          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
16396          $(event.currentTarget).data(dataKey, context);
16397        }
16398
16399        context._activeTrigger.click = !context._activeTrigger.click;
16400
16401        if (context._isWithActiveTrigger()) {
16402          context._enter(null, context);
16403        } else {
16404          context._leave(null, context);
16405        }
16406      } else {
16407        if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW$4)) {
16408          this._leave(null, this);
16409
16410          return;
16411        }
16412
16413        this._enter(null, this);
16414      }
16415    };
16416
16417    _proto.dispose = function dispose() {
16418      clearTimeout(this._timeout);
16419      $.removeData(this.element, this.constructor.DATA_KEY);
16420      $(this.element).off(this.constructor.EVENT_KEY);
16421      $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
16422
16423      if (this.tip) {
16424        $(this.tip).remove();
16425      }
16426
16427      this._isEnabled = null;
16428      this._timeout = null;
16429      this._hoverState = null;
16430      this._activeTrigger = null;
16431
16432      if (this._popper) {
16433        this._popper.destroy();
16434      }
16435
16436      this._popper = null;
16437      this.element = null;
16438      this.config = null;
16439      this.tip = null;
16440    };
16441
16442    _proto.show = function show() {
16443      var _this = this;
16444
16445      if ($(this.element).css('display') === 'none') {
16446        throw new Error('Please use show on visible elements');
16447      }
16448
16449      var showEvent = $.Event(this.constructor.Event.SHOW);
16450
16451      if (this.isWithContent() && this._isEnabled) {
16452        $(this.element).trigger(showEvent);
16453        var shadowRoot = Util.findShadowRoot(this.element);
16454        var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
16455
16456        if (showEvent.isDefaultPrevented() || !isInTheDom) {
16457          return;
16458        }
16459
16460        var tip = this.getTipElement();
16461        var tipId = Util.getUID(this.constructor.NAME);
16462        tip.setAttribute('id', tipId);
16463        this.element.setAttribute('aria-describedby', tipId);
16464        this.setContent();
16465
16466        if (this.config.animation) {
16467          $(tip).addClass(CLASS_NAME_FADE$2);
16468        }
16469
16470        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
16471
16472        var attachment = this._getAttachment(placement);
16473
16474        this.addAttachmentClass(attachment);
16475
16476        var container = this._getContainer();
16477
16478        $(tip).data(this.constructor.DATA_KEY, this);
16479
16480        if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
16481          $(tip).appendTo(container);
16482        }
16483
16484        $(this.element).trigger(this.constructor.Event.INSERTED);
16485        this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
16486        $(tip).addClass(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we add extra
16487        // empty mouseover listeners to the body's immediate children;
16488        // only needed because of broken event delegation on iOS
16489        // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
16490
16491        if ('ontouchstart' in document.documentElement) {
16492          $(document.body).children().on('mouseover', null, $.noop);
16493        }
16494
16495        var complete = function complete() {
16496          if (_this.config.animation) {
16497            _this._fixTransition();
16498          }
16499
16500          var prevHoverState = _this._hoverState;
16501          _this._hoverState = null;
16502          $(_this.element).trigger(_this.constructor.Event.SHOWN);
16503
16504          if (prevHoverState === HOVER_STATE_OUT) {
16505            _this._leave(null, _this);
16506          }
16507        };
16508
16509        if ($(this.tip).hasClass(CLASS_NAME_FADE$2)) {
16510          var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
16511          $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
16512        } else {
16513          complete();
16514        }
16515      }
16516    };
16517
16518    _proto.hide = function hide(callback) {
16519      var _this2 = this;
16520
16521      var tip = this.getTipElement();
16522      var hideEvent = $.Event(this.constructor.Event.HIDE);
16523
16524      var complete = function complete() {
16525        if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
16526          tip.parentNode.removeChild(tip);
16527        }
16528
16529        _this2._cleanTipClass();
16530
16531        _this2.element.removeAttribute('aria-describedby');
16532
16533        $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
16534
16535        if (_this2._popper !== null) {
16536          _this2._popper.destroy();
16537        }
16538
16539        if (callback) {
16540          callback();
16541        }
16542      };
16543
16544      $(this.element).trigger(hideEvent);
16545
16546      if (hideEvent.isDefaultPrevented()) {
16547        return;
16548      }
16549
16550      $(tip).removeClass(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra
16551      // empty mouseover listeners we added for iOS support
16552
16553      if ('ontouchstart' in document.documentElement) {
16554        $(document.body).children().off('mouseover', null, $.noop);
16555      }
16556
16557      this._activeTrigger[TRIGGER_CLICK] = false;
16558      this._activeTrigger[TRIGGER_FOCUS] = false;
16559      this._activeTrigger[TRIGGER_HOVER] = false;
16560
16561      if ($(this.tip).hasClass(CLASS_NAME_FADE$2)) {
16562        var transitionDuration = Util.getTransitionDurationFromElement(tip);
16563        $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
16564      } else {
16565        complete();
16566      }
16567
16568      this._hoverState = '';
16569    };
16570
16571    _proto.update = function update() {
16572      if (this._popper !== null) {
16573        this._popper.scheduleUpdate();
16574      }
16575    } // Protected
16576    ;
16577
16578    _proto.isWithContent = function isWithContent() {
16579      return Boolean(this.getTitle());
16580    };
16581
16582    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
16583      $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
16584    };
16585
16586    _proto.getTipElement = function getTipElement() {
16587      this.tip = this.tip || $(this.config.template)[0];
16588      return this.tip;
16589    };
16590
16591    _proto.setContent = function setContent() {
16592      var tip = this.getTipElement();
16593      this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
16594      $(tip).removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$4);
16595    };
16596
16597    _proto.setElementContent = function setElementContent($element, content) {
16598      if (typeof content === 'object' && (content.nodeType || content.jquery)) {
16599        // Content is a DOM node or a jQuery
16600        if (this.config.html) {
16601          if (!$(content).parent().is($element)) {
16602            $element.empty().append(content);
16603          }
16604        } else {
16605          $element.text($(content).text());
16606        }
16607
16608        return;
16609      }
16610
16611      if (this.config.html) {
16612        if (this.config.sanitize) {
16613          content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
16614        }
16615
16616        $element.html(content);
16617      } else {
16618        $element.text(content);
16619      }
16620    };
16621
16622    _proto.getTitle = function getTitle() {
16623      var title = this.element.getAttribute('data-original-title');
16624
16625      if (!title) {
16626        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
16627      }
16628
16629      return title;
16630    } // Private
16631    ;
16632
16633    _proto._getPopperConfig = function _getPopperConfig(attachment) {
16634      var _this3 = this;
16635
16636      var defaultBsConfig = {
16637        placement: attachment,
16638        modifiers: {
16639          offset: this._getOffset(),
16640          flip: {
16641            behavior: this.config.fallbackPlacement
16642          },
16643          arrow: {
16644            element: SELECTOR_ARROW
16645          },
16646          preventOverflow: {
vendor: 4,528 bytes, lines 16647-16785
16647            boundariesElement: this.config.boundary
16648          }
16649        },
16650        onCreate: function onCreate(data) {
16651          if (data.originalPlacement !== data.placement) {
16652            _this3._handlePopperPlacementChange(data);
16653          }
16654        },
16655        onUpdate: function onUpdate(data) {
16656          return _this3._handlePopperPlacementChange(data);
16657        }
16658      };
16659      return _extends({}, defaultBsConfig, this.config.popperConfig);
16660    };
16661
16662    _proto._getOffset = function _getOffset() {
16663      var _this4 = this;
16664
16665      var offset = {};
16666
16667      if (typeof this.config.offset === 'function') {
16668        offset.fn = function (data) {
16669          data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
16670          return data;
16671        };
16672      } else {
16673        offset.offset = this.config.offset;
16674      }
16675
16676      return offset;
16677    };
16678
16679    _proto._getContainer = function _getContainer() {
16680      if (this.config.container === false) {
16681        return document.body;
16682      }
16683
16684      if (Util.isElement(this.config.container)) {
16685        return $(this.config.container);
16686      }
16687
16688      return $(document).find(this.config.container);
16689    };
16690
16691    _proto._getAttachment = function _getAttachment(placement) {
16692      return AttachmentMap[placement.toUpperCase()];
16693    };
16694
16695    _proto._setListeners = function _setListeners() {
16696      var _this5 = this;
16697
16698      var triggers = this.config.trigger.split(' ');
16699      triggers.forEach(function (trigger) {
16700        if (trigger === 'click') {
16701          $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
16702            return _this5.toggle(event);
16703          });
16704        } else if (trigger !== TRIGGER_MANUAL) {
16705          var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
16706          var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
16707          $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
16708            return _this5._enter(event);
16709          }).on(eventOut, _this5.config.selector, function (event) {
16710            return _this5._leave(event);
16711          });
16712        }
16713      });
16714
16715      this._hideModalHandler = function () {
16716        if (_this5.element) {
16717          _this5.hide();
16718        }
16719      };
16720
16721      $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
16722
16723      if (this.config.selector) {
16724        this.config = _extends({}, this.config, {
16725          trigger: 'manual',
16726          selector: ''
16727        });
16728      } else {
16729        this._fixTitle();
16730      }
16731    };
16732
16733    _proto._fixTitle = function _fixTitle() {
16734      var titleType = typeof this.element.getAttribute('data-original-title');
16735
16736      if (this.element.getAttribute('title') || titleType !== 'string') {
16737        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
16738        this.element.setAttribute('title', '');
16739      }
16740    };
16741
16742    _proto._enter = function _enter(event, context) {
16743      var dataKey = this.constructor.DATA_KEY;
16744      context = context || $(event.currentTarget).data(dataKey);
16745
16746      if (!context) {
16747        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
16748        $(event.currentTarget).data(dataKey, context);
16749      }
16750
16751      if (event) {
16752        context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
16753      }
16754
16755      if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) {
16756        context._hoverState = HOVER_STATE_SHOW;
16757        return;
16758      }
16759
16760      clearTimeout(context._timeout);
16761      context._hoverState = HOVER_STATE_SHOW;
16762
16763      if (!context.config.delay || !context.config.delay.show) {
16764        context.show();
16765        return;
16766      }
16767
16768      context._timeout = setTimeout(function () {
16769        if (context._hoverState === HOVER_STATE_SHOW) {
16770          context.show();
16771        }
16772      }, context.config.delay.show);
16773    };
16774
16775    _proto._leave = function _leave(event, context) {
16776      var dataKey = this.constructor.DATA_KEY;
16777      context = context || $(event.currentTarget).data(dataKey);
16778
16779      if (!context) {
16780        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
16781        $(event.currentTarget).data(dataKey, context);
16782      }
16783
16784      if (event) {
16785        context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
vendor: 4,119 bytes, lines 16786-16947
16786      }
16787
16788      if (context._isWithActiveTrigger()) {
16789        return;
16790      }
16791
16792      clearTimeout(context._timeout);
16793      context._hoverState = HOVER_STATE_OUT;
16794
16795      if (!context.config.delay || !context.config.delay.hide) {
16796        context.hide();
16797        return;
16798      }
16799
16800      context._timeout = setTimeout(function () {
16801        if (context._hoverState === HOVER_STATE_OUT) {
16802          context.hide();
16803        }
16804      }, context.config.delay.hide);
16805    };
16806
16807    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
16808      for (var trigger in this._activeTrigger) {
16809        if (this._activeTrigger[trigger]) {
16810          return true;
16811        }
16812      }
16813
16814      return false;
16815    };
16816
16817    _proto._getConfig = function _getConfig(config) {
16818      var dataAttributes = $(this.element).data();
16819      Object.keys(dataAttributes).forEach(function (dataAttr) {
16820        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
16821          delete dataAttributes[dataAttr];
16822        }
16823      });
16824      config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
16825
16826      if (typeof config.delay === 'number') {
16827        config.delay = {
16828          show: config.delay,
16829          hide: config.delay
16830        };
16831      }
16832
16833      if (typeof config.title === 'number') {
16834        config.title = config.title.toString();
16835      }
16836
16837      if (typeof config.content === 'number') {
16838        config.content = config.content.toString();
16839      }
16840
16841      Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
16842
16843      if (config.sanitize) {
16844        config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
16845      }
16846
16847      return config;
16848    };
16849
16850    _proto._getDelegateConfig = function _getDelegateConfig() {
16851      var config = {};
16852
16853      if (this.config) {
16854        for (var key in this.config) {
16855          if (this.constructor.Default[key] !== this.config[key]) {
16856            config[key] = this.config[key];
16857          }
16858        }
16859      }
16860
16861      return config;
16862    };
16863
16864    _proto._cleanTipClass = function _cleanTipClass() {
16865      var $tip = $(this.getTipElement());
16866      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
16867
16868      if (tabClass !== null && tabClass.length) {
16869        $tip.removeClass(tabClass.join(''));
16870      }
16871    };
16872
16873    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
16874      this.tip = popperData.instance.popper;
16875
16876      this._cleanTipClass();
16877
16878      this.addAttachmentClass(this._getAttachment(popperData.placement));
16879    };
16880
16881    _proto._fixTransition = function _fixTransition() {
16882      var tip = this.getTipElement();
16883      var initConfigAnimation = this.config.animation;
16884
16885      if (tip.getAttribute('x-placement') !== null) {
16886        return;
16887      }
16888
16889      $(tip).removeClass(CLASS_NAME_FADE$2);
16890      this.config.animation = false;
16891      this.hide();
16892      this.show();
16893      this.config.animation = initConfigAnimation;
16894    } // Static
16895    ;
16896
16897    Tooltip._jQueryInterface = function _jQueryInterface(config) {
16898      return this.each(function () {
16899        var data = $(this).data(DATA_KEY$6);
16900
16901        var _config = typeof config === 'object' && config;
16902
16903        if (!data && /dispose|hide/.test(config)) {
16904          return;
16905        }
16906
16907        if (!data) {
16908          data = new Tooltip(this, _config);
16909          $(this).data(DATA_KEY$6, data);
16910        }
16911
16912        if (typeof config === 'string') {
16913          if (typeof data[config] === 'undefined') {
16914            throw new TypeError("No method named \"" + config + "\"");
16915          }
16916
16917          data[config]();
16918        }
16919      });
16920    };
16921
16922    _createClass(Tooltip, null, [{
16923      key: "VERSION",
16924      get: function get() {
16925        return VERSION$6;
16926      }
16927    }, {
16928      key: "Default",
16929      get: function get() {
16930        return Default$4;
16931      }
16932    }, {
16933      key: "NAME",
16934      get: function get() {
16935        return NAME$6;
16936      }
16937    }, {
16938      key: "DATA_KEY",
16939      get: function get() {
16940        return DATA_KEY$6;
16941      }
16942    }, {
16943      key: "Event",
16944      get: function get() {
16945        return Event;
16946      }
16947    }, {
16948      key: "EVENT_KEY",
16949      get: function get() {
16950        return EVENT_KEY$6;
16951      }
16952    }, {
16953      key: "DefaultType",
16954      get: function get() {
16955        return DefaultType$4;
16956      }
16957    }]);
16958
16959    return Tooltip;
16960  }();
16961  /**
16962   * ------------------------------------------------------------------------
16963   * jQuery
16964   * ------------------------------------------------------------------------
16965   */
16966
16967
16968  $.fn[NAME$6] = Tooltip._jQueryInterface;
16969  $.fn[NAME$6].Constructor = Tooltip;
16970
16971  $.fn[NAME$6].noConflict = function () {
16972    $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
16973    return Tooltip._jQueryInterface;
16974  };
16975
16976  /**
16977   * ------------------------------------------------------------------------
16978   * Constants
16979   * ------------------------------------------------------------------------
16980   */
16981
16982  var NAME$7 = 'popover';
16983  var VERSION$7 = '4.5.2';
16984  var DATA_KEY$7 = 'bs.popover';
16985  var EVENT_KEY$7 = "." + DATA_KEY$7;
16986  var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
16987  var CLASS_PREFIX$1 = 'bs-popover';
16988  var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
16989
16990  var Default$5 = _extends({}, Tooltip.Default, {
16991    placement: 'right',
16992    trigger: 'click',
16993    content: '',
16994    template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
16995  });
16996
16997  var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
16998    content: '(string|element|function)'
16999  });
17000
17001  var CLASS_NAME_FADE$3 = 'fade';
17002  var CLASS_NAME_SHOW$5 = 'show';
17003  var SELECTOR_TITLE = '.popover-header';
17004  var SELECTOR_CONTENT = '.popover-body';
17005  var Event$1 = {
17006    HIDE: "hide" + EVENT_KEY$7,
17007    HIDDEN: "hidden" + EVENT_KEY$7,
17008    SHOW: "show" + EVENT_KEY$7,
17009    SHOWN: "shown" + EVENT_KEY$7,
17010    INSERTED: "inserted" + EVENT_KEY$7,
17011    CLICK: "click" + EVENT_KEY$7,
17012    FOCUSIN: "focusin" + EVENT_KEY$7,
17013    FOCUSOUT: "focusout" + EVENT_KEY$7,
17014    MOUSEENTER: "mouseenter" + EVENT_KEY$7,
17015    MOUSELEAVE: "mouseleave" + EVENT_KEY$7
17016  };
17017  /**
17018   * ------------------------------------------------------------------------
17019   * Class Definition
17020   * ------------------------------------------------------------------------
17021   */
17022
17023  var Popover = /*#__PURE__*/function (_Tooltip) {
17024    _inheritsLoose(Popover, _Tooltip);
17025
17026    function Popover() {
17027      return _Tooltip.apply(this, arguments) || this;
17028    }
17029
17030    var _proto = Popover.prototype;
17031
17032    // Overrides
17033    _proto.isWithContent = function isWithContent() {
17034      return this.getTitle() || this._getContent();
17035    };
17036
17037    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
17038      $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
17039    };
17040
17041    _proto.getTipElement = function getTipElement() {
17042      this.tip = this.tip || $(this.config.template)[0];
17043      return this.tip;
17044    };
17045
17046    _proto.setContent = function setContent() {
17047      var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
17048
17049      this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
17050
17051      var content = this._getContent();
17052
17053      if (typeof content === 'function') {
17054        content = content.call(this.element);
17055      }
17056
17057      this.setElementContent($tip.find(SELECTOR_CONTENT), content);
17058      $tip.removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$5);
17059    } // Private
17060    ;
17061
17062    _proto._getContent = function _getContent() {
17063      return this.element.getAttribute('data-content') || this.config.content;
17064    };
17065
17066    _proto._cleanTipClass = function _cleanTipClass() {
17067      var $tip = $(this.getTipElement());
17068      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
17069
17070      if (tabClass !== null && tabClass.length > 0) {
17071        $tip.removeClass(tabClass.join(''));
17072      }
17073    } // Static
17074    ;
17075
17076    Popover._jQueryInterface = function _jQueryInterface(config) {
17077      return this.each(function () {
17078        var data = $(this).data(DATA_KEY$7);
17079
17080        var _config = typeof config === 'object' ? config : null;
17081
17082        if (!data && /dispose|hide/.test(config)) {
17083          return;
17084        }
17085
17086        if (!data) {
17087          data = new Popover(this, _config);
17088          $(this).data(DATA_KEY$7, data);
17089        }
17090
17091        if (typeof config === 'string') {
17092          if (typeof data[config] === 'undefined') {
17093            throw new TypeError("No method named \"" + config + "\"");
17094          }
17095
17096          data[config]();
17097        }
17098      });
17099    };
17100
17101    _createClass(Popover, null, [{
17102      key: "VERSION",
17103      // Getters
17104      get: function get() {
17105        return VERSION$7;
17106      }
17107    }, {
17108      key: "Default",
17109      get: function get() {
17110        return Default$5;
17111      }
17112    }, {
17113      key: "NAME",
17114      get: function get() {
17115        return NAME$7;
17116      }
17117    }, {
17118      key: "DATA_KEY",
17119      get: function get() {
17120        return DATA_KEY$7;
17121      }
17122    }, {
17123      key: "Event",
17124      get: function get() {
17125        return Event$1;
17126      }
17127    }, {
17128      key: "EVENT_KEY",
17129      get: function get() {
17130        return EVENT_KEY$7;
17131      }
17132    }, {
17133      key: "DefaultType",
17134      get: function get() {
17135        return DefaultType$5;
17136      }
17137    }]);
17138
17139    return Popover;
17140  }(Tooltip);
17141  /**
17142   * ------------------------------------------------------------------------
17143   * jQuery
17144   * ------------------------------------------------------------------------
17145   */
17146
17147
17148  $.fn[NAME$7] = Popover._jQueryInterface;
17149  $.fn[NAME$7].Constructor = Popover;
17150
17151  $.fn[NAME$7].noConflict = function () {
17152    $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
17153    return Popover._jQueryInterface;
17154  };
17155
17156  /**
17157   * ------------------------------------------------------------------------
17158   * Constants
17159   * ------------------------------------------------------------------------
17160   */
17161
17162  var NAME$8 = 'scrollspy';
17163  var VERSION$8 = '4.5.2';
17164  var DATA_KEY$8 = 'bs.scrollspy';
17165  var EVENT_KEY$8 = "." + DATA_KEY$8;
17166  var DATA_API_KEY$6 = '.data-api';
17167  var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
17168  var Default$6 = {
17169    offset: 10,
17170    method: 'auto',
17171    target: ''
17172  };
17173  var DefaultType$6 = {
17174    offset: 'number',
17175    method: 'string',
17176    target: '(string|element)'
17177  };
17178  var EVENT_ACTIVATE = "activate" + EVENT_KEY$8;
17179  var EVENT_SCROLL = "scroll" + EVENT_KEY$8;
17180  var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
17181  var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
17182  var CLASS_NAME_ACTIVE$2 = 'active';
17183  var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
17184  var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
17185  var SELECTOR_NAV_LINKS = '.nav-link';
17186  var SELECTOR_NAV_ITEMS = '.nav-item';
17187  var SELECTOR_LIST_ITEMS = '.list-group-item';
17188  var SELECTOR_DROPDOWN = '.dropdown';
17189  var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
17190  var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
17191  var METHOD_OFFSET = 'offset';
17192  var METHOD_POSITION = 'position';
17193  /**
17194   * ------------------------------------------------------------------------
17195   * Class Definition
17196   * ------------------------------------------------------------------------
17197   */
17198
17199  var ScrollSpy = /*#__PURE__*/function () {
17200    function ScrollSpy(element, config) {
17201      var _this = this;
17202
17203      this._element = element;
17204      this._scrollElement = element.tagName === 'BODY' ? window : element;
17205      this._config = this._getConfig(config);
17206      this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
17207      this._offsets = [];
17208      this._targets = [];
17209      this._activeTarget = null;
17210      this._scrollHeight = 0;
17211      $(this._scrollElement).on(EVENT_SCROLL, function (event) {
17212        return _this._process(event);
17213      });
17214      this.refresh();
17215
17216      this._process();
17217    } // Getters
17218
17219
17220    var _proto = ScrollSpy.prototype;
17221
17222    // Public
17223    _proto.refresh = function refresh() {
17224      var _this2 = this;
17225
17226      var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
17227      var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
17228      var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
17229      this._offsets = [];
17230      this._targets = [];
17231      this._scrollHeight = this._getScrollHeight();
17232      var targets = [].slice.call(document.querySelectorAll(this._selector));
17233      targets.map(function (element) {
17234        var target;
17235        var targetSelector = Util.getSelectorFromElement(element);
17236
vendor: 4,655 bytes, lines 17237-17376
17237        if (targetSelector) {
17238          target = document.querySelector(targetSelector);
17239        }
17240
17241        if (target) {
17242          var targetBCR = target.getBoundingClientRect();
17243
17244          if (targetBCR.width || targetBCR.height) {
17245            // TODO (fat): remove sketch reliance on jQuery position/offset
17246            return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
17247          }
17248        }
17249
17250        return null;
17251      }).filter(function (item) {
17252        return item;
17253      }).sort(function (a, b) {
17254        return a[0] - b[0];
17255      }).forEach(function (item) {
17256        _this2._offsets.push(item[0]);
17257
17258        _this2._targets.push(item[1]);
17259      });
17260    };
17261
17262    _proto.dispose = function dispose() {
17263      $.removeData(this._element, DATA_KEY$8);
17264      $(this._scrollElement).off(EVENT_KEY$8);
17265      this._element = null;
17266      this._scrollElement = null;
17267      this._config = null;
17268      this._selector = null;
17269      this._offsets = null;
17270      this._targets = null;
17271      this._activeTarget = null;
17272      this._scrollHeight = null;
17273    } // Private
17274    ;
17275
17276    _proto._getConfig = function _getConfig(config) {
17277      config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
17278
17279      if (typeof config.target !== 'string' && Util.isElement(config.target)) {
17280        var id = $(config.target).attr('id');
17281
17282        if (!id) {
17283          id = Util.getUID(NAME$8);
17284          $(config.target).attr('id', id);
17285        }
17286
17287        config.target = "#" + id;
17288      }
17289
17290      Util.typeCheckConfig(NAME$8, config, DefaultType$6);
17291      return config;
17292    };
17293
17294    _proto._getScrollTop = function _getScrollTop() {
17295      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
17296    };
17297
17298    _proto._getScrollHeight = function _getScrollHeight() {
17299      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
17300    };
17301
17302    _proto._getOffsetHeight = function _getOffsetHeight() {
17303      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
17304    };
17305
17306    _proto._process = function _process() {
17307      var scrollTop = this._getScrollTop() + this._config.offset;
17308
17309      var scrollHeight = this._getScrollHeight();
17310
17311      var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
17312
17313      if (this._scrollHeight !== scrollHeight) {
17314        this.refresh();
17315      }
17316
17317      if (scrollTop >= maxScroll) {
17318        var target = this._targets[this._targets.length - 1];
17319
17320        if (this._activeTarget !== target) {
17321          this._activate(target);
17322        }
17323
17324        return;
17325      }
17326
17327      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
17328        this._activeTarget = null;
17329
17330        this._clear();
17331
17332        return;
17333      }
17334
17335      for (var i = this._offsets.length; i--;) {
17336        var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
17337
17338        if (isActiveTarget) {
17339          this._activate(this._targets[i]);
17340        }
17341      }
17342    };
17343
17344    _proto._activate = function _activate(target) {
17345      this._activeTarget = target;
17346
17347      this._clear();
17348
17349      var queries = this._selector.split(',').map(function (selector) {
17350        return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
17351      });
17352
17353      var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
17354
17355      if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
17356        $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE$2);
17357        $link.addClass(CLASS_NAME_ACTIVE$2);
17358      } else {
17359        // Set triggered link as active
17360        $link.addClass(CLASS_NAME_ACTIVE$2); // Set triggered links parents as active
17361        // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
17362
17363        $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$2); // Handle special case when .nav-link is inside .nav-item
17364
17365        $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$2);
17366      }
17367
17368      $(this._scrollElement).trigger(EVENT_ACTIVATE, {
17369        relatedTarget: target
17370      });
17371    };
17372
17373    _proto._clear = function _clear() {
17374      [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
17375        return node.classList.contains(CLASS_NAME_ACTIVE$2);
17376      }
17376).forEach(function (node) {
17377        return node.classList.remove(CLASS_NAME_ACTIVE$2);
17378      });
17379    } // Static
17380    ;
17381
17382    ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
17383      return this.each(function () {
17384        var data = $(this).data(DATA_KEY$8);
17385
17386        var _config = typeof config === 'object' && config;
17387
17388        if (!data) {
17389          data = new ScrollSpy(this, _config);
17390          $(this).data(DATA_KEY$8, data);
17391        }
17392
17393        if (typeof config === 'string') {
17394          if (typeof data[config] === 'undefined') {
17395            throw new TypeError("No method named \"" + config + "\"");
17396          }
17397
17398          data[config]();
17399        }
17400      });
17401    };
17402
17403    _createClass(ScrollSpy, null, [{
17404      key: "VERSION",
17405      get: function get() {
17406        return VERSION$8;
17407      }
17408    }, {
17409      key: "Default",
17410      get: function get() {
17411        return Default$6;
17412      }
17413    }]);
17414
17415    return ScrollSpy;
17416  }();
17417  /**
17418   * ------------------------------------------------------------------------
17419   * Data Api implementation
17420   * ------------------------------------------------------------------------
17421   */
17422
17423
17424  $(window).on(EVENT_LOAD_DATA_API$2, function () {
17425    var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
17426    var scrollSpysLength = scrollSpys.length;
17427
17428    for (var i = scrollSpysLength; i--;) {
17429      var $spy = $(scrollSpys[i]);
17430
17431      ScrollSpy._jQueryInterface.call($spy, $spy.data());
17432    }
17433  });
17434  /**
17435   * ------------------------------------------------------------------------
17436   * jQuery
17437   * ------------------------------------------------------------------------
17438   */
17439
17440  $.fn[NAME$8] = ScrollSpy._jQueryInterface;
17441  $.fn[NAME$8].Constructor = ScrollSpy;
17442
17443  $.fn[NAME$8].noConflict = function () {
17444    $.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
17445    return ScrollSpy._jQueryInterface;
17446  };
17447
17448  /**
17449   * ------------------------------------------------------------------------
17450   * Constants
17451   * ------------------------------------------------------------------------
17452   */
17453
17454  var NAME$9 = 'tab';
17455  var VERSION$9 = '4.5.2';
17456  var DATA_KEY$9 = 'bs.tab';
17457  var EVENT_KEY$9 = "." + DATA_KEY$9;
17458  var DATA_API_KEY$7 = '.data-api';
17459  var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
17460  var EVENT_HIDE$3 = "hide" + EVENT_KEY$9;
17461  var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$9;
17462  var EVENT_SHOW$3 = "show" + EVENT_KEY$9;
17463  var EVENT_SHOWN$3 = "shown" + EVENT_KEY$9;
17464  var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$9 + DATA_API_KEY$7;
17465  var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
17466  var CLASS_NAME_ACTIVE$3 = 'active';
17467  var CLASS_NAME_DISABLED$1 = 'disabled';
17468  var CLASS_NAME_FADE$4 = 'fade';
17469  var CLASS_NAME_SHOW$6 = 'show';
17470  var SELECTOR_DROPDOWN$1 = '.dropdown';
17471  var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
17472  var SELECTOR_ACTIVE$2 = '.active';
17473  var SELECTOR_ACTIVE_UL = '> li > .active';
17474  var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
17475  var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
17476  var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
17477  /**
17478   * ------------------------------------------------------------------------
17479   * Class Definition
17480   * ------------------------------------------------------------------------
17481   */
17482
17483  var Tab = /*#__PURE__*/function () {
17484    function Tab(element) {
17485      this._element = element;
17486    } // Getters
17487
17488
17489    var _proto = Tab.prototype;
17490
17491    // Public
17492    _proto.show = function show() {
17493      var _this = this;
17494
17495      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(CLASS_NAME_ACTIVE$3) || $(this._element).hasClass(CLASS_NAME_DISABLED$1)) {
17496        return;
17497      }
17498
17499      var target;
17500      var previous;
17501      var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP$1)[0];
17502      var selector = Util.getSelectorFromElement(this._element);
17503
17504      if (listElement) {
17505        var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$2;
17506        previous = $.makeArray($(listElement).find(itemSelector));
17507        previous = previous[previous.length - 1];
17508      }
17509
17510      var hideEvent = $.Event(EVENT_HIDE$3, {
17511        relatedTarget: this._element
17512      });
17513      var showEvent = $.Event(EVENT_SHOW$3, {
17514        relatedTarget: previous
17515      });
17516
17517      if (previous) {
17518        $(previous).trigger(hideEvent);
17519      }
17520
17521      $(this._element).trigger(showEvent);
17522
17523      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
17524        return;
17525      }
17526
17527      if (selector) {
17528        target = document.querySelector(selector);
17529      }
17530
17531      this._activate(this._element, listElement);
17532
17533      var complete = function complete() {
17534        var hiddenEvent = $.Event(EVENT_HIDDEN$3, {
17535          relatedTarget: _this._element
17536        });
17537        var shownEvent = $.Event(EVENT_SHOWN$3, {
17538          relatedTarget: previous
17539        });
17540        $(previous).trigger(hiddenEvent);
17541        $(_this._element).trigger(shownEvent);
17542      };
17543
17544      if (target) {
17545        this._activate(target, target.parentNode, complete);
17546      } else {
17547        complete();
17548      }
17549    };
17550
17551    _proto.dispose = function dispose() {
17552      $.removeData(this._element, DATA_KEY$9);
17553      this._element = null;
17554    } // Private
17555    ;
17556
17557    _proto._activate = function _activate(element, container, callback) {
17558      var _this2 = this;
17559
17560      var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE$2);
17561      var active = activeElements[0];
17562      var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE$4);
17563
17564      var complete = function complete() {
17565        return _this2._transitionComplete(element, active, callback);
17566      };
17567
17568      if (active && isTransitioning) {
17569        var transitionDuration = Util.getTransitionDurationFromElement(active);
17570        $(active).removeClass(CLASS_NAME_SHOW$6).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
17571      } else {
17572        complete();
17573      }
17574    };
17575
17576    _proto._transitionComplete = function _transitionComplete(element, active, callback) {
17577      if (active) {
17578        $(active).removeClass(CLASS_NAME_ACTIVE$3);
17579        var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
17580
17581        if (dropdownChild) {
17582          $(dropdownChild).removeClass(CLASS_NAME_ACTIVE$3);
17583        }
17584
17585        if (active.getAttribute('role') === 'tab') {
17586          active.setAttribute('aria-selected', false);
17587        }
17588      }
17589
17590      $(element).addClass(CLASS_NAME_ACTIVE$3);
17591
17592      if (element.getAttribute('role') === 'tab') {
17593        element.setAttribute('aria-selected', true);
17594      }
17595
17596      Util.reflow(element);
17597
17598      if (element.classList.contains(CLASS_NAME_FADE$4)) {
17599        element.classList.add(CLASS_NAME_SHOW$6);
17600      }
17601
17602      if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
17603        var dropdownElement = $(element).closest(SELECTOR_DROPDOWN$1)[0];
17604
17605        if (dropdownElement) {
17606          var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE$1));
17607          $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE$3);
17608        }
17609
17610        element.setAttribute('aria-expanded', true);
17611      }
17612
17613      if (callback) {
17614        callback();
17615      }
17616    } // Static
17617    ;
17618
17619    Tab._jQueryInterface = function _jQueryInterface(config) {
17620      return this.each(function () {
17621        var $this = $(this);
17622        var data = $this.data(DATA_KEY$9);
17623
17624        if (!data) {
17625          data = new Tab(this);
17626          $this.data(DATA_KEY$9, data);
17627        }
17628
17629        if (typeof config === 'string') {
17630          if (typeof data[config] === 'undefined') {
17631            throw new TypeError("No method named \"" + config + "\"");
17632          }
17633
17634          data[config]();
17635        }
17636      });
17637    };
17638
17639    _createClass(Tab, null, [{
17640      key: "VERSION",
17641      get: function get() {
17642        return VERSION$9;
17643      }
17644    }]);
17645
17646    return Tab;
17647  }();
17648  /**
17649   * ------------------------------------------------------------------------
17650   * Data Api implementation
17651   * ------------------------------------------------------------------------
17652   */
17653
17654
17655  $(document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
17656    event.preventDefault();
17657
17658    Tab._jQueryInterface.call($(this), 'show');
17659  });
17660  /**
17661   * ------------------------------------------------------------------------
17662   * jQuery
17663   * ------------------------------------------------------------------------
17664   */
17665
17666  $.fn[NAME$9] = Tab._jQueryInterface;
17667  $.fn[NAME$9].Constructor = Tab;
17668
17669  $.fn[NAME$9].noConflict = function () {
17670    $.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
17671    return Tab._jQueryInterface;
17672  };
17673
17674  /**
17675   * ------------------------------------------------------------------------
17676   * Constants
17677   * ------------------------------------------------------------------------
17678   */
17679
17680  var NAME$a = 'toast';
17681  var VERSION$a = '4.5.2';
17682  var DATA_KEY$a = 'bs.toast';
17683  var EVENT_KEY$a = "." + DATA_KEY$a;
17684  var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
17685  var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$a;
17686  var EVENT_HIDE$4 = "hide" + EVENT_KEY$a;
17687  var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
17688  var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
17689  var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
17690  var CLASS_NAME_FADE$5 = 'fade';
17691  var CLASS_NAME_HIDE = 'hide';
17692  var CLASS_NAME_SHOW$7 = 'show';
17693  var CLASS_NAME_SHOWING = 'showing';
17694  var DefaultType$7 = {
17695    animation: 'boolean',
17696    autohide: 'boolean',
17697    delay: 'number'
17698  };
17699  var Default$7 = {
17700    animation: true,
17701    autohide: true,
17702    delay: 500
17703  };
17704  var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="toast"]';
17705  /**
17706   * ------------------------------------------------------------------------
17707   * Class Definition
17708   * ------------------------------------------------------------------------
17709   */
17710
17711  var Toast = /*#__PURE__*/function () {
17712    function Toast(element, config) {
17713      this._element = element;
17714      this._config = this._getConfig(config);
17715      this._timeout = null;
17716
17717      this._setListeners();
17718    } // Getters
17719
17720
17721    var _proto = Toast.prototype;
17722
17723    // Public
17724    _proto.show = function show() {
17725      var _this = this;
17726
17727      var showEvent = $.Event(EVENT_SHOW$4);
17728      $(this._element).trigger(showEvent);
17729
17730      if (showEvent.isDefaultPrevented()) {
17731        return;
17732      }
17733
17734      this._clearTimeout();
17735
17736      if (this._config.animation) {
17737        this._element.classList.add(CLASS_NAME_FADE$5);
17738      }
17739
17740      var complete = function complete() {
17741        _this._element.classList.remove(CLASS_NAME_SHOWING);
17742
17743        _this._element.classList.add(CLASS_NAME_SHOW$7);
17744
17745        $(_this._element).trigger(EVENT_SHOWN$4);
17746
17747        if (_this._config.autohide) {
17748          _this._timeout = setTimeout(function () {
17749            _this.hide();
17750          }, _this._config.delay);
17751        }
17752      };
17753
17754      this._element.classList.remove(CLASS_NAME_HIDE);
17755
17756      Util.reflow(this._element);
17757
17758      this._element.classList.add(CLASS_NAME_SHOWING);
17759
17760      if (this._config.animation) {
17761        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
17762        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
17763      } else {
17764        complete();
17765      }
17766    };
17767
17768    _proto.hide = function hide() {
17769      if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) {
17770        return;
17771      }
17772
17773      var hideEvent = $.Event(EVENT_HIDE$4);
17774      $(this._element).trigger(hideEvent);
17775
17776      if (hideEvent.isDefaultPrevented()) {
17777        return;
17778      }
17779
17780      this._close();
17781    };
17782
17783    _proto.dispose = function dispose() {
17784      this._clearTimeout();
17785
17786      if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
17787        this._element.classList.remove(CLASS_NAME_SHOW$7);
17788      }
17789
17790      $(this._element).off(EVENT_CLICK_DISMISS$1);
17791      $.removeData(this._element, DATA_KEY$a);
17792      this._element = null;
17793      this._config = null;
17794    } // Private
17795    ;
17796
17797    _proto._getConfig = function _getConfig(config) {
17798      config = _extends({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
17799      Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
17800      return config;
17801    };
17802
17803    _proto._setListeners = function _setListeners() {
17804      var _this2 = this;
17805
17806      $(this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
17807        return _this2.hide();
17808      });
17809    };
17810
17811    _proto._close = function _close() {
17812      var _this3 = this;
17813
17814      var complete = function complete() {
17815        _this3._element.classList.add(CLASS_NAME_HIDE);
17816
17817        $(_this3._element).trigger(EVENT_HIDDEN$4);
17818      };
17819
17820      this._element.classList.remove(CLASS_NAME_SHOW$7);
17821
17822      if (this._config.animation) {
17823        var transitionDuration = Util.getTransitionDurationFromElement(this._element);
17824        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
17825      } else {
17826        complete();
17827      }
17828    };
17829
17830    _proto._clearTimeout = function _clearTimeout() {
17831      clearTimeout(this._timeout);
17832      this._timeout = null;
17833    } // Static
17834    ;
17835
17836    Toast._jQueryInterface = function _jQueryInterface(config) {
17837      return this.each(function () {
17838        var $element = $(this);
17839        var data = $element.data(DATA_KEY$a);
17840
17841        var _config = typeof config === 'object' && config;
17842
17843        if (!data) {
17844          data = new Toast(this, _config);
17845          $element.data(DATA_KEY$a, data);
17846        }
17847
17848        if (typeof config === 'string') {
17849          if (typeof data[config] === 'undefined') {
17850            throw new TypeError("No method named \"" + config + "\"");
17851          }
17852
17853          data[config](this);
17854        }
17855      });
17856    };
17857
17858    _createClass(Toast, null, [{
17859      key: "VERSION",
17860      get: function get() {
17861        return VERSION$a;
17862      }
17863    }, {
17864      key: "DefaultType",
17865      get: function get() {
17866        return DefaultType$7;
17867      }
17868    }, {
17869      key: "Default",
17870      get: function get() {
17871        return Default$7;
17872      }
17873    }]);
17874
17875    return Toast;
17876  }();
17877  /**
17878   * ------------------------------------------------------------------------
17879   * jQuery
17880   * ------------------------------------------------------------------------
17881   */
17882
17883
17884  $.fn[NAME$a] = Toast._jQueryInterface;
17885  $.fn[NAME$a].Constructor = Toast;
17886
17887  $.fn[NAME$a].noConflict = function () {
17888    $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
17889    return Toast._jQueryInterface;
17890  };
17891
17892  exports.Alert = Alert;
17893  exports.Button = Button;
17894  exports.Carousel = Carousel;
17895  exports.Collapse = Collapse;
17896  exports.Dropdown = Dropdown;
17897  exports.Modal = Modal;
17898  exports.Popover = Popover;
17899  exports.Scrollspy = ScrollSpy;
17900  exports.Tab = Tab;
17901  exports.Toast = Toast;
17902  exports.Tooltip = Tooltip;
17903  exports.Util = Util;
17904
17905  Object.defineProperty(exports, '__esModule', { value: true });
17906
17907})));
17908//# sourceMappingURL=bootstrap.js.map
17909
17910;//! moment.js
17911//! version : 2.29.4
17912//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
17913//! license : MIT
17914//! momentjs.com
17915
17916;(function (global, factory) {
17917    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
17918    typeof define === 'function' && define.amd ? define(factory) :
17919    global.moment = factory()
17920}(this, (function () { 'use strict';
17921
17922    var hookCallback;
17923
17924    function hooks() {
17925        return hookCallback.apply(null, arguments);
17926    }
17927
17928    // This is done to register the method called with moment()
17929    // without creating circular dependencies.
17930    function setHookCallback(callback) {
17931        hookCallback = callback;
17932    }
17933
17934    function isArray(input) {
17935        return (
17936            input instanceof Array ||
17937            Object.prototype.toString.call(input) === '[object Array]'
17938        );
17939    }
17940
17941    function isObject(input) {
17942        // IE8 will treat undefined and null as object if it wasn't for
17943        // input != null
17944        return (
17945            input != null &&
17946            Object.prototype.toString.call(input) === '[object Object]'
17947        );
17948    }
17949
17950    function hasOwnProp(a, b) {
17951        return Object.prototype.hasOwnProperty.call(a, b);
17952    }
17953
17954    function isObjectEmpty(obj) {
17955        if (Object.getOwnPropertyNames) {
17956            return Object.getOwnPropertyNames(obj).length === 0;
17957        } else {
17958            var k;
17959            for (k in obj) {
17960                if (hasOwnProp(obj, k)) {
17961                    return false;
17962                }
17963            }
17964            return true;
17965        }
17966    }
17967
17968    function isUndefined(input) {
17969        return input === void 0;
17970    }
17971
17972    function isNumber(input) {
17973        return (
17974            typeof input === 'number' ||
17975            Object.prototype.toString.call(input) === '[object Number]'
17976        );
17977    }
17978
17979    function isDate(input) {
17980        return (
17981            input instanceof Date ||
17982            Object.prototype.toString.call(input) === '[object Date]'
17983        );
17984    }
17985
17986    function map(arr, fn) {
17987        var res = [],
17988            i,
17989            arrLen = arr.length;
17990        for (i = 0; i < arrLen; ++i) {
17991            res.push(fn(arr[i], i));
17992        }
17993        return res;
17994    }
17995
17996    function extend(a, b) {
17997        for (var i in b) {
17998            if (hasOwnProp(b, i)) {
17999                a[i] = b[i];
18000            }
18001        }
18002
18003        if (hasOwnProp(b, 'toString')) {
18004            a.toString = b.toString;
18005        }
18006
18007        if (hasOwnProp(b, 'valueOf')) {
18008            a.valueOf = b.valueOf;
18009        }
18010
18011        return a;
18012    }
18013
18014    function createUTC(input, format, locale, strict) {
18015        return createLocalOrUTC(input, format, locale, strict, true).utc();
18016    }
18017
18018    function defaultParsingFlags() {
18019        // We need to deep clone this object.
18020        return {
18021            empty: false,
18022            unusedTokens: [],
18023            unusedInput: [],
18024            overflow: -2,
18025            charsLeftOver: 0,
18026            nullInput: false,
18027            invalidEra: null,
18028            invalidMonth: null,
18029            invalidFormat: false,
18030            userInvalidated: false,
18031            iso: false,
18032            parsedDateParts: [],
18033            era: null,
18034            meridiem: null,
18035            rfc2822: false,
18036            weekdayMismatch: false,
18037        };
18038    }
18039
18040    function getParsingFlags(m) {
18041        if (m._pf == null) {
18042            m._pf = defaultParsingFlags();
18043        }
18044        return m._pf;
18045    }
18046
18047    var some;
18048    if (Array.prototype.some) {
18049        some = Array.prototype.some;
18050    } else {
18051        some = function (fun) {
18052            var t = Object(this),
18053                len = t.length >>> 0,
18054                i;
18055
18056            for (i = 0; i < len; i++) {
18057                if (i in t && fun.call(this, t[i], i, t)) {
18058                    return true;
18059                }
18060            }
18061
18062            return false;
vendor: 23,269 bytes, lines 18063-18854
18063        };
18064    }
18065
18066    function isValid(m) {
18067        if (m._isValid == null) {
18068            var flags = getParsingFlags(m),
18069                parsedParts = some.call(flags.parsedDateParts, function (i) {
18070                    return i != null;
18071                }),
18072                isNowValid =
18073                    !isNaN(m._d.getTime()) &&
18074                    flags.overflow < 0 &&
18075                    !flags.empty &&
18076                    !flags.invalidEra &&
18077                    !flags.invalidMonth &&
18078                    !flags.invalidWeekday &&
18079                    !flags.weekdayMismatch &&
18080                    !flags.nullInput &&
18081                    !flags.invalidFormat &&
18082                    !flags.userInvalidated &&
18083                    (!flags.meridiem || (flags.meridiem && parsedParts));
18084
18085            if (m._strict) {
18086                isNowValid =
18087                    isNowValid &&
18088                    flags.charsLeftOver === 0 &&
18089                    flags.unusedTokens.length === 0 &&
18090                    flags.bigHour === undefined;
18091            }
18092
18093            if (Object.isFrozen == null || !Object.isFrozen(m)) {
18094                m._isValid = isNowValid;
18095            } else {
18096                return isNowValid;
18097            }
18098        }
18099        return m._isValid;
18100    }
18101
18102    function createInvalid(flags) {
18103        var m = createUTC(NaN);
18104        if (flags != null) {
18105            extend(getParsingFlags(m), flags);
18106        } else {
18107            getParsingFlags(m).userInvalidated = true;
18108        }
18109
18110        return m;
18111    }
18112
18113    // Plugins that add properties should also add the key here (null value),
18114    // so we can properly clone ourselves.
18115    var momentProperties = (hooks.momentProperties = []),
18116        updateInProgress = false;
18117
18118    function copyConfig(to, from) {
18119        var i,
18120            prop,
18121            val,
18122            momentPropertiesLen = momentProperties.length;
18123
18124        if (!isUndefined(from._isAMomentObject)) {
18125            to._isAMomentObject = from._isAMomentObject;
18126        }
18127        if (!isUndefined(from._i)) {
18128            to._i = from._i;
18129        }
18130        if (!isUndefined(from._f)) {
18131            to._f = from._f;
18132        }
18133        if (!isUndefined(from._l)) {
18134            to._l = from._l;
18135        }
18136        if (!isUndefined(from._strict)) {
18137            to._strict = from._strict;
18138        }
18139        if (!isUndefined(from._tzm)) {
18140            to._tzm = from._tzm;
18141        }
18142        if (!isUndefined(from._isUTC)) {
18143            to._isUTC = from._isUTC;
18144        }
18145        if (!isUndefined(from._offset)) {
18146            to._offset = from._offset;
18147        }
18148        if (!isUndefined(from._pf)) {
18149            to._pf = getParsingFlags(from);
18150        }
18151        if (!isUndefined(from._locale)) {
18152            to._locale = from._locale;
18153        }
18154
18155        if (momentPropertiesLen > 0) {
18156            for (i = 0; i < momentPropertiesLen; i++) {
18157                prop = momentProperties[i];
18158                val = from[prop];
18159                if (!isUndefined(val)) {
18160                    to[prop] = val;
18161                }
18162            }
18163        }
18164
18165        return to;
18166    }
18167
18168    // Moment prototype object
18169    function Moment(config) {
18170        copyConfig(this, config);
18171        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
18172        if (!this.isValid()) {
18173            this._d = new Date(NaN);
18174        }
18175        // Prevent infinite loop in case updateOffset creates new moment
18176        // objects.
18177        if (updateInProgress === false) {
18178            updateInProgress = true;
18179            hooks.updateOffset(this);
18180            updateInProgress = false;
18181        }
18182    }
18183
18184    function isMoment(obj) {
18185        return (
18186            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
18187        );
18188    }
18189
18190    function warn(msg) {
18191        if (
18192            hooks.suppressDeprecationWarnings === false &&
18193            typeof console !== 'undefined' &&
18194            console.warn
18195        ) {
18196            console.warn('Deprecation warning: ' + msg);
18197        }
18198    }
18199
18200    function deprecate(msg, fn) {
18201        var firstTime = true;
18202
18203        return extend(function () {
18204            if (hooks.deprecationHandler != null) {
18205                hooks.deprecationHandler(null, msg);
18206            }
18207            if (firstTime) {
18208                var args = [],
18209                    arg,
18210                    i,
18211                    key,
18212                    argLen = arguments.length;
18213                for (i = 0; i < argLen; i++) {
18214                    arg = '';
18215                    if (typeof arguments[i] === 'object') {
18216                        arg += '\n[' + i + '] ';
18217                        for (key in arguments[0]) {
18218                            if (hasOwnProp(arguments[0], key)) {
18219                                arg += key + ': ' + arguments[0][key] + ', ';
18220                            }
18221                        }
18222                        arg = arg.slice(0, -2); // Remove trailing comma and space
18223                    } else {
18224                        arg = arguments[i];
18225                    }
18226                    args.push(arg);
18227                }
18228                warn(
18229                    msg +
18230                        '\nArguments: ' +
18231                        Array.prototype.slice.call(args).join('') +
18232                        '\n' +
18233                        new Error().stack
18234                );
18235                firstTime = false;
18236            }
18237            return fn.apply(this, arguments);
18238        }, fn);
18239    }
18240
18241    var deprecations = {};
18242
18243    function deprecateSimple(name, msg) {
18244        if (hooks.deprecationHandler != null) {
18245            hooks.deprecationHandler(name, msg);
18246        }
18247        if (!deprecations[name]) {
18248            warn(msg);
18249            deprecations[name] = true;
18250        }
18251    }
18252
18253    hooks.suppressDeprecationWarnings = false;
18254    hooks.deprecationHandler = null;
18255
18256    function isFunction(input) {
18257        return (
18258            (typeof Function !== 'undefined' && input instanceof Function) ||
18259            Object.prototype.toString.call(input) === '[object Function]'
18260        );
18261    }
18262
18263    function set(config) {
18264        var prop, i;
18265        for (i in config) {
18266            if (hasOwnProp(config, i)) {
18267                prop = config[i];
18268                if (isFunction(prop)) {
18269                    this[i] = prop;
18270                } else {
18271                    this['_' + i] = prop;
18272                }
18273            }
18274        }
18275        this._config = config;
18276        // Lenient ordinal parsing accepts just a number in addition to
18277        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
18278        // TODO: Remove "ordinalParse" fallback in next major release.
18279        this._dayOfMonthOrdinalParseLenient = new RegExp(
18280            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
18281                '|' +
18282                /\d{1,2}/.source
18283        );
18284    }
18285
18286    function mergeConfigs(parentConfig, childConfig) {
18287        var res = extend({}, parentConfig),
18288            prop;
18289        for (prop in childConfig) {
18290            if (hasOwnProp(childConfig, prop)) {
18291                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
18292                    res[prop] = {};
18293                    extend(res[prop], parentConfig[prop]);
18294                    extend(res[prop], childConfig[prop]);
18295                } else if (childConfig[prop] != null) {
18296                    res[prop] = childConfig[prop];
18297                } else {
18298                    delete res[prop];
18299                }
18300            }
18301        }
18302        for (prop in parentConfig) {
18303            if (
18304                hasOwnProp(parentConfig, prop) &&
18305                !hasOwnProp(childConfig, prop) &&
18306                isObject(parentConfig[prop])
18307            ) {
18308                // make sure changes to properties don't modify parent config
18309                res[prop] = extend({}, res[prop]);
18310            }
18311        }
18312        return res;
18313    }
18314
18315    function Locale(config) {
18316        if (config != null) {
18317            this.set(config);
18318        }
18319    }
18320
18321    var keys;
18322
18323    if (Object.keys) {
18324        keys = Object.keys;
18325    } else {
18326        keys = function (obj) {
18327            var i,
18328                res = [];
18329            for (i in obj) {
18330                if (hasOwnProp(obj, i)) {
18331                    res.push(i);
18332                }
18333            }
18334            return res;
18335        };
18336    }
18337
18338    var defaultCalendar = {
18339        sameDay: '[Today at] LT',
18340        nextDay: '[Tomorrow at] LT',
18341        nextWeek: 'dddd [at] LT',
18342        lastDay: '[Yesterday at] LT',
18343        lastWeek: '[Last] dddd [at] LT',
18344        sameElse: 'L',
18345    };
18346
18347    function calendar(key, mom, now) {
18348        var output = this._calendar[key] || this._calendar['sameElse'];
18349        return isFunction(output) ? output.call(mom, now) : output;
18350    }
18351
18352    function zeroFill(number, targetLength, forceSign) {
18353        var absNumber = '' + Math.abs(number),
18354            zerosToFill = targetLength - absNumber.length,
18355            sign = number >= 0;
18356        return (
18357            (sign ? (forceSign ? '+' : '') : '-') +
18358            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
18359            absNumber
18360        );
18361    }
18362
18363    var formattingTokens =
18364            /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
18365        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
18366        formatFunctions = {},
18367        formatTokenFunctions = {};
18368
18369    // token:    'M'
18370    // padded:   ['MM', 2]
18371    // ordinal:  'Mo'
18372    // callback: function () { this.month() + 1 }
18373    function addFormatToken(token, padded, ordinal, callback) {
18374        var func = callback;
18375        if (typeof callback === 'string') {
18376            func = function () {
18377                return this[callback]();
18378            };
18379        }
18380        if (token) {
18381            formatTokenFunctions[token] = func;
18382        }
18383        if (padded) {
18384            formatTokenFunctions[padded[0]] = function () {
18385                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
18386            };
18387        }
18388        if (ordinal) {
18389            formatTokenFunctions[ordinal] = function () {
18390                return this.localeData().ordinal(
18391                    func.apply(this, arguments),
18392                    token
18393                );
18394            };
18395        }
18396    }
18397
18398    function removeFormattingTokens(input) {
18399        if (input.match(/\[[\s\S]/)) {
18400            return input.replace(/^\[|\]$/g, '');
18401        }
18402        return input.replace(/\\/g, '');
18403    }
18404
18405    function makeFormatFunction(format) {
18406        var array = format.match(formattingTokens),
18407            i,
18408            length;
18409
18410        for (i = 0, length = array.length; i < length; i++) {
18411            if (formatTokenFunctions[array[i]]) {
18412                array[i] = formatTokenFunctions[array[i]];
18413            } else {
18414                array[i] = removeFormattingTokens(array[i]);
18415            }
18416        }
18417
18418        return function (mom) {
18419            var output = '',
18420                i;
18421            for (i = 0; i < length; i++) {
18422                output += isFunction(array[i])
18423                    ? array[i].call(mom, format)
18424                    : array[i];
18425            }
18426            return output;
18427        };
18428    }
18429
18430    // format date using native date object
18431    function formatMoment(m, format) {
18432        if (!m.isValid()) {
18433            return m.localeData().invalidDate();
18434        }
18435
18436        format = expandFormat(format, m.localeData());
18437        formatFunctions[format] =
18438            formatFunctions[format] || makeFormatFunction(format);
18439
18440        return formatFunctions[format](m);
18441    }
18442
18443    function expandFormat(format, locale) {
18444        var i = 5;
18445
18446        function replaceLongDateFormatTokens(input) {
18447            return locale.longDateFormat(input) || input;
18448        }
18449
18450        localFormattingTokens.lastIndex = 0;
18451        while (i >= 0 && localFormattingTokens.test(format)) {
18452            format = format.replace(
18453                localFormattingTokens,
18454                replaceLongDateFormatTokens
18455            );
18456            localFormattingTokens.lastIndex = 0;
18457            i -= 1;
18458        }
18459
18460        return format;
18461    }
18462
18463    var defaultLongDateFormat = {
18464        LTS: 'h:mm:ss A',
18465        LT: 'h:mm A',
18466        L: 'MM/DD/YYYY',
18467        LL: 'MMMM D, YYYY',
18468        LLL: 'MMMM D, YYYY h:mm A',
18469        LLLL: 'dddd, MMMM D, YYYY h:mm A',
18470    };
18471
18472    function longDateFormat(key) {
18473        var format = this._longDateFormat[key],
18474            formatUpper = this._longDateFormat[key.toUpperCase()];
18475
18476        if (format || !formatUpper) {
18477            return format;
18478        }
18479
18480        this._longDateFormat[key] = formatUpper
18481            .match(formattingTokens)
18482            .map(function (tok) {
18483                if (
18484                    tok === 'MMMM' ||
18485                    tok === 'MM' ||
18486                    tok === 'DD' ||
18487                    tok === 'dddd'
18488                ) {
18489                    return tok.slice(1);
18490                }
18491                return tok;
18492            })
18493            .join('');
18494
18495        return this._longDateFormat[key];
18496    }
18497
18498    var defaultInvalidDate = 'Invalid date';
18499
18500    function invalidDate() {
18501        return this._invalidDate;
18502    }
18503
18504    var defaultOrdinal = '%d',
18505        defaultDayOfMonthOrdinalParse = /\d{1,2}/;
18506
18507    function ordinal(number) {
18508        return this._ordinal.replace('%d', number);
18509    }
18510
18511    var defaultRelativeTime = {
18512        future: 'in %s',
18513        past: '%s ago',
18514        s: 'a few seconds',
18515        ss: '%d seconds',
18516        m: 'a minute',
18517        mm: '%d minutes',
18518        h: 'an hour',
18519        hh: '%d hours',
18520        d: 'a day',
18521        dd: '%d days',
18522        w: 'a week',
18523        ww: '%d weeks',
18524        M: 'a month',
18525        MM: '%d months',
18526        y: 'a year',
18527        yy: '%d years',
18528    };
18529
18530    function relativeTime(number, withoutSuffix, string, isFuture) {
18531        var output = this._relativeTime[string];
18532        return isFunction(output)
18533            ? output(number, withoutSuffix, string, isFuture)
18534            : output.replace(/%d/i, number);
18535    }
18536
18537    function pastFuture(diff, output) {
18538        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
18539        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
18540    }
18541
18542    var aliases = {};
18543
18544    function addUnitAlias(unit, shorthand) {
18545        var lowerCase = unit.toLowerCase();
18546        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
18547    }
18548
18549    function normalizeUnits(units) {
18550        return typeof units === 'string'
18551            ? aliases[units] || aliases[units.toLowerCase()]
18552            : undefined;
18553    }
18554
18555    function normalizeObjectUnits(inputObject) {
18556        var normalizedInput = {},
18557            normalizedProp,
18558            prop;
18559
18560        for (prop in inputObject) {
18561            if (hasOwnProp(inputObject, prop)) {
18562                normalizedProp = normalizeUnits(prop);
18563                if (normalizedProp) {
18564                    normalizedInput[normalizedProp] = inputObject[prop];
18565                }
18566            }
18567        }
18568
18569        return normalizedInput;
18570    }
18571
18572    var priorities = {};
18573
18574    function addUnitPriority(unit, priority) {
18575        priorities[unit] = priority;
18576    }
18577
18578    function getPrioritizedUnits(unitsObj) {
18579        var units = [],
18580            u;
18581        for (u in unitsObj) {
18582            if (hasOwnProp(unitsObj, u)) {
18583                units.push({ unit: u, priority: priorities[u] });
18584            }
18585        }
18586        units.sort(function (a, b) {
18587            return a.priority - b.priority;
18588        });
18589        return units;
18590    }
18591
18592    function isLeapYear(year) {
18593        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
18594    }
18595
18596    function absFloor(number) {
18597        if (number < 0) {
18598            // -0 -> 0
18599            return Math.ceil(number) || 0;
18600        } else {
18601            return Math.floor(number);
18602        }
18603    }
18604
18605    function toInt(argumentForCoercion) {
18606        var coercedNumber = +argumentForCoercion,
18607            value = 0;
18608
18609        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
18610            value = absFloor(coercedNumber);
18611        }
18612
18613        return value;
18614    }
18615
18616    function makeGetSet(unit, keepTime) {
18617        return function (value) {
18618            if (value != null) {
18619                set$1(this, unit, value);
18620                hooks.updateOffset(this, keepTime);
18621                return this;
18622            } else {
18623                return get(this, unit);
18624            }
18625        };
18626    }
18627
18628    function get(mom, unit) {
18629        return mom.isValid()
18630            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
18631            : NaN;
18632    }
18633
18634    function set$1(mom, unit, value) {
18635        if (mom.isValid() && !isNaN(value)) {
18636            if (
18637                unit === 'FullYear' &&
18638                isLeapYear(mom.year()) &&
18639                mom.month() === 1 &&
18640                mom.date() === 29
18641            ) {
18642                value = toInt(value);
18643                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
18644                    value,
18645                    mom.month(),
18646                    daysInMonth(value, mom.month())
18647                );
18648            } else {
18649                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
18650            }
18651        }
18652    }
18653
18654    // MOMENTS
18655
18656    function stringGet(units) {
18657        units = normalizeUnits(units);
18658        if (isFunction(this[units])) {
18659            return this[units]();
18660        }
18661        return this;
18662    }
18663
18664    function stringSet(units, value) {
18665        if (typeof units === 'object') {
18666            units = normalizeObjectUnits(units);
18667            var prioritized = getPrioritizedUnits(units),
18668                i,
18669                prioritizedLen = prioritized.length;
18670            for (i = 0; i < prioritizedLen; i++) {
18671                this[prioritized[i].unit](units[prioritized[i].unit]);
18672            }
18673        } else {
18674            units = normalizeUnits(units);
18675            if (isFunction(this[units])) {
18676                return this[units](value);
18677            }
18678        }
18679        return this;
18680    }
18681
18682    var match1 = /\d/, //       0 - 9
18683        match2 = /\d\d/, //      00 - 99
18684        match3 = /\d{3}/, //     000 - 999
18685        match4 = /\d{4}/, //    0000 - 9999
18686        match6 = /[+-]?\d{6}/, // -999999 - 999999
18687        match1to2 = /\d\d?/, //       0 - 99
18688        match3to4 = /\d\d\d\d?/, //     999 - 9999
18689        match5to6 = /\d\d\d\d\d\d?/, //   99999 - 999999
18690        match1to3 = /\d{1,3}/, //       0 - 999
18691        match1to4 = /\d{1,4}/, //       0 - 9999
18692        match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
18693        matchUnsigned = /\d+/, //       0 - inf
18694        matchSigned = /[+-]?\d+/, //    -inf - inf
18695        matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
18696        matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
18697        matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
18698        // any word (or two) characters or numbers including two/three word month in arabic.
18699        // includes scottish gaelic two word and hyphenated months
18700        matchWord =
18701            /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
18702        regexes;
18703
18704    regexes = {};
18705
18706    function addRegexToken(token, regex, strictRegex) {
18707        regexes[token] = isFunction(regex)
18708            ? regex
18709            : function (isStrict, localeData) {
18710                  return isStrict && strictRegex ? strictRegex : regex;
18711              };
18712    }
18713
18714    function getParseRegexForToken(token, config) {
18715        if (!hasOwnProp(regexes, token)) {
18716            return new RegExp(unescapeFormat(token));
18717        }
18718
18719        return regexes[token](config._strict, config._locale);
18720    }
18721
18722    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
18723    function unescapeFormat(s) {
18724        return regexEscape(
18725            s
18726                .replace('\\', '')
18727                .replace(
18728                    /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
18729                    function (matched, p1, p2, p3, p4) {
18730                        return p1 || p2 || p3 || p4;
18731                    }
18732                )
18733        );
18734    }
18735
18736    function regexEscape(s) {
18737        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
18738    }
18739
18740    var tokens = {};
18741
18742    function addParseToken(token, callback) {
18743        var i,
18744            func = callback,
18745            tokenLen;
18746        if (typeof token === 'string') {
18747            token = [token];
18748        }
18749        if (isNumber(callback)) {
18750            func = function (input, array) {
18751                array[callback] = toInt(input);
18752            };
18753        }
18754        tokenLen = token.length;
18755        for (i = 0; i < tokenLen; i++) {
18756            tokens[token[i]] = func;
18757        }
18758    }
18759
18760    function addWeekParseToken(token, callback) {
18761        addParseToken(token, function (input, array, config, token) {
18762            config._w = config._w || {};
18763            callback(input, config._w, config, token);
18764        });
18765    }
18766
18767    function addTimeToArrayFromToken(token, input, config) {
18768        if (input != null && hasOwnProp(tokens, token)) {
18769            tokens[token](input, config._a, config, token);
18770        }
18771    }
18772
18773    var YEAR = 0,
18774        MONTH = 1,
18775        DATE = 2,
18776        HOUR = 3,
18777        MINUTE = 4,
18778        SECOND = 5,
18779        MILLISECOND = 6,
18780        WEEK = 7,
18781        WEEKDAY = 8;
18782
18783    function mod(n, x) {
18784        return ((n % x) + x) % x;
18785    }
18786
18787    var indexOf;
18788
18789    if (Array.prototype.indexOf) {
18790        indexOf = Array.prototype.indexOf;
18791    } else {
18792        indexOf = function (o) {
18793            // I know
18794            var i;
18795            for (i = 0; i < this.length; ++i) {
18796                if (this[i] === o) {
18797                    return i;
18798                }
18799            }
18800            return -1;
18801        };
18802    }
18803
18804    function daysInMonth(year, month) {
18805        if (isNaN(year) || isNaN(month)) {
18806            return NaN;
18807        }
18808        var modMonth = mod(month, 12);
18809        year += (month - modMonth) / 12;
18810        return modMonth === 1
18811            ? isLeapYear(year)
18812                ? 29
18813                : 28
18814            : 31 - ((modMonth % 7) % 2);
18815    }
18816
18817    // FORMATTING
18818
18819    addFormatToken('M', ['MM', 2], 'Mo', function () {
18820        return this.month() + 1;
18821    });
18822
18823    addFormatToken('MMM', 0, 0, function (format) {
18824        return this.localeData().monthsShort(this, format);
18825    });
18826
18827    addFormatToken('MMMM', 0, 0, function (format) {
18828        return this.localeData().months(this, format);
18829    });
18830
18831    // ALIASES
18832
18833    addUnitAlias('month', 'M');
18834
18835    // PRIORITY
18836
18837    addUnitPriority('month', 8);
18838
18839    // PARSING
18840
18841    addRegexToken('M', match1to2);
18842    addRegexToken('MM', match1to2, match2);
18843    addRegexToken('MMM', function (isStrict, locale) {
18844        return locale.monthsShortRegex(isStrict);
18845    });
18846    addRegexToken('MMMM', function (isStrict, locale) {
18847        return locale.monthsRegex(isStrict);
18848    });
18849
18850    addParseToken(['M', 'MM'], function (input, array) {
18851        array[MONTH] = toInt(input) - 1;
18852    });
18853
18854    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
18855        var month = config._locale.monthsParse(input, token, config._strict);
18856        // if we didn't find a month name, mark the date as invalid.
18857        if (month != null) {
18858            array[MONTH] = month;
18859        } else {
18860            getParsingFlags(config).invalidMonth = input;
18861        }
18862    });
18863
18864    // LOCALES
18865
18866    var defaultLocaleMonths =
18867            'January_February_March_April_May_June_July_August_September_October_November_December'.split(
18868                '_'
18869            ),
18870        defaultLocaleMonthsShort =
18871            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'
vendor: 13,773 bytes, lines 18871-19313
18871),
18872        MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
18873        defaultMonthsShortRegex = matchWord,
18874        defaultMonthsRegex = matchWord;
18875
18876    function localeMonths(m, format) {
18877        if (!m) {
18878            return isArray(this._months)
18879                ? this._months
18880                : this._months['standalone'];
18881        }
18882        return isArray(this._months)
18883            ? this._months[m.month()]
18884            : this._months[
18885                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
18886                      ? 'format'
18887                      : 'standalone'
18888              ][m.month()];
18889    }
18890
18891    function localeMonthsShort(m, format) {
18892        if (!m) {
18893            return isArray(this._monthsShort)
18894                ? this._monthsShort
18895                : this._monthsShort['standalone'];
18896        }
18897        return isArray(this._monthsShort)
18898            ? this._monthsShort[m.month()]
18899            : this._monthsShort[
18900                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
18901              ][m.month()];
18902    }
18903
18904    function handleStrictParse(monthName, format, strict) {
18905        var i,
18906            ii,
18907            mom,
18908            llc = monthName.toLocaleLowerCase();
18909        if (!this._monthsParse) {
18910            // this is not used
18911            this._monthsParse = [];
18912            this._longMonthsParse = [];
18913            this._shortMonthsParse = [];
18914            for (i = 0; i < 12; ++i) {
18915                mom = createUTC([2000, i]);
18916                this._shortMonthsParse[i] = this.monthsShort(
18917                    mom,
18918                    ''
18919                ).toLocaleLowerCase();
18920                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
18921            }
18922        }
18923
18924        if (strict) {
18925            if (format === 'MMM') {
18926                ii = indexOf.call(this._shortMonthsParse, llc);
18927                return ii !== -1 ? ii : null;
18928            } else {
18929                ii = indexOf.call(this._longMonthsParse, llc);
18930                return ii !== -1 ? ii : null;
18931            }
18932        } else {
18933            if (format === 'MMM') {
18934                ii = indexOf.call(this._shortMonthsParse, llc);
18935                if (ii !== -1) {
18936                    return ii;
18937                }
18938                ii = indexOf.call(this._longMonthsParse, llc);
18939                return ii !== -1 ? ii : null;
18940            } else {
18941                ii = indexOf.call(this._longMonthsParse, llc);
18942                if (ii !== -1) {
18943                    return ii;
18944                }
18945                ii = indexOf.call(this._shortMonthsParse, llc);
18946                return ii !== -1 ? ii : null;
18947            }
18948        }
18949    }
18950
18951    function localeMonthsParse(monthName, format, strict) {
18952        var i, mom, regex;
18953
18954        if (this._monthsParseExact) {
18955            return handleStrictParse.call(this, monthName, format, strict);
18956        }
18957
18958        if (!this._monthsParse) {
18959            this._monthsParse = [];
18960            this._longMonthsParse = [];
18961            this._shortMonthsParse = [];
18962        }
18963
18964        // TODO: add sorting
18965        // Sorting makes sure if one month (or abbr) is a prefix of another
18966        // see sorting in computeMonthsParse
18967        for (i = 0; i < 12; i++) {
18968            // make the regex if we don't have it already
18969            mom = createUTC([2000, i]);
18970            if (strict && !this._longMonthsParse[i]) {
18971                this._longMonthsParse[i] = new RegExp(
18972                    '^' + this.months(mom, '').replace('.', '') + '$',
18973                    'i'
18974                );
18975                this._shortMonthsParse[i] = new RegExp(
18976                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
18977                    'i'
18978                );
18979            }
18980            if (!strict && !this._monthsParse[i]) {
18981                regex =
18982                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
18983                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
18984            }
18985            // test the regex
18986            if (
18987                strict &&
18988                format === 'MMMM' &&
18989                this._longMonthsParse[i].test(monthName)
18990            ) {
18991                return i;
18992            } else if (
18993                strict &&
18994                format === 'MMM' &&
18995                this._shortMonthsParse[i].test(monthName)
18996            ) {
18997                return i;
18998            } else if (!strict && this._monthsParse[i].test(monthName)) {
18999                return i;
19000            }
19001        }
19002    }
19003
19004    // MOMENTS
19005
19006    function setMonth(mom, value) {
19007        var dayOfMonth;
19008
19009        if (!mom.isValid()) {
19010            // No op
19011            return mom;
19012        }
19013
19014        if (typeof value === 'string') {
19015            if (/^\d+$/.test(value)) {
19016                value = toInt(value);
19017            } else {
19018                value = mom.localeData().monthsParse(value);
19019                // TODO: Another silent failure?
19020                if (!isNumber(value)) {
19021                    return mom;
19022                }
19023            }
19024        }
19025
19026        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
19027        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
19028        return mom;
19029    }
19030
19031    function getSetMonth(value) {
19032        if (value != null) {
19033            setMonth(this, value);
19034            hooks.updateOffset(this, true);
19035            return this;
19036        } else {
19037            return get(this, 'Month');
19038        }
19039    }
19040
19041    function getDaysInMonth() {
19042        return daysInMonth(this.year(), this.month());
19043    }
19044
19045    function monthsShortRegex(isStrict) {
19046        if (this._monthsParseExact) {
19047            if (!hasOwnProp(this, '_monthsRegex')) {
19048                computeMonthsParse.call(this);
19049            }
19050            if (isStrict) {
19051                return this._monthsShortStrictRegex;
19052            } else {
19053                return this._monthsShortRegex;
19054            }
19055        } else {
19056            if (!hasOwnProp(this, '_monthsShortRegex')) {
19057                this._monthsShortRegex = defaultMonthsShortRegex;
19058            }
19059            return this._monthsShortStrictRegex && isStrict
19060                ? this._monthsShortStrictRegex
19061                : this._monthsShortRegex;
19062        }
19063    }
19064
19065    function monthsRegex(isStrict) {
19066        if (this._monthsParseExact) {
19067            if (!hasOwnProp(this, '_monthsRegex')) {
19068                computeMonthsParse.call(this);
19069            }
19070            if (isStrict) {
19071                return this._monthsStrictRegex;
19072            } else {
19073                return this._monthsRegex;
19074            }
19075        } else {
19076            if (!hasOwnProp(this, '_monthsRegex')) {
19077                this._monthsRegex = defaultMonthsRegex;
19078            }
19079            return this._monthsStrictRegex && isStrict
19080                ? this._monthsStrictRegex
19081                : this._monthsRegex;
19082        }
19083    }
19084
19085    function computeMonthsParse() {
19086        function cmpLenRev(a, b) {
19087            return b.length - a.length;
19088        }
19089
19090        var shortPieces = [],
19091            longPieces = [],
19092            mixedPieces = [],
19093            i,
19094            mom;
19095        for (i = 0; i < 12; i++) {
19096            // make the regex if we don't have it already
19097            mom = createUTC([2000, i]);
19098            shortPieces.push(this.monthsShort(mom, ''));
19099            longPieces.push(this.months(mom, ''));
19100            mixedPieces.push(this.months(mom, ''));
19101            mixedPieces.push(this.monthsShort(mom, ''));
19102        }
19103        // Sorting makes sure if one month (or abbr) is a prefix of another it
19104        // will match the longer piece.
19105        shortPieces.sort(cmpLenRev);
19106        longPieces.sort(cmpLenRev);
19107        mixedPieces.sort(cmpLenRev);
19108        for (i = 0; i < 12; i++) {
19109            shortPieces[i] = regexEscape(shortPieces[i]);
19110            longPieces[i] = regexEscape(longPieces[i]);
19111        }
19112        for (i = 0; i < 24; i++) {
19113            mixedPieces[i] = regexEscape(mixedPieces[i]);
19114        }
19115
19116        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
19117        this._monthsShortRegex = this._monthsRegex;
19118        this._monthsStrictRegex = new RegExp(
19119            '^(' + longPieces.join('|') + ')',
19120            'i'
19121        );
19122        this._monthsShortStrictRegex = new RegExp(
19123            '^(' + shortPieces.join('|') + ')',
19124            'i'
19125        );
19126    }
19127
19128    // FORMATTING
19129
19130    addFormatToken('Y', 0, 0, function () {
19131        var y = this.year();
19132        return y <= 9999 ? zeroFill(y, 4) : '+' + y;
19133    });
19134
19135    addFormatToken(0, ['YY', 2], 0, function () {
19136        return this.year() % 100;
19137    });
19138
19139    addFormatToken(0, ['YYYY', 4], 0, 'year');
19140    addFormatToken(0, ['YYYYY', 5], 0, 'year');
19141    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
19142
19143    // ALIASES
19144
19145    addUnitAlias('year', 'y');
19146
19147    // PRIORITIES
19148
19149    addUnitPriority('year', 1);
19150
19151    // PARSING
19152
19153    addRegexToken('Y', matchSigned);
19154    addRegexToken('YY', match1to2, match2);
19155    addRegexToken('YYYY', match1to4, match4);
19156    addRegexToken('YYYYY', match1to6, match6);
19157    addRegexToken('YYYYYY', match1to6, match6);
19158
19159    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
19160    addParseToken('YYYY', function (input, array) {
19161        array[YEAR] =
19162            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
19163    });
19164    addParseToken('YY', function (input, array) {
19165        array[YEAR] = hooks.parseTwoDigitYear(input);
19166    });
19167    addParseToken('Y', function (input, array) {
19168        array[YEAR] = parseInt(input, 10);
19169    });
19170
19171    // HELPERS
19172
19173    function daysInYear(year) {
19174        return isLeapYear(year) ? 366 : 365;
19175    }
19176
19177    // HOOKS
19178
19179    hooks.parseTwoDigitYear = function (input) {
19180        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
19181    };
19182
19183    // MOMENTS
19184
19185    var getSetYear = makeGetSet('FullYear', true);
19186
19187    function getIsLeapYear() {
19188        return isLeapYear(this.year());
19189    }
19190
19191    function createDate(y, m, d, h, M, s, ms) {
19192        // can't just apply() to create a date:
19193        // https://stackoverflow.com/q/181348
19194        var date;
19195        // the date constructor remaps years 0-99 to 1900-1999
19196        if (y < 100 && y >= 0) {
19197            // preserve leap years using a full 400 year cycle, then reset
19198            date = new Date(y + 400, m, d, h, M, s, ms);
19199            if (isFinite(date.getFullYear())) {
19200                date.setFullYear(y);
19201            }
19202        } else {
19203            date = new Date(y, m, d, h, M, s, ms);
19204        }
19205
19206        return date;
19207    }
19208
19209    function createUTCDate(y) {
19210        var date, args;
19211        // the Date.UTC function remaps years 0-99 to 1900-1999
19212        if (y < 100 && y >= 0) {
19213            args = Array.prototype.slice.call(arguments);
19214            // preserve leap years using a full 400 year cycle, then reset
19215            args[0] = y + 400;
19216            date = new Date(Date.UTC.apply(null, args));
19217            if (isFinite(date.getUTCFullYear())) {
19218                date.setUTCFullYear(y);
19219            }
19220        } else {
19221            date = new Date(Date.UTC.apply(null, arguments));
19222        }
19223
19224        return date;
19225    }
19226
19227    // start-of-first-week - start-of-year
19228    function firstWeekOffset(year, dow, doy) {
19229        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
19230            fwd = 7 + dow - doy,
19231            // first-week day local weekday -- which local weekday is fwd
19232            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
19233
19234        return -fwdlw + fwd - 1;
19235    }
19236
19237    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
19238    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
19239        var localWeekday = (7 + weekday - dow) % 7,
19240            weekOffset = firstWeekOffset(year, dow, doy),
19241            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
19242            resYear,
19243            resDayOfYear;
19244
19245        if (dayOfYear <= 0) {
19246            resYear = year - 1;
19247            resDayOfYear = daysInYear(resYear) + dayOfYear;
19248        } else if (dayOfYear > daysInYear(year)) {
19249            resYear = year + 1;
19250            resDayOfYear = dayOfYear - daysInYear(year);
19251        } else {
19252            resYear = year;
19253            resDayOfYear = dayOfYear;
19254        }
19255
19256        return {
19257            year: resYear,
19258            dayOfYear: resDayOfYear,
19259        };
19260    }
19261
19262    function weekOfYear(mom, dow, doy) {
19263        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
19264            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
19265            resWeek,
19266            resYear;
19267
19268        if (week < 1) {
19269            resYear = mom.year() - 1;
19270            resWeek = week + weeksInYear(resYear, dow, doy);
19271        } else if (week > weeksInYear(mom.year(), dow, doy)) {
19272            resWeek = week - weeksInYear(mom.year(), dow, doy);
19273            resYear = mom.year() + 1;
19274        } else {
19275            resYear = mom.year();
19276            resWeek = week;
19277        }
19278
19279        return {
19280            week: resWeek,
19281            year: resYear,
19282        };
19283    }
19284
19285    function weeksInYear(year, dow, doy) {
19286        var weekOffset = firstWeekOffset(year, dow, doy),
19287            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
19288        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
19289    }
19290
19291    // FORMATTING
19292
19293    addFormatToken('w', ['ww', 2], 'wo', 'week');
19294    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
19295
19296    // ALIASES
19297
19298    addUnitAlias('week', 'w');
19299    addUnitAlias('isoWeek', 'W');
19300
19301    // PRIORITIES
19302
19303    addUnitPriority('week', 5);
19304    addUnitPriority('isoWeek', 5);
19305
19306    // PARSING
19307
19308    addRegexToken('w', match1to2);
19309    addRegexToken('ww', match1to2, match2);
19310    addRegexToken('W', match1to2);
19311    addRegexToken('WW', match1to2, match2);
19312
19313    addWeekParseToken(
vendor: 3,487 bytes, lines 19313-19444
19313
19314        ['w', 'ww', 'W', 'WW'],
19315        function (input, week, config, token) {
19316            week[token.substr(0, 1)] = toInt(input);
19317        }
19318    );
19319
19320    // HELPERS
19321
19322    // LOCALES
19323
19324    function localeWeek(mom) {
19325        return weekOfYear(mom, this._week.dow, this._week.doy).week;
19326    }
19327
19328    var defaultLocaleWeek = {
19329        dow: 0, // Sunday is the first day of the week.
19330        doy: 6, // The week that contains Jan 6th is the first week of the year.
19331    };
19332
19333    function localeFirstDayOfWeek() {
19334        return this._week.dow;
19335    }
19336
19337    function localeFirstDayOfYear() {
19338        return this._week.doy;
19339    }
19340
19341    // MOMENTS
19342
19343    function getSetWeek(input) {
19344        var week = this.localeData().week(this);
19345        return input == null ? week : this.add((input - week) * 7, 'd');
19346    }
19347
19348    function getSetISOWeek(input) {
19349        var week = weekOfYear(this, 1, 4).week;
19350        return input == null ? week : this.add((input - week) * 7, 'd');
19351    }
19352
19353    // FORMATTING
19354
19355    addFormatToken('d', 0, 'do', 'day');
19356
19357    addFormatToken('dd', 0, 0, function (format) {
19358        return this.localeData().weekdaysMin(this, format);
19359    });
19360
19361    addFormatToken('ddd', 0, 0, function (format) {
19362        return this.localeData().weekdaysShort(this, format);
19363    });
19364
19365    addFormatToken('dddd', 0, 0, function (format) {
19366        return this.localeData().weekdays(this, format);
19367    });
19368
19369    addFormatToken('e', 0, 0, 'weekday');
19370    addFormatToken('E', 0, 0, 'isoWeekday');
19371
19372    // ALIASES
19373
19374    addUnitAlias('day', 'd');
19375    addUnitAlias('weekday', 'e');
19376    addUnitAlias('isoWeekday', 'E');
19377
19378    // PRIORITY
19379    addUnitPriority('day', 11);
19380    addUnitPriority('weekday', 11);
19381    addUnitPriority('isoWeekday', 11);
19382
19383    // PARSING
19384
19385    addRegexToken('d', match1to2);
19386    addRegexToken('e', match1to2);
19387    addRegexToken('E', match1to2);
19388    addRegexToken('dd', function (isStrict, locale) {
19389        return locale.weekdaysMinRegex(isStrict);
19390    });
19391    addRegexToken('ddd', function (isStrict, locale) {
19392        return locale.weekdaysShortRegex(isStrict);
19393    });
19394    addRegexToken('dddd', function (isStrict, locale) {
19395        return locale.weekdaysRegex(isStrict);
19396    });
19397
19398    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
19399        var weekday = config._locale.weekdaysParse(input, token, config._strict);
19400        // if we didn't get a weekday name, mark the date as invalid
19401        if (weekday != null) {
19402            week.d = weekday;
19403        } else {
19404            getParsingFlags(config).invalidWeekday = input;
19405        }
19406    });
19407
19408    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
19409        week[token] = toInt(input);
19410    });
19411
19412    // HELPERS
19413
19414    function parseWeekday(input, locale) {
19415        if (typeof input !== 'string') {
19416            return input;
19417        }
19418
19419        if (!isNaN(input)) {
19420            return parseInt(input, 10);
19421        }
19422
19423        input = locale.weekdaysParse(input);
19424        if (typeof input === 'number') {
19425            return input;
19426        }
19427
19428        return null;
19429    }
19430
19431    function parseIsoWeekday(input, locale) {
19432        if (typeof input === 'string') {
19433            return locale.weekdaysParse(input) % 7 || 7;
19434        }
19435        return isNaN(input) ? null : input;
19436    }
19437
19438    // LOCALES
19439    function shiftWeekdays(ws, n) {
19440        return ws.slice(n, 7).concat(ws.slice(0, n));
19441    }
19442
19443    var defaultLocaleWeekdays =
19444            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'
vendor: 17,864 bytes, lines 19444-19992
19444),
19445        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
19446        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
19447        defaultWeekdaysRegex = matchWord,
19448        defaultWeekdaysShortRegex = matchWord,
19449        defaultWeekdaysMinRegex = matchWord;
19450
19451    function localeWeekdays(m, format) {
19452        var weekdays = isArray(this._weekdays)
19453            ? this._weekdays
19454            : this._weekdays[
19455                  m && m !== true && this._weekdays.isFormat.test(format)
19456                      ? 'format'
19457                      : 'standalone'
19458              ];
19459        return m === true
19460            ? shiftWeekdays(weekdays, this._week.dow)
19461            : m
19462            ? weekdays[m.day()]
19463            : weekdays;
19464    }
19465
19466    function localeWeekdaysShort(m) {
19467        return m === true
19468            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
19469            : m
19470            ? this._weekdaysShort[m.day()]
19471            : this._weekdaysShort;
19472    }
19473
19474    function localeWeekdaysMin(m) {
19475        return m === true
19476            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
19477            : m
19478            ? this._weekdaysMin[m.day()]
19479            : this._weekdaysMin;
19480    }
19481
19482    function handleStrictParse$1(weekdayName, format, strict) {
19483        var i,
19484            ii,
19485            mom,
19486            llc = weekdayName.toLocaleLowerCase();
19487        if (!this._weekdaysParse) {
19488            this._weekdaysParse = [];
19489            this._shortWeekdaysParse = [];
19490            this._minWeekdaysParse = [];
19491
19492            for (i = 0; i < 7; ++i) {
19493                mom = createUTC([2000, 1]).day(i);
19494                this._minWeekdaysParse[i] = this.weekdaysMin(
19495                    mom,
19496                    ''
19497                ).toLocaleLowerCase();
19498                this._shortWeekdaysParse[i] = this.weekdaysShort(
19499                    mom,
19500                    ''
19501                ).toLocaleLowerCase();
19502                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
19503            }
19504        }
19505
19506        if (strict) {
19507            if (format === 'dddd') {
19508                ii = indexOf.call(this._weekdaysParse, llc);
19509                return ii !== -1 ? ii : null;
19510            } else if (format === 'ddd') {
19511                ii = indexOf.call(this._shortWeekdaysParse, llc);
19512                return ii !== -1 ? ii : null;
19513            } else {
19514                ii = indexOf.call(this._minWeekdaysParse, llc);
19515                return ii !== -1 ? ii : null;
19516            }
19517        } else {
19518            if (format === 'dddd') {
19519                ii = indexOf.call(this._weekdaysParse, llc);
19520                if (ii !== -1) {
19521                    return ii;
19522                }
19523                ii = indexOf.call(this._shortWeekdaysParse, llc);
19524                if (ii !== -1) {
19525                    return ii;
19526                }
19527                ii = indexOf.call(this._minWeekdaysParse, llc);
19528                return ii !== -1 ? ii : null;
19529            } else if (format === 'ddd') {
19530                ii = indexOf.call(this._shortWeekdaysParse, llc);
19531                if (ii !== -1) {
19532                    return ii;
19533                }
19534                ii = indexOf.call(this._weekdaysParse, llc);
19535                if (ii !== -1) {
19536                    return ii;
19537                }
19538                ii = indexOf.call(this._minWeekdaysParse, llc);
19539                return ii !== -1 ? ii : null;
19540            } else {
19541                ii = indexOf.call(this._minWeekdaysParse, llc);
19542                if (ii !== -1) {
19543                    return ii;
19544                }
19545                ii = indexOf.call(this._weekdaysParse, llc);
19546                if (ii !== -1) {
19547                    return ii;
19548                }
19549                ii = indexOf.call(this._shortWeekdaysParse, llc);
19550                return ii !== -1 ? ii : null;
19551            }
19552        }
19553    }
19554
19555    function localeWeekdaysParse(weekdayName, format, strict) {
19556        var i, mom, regex;
19557
19558        if (this._weekdaysParseExact) {
19559            return handleStrictParse$1.call(this, weekdayName, format, strict);
19560        }
19561
19562        if (!this._weekdaysParse) {
19563            this._weekdaysParse = [];
19564            this._minWeekdaysParse = [];
19565            this._shortWeekdaysParse = [];
19566            this._fullWeekdaysParse = [];
19567        }
19568
19569        for (i = 0; i < 7; i++) {
19570            // make the regex if we don't have it already
19571
19572            mom = createUTC([2000, 1]).day(i);
19573            if (strict && !this._fullWeekdaysParse[i]) {
19574                this._fullWeekdaysParse[i] = new RegExp(
19575                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
19576                    'i'
19577                );
19578                this._shortWeekdaysParse[i] = new RegExp(
19579                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
19580                    'i'
19581                );
19582                this._minWeekdaysParse[i] = new RegExp(
19583                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
19584                    'i'
19585                );
19586            }
19587            if (!this._weekdaysParse[i]) {
19588                regex =
19589                    '^' +
19590                    this.weekdays(mom, '') +
19591                    '|^' +
19592                    this.weekdaysShort(mom, '') +
19593                    '|^' +
19594                    this.weekdaysMin(mom, '');
19595                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
19596            }
19597            // test the regex
19598            if (
19599                strict &&
19600                format === 'dddd' &&
19601                this._fullWeekdaysParse[i].test(weekdayName)
19602            ) {
19603                return i;
19604            } else if (
19605                strict &&
19606                format === 'ddd' &&
19607                this._shortWeekdaysParse[i].test(weekdayName)
19608            ) {
19609                return i;
19610            } else if (
19611                strict &&
19612                format === 'dd' &&
19613                this._minWeekdaysParse[i].test(weekdayName)
19614            ) {
19615                return i;
19616            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
19617                return i;
19618            }
19619        }
19620    }
19621
19622    // MOMENTS
19623
19624    function getSetDayOfWeek(input) {
19625        if (!this.isValid()) {
19626            return input != null ? this : NaN;
19627        }
19628        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
19629        if (input != null) {
19630            input = parseWeekday(input, this.localeData());
19631            return this.add(input - day, 'd');
19632        } else {
19633            return day;
19634        }
19635    }
19636
19637    function getSetLocaleDayOfWeek(input) {
19638        if (!this.isValid()) {
19639            return input != null ? this : NaN;
19640        }
19641        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
19642        return input == null ? weekday : this.add(input - weekday, 'd');
19643    }
19644
19645    function getSetISODayOfWeek(input) {
19646        if (!this.isValid()) {
19647            return input != null ? this : NaN;
19648        }
19649
19650        // behaves the same as moment#day except
19651        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
19652        // as a setter, sunday should belong to the previous week.
19653
19654        if (input != null) {
19655            var weekday = parseIsoWeekday(input, this.localeData());
19656            return this.day(this.day() % 7 ? weekday : weekday - 7);
19657        } else {
19658            return this.day() || 7;
19659        }
19660    }
19661
19662    function weekdaysRegex(isStrict) {
19663        if (this._weekdaysParseExact) {
19664            if (!hasOwnProp(this, '_weekdaysRegex')) {
19665                computeWeekdaysParse.call(this);
19666            }
19667            if (isStrict) {
19668                return this._weekdaysStrictRegex;
19669            } else {
19670                return this._weekdaysRegex;
19671            }
19672        } else {
19673            if (!hasOwnProp(this, '_weekdaysRegex')) {
19674                this._weekdaysRegex = defaultWeekdaysRegex;
19675            }
19676            return this._weekdaysStrictRegex && isStrict
19677                ? this._weekdaysStrictRegex
19678                : this._weekdaysRegex;
19679        }
19680    }
19681
19682    function weekdaysShortRegex(isStrict) {
19683        if (this._weekdaysParseExact) {
19684            if (!hasOwnProp(this, '_weekdaysRegex')) {
19685                computeWeekdaysParse.call(this);
19686            }
19687            if (isStrict) {
19688                return this._weekdaysShortStrictRegex;
19689            } else {
19690                return this._weekdaysShortRegex;
19691            }
19692        } else {
19693            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
19694                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
19695            }
19696            return this._weekdaysShortStrictRegex && isStrict
19697                ? this._weekdaysShortStrictRegex
19698                : this._weekdaysShortRegex;
19699        }
19700    }
19701
19702    function weekdaysMinRegex(isStrict) {
19703        if (this._weekdaysParseExact) {
19704            if (!hasOwnProp(this, '_weekdaysRegex')) {
19705                computeWeekdaysParse.call(this);
19706            }
19707            if (isStrict) {
19708                return this._weekdaysMinStrictRegex;
19709            } else {
19710                return this._weekdaysMinRegex;
19711            }
19712        } else {
19713            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
19714                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
19715            }
19716            return this._weekdaysMinStrictRegex && isStrict
19717                ? this._weekdaysMinStrictRegex
19718                : this._weekdaysMinRegex;
19719        }
19720    }
19721
19722    function computeWeekdaysParse() {
19723        function cmpLenRev(a, b) {
19724            return b.length - a.length;
19725        }
19726
19727        var minPieces = [],
19728            shortPieces = [],
19729            longPieces = [],
19730            mixedPieces = [],
19731            i,
19732            mom,
19733            minp,
19734            shortp,
19735            longp;
19736        for (i = 0; i < 7; i++) {
19737            // make the regex if we don't have it already
19738            mom = createUTC([2000, 1]).day(i);
19739            minp = regexEscape(this.weekdaysMin(mom, ''));
19740            shortp = regexEscape(this.weekdaysShort(mom, ''));
19741            longp = regexEscape(this.weekdays(mom, ''));
19742            minPieces.push(minp);
19743            shortPieces.push(shortp);
19744            longPieces.push(longp);
19745            mixedPieces.push(minp);
19746            mixedPieces.push(shortp);
19747            mixedPieces.push(longp);
19748        }
19749        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
19750        // will match the longer piece.
19751        minPieces.sort(cmpLenRev);
19752        shortPieces.sort(cmpLenRev);
19753        longPieces.sort(cmpLenRev);
19754        mixedPieces.sort(cmpLenRev);
19755
19756        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
19757        this._weekdaysShortRegex = this._weekdaysRegex;
19758        this._weekdaysMinRegex = this._weekdaysRegex;
19759
19760        this._weekdaysStrictRegex = new RegExp(
19761            '^(' + longPieces.join('|') + ')',
19762            'i'
19763        );
19764        this._weekdaysShortStrictRegex = new RegExp(
19765            '^(' + shortPieces.join('|') + ')',
19766            'i'
19767        );
19768        this._weekdaysMinStrictRegex = new RegExp(
19769            '^(' + minPieces.join('|') + ')',
19770            'i'
19771        );
19772    }
19773
19774    // FORMATTING
19775
19776    function hFormat() {
19777        return this.hours() % 12 || 12;
19778    }
19779
19780    function kFormat() {
19781        return this.hours() || 24;
19782    }
19783
19784    addFormatToken('H', ['HH', 2], 0, 'hour');
19785    addFormatToken('h', ['hh', 2], 0, hFormat);
19786    addFormatToken('k', ['kk', 2], 0, kFormat);
19787
19788    addFormatToken('hmm', 0, 0, function () {
19789        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
19790    });
19791
19792    addFormatToken('hmmss', 0, 0, function () {
19793        return (
19794            '' +
19795            hFormat.apply(this) +
19796            zeroFill(this.minutes(), 2) +
19797            zeroFill(this.seconds(), 2)
19798        );
19799    });
19800
19801    addFormatToken('Hmm', 0, 0, function () {
19802        return '' + this.hours() + zeroFill(this.minutes(), 2);
19803    });
19804
19805    addFormatToken('Hmmss', 0, 0, function () {
19806        return (
19807            '' +
19808            this.hours() +
19809            zeroFill(this.minutes(), 2) +
19810            zeroFill(this.seconds(), 2)
19811        );
19812    });
19813
19814    function meridiem(token, lowercase) {
19815        addFormatToken(token, 0, 0, function () {
19816            return this.localeData().meridiem(
19817                this.hours(),
19818                this.minutes(),
19819                lowercase
19820            );
19821        });
19822    }
19823
19824    meridiem('a', true);
19825    meridiem('A', false);
19826
19827    // ALIASES
19828
19829    addUnitAlias('hour', 'h');
19830
19831    // PRIORITY
19832    addUnitPriority('hour', 13);
19833
19834    // PARSING
19835
19836    function matchMeridiem(isStrict, locale) {
19837        return locale._meridiemParse;
19838    }
19839
19840    addRegexToken('a', matchMeridiem);
19841    addRegexToken('A', matchMeridiem);
19842    addRegexToken('H', match1to2);
19843    addRegexToken('h', match1to2);
19844    addRegexToken('k', match1to2);
19845    addRegexToken('HH', match1to2, match2);
19846    addRegexToken('hh', match1to2, match2);
19847    addRegexToken('kk', match1to2, match2);
19848
19849    addRegexToken('hmm', match3to4);
19850    addRegexToken('hmmss', match5to6);
19851    addRegexToken('Hmm', match3to4);
19852    addRegexToken('Hmmss', match5to6);
19853
19854    addParseToken(['H', 'HH'], HOUR);
19855    addParseToken(['k', 'kk'], function (input, array, config) {
19856        var kInput = toInt(input);
19857        array[HOUR] = kInput === 24 ? 0 : kInput;
19858    });
19859    addParseToken(['a', 'A'], function (input, array, config) {
19860        config._isPm = config._locale.isPM(input);
19861        config._meridiem = input;
19862    });
19863    addParseToken(['h', 'hh'], function (input, array, config) {
19864        array[HOUR] = toInt(input);
19865        getParsingFlags(config).bigHour = true;
19866    });
19867    addParseToken('hmm', function (input, array, config) {
19868        var pos = input.length - 2;
19869        array[HOUR] = toInt(input.substr(0, pos));
19870        array[MINUTE] = toInt(input.substr(pos));
19871        getParsingFlags(config).bigHour = true;
19872    });
19873    addParseToken('hmmss', function (input, array, config) {
19874        var pos1 = input.length - 4,
19875            pos2 = input.length - 2;
19876        array[HOUR] = toInt(input.substr(0, pos1));
19877        array[MINUTE] = toInt(input.substr(pos1, 2));
19878        array[SECOND] = toInt(input.substr(pos2));
19879        getParsingFlags(config).bigHour = true;
19880    });
19881    addParseToken('Hmm', function (input, array, config) {
19882        var pos = input.length - 2;
19883        array[HOUR] = toInt(input.substr(0, pos));
19884        array[MINUTE] = toInt(input.substr(pos));
19885    });
19886    addParseToken('Hmmss', function (input, array, config) {
19887        var pos1 = input.length - 4,
19888            pos2 = input.length - 2;
19889        array[HOUR] = toInt(input.substr(0, pos1));
19890        array[MINUTE] = toInt(input.substr(pos1, 2));
19891        array[SECOND] = toInt(input.substr(pos2));
19892    });
19893
19894    // LOCALES
19895
19896    function localeIsPM(input) {
19897        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
19898        // Using charAt should be more compatible.
19899        return (input + '').toLowerCase().charAt(0) === 'p';
19900    }
19901
19902    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
19903        // Setting the hour should keep the time, because the user explicitly
19904        // specified which hour they want. So trying to maintain the same hour (in
19905        // a new timezone) makes sense. Adding/subtracting hours does not follow
19906        // this rule.
19907        getSetHour = makeGetSet('Hours', true);
19908
19909    function localeMeridiem(hours, minutes, isLower) {
19910        if (hours > 11) {
19911            return isLower ? 'pm' : 'PM';
19912        } else {
19913            return isLower ? 'am' : 'AM';
19914        }
19915    }
19916
19917    var baseConfig = {
19918        calendar: defaultCalendar,
19919        longDateFormat: defaultLongDateFormat,
19920        invalidDate: defaultInvalidDate,
19921        ordinal: defaultOrdinal,
19922        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
19923        relativeTime: defaultRelativeTime,
19924
19925        months: defaultLocaleMonths,
19926        monthsShort: defaultLocaleMonthsShort,
19927
19928        week: defaultLocaleWeek,
19929
19930        weekdays: defaultLocaleWeekdays,
19931        weekdaysMin: defaultLocaleWeekdaysMin,
19932        weekdaysShort: defaultLocaleWeekdaysShort,
19933
19934        meridiemParse: defaultLocaleMeridiemParse,
19935    };
19936
19937    // internal storage for locale config files
19938    var locales = {},
19939        localeFamilies = {},
19940        globalLocale;
19941
19942    function commonPrefix(arr1, arr2) {
19943        var i,
19944            minl = Math.min(arr1.length, arr2.length);
19945        for (i = 0; i < minl; i += 1) {
19946            if (arr1[i] !== arr2[i]) {
19947                return i;
19948            }
19949        }
19950        return minl;
19951    }
19952
19953    function normalizeLocale(key) {
19954        return key ? key.toLowerCase().replace('_', '-') : key;
19955    }
19956
19957    // pick the locale from the array
19958    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
19959    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
19960    function chooseLocale(names) {
19961        var i = 0,
19962            j,
19963            next,
19964            locale,
19965            split;
19966
19967        while (i < names.length) {
19968            split = normalizeLocale(names[i]).split('-');
19969            j = split.length;
19970            next = normalizeLocale(names[i + 1]);
19971            next = next ? next.split('-') : null;
19972            while (j > 0) {
19973                locale = loadLocale(split.slice(0, j).join('-'));
19974                if (locale) {
19975                    return locale;
19976                }
19977                if (
19978                    next &&
19979                    next.length >= j &&
19980                    commonPrefix(split, next) >= j - 1
19981                ) {
19982                    //the next array item is better than a shallower substring of this one
19983                    break;
19984                }
19985                j--;
19986            }
19987            i++;
19988        }
19989        return globalLocale;
19990    }
19991
19992    function 
vendor: 7,449 bytes, lines 19992-20199
19992isLocaleNameSane(name) {
19993        // Prevent names that look like filesystem paths, i.e contain '/' or '\'
19994        return name.match('^[^/\\\\]*$') != null;
19995    }
19996
19997    function loadLocale(name) {
19998        var oldLocale = null,
19999            aliasedRequire;
20000        // TODO: Find a better way to register and load all the locales in Node
20001        if (
20002            locales[name] === undefined &&
20003            typeof module !== 'undefined' &&
20004            module &&
20005            module.exports &&
20006            isLocaleNameSane(name)
20007        ) {
20008            try {
20009                oldLocale = globalLocale._abbr;
20010                aliasedRequire = require;
20011                aliasedRequire('./locale/' + name);
20012                getSetGlobalLocale(oldLocale);
20013            } catch (e) {
20014                // mark as not found to avoid repeating expensive file require call causing high CPU
20015                // when trying to find en-US, en_US, en-us for every format call
20016                locales[name] = null; // null means not found
20017            }
20018        }
20019        return locales[name];
20020    }
20021
20022    // This function will load locale and then set the global locale.  If
20023    // no arguments are passed in, it will simply return the current global
20024    // locale key.
20025    function getSetGlobalLocale(key, values) {
20026        var data;
20027        if (key) {
20028            if (isUndefined(values)) {
20029                data = getLocale(key);
20030            } else {
20031                data = defineLocale(key, values);
20032            }
20033
20034            if (data) {
20035                // moment.duration._locale = moment._locale = data;
20036                globalLocale = data;
20037            } else {
20038                if (typeof console !== 'undefined' && console.warn) {
20039                    //warn user if arguments are passed but the locale could not be set
20040                    console.warn(
20041                        'Locale ' + key + ' not found. Did you forget to load it?'
20042                    );
20043                }
20044            }
20045        }
20046
20047        return globalLocale._abbr;
20048    }
20049
20050    function defineLocale(name, config) {
20051        if (config !== null) {
20052            var locale,
20053                parentConfig = baseConfig;
20054            config.abbr = name;
20055            if (locales[name] != null) {
20056                deprecateSimple(
20057                    'defineLocaleOverride',
20058                    'use moment.updateLocale(localeName, config) to change ' +
20059                        'an existing locale. moment.defineLocale(localeName, ' +
20060                        'config) should only be used for creating a new locale ' +
20061                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
20062                );
20063                parentConfig = locales[name]._config;
20064            } else if (config.parentLocale != null) {
20065                if (locales[config.parentLocale] != null) {
20066                    parentConfig = locales[config.parentLocale]._config;
20067                } else {
20068                    locale = loadLocale(config.parentLocale);
20069                    if (locale != null) {
20070                        parentConfig = locale._config;
20071                    } else {
20072                        if (!localeFamilies[config.parentLocale]) {
20073                            localeFamilies[config.parentLocale] = [];
20074                        }
20075                        localeFamilies[config.parentLocale].push({
20076                            name: name,
20077                            config: config,
20078                        });
20079                        return null;
20080                    }
20081                }
20082            }
20083            locales[name] = new Locale(mergeConfigs(parentConfig, config));
20084
20085            if (localeFamilies[name]) {
20086                localeFamilies[name].forEach(function (x) {
20087                    defineLocale(x.name, x.config);
20088                });
20089            }
20090
20091            // backwards compat for now: also set the locale
20092            // make sure we set the locale AFTER all child locales have been
20093            // created, so we won't end up with the child locale set.
20094            getSetGlobalLocale(name);
20095
20096            return locales[name];
20097        } else {
20098            // useful for testing
20099            delete locales[name];
20100            return null;
20101        }
20102    }
20103
20104    function updateLocale(name, config) {
20105        if (config != null) {
20106            var locale,
20107                tmpLocale,
20108                parentConfig = baseConfig;
20109
20110            if (locales[name] != null && locales[name].parentLocale != null) {
20111                // Update existing child locale in-place to avoid memory-leaks
20112                locales[name].set(mergeConfigs(locales[name]._config, config));
20113            } else {
20114                // MERGE
20115                tmpLocale = loadLocale(name);
20116                if (tmpLocale != null) {
20117                    parentConfig = tmpLocale._config;
20118                }
20119                config = mergeConfigs(parentConfig, config);
20120                if (tmpLocale == null) {
20121                    // updateLocale is called for creating a new locale
20122                    // Set abbr so it will have a name (getters return
20123                    // undefined otherwise).
20124                    config.abbr = name;
20125                }
20126                locale = new Locale(config);
20127                locale.parentLocale = locales[name];
20128                locales[name] = locale;
20129            }
20130
20131            // backwards compat for now: also set the locale
20132            getSetGlobalLocale(name);
20133        } else {
20134            // pass null for config to unupdate, useful for tests
20135            if (locales[name] != null) {
20136                if (locales[name].parentLocale != null) {
20137                    locales[name] = locales[name].parentLocale;
20138                    if (name === getSetGlobalLocale()) {
20139                        getSetGlobalLocale(name);
20140                    }
20141                } else if (locales[name] != null) {
20142                    delete locales[name];
20143                }
20144            }
20145        }
20146        return locales[name];
20147    }
20148
20149    // returns locale data
20150    function getLocale(key) {
20151        var locale;
20152
20153        if (key && key._locale && key._locale._abbr) {
20154            key = key._locale._abbr;
20155        }
20156
20157        if (!key) {
20158            return globalLocale;
20159        }
20160
20161        if (!isArray(key)) {
20162            //short-circuit everything else
20163            locale = loadLocale(key);
20164            if (locale) {
20165                return locale;
20166            }
20167            key = [key];
20168        }
20169
20170        return chooseLocale(key);
20171    }
20172
20173    function listLocales() {
20174        return keys(locales);
20175    }
20176
20177    function checkOverflow(m) {
20178        var overflow,
20179            a = m._a;
20180
20181        if (a && getParsingFlags(m).overflow === -2) {
20182            overflow =
20183                a[MONTH] < 0 || a[MONTH] > 11
20184                    ? MONTH
20185                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
20186                    ? DATE
20187                    : a[HOUR] < 0 ||
20188                      a[HOUR] > 24 ||
20189                      (a[HOUR] === 24 &&
20190                          (a[MINUTE] !== 0 ||
20191                              a[SECOND] !== 0 ||
20192                              a[MILLISECOND] !== 0))
20193                    ? HOUR
20194                    : a[MINUTE] < 0 || a[MINUTE] > 59
20195                    ? MINUTE
20196                    : a[SECOND] < 0 || a[SECOND] > 59
20197                    ? SECOND
20198                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
20199                    ? MILLISECOND
vendor: 9,346 bytes, lines 20200-20483
20200                    : -1;
20201
20202            if (
20203                getParsingFlags(m)._overflowDayOfYear &&
20204                (overflow < YEAR || overflow > DATE)
20205            ) {
20206                overflow = DATE;
20207            }
20208            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
20209                overflow = WEEK;
20210            }
20211            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
20212                overflow = WEEKDAY;
20213            }
20214
20215            getParsingFlags(m).overflow = overflow;
20216        }
20217
20218        return m;
20219    }
20220
20221    // iso 8601 regex
20222    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
20223    var extendedIsoRegex =
20224            /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
20225        basicIsoRegex =
20226            /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
20227        tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
20228        isoDates = [
20229            ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
20230            ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
20231            ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
20232            ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
20233            ['YYYY-DDD', /\d{4}-\d{3}/],
20234            ['YYYY-MM', /\d{4}-\d\d/, false],
20235            ['YYYYYYMMDD', /[+-]\d{10}/],
20236            ['YYYYMMDD', /\d{8}/],
20237            ['GGGG[W]WWE', /\d{4}W\d{3}/],
20238            ['GGGG[W]WW', /\d{4}W\d{2}/, false],
20239            ['YYYYDDD', /\d{7}/],
20240            ['YYYYMM', /\d{6}/, false],
20241            ['YYYY', /\d{4}/, false],
20242        ],
20243        // iso time formats and regexes
20244        isoTimes = [
20245            ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
20246            ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
20247            ['HH:mm:ss', /\d\d:\d\d:\d\d/],
20248            ['HH:mm', /\d\d:\d\d/],
20249            ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
20250            ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
20251            ['HHmmss', /\d\d\d\d\d\d/],
20252            ['HHmm', /\d\d\d\d/],
20253            ['HH', /\d\d/],
20254        ],
20255        aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
20256        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
20257        rfc2822 =
20258            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
20259        obsOffsets = {
20260            UT: 0,
20261            GMT: 0,
20262            EDT: -4 * 60,
20263            EST: -5 * 60,
20264            CDT: -5 * 60,
20265            CST: -6 * 60,
20266            MDT: -6 * 60,
20267            MST: -7 * 60,
20268            PDT: -7 * 60,
20269            PST: -8 * 60,
20270        };
20271
20272    // date from iso format
20273    function configFromISO(config) {
20274        var i,
20275            l,
20276            string = config._i,
20277            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
20278            allowTime,
20279            dateFormat,
20280            timeFormat,
20281            tzFormat,
20282            isoDatesLen = isoDates.length,
20283            isoTimesLen = isoTimes.length;
20284
20285        if (match) {
20286            getParsingFlags(config).iso = true;
20287            for (i = 0, l = isoDatesLen; i < l; i++) {
20288                if (isoDates[i][1].exec(match[1])) {
20289                    dateFormat = isoDates[i][0];
20290                    allowTime = isoDates[i][2] !== false;
20291                    break;
20292                }
20293            }
20294            if (dateFormat == null) {
20295                config._isValid = false;
20296                return;
20297            }
20298            if (match[3]) {
20299                for (i = 0, l = isoTimesLen; i < l; i++) {
20300                    if (isoTimes[i][1].exec(match[3])) {
20301                        // match[2] should be 'T' or space
20302                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
20303                        break;
20304                    }
20305                }
20306                if (timeFormat == null) {
20307                    config._isValid = false;
20308                    return;
20309                }
20310            }
20311            if (!allowTime && timeFormat != null) {
20312                config._isValid = false;
20313                return;
20314            }
20315            if (match[4]) {
20316                if (tzRegex.exec(match[4])) {
20317                    tzFormat = 'Z';
20318                } else {
20319                    config._isValid = false;
20320                    return;
20321                }
20322            }
20323            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
20324            configFromStringAndFormat(config);
20325        } else {
20326            config._isValid = false;
20327        }
20328    }
20329
20330    function extractFromRFC2822Strings(
20331        yearStr,
20332        monthStr,
20333        dayStr,
20334        hourStr,
20335        minuteStr,
20336        secondStr
20337    ) {
20338        var result = [
20339            untruncateYear(yearStr),
20340            defaultLocaleMonthsShort.indexOf(monthStr),
20341            parseInt(dayStr, 10),
20342            parseInt(hourStr, 10),
20343            parseInt(minuteStr, 10),
20344        ];
20345
20346        if (secondStr) {
20347            result.push(parseInt(secondStr, 10));
20348        }
20349
20350        return result;
20351    }
20352
20353    function untruncateYear(yearStr) {
20354        var year = parseInt(yearStr, 10);
20355        if (year <= 49) {
20356            return 2000 + year;
20357        } else if (year <= 999) {
20358            return 1900 + year;
20359        }
20360        return year;
20361    }
20362
20363    function preprocessRFC2822(s) {
20364        // Remove comments and folding whitespace and replace multiple-spaces with a single space
20365        return s
20366            .replace(/\([^()]*\)|[\n\t]/g, ' ')
20367            .replace(/(\s\s+)/g, ' ')
20368            .replace(/^\s\s*/, '')
20369            .replace(/\s\s*$/, '');
20370    }
20371
20372    function checkWeekday(weekdayStr, parsedInput, config) {
20373        if (weekdayStr) {
20374            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
20375            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
20376                weekdayActual = new Date(
20377                    parsedInput[0],
20378                    parsedInput[1],
20379                    parsedInput[2]
20380                ).getDay();
20381            if (weekdayProvided !== weekdayActual) {
20382                getParsingFlags(config).weekdayMismatch = true;
20383                config._isValid = false;
20384                return false;
20385            }
20386        }
20387        return true;
20388    }
20389
20390    function calculateOffset(obsOffset, militaryOffset, numOffset) {
20391        if (obsOffset) {
20392            return obsOffsets[obsOffset];
20393        } else if (militaryOffset) {
20394            // the only allowed military tz is Z
20395            return 0;
20396        } else {
20397            var hm = parseInt(numOffset, 10),
20398                m = hm % 100,
20399                h = (hm - m) / 100;
20400            return h * 60 + m;
20401        }
20402    }
20403
20404    // date and time from ref 2822 format
20405    function configFromRFC2822(config) {
20406        var match = rfc2822.exec(preprocessRFC2822(config._i)),
20407            parsedArray;
20408        if (match) {
20409            parsedArray = extractFromRFC2822Strings(
20410                match[4],
20411                match[3],
20412                match[2],
20413                match[5],
20414                match[6],
20415                match[7]
20416            );
20417            if (!checkWeekday(match[1], parsedArray, config)) {
20418                return;
20419            }
20420
20421            config._a = parsedArray;
20422            config._tzm = calculateOffset(match[8], match[9], match[10]);
20423
20424            config._d = createUTCDate.apply(null, config._a);
20425            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
20426
20427            getParsingFlags(config).rfc2822 = true;
20428        } else {
20429            config._isValid = false;
20430        }
20431    }
20432
20433    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
20434    function configFromString(config) {
20435        var matched = aspNetJsonRegex.exec(config._i);
20436        if (matched !== null) {
20437            config._d = new Date(+matched[1]);
20438            return;
20439        }
20440
20441        configFromISO(config);
20442        if (config._isValid === false) {
20443            delete config._isValid;
20444        } else {
20445            return;
20446        }
20447
20448        configFromRFC2822(config);
20449        if (config._isValid === false) {
20450            delete config._isValid;
20451        } else {
20452            return;
20453        }
20454
20455        if (config._strict) {
20456            config._isValid = false;
20457        } else {
20458            // Final attempt, use Input Fallback
20459            hooks.createFromInputFallback(config);
20460        }
20461    }
20462
20463    hooks.createFromInputFallback = deprecate(
20464        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
20465            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
20466            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
20467        function (config) {
20468            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
20469        }
20470    );
20471
20472    // Pick the first defined of two or three arguments.
20473    function defaults(a, b, c) {
20474        if (a != null) {
20475            return a;
20476        }
20477        if (b != null) {
20478            return b;
20479        }
20480        return c;
20481    }
20482
20483    function currentDateArray(config
vendor: 17,694 bytes, lines 20483-21044
20483) {
20484        // hooks is actually the exported moment object
20485        var nowValue = new Date(hooks.now());
20486        if (config._useUTC) {
20487            return [
20488                nowValue.getUTCFullYear(),
20489                nowValue.getUTCMonth(),
20490                nowValue.getUTCDate(),
20491            ];
20492        }
20493        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
20494    }
20495
20496    // convert an array to a date.
20497    // the array should mirror the parameters below
20498    // note: all values past the year are optional and will default to the lowest possible value.
20499    // [year, month, day , hour, minute, second, millisecond]
20500    function configFromArray(config) {
20501        var i,
20502            date,
20503            input = [],
20504            currentDate,
20505            expectedWeekday,
20506            yearToUse;
20507
20508        if (config._d) {
20509            return;
20510        }
20511
20512        currentDate = currentDateArray(config);
20513
20514        //compute day of the year from weeks and weekdays
20515        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
20516            dayOfYearFromWeekInfo(config);
20517        }
20518
20519        //if the day of the year is set, figure out what it is
20520        if (config._dayOfYear != null) {
20521            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
20522
20523            if (
20524                config._dayOfYear > daysInYear(yearToUse) ||
20525                config._dayOfYear === 0
20526            ) {
20527                getParsingFlags(config)._overflowDayOfYear = true;
20528            }
20529
20530            date = createUTCDate(yearToUse, 0, config._dayOfYear);
20531            config._a[MONTH] = date.getUTCMonth();
20532            config._a[DATE] = date.getUTCDate();
20533        }
20534
20535        // Default to current date.
20536        // * if no year, month, day of month are given, default to today
20537        // * if day of month is given, default month and year
20538        // * if month is given, default only year
20539        // * if year is given, don't default anything
20540        for (i = 0; i < 3 && config._a[i] == null; ++i) {
20541            config._a[i] = input[i] = currentDate[i];
20542        }
20543
20544        // Zero out whatever was not defaulted, including time
20545        for (; i < 7; i++) {
20546            config._a[i] = input[i] =
20547                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
20548        }
20549
20550        // Check for 24:00:00.000
20551        if (
20552            config._a[HOUR] === 24 &&
20553            config._a[MINUTE] === 0 &&
20554            config._a[SECOND] === 0 &&
20555            config._a[MILLISECOND] === 0
20556        ) {
20557            config._nextDay = true;
20558            config._a[HOUR] = 0;
20559        }
20560
20561        config._d = (config._useUTC ? createUTCDate : createDate).apply(
20562            null,
20563            input
20564        );
20565        expectedWeekday = config._useUTC
20566            ? config._d.getUTCDay()
20567            : config._d.getDay();
20568
20569        // Apply timezone offset from input. The actual utcOffset can be changed
20570        // with parseZone.
20571        if (config._tzm != null) {
20572            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
20573        }
20574
20575        if (config._nextDay) {
20576            config._a[HOUR] = 24;
20577        }
20578
20579        // check for mismatching day of week
20580        if (
20581            config._w &&
20582            typeof config._w.d !== 'undefined' &&
20583            config._w.d !== expectedWeekday
20584        ) {
20585            getParsingFlags(config).weekdayMismatch = true;
20586        }
20587    }
20588
20589    function dayOfYearFromWeekInfo(config) {
20590        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
20591
20592        w = config._w;
20593        if (w.GG != null || w.W != null || w.E != null) {
20594            dow = 1;
20595            doy = 4;
20596
20597            // TODO: We need to take the current isoWeekYear, but that depends on
20598            // how we interpret now (local, utc, fixed offset). So create
20599            // a now version of current config (take local/utc/offset flags, and
20600            // create now).
20601            weekYear = defaults(
20602                w.GG,
20603                config._a[YEAR],
20604                weekOfYear(createLocal(), 1, 4).year
20605            );
20606            week = defaults(w.W, 1);
20607            weekday = defaults(w.E, 1);
20608            if (weekday < 1 || weekday > 7) {
20609                weekdayOverflow = true;
20610            }
20611        } else {
20612            dow = config._locale._week.dow;
20613            doy = config._locale._week.doy;
20614
20615            curWeek = weekOfYear(createLocal(), dow, doy);
20616
20617            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
20618
20619            // Default to current week.
20620            week = defaults(w.w, curWeek.week);
20621
20622            if (w.d != null) {
20623                // weekday -- low day numbers are considered next week
20624                weekday = w.d;
20625                if (weekday < 0 || weekday > 6) {
20626                    weekdayOverflow = true;
20627                }
20628            } else if (w.e != null) {
20629                // local weekday -- counting starts from beginning of week
20630                weekday = w.e + dow;
20631                if (w.e < 0 || w.e > 6) {
20632                    weekdayOverflow = true;
20633                }
20634            } else {
20635                // default to beginning of week
20636                weekday = dow;
20637            }
20638        }
20639        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
20640            getParsingFlags(config)._overflowWeeks = true;
20641        } else if (weekdayOverflow != null) {
20642            getParsingFlags(config)._overflowWeekday = true;
20643        } else {
20644            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
20645            config._a[YEAR] = temp.year;
20646            config._dayOfYear = temp.dayOfYear;
20647        }
20648    }
20649
20650    // constant that refers to the ISO standard
20651    hooks.ISO_8601 = function () {};
20652
20653    // constant that refers to the RFC 2822 form
20654    hooks.RFC_2822 = function () {};
20655
20656    // date from string and format string
20657    function configFromStringAndFormat(config) {
20658        // TODO: Move this to another part of the creation flow to prevent circular deps
20659        if (config._f === hooks.ISO_8601) {
20660            configFromISO(config);
20661            return;
20662        }
20663        if (config._f === hooks.RFC_2822) {
20664            configFromRFC2822(config);
20665            return;
20666        }
20667        config._a = [];
20668        getParsingFlags(config).empty = true;
20669
20670        // This array is used to make a Date, either with `new Date` or `Date.UTC`
20671        var string = '' + config._i,
20672            i,
20673            parsedInput,
20674            tokens,
20675            token,
20676            skipped,
20677            stringLength = string.length,
20678            totalParsedInputLength = 0,
20679            era,
20680            tokenLen;
20681
20682        tokens =
20683            expandFormat(config._f, config._locale).match(formattingTokens) || [];
20684        tokenLen = tokens.length;
20685        for (i = 0; i < tokenLen; i++) {
20686            token = tokens[i];
20687            parsedInput = (string.match(getParseRegexForToken(token, config)) ||
20688                [])[0];
20689            if (parsedInput) {
20690                skipped = string.substr(0, string.indexOf(parsedInput));
20691                if (skipped.length > 0) {
20692                    getParsingFlags(config).unusedInput.push(skipped);
20693                }
20694                string = string.slice(
20695                    string.indexOf(parsedInput) + parsedInput.length
20696                );
20697                totalParsedInputLength += parsedInput.length;
20698            }
20699            // don't parse if it's not a known token
20700            if (formatTokenFunctions[token]) {
20701                if (parsedInput) {
20702                    getParsingFlags(config).empty = false;
20703                } else {
20704                    getParsingFlags(config).unusedTokens.push(token);
20705                }
20706                addTimeToArrayFromToken(token, parsedInput, config);
20707            } else if (config._strict && !parsedInput) {
20708                getParsingFlags(config).unusedTokens.push(token);
20709            }
20710        }
20711
20712        // add remaining unparsed input length to the string
20713        getParsingFlags(config).charsLeftOver =
20714            stringLength - totalParsedInputLength;
20715        if (string.length > 0) {
20716            getParsingFlags(config).unusedInput.push(string);
20717        }
20718
20719        // clear _12h flag if hour is <= 12
20720        if (
20721            config._a[HOUR] <= 12 &&
20722            getParsingFlags(config).bigHour === true &&
20723            config._a[HOUR] > 0
20724        ) {
20725            getParsingFlags(config).bigHour = undefined;
20726        }
20727
20728        getParsingFlags(config).parsedDateParts = config._a.slice(0);
20729        getParsingFlags(config).meridiem = config._meridiem;
20730        // handle meridiem
20731        config._a[HOUR] = meridiemFixWrap(
20732            config._locale,
20733            config._a[HOUR],
20734            config._meridiem
20735        );
20736
20737        // handle era
20738        era = getParsingFlags(config).era;
20739        if (era !== null) {
20740            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
20741        }
20742
20743        configFromArray(config);
20744        checkOverflow(config);
20745    }
20746
20747    function meridiemFixWrap(locale, hour, meridiem) {
20748        var isPm;
20749
20750        if (meridiem == null) {
20751            // nothing to do
20752            return hour;
20753        }
20754        if (locale.meridiemHour != null) {
20755            return locale.meridiemHour(hour, meridiem);
20756        } else if (locale.isPM != null) {
20757            // Fallback
20758            isPm = locale.isPM(meridiem);
20759            if (isPm && hour < 12) {
20760                hour += 12;
20761            }
20762            if (!isPm && hour === 12) {
20763                hour = 0;
20764            }
20765            return hour;
20766        } else {
20767            // this is not supposed to happen
20768            return hour;
20769        }
20770    }
20771
20772    // date from string and array of format strings
20773    function configFromStringAndArray(config) {
20774        var tempConfig,
20775            bestMoment,
20776            scoreToBeat,
20777            i,
20778            currentScore,
20779            validFormatFound,
20780            bestFormatIsValid = false,
20781            configfLen = config._f.length;
20782
20783        if (configfLen === 0) {
20784            getParsingFlags(config).invalidFormat = true;
20785            config._d = new Date(NaN);
20786            return;
20787        }
20788
20789        for (i = 0; i < configfLen; i++) {
20790            currentScore = 0;
20791            validFormatFound = false;
20792            tempConfig = copyConfig({}, config);
20793            if (config._useUTC != null) {
20794                tempConfig._useUTC = config._useUTC;
20795            }
20796            tempConfig._f = config._f[i];
20797            configFromStringAndFormat(tempConfig);
20798
20799            if (isValid(tempConfig)) {
20800                validFormatFound = true;
20801            }
20802
20803            // if there is any input that was not parsed add a penalty for that format
20804            currentScore += getParsingFlags(tempConfig).charsLeftOver;
20805
20806            //or tokens
20807            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
20808
20809            getParsingFlags(tempConfig).score = currentScore;
20810
20811            if (!bestFormatIsValid) {
20812                if (
20813                    scoreToBeat == null ||
20814                    currentScore < scoreToBeat ||
20815                    validFormatFound
20816                ) {
20817                    scoreToBeat = currentScore;
20818                    bestMoment = tempConfig;
20819                    if (validFormatFound) {
20820                        bestFormatIsValid = true;
20821                    }
20822                }
20823            } else {
20824                if (currentScore < scoreToBeat) {
20825                    scoreToBeat = currentScore;
20826                    bestMoment = tempConfig;
20827                }
20828            }
20829        }
20830
20831        extend(config, bestMoment || tempConfig);
20832    }
20833
20834    function configFromObject(config) {
20835        if (config._d) {
20836            return;
20837        }
20838
20839        var i = normalizeObjectUnits(config._i),
20840            dayOrDate = i.day === undefined ? i.date : i.day;
20841        config._a = map(
20842            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
20843            function (obj) {
20844                return obj && parseInt(obj, 10);
20845            }
20846        );
20847
20848        configFromArray(config);
20849    }
20850
20851    function createFromConfig(config) {
20852        var res = new Moment(checkOverflow(prepareConfig(config)));
20853        if (res._nextDay) {
20854            // Adding is smart enough around DST
20855            res.add(1, 'd');
20856            res._nextDay = undefined;
20857        }
20858
20859        return res;
20860    }
20861
20862    function prepareConfig(config) {
20863        var input = config._i,
20864            format = config._f;
20865
20866        config._locale = config._locale || getLocale(config._l);
20867
20868        if (input === null || (format === undefined && input === '')) {
20869            return createInvalid({ nullInput: true });
20870        }
20871
20872        if (typeof input === 'string') {
20873            config._i = input = config._locale.preparse(input);
20874        }
20875
20876        if (isMoment(input)) {
20877            return new Moment(checkOverflow(input));
20878        } else if (isDate(input)) {
20879            config._d = input;
20880        } else if (isArray(format)) {
20881            configFromStringAndArray(config);
20882        } else if (format) {
20883            configFromStringAndFormat(config);
20884        } else {
20885            configFromInput(config);
20886        }
20887
20888        if (!isValid(config)) {
20889            config._d = null;
20890        }
20891
20892        return config;
20893    }
20894
20895    function configFromInput(config) {
20896        var input = config._i;
20897        if (isUndefined(input)) {
20898            config._d = new Date(hooks.now());
20899        } else if (isDate(input)) {
20900            config._d = new Date(input.valueOf());
20901        } else if (typeof input === 'string') {
20902            configFromString(config);
20903        } else if (isArray(input)) {
20904            config._a = map(input.slice(0), function (obj) {
20905                return parseInt(obj, 10);
20906            });
20907            configFromArray(config);
20908        } else if (isObject(input)) {
20909            configFromObject(config);
20910        } else if (isNumber(input)) {
20911            // from milliseconds
20912            config._d = new Date(input);
20913        } else {
20914            hooks.createFromInputFallback(config);
20915        }
20916    }
20917
20918    function createLocalOrUTC(input, format, locale, strict, isUTC) {
20919        var c = {};
20920
20921        if (format === true || format === false) {
20922            strict = format;
20923            format = undefined;
20924        }
20925
20926        if (locale === true || locale === false) {
20927            strict = locale;
20928            locale = undefined;
20929        }
20930
20931        if (
20932            (isObject(input) && isObjectEmpty(input)) ||
20933            (isArray(input) && input.length === 0)
20934        ) {
20935            input = undefined;
20936        }
20937        // object construction must be done this way.
20938        // https://github.com/moment/moment/issues/1423
20939        c._isAMomentObject = true;
20940        c._useUTC = c._isUTC = isUTC;
20941        c._l = locale;
20942        c._i = input;
20943        c._f = format;
20944        c._strict = strict;
20945
20946        return createFromConfig(c);
20947    }
20948
20949    function createLocal(input, format, locale, strict) {
20950        return createLocalOrUTC(input, format, locale, strict, false);
20951    }
20952
20953    var prototypeMin = deprecate(
20954            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
20955            function () {
20956                var other = createLocal.apply(null, arguments);
20957                if (this.isValid() && other.isValid()) {
20958                    return other < this ? this : other;
20959                } else {
20960                    return createInvalid();
20961                }
20962            }
20963        ),
20964        prototypeMax = deprecate(
20965            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
20966            function () {
20967                var other = createLocal.apply(null, arguments);
20968                if (this.isValid() && other.isValid()) {
20969                    return other > this ? this : other;
20970                } else {
20971                    return createInvalid();
20972                }
20973            }
20974        );
20975
20976    // Pick a moment m from moments so that m[fn](other) is true for all
20977    // other. This relies on the function fn to be transitive.
20978    //
20979    // moments should either be an array of moment objects or an array, whose
20980    // first element is an array of moment objects.
20981    function pickBy(fn, moments) {
20982        var res, i;
20983        if (moments.length === 1 && isArray(moments[0])) {
20984            moments = moments[0];
20985        }
20986        if (!moments.length) {
20987            return createLocal();
20988        }
20989        res = moments[0];
20990        for (i = 1; i < moments.length; ++i) {
20991            if (!moments[i].isValid() || moments[i][fn](res)) {
20992                res = moments[i];
20993            }
20994        }
20995        return res;
20996    }
20997
20998    // TODO: Use [].sort instead?
20999    function min() {
21000        var args = [].slice.call(arguments, 0);
21001
21002        return pickBy('isBefore', args);
21003    }
21004
21005    function max() {
21006        var args = [].slice.call(arguments, 0);
21007
21008        return pickBy('isAfter', args);
21009    }
21010
21011    var now = function () {
21012        return Date.now ? Date.now() : +new Date();
21013    };
21014
21015    var ordering = [
21016        'year',
21017        'quarter',
21018        'month',
21019        'week',
21020        'day',
21021        'hour',
21022        'minute',
21023        'second',
21024        'millisecond',
21025    ];
21026
21027    function isDurationValid(m) {
21028        var key,
21029            unitHasDecimal = false,
21030            i,
21031            orderLen = ordering.length;
21032        for (key in m) {
21033            if (
21034                hasOwnProp(m, key) &&
21035                !(
21036                    indexOf.call(ordering, key) !== -1 &&
21037                    (m[key] == null || !isNaN(m[key]))
21038                )
21039            ) {
21040                return false;
21041            }
21042        }
21043
21044        for (i = 0; i < orderLen
vendor: 10,251 bytes, lines 21044-21369
21044; ++i) {
21045            if (m[ordering[i]]) {
21046                if (unitHasDecimal) {
21047                    return false; // only allow non-integers for smallest unit
21048                }
21049                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
21050                    unitHasDecimal = true;
21051                }
21052            }
21053        }
21054
21055        return true;
21056    }
21057
21058    function isValid$1() {
21059        return this._isValid;
21060    }
21061
21062    function createInvalid$1() {
21063        return createDuration(NaN);
21064    }
21065
21066    function Duration(duration) {
21067        var normalizedInput = normalizeObjectUnits(duration),
21068            years = normalizedInput.year || 0,
21069            quarters = normalizedInput.quarter || 0,
21070            months = normalizedInput.month || 0,
21071            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
21072            days = normalizedInput.day || 0,
21073            hours = normalizedInput.hour || 0,
21074            minutes = normalizedInput.minute || 0,
21075            seconds = normalizedInput.second || 0,
21076            milliseconds = normalizedInput.millisecond || 0;
21077
21078        this._isValid = isDurationValid(normalizedInput);
21079
21080        // representation for dateAddRemove
21081        this._milliseconds =
21082            +milliseconds +
21083            seconds * 1e3 + // 1000
21084            minutes * 6e4 + // 1000 * 60
21085            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
21086        // Because of dateAddRemove treats 24 hours as different from a
21087        // day when working around DST, we need to store them separately
21088        this._days = +days + weeks * 7;
21089        // It is impossible to translate months into days without knowing
21090        // which months you are are talking about, so we have to store
21091        // it separately.
21092        this._months = +months + quarters * 3 + years * 12;
21093
21094        this._data = {};
21095
21096        this._locale = getLocale();
21097
21098        this._bubble();
21099    }
21100
21101    function isDuration(obj) {
21102        return obj instanceof Duration;
21103    }
21104
21105    function absRound(number) {
21106        if (number < 0) {
21107            return Math.round(-1 * number) * -1;
21108        } else {
21109            return Math.round(number);
21110        }
21111    }
21112
21113    // compare two arrays, return the number of differences
21114    function compareArrays(array1, array2, dontConvert) {
21115        var len = Math.min(array1.length, array2.length),
21116            lengthDiff = Math.abs(array1.length - array2.length),
21117            diffs = 0,
21118            i;
21119        for (i = 0; i < len; i++) {
21120            if (
21121                (dontConvert && array1[i] !== array2[i]) ||
21122                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
21123            ) {
21124                diffs++;
21125            }
21126        }
21127        return diffs + lengthDiff;
21128    }
21129
21130    // FORMATTING
21131
21132    function offset(token, separator) {
21133        addFormatToken(token, 0, 0, function () {
21134            var offset = this.utcOffset(),
21135                sign = '+';
21136            if (offset < 0) {
21137                offset = -offset;
21138                sign = '-';
21139            }
21140            return (
21141                sign +
21142                zeroFill(~~(offset / 60), 2) +
21143                separator +
21144                zeroFill(~~offset % 60, 2)
21145            );
21146        });
21147    }
21148
21149    offset('Z', ':');
21150    offset('ZZ', '');
21151
21152    // PARSING
21153
21154    addRegexToken('Z', matchShortOffset);
21155    addRegexToken('ZZ', matchShortOffset);
21156    addParseToken(['Z', 'ZZ'], function (input, array, config) {
21157        config._useUTC = true;
21158        config._tzm = offsetFromString(matchShortOffset, input);
21159    });
21160
21161    // HELPERS
21162
21163    // timezone chunker
21164    // '+10:00' > ['10',  '00']
21165    // '-1530'  > ['-15', '30']
21166    var chunkOffset = /([\+\-]|\d\d)/gi;
21167
21168    function offsetFromString(matcher, string) {
21169        var matches = (string || '').match(matcher),
21170            chunk,
21171            parts,
21172            minutes;
21173
21174        if (matches === null) {
21175            return null;
21176        }
21177
21178        chunk = matches[matches.length - 1] || [];
21179        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
21180        minutes = +(parts[1] * 60) + toInt(parts[2]);
21181
21182        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
21183    }
21184
21185    // Return a moment from input, that is local/utc/zone equivalent to model.
21186    function cloneWithOffset(input, model) {
21187        var res, diff;
21188        if (model._isUTC) {
21189            res = model.clone();
21190            diff =
21191                (isMoment(input) || isDate(input)
21192                    ? input.valueOf()
21193                    : createLocal(input).valueOf()) - res.valueOf();
21194            // Use low-level api, because this fn is low-level api.
21195            res._d.setTime(res._d.valueOf() + diff);
21196            hooks.updateOffset(res, false);
21197            return res;
21198        } else {
21199            return createLocal(input).local();
21200        }
21201    }
21202
21203    function getDateOffset(m) {
21204        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
21205        // https://github.com/moment/moment/pull/1871
21206        return -Math.round(m._d.getTimezoneOffset());
21207    }
21208
21209    // HOOKS
21210
21211    // This function will be called whenever a moment is mutated.
21212    // It is intended to keep the offset in sync with the timezone.
21213    hooks.updateOffset = function () {};
21214
21215    // MOMENTS
21216
21217    // keepLocalTime = true means only change the timezone, without
21218    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
21219    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
21220    // +0200, so we adjust the time as needed, to be valid.
21221    //
21222    // Keeping the time actually adds/subtracts (one hour)
21223    // from the actual represented time. That is why we call updateOffset
21224    // a second time. In case it wants us to change the offset again
21225    // _changeInProgress == true case, then we have to adjust, because
21226    // there is no such time in the given timezone.
21227    function getSetOffset(input, keepLocalTime, keepMinutes) {
21228        var offset = this._offset || 0,
21229            localAdjust;
21230        if (!this.isValid()) {
21231            return input != null ? this : NaN;
21232        }
21233        if (input != null) {
21234            if (typeof input === 'string') {
21235                input = offsetFromString(matchShortOffset, input);
21236                if (input === null) {
21237                    return this;
21238                }
21239            } else if (Math.abs(input) < 16 && !keepMinutes) {
21240                input = input * 60;
21241            }
21242            if (!this._isUTC && keepLocalTime) {
21243                localAdjust = getDateOffset(this);
21244            }
21245            this._offset = input;
21246            this._isUTC = true;
21247            if (localAdjust != null) {
21248                this.add(localAdjust, 'm');
21249            }
21250            if (offset !== input) {
21251                if (!keepLocalTime || this._changeInProgress) {
21252                    addSubtract(
21253                        this,
21254                        createDuration(input - offset, 'm'),
21255                        1,
21256                        false
21257                    );
21258                } else if (!this._changeInProgress) {
21259                    this._changeInProgress = true;
21260                    hooks.updateOffset(this, true);
21261                    this._changeInProgress = null;
21262                }
21263            }
21264            return this;
21265        } else {
21266            return this._isUTC ? offset : getDateOffset(this);
21267        }
21268    }
21269
21270    function getSetZone(input, keepLocalTime) {
21271        if (input != null) {
21272            if (typeof input !== 'string') {
21273                input = -input;
21274            }
21275
21276            this.utcOffset(input, keepLocalTime);
21277
21278            return this;
21279        } else {
21280            return -this.utcOffset();
21281        }
21282    }
21283
21284    function setOffsetToUTC(keepLocalTime) {
21285        return this.utcOffset(0, keepLocalTime);
21286    }
21287
21288    function setOffsetToLocal(keepLocalTime) {
21289        if (this._isUTC) {
21290            this.utcOffset(0, keepLocalTime);
21291            this._isUTC = false;
21292
21293            if (keepLocalTime) {
21294                this.subtract(getDateOffset(this), 'm');
21295            }
21296        }
21297        return this;
21298    }
21299
21300    function setOffsetToParsedOffset() {
21301        if (this._tzm != null) {
21302            this.utcOffset(this._tzm, false, true);
21303        } else if (typeof this._i === 'string') {
21304            var tZone = offsetFromString(matchOffset, this._i);
21305            if (tZone != null) {
21306                this.utcOffset(tZone);
21307            } else {
21308                this.utcOffset(0, true);
21309            }
21310        }
21311        return this;
21312    }
21313
21314    function hasAlignedHourOffset(input) {
21315        if (!this.isValid()) {
21316            return false;
21317        }
21318        input = input ? createLocal(input).utcOffset() : 0;
21319
21320        return (this.utcOffset() - input) % 60 === 0;
21321    }
21322
21323    function isDaylightSavingTime() {
21324        return (
21325            this.utcOffset() > this.clone().month(0).utcOffset() ||
21326            this.utcOffset() > this.clone().month(5).utcOffset()
21327        );
21328    }
21329
21330    function isDaylightSavingTimeShifted() {
21331        if (!isUndefined(this._isDSTShifted)) {
21332            return this._isDSTShifted;
21333        }
21334
21335        var c = {},
21336            other;
21337
21338        copyConfig(c, this);
21339        c = prepareConfig(c);
21340
21341        if (c._a) {
21342            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
21343            this._isDSTShifted =
21344                this.isValid() && compareArrays(c._a, other.toArray()) > 0;
21345        } else {
21346            this._isDSTShifted = false;
21347        }
21348
21349        return this._isDSTShifted;
21350    }
21351
21352    function isLocal() {
21353        return this.isValid() ? !this._isUTC : false;
21354    }
21355
21356    function isUtcOffset() {
21357        return this.isValid() ? this._isUTC : false;
21358    }
21359
21360    function isUtc() {
21361        return this.isValid() ? this._isUTC && this._offset === 0 : false;
21362    }
21363
21364    // ASP.NET json date format regex
21365    var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
21366        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
21367        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
21368        // and further modified to allow for strings containing both week and day
21369        isoRegex =
vendor: 9,021 bytes, lines 21369-21659
21369
21370            /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
21371
21372    function createDuration(input, key) {
21373        var duration = input,
21374            // matching against regexp is expensive, do it on demand
21375            match = null,
21376            sign,
21377            ret,
21378            diffRes;
21379
21380        if (isDuration(input)) {
21381            duration = {
21382                ms: input._milliseconds,
21383                d: input._days,
21384                M: input._months,
21385            };
21386        } else if (isNumber(input) || !isNaN(+input)) {
21387            duration = {};
21388            if (key) {
21389                duration[key] = +input;
21390            } else {
21391                duration.milliseconds = +input;
21392            }
21393        } else if ((match = aspNetRegex.exec(input))) {
21394            sign = match[1] === '-' ? -1 : 1;
21395            duration = {
21396                y: 0,
21397                d: toInt(match[DATE]) * sign,
21398                h: toInt(match[HOUR]) * sign,
21399                m: toInt(match[MINUTE]) * sign,
21400                s: toInt(match[SECOND]) * sign,
21401                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
21402            };
21403        } else if ((match = isoRegex.exec(input))) {
21404            sign = match[1] === '-' ? -1 : 1;
21405            duration = {
21406                y: parseIso(match[2], sign),
21407                M: parseIso(match[3], sign),
21408                w: parseIso(match[4], sign),
21409                d: parseIso(match[5], sign),
21410                h: parseIso(match[6], sign),
21411                m: parseIso(match[7], sign),
21412                s: parseIso(match[8], sign),
21413            };
21414        } else if (duration == null) {
21415            // checks for null or undefined
21416            duration = {};
21417        } else if (
21418            typeof duration === 'object' &&
21419            ('from' in duration || 'to' in duration)
21420        ) {
21421            diffRes = momentsDifference(
21422                createLocal(duration.from),
21423                createLocal(duration.to)
21424            );
21425
21426            duration = {};
21427            duration.ms = diffRes.milliseconds;
21428            duration.M = diffRes.months;
21429        }
21430
21431        ret = new Duration(duration);
21432
21433        if (isDuration(input) && hasOwnProp(input, '_locale')) {
21434            ret._locale = input._locale;
21435        }
21436
21437        if (isDuration(input) && hasOwnProp(input, '_isValid')) {
21438            ret._isValid = input._isValid;
21439        }
21440
21441        return ret;
21442    }
21443
21444    createDuration.fn = Duration.prototype;
21445    createDuration.invalid = createInvalid$1;
21446
21447    function parseIso(inp, sign) {
21448        // We'd normally use ~~inp for this, but unfortunately it also
21449        // converts floats to ints.
21450        // inp may be undefined, so careful calling replace on it.
21451        var res = inp && parseFloat(inp.replace(',', '.'));
21452        // apply sign while we're at it
21453        return (isNaN(res) ? 0 : res) * sign;
21454    }
21455
21456    function positiveMomentsDifference(base, other) {
21457        var res = {};
21458
21459        res.months =
21460            other.month() - base.month() + (other.year() - base.year()) * 12;
21461        if (base.clone().add(res.months, 'M').isAfter(other)) {
21462            --res.months;
21463        }
21464
21465        res.milliseconds = +other - +base.clone().add(res.months, 'M');
21466
21467        return res;
21468    }
21469
21470    function momentsDifference(base, other) {
21471        var res;
21472        if (!(base.isValid() && other.isValid())) {
21473            return { milliseconds: 0, months: 0 };
21474        }
21475
21476        other = cloneWithOffset(other, base);
21477        if (base.isBefore(other)) {
21478            res = positiveMomentsDifference(base, other);
21479        } else {
21480            res = positiveMomentsDifference(other, base);
21481            res.milliseconds = -res.milliseconds;
21482            res.months = -res.months;
21483        }
21484
21485        return res;
21486    }
21487
21488    // TODO: remove 'name' arg after deprecation is removed
21489    function createAdder(direction, name) {
21490        return function (val, period) {
21491            var dur, tmp;
21492            //invert the arguments, but complain about it
21493            if (period !== null && !isNaN(+period)) {
21494                deprecateSimple(
21495                    name,
21496                    'moment().' +
21497                        name +
21498                        '(period, number) is deprecated. Please use moment().' +
21499                        name +
21500                        '(number, period). ' +
21501                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
21502                );
21503                tmp = val;
21504                val = period;
21505                period = tmp;
21506            }
21507
21508            dur = createDuration(val, period);
21509            addSubtract(this, dur, direction);
21510            return this;
21511        };
21512    }
21513
21514    function addSubtract(mom, duration, isAdding, updateOffset) {
21515        var milliseconds = duration._milliseconds,
21516            days = absRound(duration._days),
21517            months = absRound(duration._months);
21518
21519        if (!mom.isValid()) {
21520            // No op
21521            return;
21522        }
21523
21524        updateOffset = updateOffset == null ? true : updateOffset;
21525
21526        if (months) {
21527            setMonth(mom, get(mom, 'Month') + months * isAdding);
21528        }
21529        if (days) {
21530            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
21531        }
21532        if (milliseconds) {
21533            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
21534        }
21535        if (updateOffset) {
21536            hooks.updateOffset(mom, days || months);
21537        }
21538    }
21539
21540    var add = createAdder(1, 'add'),
21541        subtract = createAdder(-1, 'subtract');
21542
21543    function isString(input) {
21544        return typeof input === 'string' || input instanceof String;
21545    }
21546
21547    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
21548    function isMomentInput(input) {
21549        return (
21550            isMoment(input) ||
21551            isDate(input) ||
21552            isString(input) ||
21553            isNumber(input) ||
21554            isNumberOrStringArray(input) ||
21555            isMomentInputObject(input) ||
21556            input === null ||
21557            input === undefined
21558        );
21559    }
21560
21561    function isMomentInputObject(input) {
21562        var objectTest = isObject(input) && !isObjectEmpty(input),
21563            propertyTest = false,
21564            properties = [
21565                'years',
21566                'year',
21567                'y',
21568                'months',
21569                'month',
21570                'M',
21571                'days',
21572                'day',
21573                'd',
21574                'dates',
21575                'date',
21576                'D',
21577                'hours',
21578                'hour',
21579                'h',
21580                'minutes',
21581                'minute',
21582                'm',
21583                'seconds',
21584                'second',
21585                's',
21586                'milliseconds',
21587                'millisecond',
21588                'ms',
21589            ],
21590            i,
21591            property,
21592            propertyLen = properties.length;
21593
21594        for (i = 0; i < propertyLen; i += 1) {
21595            property = properties[i];
21596            propertyTest = propertyTest || hasOwnProp(input, property);
21597        }
21598
21599        return objectTest && propertyTest;
21600    }
21601
21602    function isNumberOrStringArray(input) {
21603        var arrayTest = isArray(input),
21604            dataTypeTest = false;
21605        if (arrayTest) {
21606            dataTypeTest =
21607                input.filter(function (item) {
21608                    return !isNumber(item) && isString(input);
21609                }).length === 0;
21610        }
21611        return arrayTest && dataTypeTest;
21612    }
21613
21614    function isCalendarSpec(input) {
21615        var objectTest = isObject(input) && !isObjectEmpty(input),
21616            propertyTest = false,
21617            properties = [
21618                'sameDay',
21619                'nextDay',
21620                'lastDay',
21621                'nextWeek',
21622                'lastWeek',
21623                'sameElse',
21624            ],
21625            i,
21626            property;
21627
21628        for (i = 0; i < properties.length; i += 1) {
21629            property = properties[i];
21630            propertyTest = propertyTest || hasOwnProp(input, property);
21631        }
21632
21633        return objectTest && propertyTest;
21634    }
21635
21636    function getCalendarFormat(myMoment, now) {
21637        var diff = myMoment.diff(now, 'days', true);
21638        return diff < -6
21639            ? 'sameElse'
21640            : diff < -1
21641            ? 'lastWeek'
21642            : diff < 0
21643            ? 'lastDay'
21644            : diff < 1
21645            ? 'sameDay'
21646            : diff < 2
21647            ? 'nextDay'
21648            : diff < 7
21649            ? 'nextWeek'
21650            : 'sameElse';
21651    }
21652
21653    function calendar$1(time, formats) {
21654        // Support for single parameter, formats only overload to the calendar function
21655        if (arguments.length === 1) {
21656            if (!arguments[0]) {
21657                time = undefined;
21658                formats = undefined;
21659            } else
vendor: 17,627 bytes, lines 21659-22217
21659 if (isMomentInput(arguments[0])) {
21660                time = arguments[0];
21661                formats = undefined;
21662            } else if (isCalendarSpec(arguments[0])) {
21663                formats = arguments[0];
21664                time = undefined;
21665            }
21666        }
21667        // We want to compare the start of today, vs this.
21668        // Getting start-of-today depends on whether we're local/utc/offset or not.
21669        var now = time || createLocal(),
21670            sod = cloneWithOffset(now, this).startOf('day'),
21671            format = hooks.calendarFormat(this, sod) || 'sameElse',
21672            output =
21673                formats &&
21674                (isFunction(formats[format])
21675                    ? formats[format].call(this, now)
21676                    : formats[format]);
21677
21678        return this.format(
21679            output || this.localeData().calendar(format, this, createLocal(now))
21680        );
21681    }
21682
21683    function clone() {
21684        return new Moment(this);
21685    }
21686
21687    function isAfter(input, units) {
21688        var localInput = isMoment(input) ? input : createLocal(input);
21689        if (!(this.isValid() && localInput.isValid())) {
21690            return false;
21691        }
21692        units = normalizeUnits(units) || 'millisecond';
21693        if (units === 'millisecond') {
21694            return this.valueOf() > localInput.valueOf();
21695        } else {
21696            return localInput.valueOf() < this.clone().startOf(units).valueOf();
21697        }
21698    }
21699
21700    function isBefore(input, units) {
21701        var localInput = isMoment(input) ? input : createLocal(input);
21702        if (!(this.isValid() && localInput.isValid())) {
21703            return false;
21704        }
21705        units = normalizeUnits(units) || 'millisecond';
21706        if (units === 'millisecond') {
21707            return this.valueOf() < localInput.valueOf();
21708        } else {
21709            return this.clone().endOf(units).valueOf() < localInput.valueOf();
21710        }
21711    }
21712
21713    function isBetween(from, to, units, inclusivity) {
21714        var localFrom = isMoment(from) ? from : createLocal(from),
21715            localTo = isMoment(to) ? to : createLocal(to);
21716        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
21717            return false;
21718        }
21719        inclusivity = inclusivity || '()';
21720        return (
21721            (inclusivity[0] === '('
21722                ? this.isAfter(localFrom, units)
21723                : !this.isBefore(localFrom, units)) &&
21724            (inclusivity[1] === ')'
21725                ? this.isBefore(localTo, units)
21726                : !this.isAfter(localTo, units))
21727        );
21728    }
21729
21730    function isSame(input, units) {
21731        var localInput = isMoment(input) ? input : createLocal(input),
21732            inputMs;
21733        if (!(this.isValid() && localInput.isValid())) {
21734            return false;
21735        }
21736        units = normalizeUnits(units) || 'millisecond';
21737        if (units === 'millisecond') {
21738            return this.valueOf() === localInput.valueOf();
21739        } else {
21740            inputMs = localInput.valueOf();
21741            return (
21742                this.clone().startOf(units).valueOf() <= inputMs &&
21743                inputMs <= this.clone().endOf(units).valueOf()
21744            );
21745        }
21746    }
21747
21748    function isSameOrAfter(input, units) {
21749        return this.isSame(input, units) || this.isAfter(input, units);
21750    }
21751
21752    function isSameOrBefore(input, units) {
21753        return this.isSame(input, units) || this.isBefore(input, units);
21754    }
21755
21756    function diff(input, units, asFloat) {
21757        var that, zoneDelta, output;
21758
21759        if (!this.isValid()) {
21760            return NaN;
21761        }
21762
21763        that = cloneWithOffset(input, this);
21764
21765        if (!that.isValid()) {
21766            return NaN;
21767        }
21768
21769        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
21770
21771        units = normalizeUnits(units);
21772
21773        switch (units) {
21774            case 'year':
21775                output = monthDiff(this, that) / 12;
21776                break;
21777            case 'month':
21778                output = monthDiff(this, that);
21779                break;
21780            case 'quarter':
21781                output = monthDiff(this, that) / 3;
21782                break;
21783            case 'second':
21784                output = (this - that) / 1e3;
21785                break; // 1000
21786            case 'minute':
21787                output = (this - that) / 6e4;
21788                break; // 1000 * 60
21789            case 'hour':
21790                output = (this - that) / 36e5;
21791                break; // 1000 * 60 * 60
21792            case 'day':
21793                output = (this - that - zoneDelta) / 864e5;
21794                break; // 1000 * 60 * 60 * 24, negate dst
21795            case 'week':
21796                output = (this - that - zoneDelta) / 6048e5;
21797                break; // 1000 * 60 * 60 * 24 * 7, negate dst
21798            default:
21799                output = this - that;
21800        }
21801
21802        return asFloat ? output : absFloor(output);
21803    }
21804
21805    function monthDiff(a, b) {
21806        if (a.date() < b.date()) {
21807            // end-of-month calculations work correct when the start month has more
21808            // days than the end month.
21809            return -monthDiff(b, a);
21810        }
21811        // difference in months
21812        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
21813            // b is in (anchor - 1 month, anchor + 1 month)
21814            anchor = a.clone().add(wholeMonthDiff, 'months'),
21815            anchor2,
21816            adjust;
21817
21818        if (b - anchor < 0) {
21819            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
21820            // linear across the month
21821            adjust = (b - anchor) / (anchor - anchor2);
21822        } else {
21823            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
21824            // linear across the month
21825            adjust = (b - anchor) / (anchor2 - anchor);
21826        }
21827
21828        //check for negative zero, return zero if negative zero
21829        return -(wholeMonthDiff + adjust) || 0;
21830    }
21831
21832    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
21833    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
21834
21835    function toString() {
21836        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
21837    }
21838
21839    function toISOString(keepOffset) {
21840        if (!this.isValid()) {
21841            return null;
21842        }
21843        var utc = keepOffset !== true,
21844            m = utc ? this.clone().utc() : this;
21845        if (m.year() < 0 || m.year() > 9999) {
21846            return formatMoment(
21847                m,
21848                utc
21849                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
21850                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
21851            );
21852        }
21853        if (isFunction(Date.prototype.toISOString)) {
21854            // native implementation is ~50x faster, use it when we can
21855            if (utc) {
21856                return this.toDate().toISOString();
21857            } else {
21858                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
21859                    .toISOString()
21860                    .replace('Z', formatMoment(m, 'Z'));
21861            }
21862        }
21863        return formatMoment(
21864            m,
21865            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
21866        );
21867    }
21868
21869    /**
21870     * Return a human readable representation of a moment that can
21871     * also be evaluated to get a new moment which is the same
21872     *
21873     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
21874     */
21875    function inspect() {
21876        if (!this.isValid()) {
21877            return 'moment.invalid(/* ' + this._i + ' */)';
21878        }
21879        var func = 'moment',
21880            zone = '',
21881            prefix,
21882            year,
21883            datetime,
21884            suffix;
21885        if (!this.isLocal()) {
21886            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
21887            zone = 'Z';
21888        }
21889        prefix = '[' + func + '("]';
21890        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
21891        datetime = '-MM-DD[T]HH:mm:ss.SSS';
21892        suffix = zone + '[")]';
21893
21894        return this.format(prefix + year + datetime + suffix);
21895    }
21896
21897    function format(inputString) {
21898        if (!inputString) {
21899            inputString = this.isUtc()
21900                ? hooks.defaultFormatUtc
21901                : hooks.defaultFormat;
21902        }
21903        var output = formatMoment(this, inputString);
21904        return this.localeData().postformat(output);
21905    }
21906
21907    function from(time, withoutSuffix) {
21908        if (
21909            this.isValid() &&
21910            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
21911        ) {
21912            return createDuration({ to: this, from: time })
21913                .locale(this.locale())
21914                .humanize(!withoutSuffix);
21915        } else {
21916            return this.localeData().invalidDate();
21917        }
21918    }
21919
21920    function fromNow(withoutSuffix) {
21921        return this.from(createLocal(), withoutSuffix);
21922    }
21923
21924    function to(time, withoutSuffix) {
21925        if (
21926            this.isValid() &&
21927            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
21928        ) {
21929            return createDuration({ from: this, to: time })
21930                .locale(this.locale())
21931                .humanize(!withoutSuffix);
21932        } else {
21933            return this.localeData().invalidDate();
21934        }
21935    }
21936
21937    function toNow(withoutSuffix) {
21938        return this.to(createLocal(), withoutSuffix);
21939    }
21940
21941    // If passed a locale key, it will set the locale for this
21942    // instance.  Otherwise, it will return the locale configuration
21943    // variables for this instance.
21944    function locale(key) {
21945        var newLocaleData;
21946
21947        if (key === undefined) {
21948            return this._locale._abbr;
21949        } else {
21950            newLocaleData = getLocale(key);
21951            if (newLocaleData != null) {
21952                this._locale = newLocaleData;
21953            }
21954            return this;
21955        }
21956    }
21957
21958    var lang = deprecate(
21959        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
21960        function (key) {
21961            if (key === undefined) {
21962                return this.localeData();
21963            } else {
21964                return this.locale(key);
21965            }
21966        }
21967    );
21968
21969    function localeData() {
21970        return this._locale;
21971    }
21972
21973    var MS_PER_SECOND = 1000,
21974        MS_PER_MINUTE = 60 * MS_PER_SECOND,
21975        MS_PER_HOUR = 60 * MS_PER_MINUTE,
21976        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
21977
21978    // actual modulo - handles negative numbers (for dates before 1970):
21979    function mod$1(dividend, divisor) {
21980        return ((dividend % divisor) + divisor) % divisor;
21981    }
21982
21983    function localStartOfDate(y, m, d) {
21984        // the date constructor remaps years 0-99 to 1900-1999
21985        if (y < 100 && y >= 0) {
21986            // preserve leap years using a full 400 year cycle, then reset
21987            return new Date(y + 400, m, d) - MS_PER_400_YEARS;
21988        } else {
21989            return new Date(y, m, d).valueOf();
21990        }
21991    }
21992
21993    function utcStartOfDate(y, m, d) {
21994        // Date.UTC remaps years 0-99 to 1900-1999
21995        if (y < 100 && y >= 0) {
21996            // preserve leap years using a full 400 year cycle, then reset
21997            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
21998        } else {
21999            return Date.UTC(y, m, d);
22000        }
22001    }
22002
22003    function startOf(units) {
22004        var time, startOfDate;
22005        units = normalizeUnits(units);
22006        if (units === undefined || units === 'millisecond' || !this.isValid()) {
22007            return this;
22008        }
22009
22010        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
22011
22012        switch (units) {
22013            case 'year':
22014                time = startOfDate(this.year(), 0, 1);
22015                break;
22016            case 'quarter':
22017                time = startOfDate(
22018                    this.year(),
22019                    this.month() - (this.month() % 3),
22020                    1
22021                );
22022                break;
22023            case 'month':
22024                time = startOfDate(this.year(), this.month(), 1);
22025                break;
22026            case 'week':
22027                time = startOfDate(
22028                    this.year(),
22029                    this.month(),
22030                    this.date() - this.weekday()
22031                );
22032                break;
22033            case 'isoWeek':
22034                time = startOfDate(
22035                    this.year(),
22036                    this.month(),
22037                    this.date() - (this.isoWeekday() - 1)
22038                );
22039                break;
22040            case 'day':
22041            case 'date':
22042                time = startOfDate(this.year(), this.month(), this.date());
22043                break;
22044            case 'hour':
22045                time = this._d.valueOf();
22046                time -= mod$1(
22047                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
22048                    MS_PER_HOUR
22049                );
22050                break;
22051            case 'minute':
22052                time = this._d.valueOf();
22053                time -= mod$1(time, MS_PER_MINUTE);
22054                break;
22055            case 'second':
22056                time = this._d.valueOf();
22057                time -= mod$1(time, MS_PER_SECOND);
22058                break;
22059        }
22060
22061        this._d.setTime(time);
22062        hooks.updateOffset(this, true);
22063        return this;
22064    }
22065
22066    function endOf(units) {
22067        var time, startOfDate;
22068        units = normalizeUnits(units);
22069        if (units === undefined || units === 'millisecond' || !this.isValid()) {
22070            return this;
22071        }
22072
22073        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
22074
22075        switch (units) {
22076            case 'year':
22077                time = startOfDate(this.year() + 1, 0, 1) - 1;
22078                break;
22079            case 'quarter':
22080                time =
22081                    startOfDate(
22082                        this.year(),
22083                        this.month() - (this.month() % 3) + 3,
22084                        1
22085                    ) - 1;
22086                break;
22087            case 'month':
22088                time = startOfDate(this.year(), this.month() + 1, 1) - 1;
22089                break;
22090            case 'week':
22091                time =
22092                    startOfDate(
22093                        this.year(),
22094                        this.month(),
22095                        this.date() - this.weekday() + 7
22096                    ) - 1;
22097                break;
22098            case 'isoWeek':
22099                time =
22100                    startOfDate(
22101                        this.year(),
22102                        this.month(),
22103                        this.date() - (this.isoWeekday() - 1) + 7
22104                    ) - 1;
22105                break;
22106            case 'day':
22107            case 'date':
22108                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
22109                break;
22110            case 'hour':
22111                time = this._d.valueOf();
22112                time +=
22113                    MS_PER_HOUR -
22114                    mod$1(
22115                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
22116                        MS_PER_HOUR
22117                    ) -
22118                    1;
22119                break;
22120            case 'minute':
22121                time = this._d.valueOf();
22122                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
22123                break;
22124            case 'second':
22125                time = this._d.valueOf();
22126                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
22127                break;
22128        }
22129
22130        this._d.setTime(time);
22131        hooks.updateOffset(this, true);
22132        return this;
22133    }
22134
22135    function valueOf() {
22136        return this._d.valueOf() - (this._offset || 0) * 60000;
22137    }
22138
22139    function unix() {
22140        return Math.floor(this.valueOf() / 1000);
22141    }
22142
22143    function toDate() {
22144        return new Date(this.valueOf());
22145    }
22146
22147    function toArray() {
22148        var m = this;
22149        return [
22150            m.year(),
22151            m.month(),
22152            m.date(),
22153            m.hour(),
22154            m.minute(),
22155            m.second(),
22156            m.millisecond(),
22157        ];
22158    }
22159
22160    function toObject() {
22161        var m = this;
22162        return {
22163            years: m.year(),
22164            months: m.month(),
22165            date: m.date(),
22166            hours: m.hours(),
22167            minutes: m.minutes(),
22168            seconds: m.seconds(),
22169            milliseconds: m.milliseconds(),
22170        };
22171    }
22172
22173    function toJSON() {
22174        // new Date(NaN).toJSON() === null
22175        return this.isValid() ? this.toISOString() : null;
22176    }
22177
22178    function isValid$2() {
22179        return isValid(this);
22180    }
22181
22182    function parsingFlags() {
22183        return extend({}, getParsingFlags(this));
22184    }
22185
22186    function invalidAt() {
22187        return getParsingFlags(this).overflow;
22188    }
22189
22190    function creationData() {
22191        return {
22192            input: this._i,
22193            format: this._f,
22194            locale: this._locale,
22195            isUTC: this._isUTC,
22196            strict: this._strict,
22197        };
22198    }
22199
22200    addFormatToken('N', 0, 0, 'eraAbbr');
22201    addFormatToken('NN', 0, 0, 'eraAbbr');
22202    addFormatToken('NNN', 0, 0, 'eraAbbr');
22203    addFormatToken('NNNN', 0, 0, 'eraName');
22204    addFormatToken('NNNNN', 0, 0, 'eraNarrow');
22205
22206    addFormatToken('y', ['y', 1], 'yo', 'eraYear');
22207    addFormatToken('y', ['yy', 2], 0, 'eraYear');
22208    addFormatToken('y', ['yyy', 3], 0, 'eraYear');
22209    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
22210
22211    addRegexToken('N', matchEraAbbr);
22212    addRegexToken('NN', matchEraAbbr);
22213    addRegexToken('NNN', matchEraAbbr);
22214    addRegexToken('NNNN', matchEraName);
22215    addRegexToken('NNNNN', matchEraNarrow);
22216
22217    addParseToken(
vendor: 8,145 bytes, lines 22217-22492
22217
22218        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
22219        function (input, array, config, token) {
22220            var era = config._locale.erasParse(input, token, config._strict);
22221            if (era) {
22222                getParsingFlags(config).era = era;
22223            } else {
22224                getParsingFlags(config).invalidEra = input;
22225            }
22226        }
22227    );
22228
22229    addRegexToken('y', matchUnsigned);
22230    addRegexToken('yy', matchUnsigned);
22231    addRegexToken('yyy', matchUnsigned);
22232    addRegexToken('yyyy', matchUnsigned);
22233    addRegexToken('yo', matchEraYearOrdinal);
22234
22235    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
22236    addParseToken(['yo'], function (input, array, config, token) {
22237        var match;
22238        if (config._locale._eraYearOrdinalRegex) {
22239            match = input.match(config._locale._eraYearOrdinalRegex);
22240        }
22241
22242        if (config._locale.eraYearOrdinalParse) {
22243            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
22244        } else {
22245            array[YEAR] = parseInt(input, 10);
22246        }
22247    });
22248
22249    function localeEras(m, format) {
22250        var i,
22251            l,
22252            date,
22253            eras = this._eras || getLocale('en')._eras;
22254        for (i = 0, l = eras.length; i < l; ++i) {
22255            switch (typeof eras[i].since) {
22256                case 'string':
22257                    // truncate time
22258                    date = hooks(eras[i].since).startOf('day');
22259                    eras[i].since = date.valueOf();
22260                    break;
22261            }
22262
22263            switch (typeof eras[i].until) {
22264                case 'undefined':
22265                    eras[i].until = +Infinity;
22266                    break;
22267                case 'string':
22268                    // truncate time
22269                    date = hooks(eras[i].until).startOf('day').valueOf();
22270                    eras[i].until = date.valueOf();
22271                    break;
22272            }
22273        }
22274        return eras;
22275    }
22276
22277    function localeErasParse(eraName, format, strict) {
22278        var i,
22279            l,
22280            eras = this.eras(),
22281            name,
22282            abbr,
22283            narrow;
22284        eraName = eraName.toUpperCase();
22285
22286        for (i = 0, l = eras.length; i < l; ++i) {
22287            name = eras[i].name.toUpperCase();
22288            abbr = eras[i].abbr.toUpperCase();
22289            narrow = eras[i].narrow.toUpperCase();
22290
22291            if (strict) {
22292                switch (format) {
22293                    case 'N':
22294                    case 'NN':
22295                    case 'NNN':
22296                        if (abbr === eraName) {
22297                            return eras[i];
22298                        }
22299                        break;
22300
22301                    case 'NNNN':
22302                        if (name === eraName) {
22303                            return eras[i];
22304                        }
22305                        break;
22306
22307                    case 'NNNNN':
22308                        if (narrow === eraName) {
22309                            return eras[i];
22310                        }
22311                        break;
22312                }
22313            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
22314                return eras[i];
22315            }
22316        }
22317    }
22318
22319    function localeErasConvertYear(era, year) {
22320        var dir = era.since <= era.until ? +1 : -1;
22321        if (year === undefined) {
22322            return hooks(era.since).year();
22323        } else {
22324            return hooks(era.since).year() + (year - era.offset) * dir;
22325        }
22326    }
22327
22328    function getEraName() {
22329        var i,
22330            l,
22331            val,
22332            eras = this.localeData().eras();
22333        for (i = 0, l = eras.length; i < l; ++i) {
22334            // truncate time
22335            val = this.clone().startOf('day').valueOf();
22336
22337            if (eras[i].since <= val && val <= eras[i].until) {
22338                return eras[i].name;
22339            }
22340            if (eras[i].until <= val && val <= eras[i].since) {
22341                return eras[i].name;
22342            }
22343        }
22344
22345        return '';
22346    }
22347
22348    function getEraNarrow() {
22349        var i,
22350            l,
22351            val,
22352            eras = this.localeData().eras();
22353        for (i = 0, l = eras.length; i < l; ++i) {
22354            // truncate time
22355            val = this.clone().startOf('day').valueOf();
22356
22357            if (eras[i].since <= val && val <= eras[i].until) {
22358                return eras[i].narrow;
22359            }
22360            if (eras[i].until <= val && val <= eras[i].since) {
22361                return eras[i].narrow;
22362            }
22363        }
22364
22365        return '';
22366    }
22367
22368    function getEraAbbr() {
22369        var i,
22370            l,
22371            val,
22372            eras = this.localeData().eras();
22373        for (i = 0, l = eras.length; i < l; ++i) {
22374            // truncate time
22375            val = this.clone().startOf('day').valueOf();
22376
22377            if (eras[i].since <= val && val <= eras[i].until) {
22378                return eras[i].abbr;
22379            }
22380            if (eras[i].until <= val && val <= eras[i].since) {
22381                return eras[i].abbr;
22382            }
22383        }
22384
22385        return '';
22386    }
22387
22388    function getEraYear() {
22389        var i,
22390            l,
22391            dir,
22392            val,
22393            eras = this.localeData().eras();
22394        for (i = 0, l = eras.length; i < l; ++i) {
22395            dir = eras[i].since <= eras[i].until ? +1 : -1;
22396
22397            // truncate time
22398            val = this.clone().startOf('day').valueOf();
22399
22400            if (
22401                (eras[i].since <= val && val <= eras[i].until) ||
22402                (eras[i].until <= val && val <= eras[i].since)
22403            ) {
22404                return (
22405                    (this.year() - hooks(eras[i].since).year()) * dir +
22406                    eras[i].offset
22407                );
22408            }
22409        }
22410
22411        return this.year();
22412    }
22413
22414    function erasNameRegex(isStrict) {
22415        if (!hasOwnProp(this, '_erasNameRegex')) {
22416            computeErasParse.call(this);
22417        }
22418        return isStrict ? this._erasNameRegex : this._erasRegex;
22419    }
22420
22421    function erasAbbrRegex(isStrict) {
22422        if (!hasOwnProp(this, '_erasAbbrRegex')) {
22423            computeErasParse.call(this);
22424        }
22425        return isStrict ? this._erasAbbrRegex : this._erasRegex;
22426    }
22427
22428    function erasNarrowRegex(isStrict) {
22429        if (!hasOwnProp(this, '_erasNarrowRegex')) {
22430            computeErasParse.call(this);
22431        }
22432        return isStrict ? this._erasNarrowRegex : this._erasRegex;
22433    }
22434
22435    function matchEraAbbr(isStrict, locale) {
22436        return locale.erasAbbrRegex(isStrict);
22437    }
22438
22439    function matchEraName(isStrict, locale) {
22440        return locale.erasNameRegex(isStrict);
22441    }
22442
22443    function matchEraNarrow(isStrict, locale) {
22444        return locale.erasNarrowRegex(isStrict);
22445    }
22446
22447    function matchEraYearOrdinal(isStrict, locale) {
22448        return locale._eraYearOrdinalRegex || matchUnsigned;
22449    }
22450
22451    function computeErasParse() {
22452        var abbrPieces = [],
22453            namePieces = [],
22454            narrowPieces = [],
22455            mixedPieces = [],
22456            i,
22457            l,
22458            eras = this.eras();
22459
22460        for (i = 0, l = eras.length; i < l; ++i) {
22461            namePieces.push(regexEscape(eras[i].name));
22462            abbrPieces.push(regexEscape(eras[i].abbr));
22463            narrowPieces.push(regexEscape(eras[i].narrow));
22464
22465            mixedPieces.push(regexEscape(eras[i].name));
22466            mixedPieces.push(regexEscape(eras[i].abbr));
22467            mixedPieces.push(regexEscape(eras[i].narrow));
22468        }
22469
22470        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
22471        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
22472        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
22473        this._erasNarrowRegex = new RegExp(
22474            '^(' + narrowPieces.join('|') + ')',
22475            'i'
22476        );
22477    }
22478
22479    // FORMATTING
22480
22481    addFormatToken(0, ['gg', 2], 0, function () {
22482        return this.weekYear() % 100;
22483    });
22484
22485    addFormatToken(0, ['GG', 2], 0, function () {
22486        return this.isoWeekYear() % 100;
22487    });
22488
22489    function addWeekYearFormatToken(token, getter) {
22490        addFormatToken(0, [token, token.length], 0, getter);
22491    }
22492
22493    addWeekYearFormatToken('gggg', 'weekYear');
22494    addWeekYearFormatToken('ggggg', 'weekYear');
22495    addWeekYearFormatToken('GGGG', 'isoWeekYear');
22496    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
22497
22498    // ALIASES
22499
22500    addUnitAlias('weekYear', 'gg');
22501    addUnitAlias('isoWeekYear', 'GG');
22502
22503    // PRIORITY
22504
22505    addUnitPriority('weekYear', 1);
22506    addUnitPriority('isoWeekYear', 1);
22507
22508    // PARSING
22509
22510    addRegexToken('G', matchSigned);
22511    addRegexToken('g', matchSigned);
22512    addRegexToken('GG', match1to2, match2);
22513    addRegexToken('gg', match1to2, match2);
22514    addRegexToken('GGGG', match1to4, match4);
22515    addRegexToken('gggg', match1to4, match4);
22516    addRegexToken('GGGGG', match1to6, match6);
22517    addRegexToken('ggggg', match1to6, match6);
22518
22519    addWeekParseToken(
22520        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
22521        function (input, week, config, token) {
22522            week[token.substr(0, 2)] = toInt(input);
22523        }
22524    
vendor: 29,543 bytes, lines 22524-23547
22524);
22525
22526    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
22527        week[token] = hooks.parseTwoDigitYear(input);
22528    });
22529
22530    // MOMENTS
22531
22532    function getSetWeekYear(input) {
22533        return getSetWeekYearHelper.call(
22534            this,
22535            input,
22536            this.week(),
22537            this.weekday(),
22538            this.localeData()._week.dow,
22539            this.localeData()._week.doy
22540        );
22541    }
22542
22543    function getSetISOWeekYear(input) {
22544        return getSetWeekYearHelper.call(
22545            this,
22546            input,
22547            this.isoWeek(),
22548            this.isoWeekday(),
22549            1,
22550            4
22551        );
22552    }
22553
22554    function getISOWeeksInYear() {
22555        return weeksInYear(this.year(), 1, 4);
22556    }
22557
22558    function getISOWeeksInISOWeekYear() {
22559        return weeksInYear(this.isoWeekYear(), 1, 4);
22560    }
22561
22562    function getWeeksInYear() {
22563        var weekInfo = this.localeData()._week;
22564        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
22565    }
22566
22567    function getWeeksInWeekYear() {
22568        var weekInfo = this.localeData()._week;
22569        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
22570    }
22571
22572    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
22573        var weeksTarget;
22574        if (input == null) {
22575            return weekOfYear(this, dow, doy).year;
22576        } else {
22577            weeksTarget = weeksInYear(input, dow, doy);
22578            if (week > weeksTarget) {
22579                week = weeksTarget;
22580            }
22581            return setWeekAll.call(this, input, week, weekday, dow, doy);
22582        }
22583    }
22584
22585    function setWeekAll(weekYear, week, weekday, dow, doy) {
22586        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
22587            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
22588
22589        this.year(date.getUTCFullYear());
22590        this.month(date.getUTCMonth());
22591        this.date(date.getUTCDate());
22592        return this;
22593    }
22594
22595    // FORMATTING
22596
22597    addFormatToken('Q', 0, 'Qo', 'quarter');
22598
22599    // ALIASES
22600
22601    addUnitAlias('quarter', 'Q');
22602
22603    // PRIORITY
22604
22605    addUnitPriority('quarter', 7);
22606
22607    // PARSING
22608
22609    addRegexToken('Q', match1);
22610    addParseToken('Q', function (input, array) {
22611        array[MONTH] = (toInt(input) - 1) * 3;
22612    });
22613
22614    // MOMENTS
22615
22616    function getSetQuarter(input) {
22617        return input == null
22618            ? Math.ceil((this.month() + 1) / 3)
22619            : this.month((input - 1) * 3 + (this.month() % 3));
22620    }
22621
22622    // FORMATTING
22623
22624    addFormatToken('D', ['DD', 2], 'Do', 'date');
22625
22626    // ALIASES
22627
22628    addUnitAlias('date', 'D');
22629
22630    // PRIORITY
22631    addUnitPriority('date', 9);
22632
22633    // PARSING
22634
22635    addRegexToken('D', match1to2);
22636    addRegexToken('DD', match1to2, match2);
22637    addRegexToken('Do', function (isStrict, locale) {
22638        // TODO: Remove "ordinalParse" fallback in next major release.
22639        return isStrict
22640            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
22641            : locale._dayOfMonthOrdinalParseLenient;
22642    });
22643
22644    addParseToken(['D', 'DD'], DATE);
22645    addParseToken('Do', function (input, array) {
22646        array[DATE] = toInt(input.match(match1to2)[0]);
22647    });
22648
22649    // MOMENTS
22650
22651    var getSetDayOfMonth = makeGetSet('Date', true);
22652
22653    // FORMATTING
22654
22655    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
22656
22657    // ALIASES
22658
22659    addUnitAlias('dayOfYear', 'DDD');
22660
22661    // PRIORITY
22662    addUnitPriority('dayOfYear', 4);
22663
22664    // PARSING
22665
22666    addRegexToken('DDD', match1to3);
22667    addRegexToken('DDDD', match3);
22668    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
22669        config._dayOfYear = toInt(input);
22670    });
22671
22672    // HELPERS
22673
22674    // MOMENTS
22675
22676    function getSetDayOfYear(input) {
22677        var dayOfYear =
22678            Math.round(
22679                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
22680            ) + 1;
22681        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
22682    }
22683
22684    // FORMATTING
22685
22686    addFormatToken('m', ['mm', 2], 0, 'minute');
22687
22688    // ALIASES
22689
22690    addUnitAlias('minute', 'm');
22691
22692    // PRIORITY
22693
22694    addUnitPriority('minute', 14);
22695
22696    // PARSING
22697
22698    addRegexToken('m', match1to2);
22699    addRegexToken('mm', match1to2, match2);
22700    addParseToken(['m', 'mm'], MINUTE);
22701
22702    // MOMENTS
22703
22704    var getSetMinute = makeGetSet('Minutes', false);
22705
22706    // FORMATTING
22707
22708    addFormatToken('s', ['ss', 2], 0, 'second');
22709
22710    // ALIASES
22711
22712    addUnitAlias('second', 's');
22713
22714    // PRIORITY
22715
22716    addUnitPriority('second', 15);
22717
22718    // PARSING
22719
22720    addRegexToken('s', match1to2);
22721    addRegexToken('ss', match1to2, match2);
22722    addParseToken(['s', 'ss'], SECOND);
22723
22724    // MOMENTS
22725
22726    var getSetSecond = makeGetSet('Seconds', false);
22727
22728    // FORMATTING
22729
22730    addFormatToken('S', 0, 0, function () {
22731        return ~~(this.millisecond() / 100);
22732    });
22733
22734    addFormatToken(0, ['SS', 2], 0, function () {
22735        return ~~(this.millisecond() / 10);
22736    });
22737
22738    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
22739    addFormatToken(0, ['SSSS', 4], 0, function () {
22740        return this.millisecond() * 10;
22741    });
22742    addFormatToken(0, ['SSSSS', 5], 0, function () {
22743        return this.millisecond() * 100;
22744    });
22745    addFormatToken(0, ['SSSSSS', 6], 0, function () {
22746        return this.millisecond() * 1000;
22747    });
22748    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
22749        return this.millisecond() * 10000;
22750    });
22751    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
22752        return this.millisecond() * 100000;
22753    });
22754    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
22755        return this.millisecond() * 1000000;
22756    });
22757
22758    // ALIASES
22759
22760    addUnitAlias('millisecond', 'ms');
22761
22762    // PRIORITY
22763
22764    addUnitPriority('millisecond', 16);
22765
22766    // PARSING
22767
22768    addRegexToken('S', match1to3, match1);
22769    addRegexToken('SS', match1to3, match2);
22770    addRegexToken('SSS', match1to3, match3);
22771
22772    var token, getSetMillisecond;
22773    for (token = 'SSSS'; token.length <= 9; token += 'S') {
22774        addRegexToken(token, matchUnsigned);
22775    }
22776
22777    function parseMs(input, array) {
22778        array[MILLISECOND] = toInt(('0.' + input) * 1000);
22779    }
22780
22781    for (token = 'S'; token.length <= 9; token += 'S') {
22782        addParseToken(token, parseMs);
22783    }
22784
22785    getSetMillisecond = makeGetSet('Milliseconds', false);
22786
22787    // FORMATTING
22788
22789    addFormatToken('z', 0, 0, 'zoneAbbr');
22790    addFormatToken('zz', 0, 0, 'zoneName');
22791
22792    // MOMENTS
22793
22794    function getZoneAbbr() {
22795        return this._isUTC ? 'UTC' : '';
22796    }
22797
22798    function getZoneName() {
22799        return this._isUTC ? 'Coordinated Universal Time' : '';
22800    }
22801
22802    var proto = Moment.prototype;
22803
22804    proto.add = add;
22805    proto.calendar = calendar$1;
22806    proto.clone = clone;
22807    proto.diff = diff;
22808    proto.endOf = endOf;
22809    proto.format = format;
22810    proto.from = from;
22811    proto.fromNow = fromNow;
22812    proto.to = to;
22813    proto.toNow = toNow;
22814    proto.get = stringGet;
22815    proto.invalidAt = invalidAt;
22816    proto.isAfter = isAfter;
22817    proto.isBefore = isBefore;
22818    proto.isBetween = isBetween;
22819    proto.isSame = isSame;
22820    proto.isSameOrAfter = isSameOrAfter;
22821    proto.isSameOrBefore = isSameOrBefore;
22822    proto.isValid = isValid$2;
22823    proto.lang = lang;
22824    proto.locale = locale;
22825    proto.localeData = localeData;
22826    proto.max = prototypeMax;
22827    proto.min = prototypeMin;
22828    proto.parsingFlags = parsingFlags;
22829    proto.set = stringSet;
22830    proto.startOf = startOf;
22831    proto.subtract = subtract;
22832    proto.toArray = toArray;
22833    proto.toObject = toObject;
22834    proto.toDate = toDate;
22835    proto.toISOString = toISOString;
22836    proto.inspect = inspect;
22837    if (typeof Symbol !== 'undefined' && Symbol.for != null) {
22838        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
22839            return 'Moment<' + this.format() + '>';
22840        };
22841    }
22842    proto.toJSON = toJSON;
22843    proto.toString = toString;
22844    proto.unix = unix;
22845    proto.valueOf = valueOf;
22846    proto.creationData = creationData;
22847    proto.eraName = getEraName;
22848    proto.eraNarrow = getEraNarrow;
22849    proto.eraAbbr = getEraAbbr;
22850    proto.eraYear = getEraYear;
22851    proto.year = getSetYear;
22852    proto.isLeapYear = getIsLeapYear;
22853    proto.weekYear = getSetWeekYear;
22854    proto.isoWeekYear = getSetISOWeekYear;
22855    proto.quarter = proto.quarters = getSetQuarter;
22856    proto.month = getSetMonth;
22857    proto.daysInMonth = getDaysInMonth;
22858    proto.week = proto.weeks = getSetWeek;
22859    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
22860    proto.weeksInYear = getWeeksInYear;
22861    proto.weeksInWeekYear = getWeeksInWeekYear;
22862    proto.isoWeeksInYear = getISOWeeksInYear;
22863    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
22864    proto.date = getSetDayOfMonth;
22865    proto.day = proto.days = getSetDayOfWeek;
22866    proto.weekday = getSetLocaleDayOfWeek;
22867    proto.isoWeekday = getSetISODayOfWeek;
22868    proto.dayOfYear = getSetDayOfYear;
22869    proto.hour = proto.hours = getSetHour;
22870    proto.minute = proto.minutes = getSetMinute;
22871    proto.second = proto.seconds = getSetSecond;
22872    proto.millisecond = proto.milliseconds = getSetMillisecond;
22873    proto.utcOffset = getSetOffset;
22874    proto.utc = setOffsetToUTC;
22875    proto.local = setOffsetToLocal;
22876    proto.parseZone = setOffsetToParsedOffset;
22877    proto.hasAlignedHourOffset = hasAlignedHourOffset;
22878    proto.isDST = isDaylightSavingTime;
22879    proto.isLocal = isLocal;
22880    proto.isUtcOffset = isUtcOffset;
22881    proto.isUtc = isUtc;
22882    proto.isUTC = isUtc;
22883    proto.zoneAbbr = getZoneAbbr;
22884    proto.zoneName = getZoneName;
22885    proto.dates = deprecate(
22886        'dates accessor is deprecated. Use date instead.',
22887        getSetDayOfMonth
22888    );
22889    proto.months = deprecate(
22890        'months accessor is deprecated. Use month instead',
22891        getSetMonth
22892    );
22893    proto.years = deprecate(
22894        'years accessor is deprecated. Use year instead',
22895        getSetYear
22896    );
22897    proto.zone = deprecate(
22898        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
22899        getSetZone
22900    );
22901    proto.isDSTShifted = deprecate(
22902        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
22903        isDaylightSavingTimeShifted
22904    );
22905
22906    function createUnix(input) {
22907        return createLocal(input * 1000);
22908    }
22909
22910    function createInZone() {
22911        return createLocal.apply(null, arguments).parseZone();
22912    }
22913
22914    function preParsePostFormat(string) {
22915        return string;
22916    }
22917
22918    var proto$1 = Locale.prototype;
22919
22920    proto$1.calendar = calendar;
22921    proto$1.longDateFormat = longDateFormat;
22922    proto$1.invalidDate = invalidDate;
22923    proto$1.ordinal = ordinal;
22924    proto$1.preparse = preParsePostFormat;
22925    proto$1.postformat = preParsePostFormat;
22926    proto$1.relativeTime = relativeTime;
22927    proto$1.pastFuture = pastFuture;
22928    proto$1.set = set;
22929    proto$1.eras = localeEras;
22930    proto$1.erasParse = localeErasParse;
22931    proto$1.erasConvertYear = localeErasConvertYear;
22932    proto$1.erasAbbrRegex = erasAbbrRegex;
22933    proto$1.erasNameRegex = erasNameRegex;
22934    proto$1.erasNarrowRegex = erasNarrowRegex;
22935
22936    proto$1.months = localeMonths;
22937    proto$1.monthsShort = localeMonthsShort;
22938    proto$1.monthsParse = localeMonthsParse;
22939    proto$1.monthsRegex = monthsRegex;
22940    proto$1.monthsShortRegex = monthsShortRegex;
22941    proto$1.week = localeWeek;
22942    proto$1.firstDayOfYear = localeFirstDayOfYear;
22943    proto$1.firstDayOfWeek = localeFirstDayOfWeek;
22944
22945    proto$1.weekdays = localeWeekdays;
22946    proto$1.weekdaysMin = localeWeekdaysMin;
22947    proto$1.weekdaysShort = localeWeekdaysShort;
22948    proto$1.weekdaysParse = localeWeekdaysParse;
22949
22950    proto$1.weekdaysRegex = weekdaysRegex;
22951    proto$1.weekdaysShortRegex = weekdaysShortRegex;
22952    proto$1.weekdaysMinRegex = weekdaysMinRegex;
22953
22954    proto$1.isPM = localeIsPM;
22955    proto$1.meridiem = localeMeridiem;
22956
22957    function get$1(format, index, field, setter) {
22958        var locale = getLocale(),
22959            utc = createUTC().set(setter, index);
22960        return locale[field](utc, format);
22961    }
22962
22963    function listMonthsImpl(format, index, field) {
22964        if (isNumber(format)) {
22965            index = format;
22966            format = undefined;
22967        }
22968
22969        format = format || '';
22970
22971        if (index != null) {
22972            return get$1(format, index, field, 'month');
22973        }
22974
22975        var i,
22976            out = [];
22977        for (i = 0; i < 12; i++) {
22978            out[i] = get$1(format, i, field, 'month');
22979        }
22980        return out;
22981    }
22982
22983    // ()
22984    // (5)
22985    // (fmt, 5)
22986    // (fmt)
22987    // (true)
22988    // (true, 5)
22989    // (true, fmt, 5)
22990    // (true, fmt)
22991    function listWeekdaysImpl(localeSorted, format, index, field) {
22992        if (typeof localeSorted === 'boolean') {
22993            if (isNumber(format)) {
22994                index = format;
22995                format = undefined;
22996            }
22997
22998            format = format || '';
22999        } else {
23000            format = localeSorted;
23001            index = format;
23002            localeSorted = false;
23003
23004            if (isNumber(format)) {
23005                index = format;
23006                format = undefined;
23007            }
23008
23009            format = format || '';
23010        }
23011
23012        var locale = getLocale(),
23013            shift = localeSorted ? locale._week.dow : 0,
23014            i,
23015            out = [];
23016
23017        if (index != null) {
23018            return get$1(format, (index + shift) % 7, field, 'day');
23019        }
23020
23021        for (i = 0; i < 7; i++) {
23022            out[i] = get$1(format, (i + shift) % 7, field, 'day');
23023        }
23024        return out;
23025    }
23026
23027    function listMonths(format, index) {
23028        return listMonthsImpl(format, index, 'months');
23029    }
23030
23031    function listMonthsShort(format, index) {
23032        return listMonthsImpl(format, index, 'monthsShort');
23033    }
23034
23035    function listWeekdays(localeSorted, format, index) {
23036        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
23037    }
23038
23039    function listWeekdaysShort(localeSorted, format, index) {
23040        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
23041    }
23042
23043    function listWeekdaysMin(localeSorted, format, index) {
23044        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
23045    }
23046
23047    getSetGlobalLocale('en', {
23048        eras: [
23049            {
23050                since: '0001-01-01',
23051                until: +Infinity,
23052                offset: 1,
23053                name: 'Anno Domini',
23054                narrow: 'AD',
23055                abbr: 'AD',
23056            },
23057            {
23058                since: '0000-12-31',
23059                until: -Infinity,
23060                offset: 1,
23061                name: 'Before Christ',
23062                narrow: 'BC',
23063                abbr: 'BC',
23064            },
23065        ],
23066        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
23067        ordinal: function (number) {
23068            var b = number % 10,
23069                output =
23070                    toInt((number % 100) / 10) === 1
23071                        ? 'th'
23072                        : b === 1
23073                        ? 'st'
23074                        : b === 2
23075                        ? 'nd'
23076                        : b === 3
23077                        ? 'rd'
23078                        : 'th';
23079            return number + output;
23080        },
23081    });
23082
23083    // Side effect imports
23084
23085    hooks.lang = deprecate(
23086        'moment.lang is deprecated. Use moment.locale instead.',
23087        getSetGlobalLocale
23088    );
23089    hooks.langData = deprecate(
23090        'moment.langData is deprecated. Use moment.localeData instead.',
23091        getLocale
23092    );
23093
23094    var mathAbs = Math.abs;
23095
23096    function abs() {
23097        var data = this._data;
23098
23099        this._milliseconds = mathAbs(this._milliseconds);
23100        this._days = mathAbs(this._days);
23101        this._months = mathAbs(this._months);
23102
23103        data.milliseconds = mathAbs(data.milliseconds);
23104        data.seconds = mathAbs(data.seconds);
23105        data.minutes = mathAbs(data.minutes);
23106        data.hours = mathAbs(data.hours);
23107        data.months = mathAbs(data.months);
23108        data.years = mathAbs(data.years);
23109
23110        return this;
23111    }
23112
23113    function addSubtract$1(duration, input, value, direction) {
23114        var other = createDuration(input, value);
23115
23116        duration._milliseconds += direction * other._milliseconds;
23117        duration._days += direction * other._days;
23118        duration._months += direction * other._months;
23119
23120        return duration._bubble();
23121    }
23122
23123    // supports only 2.0-style add(1, 's') or add(duration)
23124    function add$1(input, value) {
23125        return addSubtract$1(this, input, value, 1);
23126    }
23127
23128    // supports only 2.0-style subtract(1, 's') or subtract(duration)
23129    function subtract$1(input, value) {
23130        return addSubtract$1(this, input, value, -1);
23131    }
23132
23133    function absCeil(number) {
23134        if (number < 0) {
23135            return Math.floor(number);
23136        } else {
23137            return Math.ceil(number);
23138        }
23139    }
23140
23141    function bubble() {
23142        var milliseconds = this._milliseconds,
23143            days = this._days,
23144            months = this._months,
23145            data = this._data,
23146            seconds,
23147            minutes,
23148            hours,
23149            years,
23150            monthsFromDays;
23151
23152        // if we have a mix of positive and negative values, bubble down first
23153        // check: https://github.com/moment/moment/issues/2166
23154        if (
23155            !(
23156                (milliseconds >= 0 && days >= 0 && months >= 0) ||
23157                (milliseconds <= 0 && days <= 0 && months <= 0)
23158            )
23159        ) {
23160            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
23161            days = 0;
23162            months = 0;
23163        }
23164
23165        // The following code bubbles up values, see the tests for
23166        // examples of what that means.
23167        data.milliseconds = milliseconds % 1000;
23168
23169        seconds = absFloor(milliseconds / 1000);
23170        data.seconds = seconds % 60;
23171
23172        minutes = absFloor(seconds / 60);
23173        data.minutes = minutes % 60;
23174
23175        hours = absFloor(minutes / 60);
23176        data.hours = hours % 24;
23177
23178        days += absFloor(hours / 24);
23179
23180        // convert days to months
23181        monthsFromDays = absFloor(daysToMonths(days));
23182        months += monthsFromDays;
23183        days -= absCeil(monthsToDays(monthsFromDays));
23184
23185        // 12 months -> 1 year
23186        years = absFloor(months / 12);
23187        months %= 12;
23188
23189        data.days = days;
23190        data.months = months;
23191        data.years = years;
23192
23193        return this;
23194    }
23195
23196    function daysToMonths(days) {
23197        // 400 years have 146097 days (taking into account leap year rules)
23198        // 400 years have 12 months === 4800
23199        return (days * 4800) / 146097;
23200    }
23201
23202    function monthsToDays(months) {
23203        // the reverse of daysToMonths
23204        return (months * 146097) / 4800;
23205    }
23206
23207    function as(units) {
23208        if (!this.isValid()) {
23209            return NaN;
23210        }
23211        var days,
23212            months,
23213            milliseconds = this._milliseconds;
23214
23215        units = normalizeUnits(units);
23216
23217        if (units === 'month' || units === 'quarter' || units === 'year') {
23218            days = this._days + milliseconds / 864e5;
23219            months = this._months + daysToMonths(days);
23220            switch (units) {
23221                case 'month':
23222                    return months;
23223                case 'quarter':
23224                    return months / 3;
23225                case 'year':
23226                    return months / 12;
23227            }
23228        } else {
23229            // handle milliseconds separately because of floating point math errors (issue #1867)
23230            days = this._days + Math.round(monthsToDays(this._months));
23231            switch (units) {
23232                case 'week':
23233                    return days / 7 + milliseconds / 6048e5;
23234                case 'day':
23235                    return days + milliseconds / 864e5;
23236                case 'hour':
23237                    return days * 24 + milliseconds / 36e5;
23238                case 'minute':
23239                    return days * 1440 + milliseconds / 6e4;
23240                case 'second':
23241                    return days * 86400 + milliseconds / 1000;
23242                // Math.floor prevents floating point math errors here
23243                case 'millisecond':
23244                    return Math.floor(days * 864e5) + milliseconds;
23245                default:
23246                    throw new Error('Unknown unit ' + units);
23247            }
23248        }
23249    }
23250
23251    // TODO: Use this.as('ms')?
23252    function valueOf$1() {
23253        if (!this.isValid()) {
23254            return NaN;
23255        }
23256        return (
23257            this._milliseconds +
23258            this._days * 864e5 +
23259            (this._months % 12) * 2592e6 +
23260            toInt(this._months / 12) * 31536e6
23261        );
23262    }
23263
23264    function makeAs(alias) {
23265        return function () {
23266            return this.as(alias);
23267        };
23268    }
23269
23270    var asMilliseconds = makeAs('ms'),
23271        asSeconds = makeAs('s'),
23272        asMinutes = makeAs('m'),
23273        asHours = makeAs('h'),
23274        asDays = makeAs('d'),
23275        asWeeks = makeAs('w'),
23276        asMonths = makeAs('M'),
23277        asQuarters = makeAs('Q'),
23278        asYears = makeAs('y');
23279
23280    function clone$1() {
23281        return createDuration(this);
23282    }
23283
23284    function get$2(units) {
23285        units = normalizeUnits(units);
23286        return this.isValid() ? this[units + 's']() : NaN;
23287    }
23288
23289    function makeGetter(name) {
23290        return function () {
23291            return this.isValid() ? this._data[name] : NaN;
23292        };
23293    }
23294
23295    var milliseconds = makeGetter('milliseconds'),
23296        seconds = makeGetter('seconds'),
23297        minutes = makeGetter('minutes'),
23298        hours = makeGetter('hours'),
23299        days = makeGetter('days'),
23300        months = makeGetter('months'),
23301        years = makeGetter('years');
23302
23303    function weeks() {
23304        return absFloor(this.days() / 7);
23305    }
23306
23307    var round = Math.round,
23308        thresholds = {
23309            ss: 44, // a few seconds to seconds
23310            s: 45, // seconds to minute
23311            m: 45, // minutes to hour
23312            h: 22, // hours to day
23313            d: 26, // days to month/week
23314            w: null, // weeks to month
23315            M: 11, // months to year
23316        };
23317
23318    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
23319    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
23320        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
23321    }
23322
23323    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
23324        var duration = createDuration(posNegDuration).abs(),
23325            seconds = round(duration.as('s')),
23326            minutes = round(duration.as('m')),
23327            hours = round(duration.as('h')),
23328            days = round(duration.as('d')),
23329            months = round(duration.as('M')),
23330            weeks = round(duration.as('w')),
23331            years = round(duration.as('y')),
23332            a =
23333                (seconds <= thresholds.ss && ['s', seconds]) ||
23334                (seconds < thresholds.s && ['ss', seconds]) ||
23335                (minutes <= 1 && ['m']) ||
23336                (minutes < thresholds.m && ['mm', minutes]) ||
23337                (hours <= 1 && ['h']) ||
23338                (hours < thresholds.h && ['hh', hours]) ||
23339                (days <= 1 && ['d']) ||
23340                (days < thresholds.d && ['dd', days]);
23341
23342        if (thresholds.w != null) {
23343            a =
23344                a ||
23345                (weeks <= 1 && ['w']) ||
23346                (weeks < thresholds.w && ['ww', weeks]);
23347        }
23348        a = a ||
23349            (months <= 1 && ['M']) ||
23350            (months < thresholds.M && ['MM', months]) ||
23351            (years <= 1 && ['y']) || ['yy', years];
23352
23353        a[2] = withoutSuffix;
23354        a[3] = +posNegDuration > 0;
23355        a[4] = locale;
23356        return substituteTimeAgo.apply(null, a);
23357    }
23358
23359    // This function allows you to set the rounding function for relative time strings
23360    function getSetRelativeTimeRounding(roundingFunction) {
23361        if (roundingFunction === undefined) {
23362            return round;
23363        }
23364        if (typeof roundingFunction === 'function') {
23365            round = roundingFunction;
23366            return true;
23367        }
23368        return false;
23369    }
23370
23371    // This function allows you to set a threshold for relative time strings
23372    function getSetRelativeTimeThreshold(threshold, limit) {
23373        if (thresholds[threshold] === undefined) {
23374            return false;
23375        }
23376        if (limit === undefined) {
23377            return thresholds[threshold];
23378        }
23379        thresholds[threshold] = limit;
23380        if (threshold === 's') {
23381            thresholds.ss = limit - 1;
23382        }
23383        return true;
23384    }
23385
23386    function humanize(argWithSuffix, argThresholds) {
23387        if (!this.isValid()) {
23388            return this.localeData().invalidDate();
23389        }
23390
23391        var withSuffix = false,
23392            th = thresholds,
23393            locale,
23394            output;
23395
23396        if (typeof argWithSuffix === 'object') {
23397            argThresholds = argWithSuffix;
23398            argWithSuffix = false;
23399        }
23400        if (typeof argWithSuffix === 'boolean') {
23401            withSuffix = argWithSuffix;
23402        }
23403        if (typeof argThresholds === 'object') {
23404            th = Object.assign({}, thresholds, argThresholds);
23405            if (argThresholds.s != null && argThresholds.ss == null) {
23406                th.ss = argThresholds.s - 1;
23407            }
23408        }
23409
23410        locale = this.localeData();
23411        output = relativeTime$1(this, !withSuffix, th, locale);
23412
23413        if (withSuffix) {
23414            output = locale.pastFuture(+this, output);
23415        }
23416
23417        return locale.postformat(output);
23418    }
23419
23420    var abs$1 = Math.abs;
23421
23422    function sign(x) {
23423        return (x > 0) - (x < 0) || +x;
23424    }
23425
23426    function toISOString$1() {
23427        // for ISO strings we do not use the normal bubbling rules:
23428        //  * milliseconds bubble up until they become hours
23429        //  * days do not bubble at all
23430        //  * months bubble up until they become years
23431        // This is because there is no context-free conversion between hours and days
23432        // (think of clock changes)
23433        // and also not between days and months (28-31 days per month)
23434        if (!this.isValid()) {
23435            return this.localeData().invalidDate();
23436        }
23437
23438        var seconds = abs$1(this._milliseconds) / 1000,
23439            days = abs$1(this._days),
23440            months = abs$1(this._months),
23441            minutes,
23442            hours,
23443            years,
23444            s,
23445            total = this.asSeconds(),
23446            totalSign,
23447            ymSign,
23448            daysSign,
23449            hmsSign;
23450
23451        if (!total) {
23452            // this is the same as C#'s (Noda) and python (isodate)...
23453            // but not other JS (goog.date)
23454            return 'P0D';
23455        }
23456
23457        // 3600 seconds -> 60 minutes -> 1 hour
23458        minutes = absFloor(seconds / 60);
23459        hours = absFloor(minutes / 60);
23460        seconds %= 60;
23461        minutes %= 60;
23462
23463        // 12 months -> 1 year
23464        years = absFloor(months / 12);
23465        months %= 12;
23466
23467        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
23468        s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
23469
23470        totalSign = total < 0 ? '-' : '';
23471        ymSign = sign(this._months) !== sign(total) ? '-' : '';
23472        daysSign = sign(this._days) !== sign(total) ? '-' : '';
23473        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
23474
23475        return (
23476            totalSign +
23477            'P' +
23478            (years ? ymSign + years + 'Y' : '') +
23479            (months ? ymSign + months + 'M' : '') +
23480            (days ? daysSign + days + 'D' : '') +
23481            (hours || minutes || seconds ? 'T' : '') +
23482            (hours ? hmsSign + hours + 'H' : '') +
23483            (minutes ? hmsSign + minutes + 'M' : '') +
23484            (seconds ? hmsSign + s + 'S' : '')
23485        );
23486    }
23487
23488    var proto$2 = Duration.prototype;
23489
23490    proto$2.isValid = isValid$1;
23491    proto$2.abs = abs;
23492    proto$2.add = add$1;
23493    proto$2.subtract = subtract$1;
23494    proto$2.as = as;
23495    proto$2.asMilliseconds = asMilliseconds;
23496    proto$2.asSeconds = asSeconds;
23497    proto$2.asMinutes = asMinutes;
23498    proto$2.asHours = asHours;
23499    proto$2.asDays = asDays;
23500    proto$2.asWeeks = asWeeks;
23501    proto$2.asMonths = asMonths;
23502    proto$2.asQuarters = asQuarters;
23503    proto$2.asYears = asYears;
23504    proto$2.valueOf = valueOf$1;
23505    proto$2._bubble = bubble;
23506    proto$2.clone = clone$1;
23507    proto$2.get = get$2;
23508    proto$2.milliseconds = milliseconds;
23509    proto$2.seconds = seconds;
23510    proto$2.minutes = minutes;
23511    proto$2.hours = hours;
23512    proto$2.days = days;
23513    proto$2.weeks = weeks;
23514    proto$2.months = months;
23515    proto$2.years = years;
23516    proto$2.humanize = humanize;
23517    proto$2.toISOString = toISOString$1;
23518    proto$2.toString = toISOString$1;
23519    proto$2.toJSON = toISOString$1;
23520    proto$2.locale = locale;
23521    proto$2.localeData = localeData;
23522
23523    proto$2.toIsoString = deprecate(
23524        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
23525        toISOString$1
23526    );
23527    proto$2.lang = lang;
23528
23529    // FORMATTING
23530
23531    addFormatToken('X', 0, 0, 'unix');
23532    addFormatToken('x', 0, 0, 'valueOf');
23533
23534    // PARSING
23535
23536    addRegexToken('x', matchSigned);
23537    addRegexToken('X', matchTimestamp);
23538    addParseToken('X', function (input, array, config) {
23539        config._d = new Date(parseFloat(input) * 1000);
23540    });
23541    addParseToken('x', function (input, array, config) {
23542        config._d = new Date(toInt(input));
23543    });
23544
23545    //! moment.js
23546
23547    hooks.version = '2.2
235479.4';
23548
23549    setHookCallback(createLocal);
23550
23551    hooks.fn = proto;
23552    hooks.min = min;
23553    hooks.max = max;
23554    hooks.now = now;
23555    hooks.utc = createUTC;
23556    hooks.unix = createUnix;
23557    hooks.months = listMonths;
23558    hooks.isDate = isDate;
23559    hooks.locale = getSetGlobalLocale;
23560    hooks.invalid = createInvalid;
23561    hooks.duration = createDuration;
23562    hooks.isMoment = isMoment;
23563    hooks.weekdays = listWeekdays;
23564    hooks.parseZone = createInZone;
23565    hooks.localeData = getLocale;
23566    hooks.isDuration = isDuration;
23567    hooks.monthsShort = listMonthsShort;
23568    hooks.weekdaysMin = listWeekdaysMin;
23569    hooks.defineLocale = defineLocale;
23570    hooks.updateLocale = updateLocale;
23571    hooks.locales = listLocales;
23572    hooks.weekdaysShort = listWeekdaysShort;
23573    hooks.normalizeUnits = normalizeUnits;
23574    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
23575    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
23576    hooks.calendarFormat = getCalendarFormat;
23577    hooks.prototype = proto;
23578
23579    // currently HTML5 input type only supports 24-hour formats
23580    hooks.HTML5_FMT = {
23581        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
23582        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
23583        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
23584        DATE: 'YYYY-MM-DD', // <input type="date" />
23585        TIME: 'HH:mm', // <input type="time" />
23586        TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
23587        TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
23588        WEEK: 'GGGG-[W]WW', // <input type="week" />
23589        MONTH: 'YYYY-MM', // <input type="month" />
23590    };
23591
23592    return hooks;
23593
23594})));
23595
23596;/*!
23597 * Chart.js v2.9.3
23598 * https://www.chartjs.org
23599 * (c) 2019
vendor: 26,549 bytes, lines 23599-23602
23599 Chart.js Contributors
23600 * Released under the MIT License
23601 */
23602!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:n[t].channels}),Object.defineProperty(o[t],"labels",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=y);var _
vendor: 5,008 bytes, line 23602
23602,k=y,w={noop:function(){},uid:(_=0,function(){return _++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return w.valueOrDefault(w.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(w.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(w.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!w.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(w.isArray(t))return t.map(w.clone);if(w.isObject(t)){for(var e={},n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=w.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){var a=e[t],r=n[t];w.isObject(a)&&w.isObject(r)?w.merge(a,r,i):e[t]=w.clone(r)},_mergerIf:function(t,e,n){var i=e[t],a=n[t];w.isObject(i)&&w.isObject(a)?w.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=w.clone(a))},merge:function(t,e,n){var i,a,r,o,s,l=w.isArray(e)?e:[e],u=l.length;if(!w.isObject(t))return t;for(i=(n=n||{}).merger||w._merger,a=0;a<u;++a)if(e=l[a],w.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return w.merge(t,e,{merger:w._mergerIf})},extend:Object.assign||function(t){return w.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=w.inherits,t&&w.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},M=w;w.callCallback=w.callback,w.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},w.getValueOrDefault=w.valueOrDefault,w.getValueAtIndexOrDefault=w.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},C={effects:S};
vendor: 29,752 bytes, line 23602
23602M.easingEffects=S;var P=Math.PI,A=P/180,D=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-P,-T),t.arc(u,l,o,-T,0),t.arc(u,d,o,0,T),t.arc(s,d,o,T,P)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-T,T),t.arc(s,l,o,T,P+T)):l<d?(t.arc(s,l,o,-P,0),t.arc(s,d,o,0,P)):t.arc(s,l,o,-P,P),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*A;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,D),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+I)*u,l=Math.sin(h+I)*u,t.arc(i-s,a-l,d,h-P,h-T),t.arc(i+l,a-s,d,h-T,h),t.arc(i+s,a+l,d,h,h+T),t.arc(i-l,a+s,d,h+T,h+P),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=I;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=I;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=I,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},O=L;M.clear=L.clear,M.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var R={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var z=R,N=M.valueOrDefault;var B={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return M.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=z.global,n=N(t.fontSize,e.defaultFontSize),i={family:N(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(N(t.lineHeight,e.defaultLineHeight),n),size:n,style:N(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&M.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},E={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},W=E;M.log10=E.log10;var V=M,H=C,j=O,q=B,U=W,Y={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};V.easing=H,V.canvas=j,V.options=q,V.math=U,V.rtl=Y;var G=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=V.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if("string"===d){if((h=k(l)).valid&&(c=k(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(V.isFinite(l)&&V.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=V.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return V.isNumber(this._model.x)&&V.isNumber(this._model.y)}}),G.extend=V.inherits;var X=G,K=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=K;Object.defineProperty(K.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(K.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),z._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var $={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=V.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=V.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),V.callback(t.render,[e,t],e),V.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},J=V.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(Q.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};V.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&tt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Q.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return V.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=V.merge({},[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&V._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:V.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=J([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},V.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=J([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=J([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){V.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=J([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=J([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=J([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),et.extend=V.inherits;var nt=et,it=2*Math.PI;function at(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+it,at(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=it,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+it,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+it),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&at(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}z._set("global",{elements:{arc:{backgroundColor:z.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ot=X.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=V.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=it;for(;a>s;)a-=it;for(;a<o;)a+=it;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/it)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+it,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%it}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&rt(e,n,a),e.restore()}}),st=V.valueOrDefault,lt=z.global.defaultColor;z._set("global",{elements:{line:{tension:.4,backgroundColor:lt,borderWidth:3,borderColor:lt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ut=X.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=z.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=V.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=st(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=st(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?V.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):V.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),dt=V.valueOrDefault,ht=z.global.defaultColor;function ct(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}z._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ft=X.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ct,inXRange:ct,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=z.global,u=l.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=dt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,V.canvas.drawPoint(n,i,r,o,s,a))}}),gt=z.global.defaultColor;function pt(t){return t&&void 0!==t.width}function mt(t){var e,n,i,a,r;return pt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function vt(t,e,n){return t===e?n:t===n?e:t}function bt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=vt(e,"left","right")):t.base<t.y&&(e=vt(e,"bottom","top")),n[e]=!0,n):n}(t);return V.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&mt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}z._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var yt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,i=e.bottom-e.top,a=bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return pt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},kt=ot,wt=ut,Mt=ft,St=yt;_t.Arc=kt,_t.Line=wt,_t.Point=Mt,_t.Rectangle=St;var Ct=V._deprecated,Pt=V.valueOrDefault;function At(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}z._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),z._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Ct("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ct("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ct("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ct("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ct("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},V.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):At(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(Pt(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(V.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}V.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},nt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=Pt(n.barPercentage,e.barPercentage),e.barThickness=Pt(n.barThickness,e.barThickness),e.categoryPercentage=Pt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Pt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Pt(i.minBarLength,e.minBarLength),e}}),Tt=V.valueOrDefault,It=V.options.resolve;z._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ft=nt.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;V.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Tt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Tt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Tt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=nt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=V.extend({},s)),s.radius=It([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=V.valueOrDefault,Ot=Math.PI,Rt=2*Ot,zt=Ot/2;z._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-zt,circumference:Rt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Nt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
23602dColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<Rt){var b=l.rotation%Rt,x=(b+=b>=Ot?-Rt:b<-Ot?Rt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Rt,S=b<=zt&&x>=zt||x>=Rt+zt,C=b<=-zt&&x>=-zt||x>=Ot+zt,P=b===-Ot||x>=Ot?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Rt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:V.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return V.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});z._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),z._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Bt=Dt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Et=V.valueOrDefault,Wt=V.options.resolve,Vt=V.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function jt(t,e,n){var i=n/2,a=Ht(t,i),r=Ht(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function qt(t){var e,n,i,a;return V.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}z._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ut=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
23602dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Et(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Et(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=nt.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Et(n.spanGaps,a.spanGaps),o.tension=Et(n.lineTension,r.tension),o.steppedLine=Wt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=qt(Et(n.clip,jt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)V.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=V.splineCurve(V.previousItem(l,t)._model,n,V.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Vt(n,s)&&(t>0&&Vt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Vt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,V.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),V.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Et(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Et(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Et(n.hoverBorderWidth,n.borderWidth),e.radius=Et(n.hoverRadius,n.radius)}}),Yt=V.options.resolve;z._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Gt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroun
23602dColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:V.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Yt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});z._set("pie",V.clone(z.doughnut)),z._set("pie",{cutoutPercentage:0});var Xt=Nt,Kt=V.valueOrDefault;z._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:V.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
23602dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Kt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=nt.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Kt(e.spanGaps,n.spanGaps),i.tension=Kt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=V.splineCurve(V.previousItem(o,t,!0)._model,n,V.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth),e.radius=Kt(n.hoverRadius,n.radius)}});z._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),z._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:Dt,bubble:Ft,doughnut:Nt,horizontalBar:Bt,line:Ut,polarArea:Gt,pie:Xt,radar:Zt,scatter:Ut};function Jt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function Qt(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function te(t,e){var n=[];return Qt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ee(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return Qt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ne(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ie(t,e,n){var i=Jt(e,t);n.axis=n.axis||"x";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var ae={modes:{single:function(t,e){var n=Jt(e,t),i=[];return Qt(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ie,index:ie,dataset:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},re=V.extend;function oe(t,e){return V.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;
vendor: 70,258 bytes, line 23602
23602if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),ue(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&he(u,e,n)||l}function ce(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}z._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var fe,ge={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=V.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=se(oe(e,"left"),!0),i=se(oe(e,"right")),a=se(oe(e,"top"),!0),r=se(oe(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:oe(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=re({maxPadding:re({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),he(l,h,d),he(u,h,d)&&he(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),ce(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ce(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},V.each(s.chartArea,(function(e){var n=e.box;re(n,t.chartArea),n.update(h.w,h.h)}))}}},pe=(fe=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Ce("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,V.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[me]||(t[me]={}),i=n.renderProxy=function(t){t.animationName===xe&&e()};V.each(ye,(function(e){Me(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(be)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function De(t){var e=t[me]||{},n=e.resizer;delete e.resizer,function(t){var e=t[me]||{},n=e.renderProxy;n&&(V.each(ye,(function(e){Se(t,e,n)})),delete e.renderProxy),t.classList.remove(be)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Te={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[me]||(t[me]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,pe)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[me]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ke(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ke(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[me]){var n=e[me].initial;["height","width"].forEach((function(t){var i=n[t];V.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),V.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[me]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[me]||(n[me]={});Me(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=_e[t.type]||t.type,i=V.getRelativePosition(t,e);return Ce(n,e,i.x,i.y,t)}(e,t))})}else Ae(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[me]||{}).proxies||{})[t.id+"_"+e];a&&Se(i,e,a)}else De(i)}};V.addEvent=Me,V.removeEvent=Se;var Ie=Te._enabled?Te:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Fe=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);z._set("global",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=V.clone(z.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Oe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=V.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?V.merge({},[z.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=V.extend(this.defaults[t],e))},addScalesToLayout:function(t){V.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ge.addBox(t,e)}))}},Re=V.valueOrDefault,ze=V.rtl.getRtlAdapter;z._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:V.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:V.noop,beforeBody:V.noop,beforeLabel:V.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),V.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:V.noop,afterBody:V.noop,beforeFooter:V.noop,footer:V.noop,afterFooter:V.noop}}});var Ne={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=V.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Be(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ee(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function We(t){var e=z.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Be(o,Ee(i)),o=Be(o,Ee(a)),o=Be(o,Ee(r))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ee(n)),r=Be(r,Ee(i)),r=Be(r,Ee(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),V.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=V.fontString(u,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(d,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,V.each(r,(function(t){V.each(t.before,f),V.each(t.lines,f),V.each(t.after,f)})),c=0,n.font=V.fontString(h,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?Ve(e,"left"):0,b=ze(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,y),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,V.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}V.each(i.after,x)}m=0,V.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=V.valueOrDefault;function Ge(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ye(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?V.merge(e[t][a],[Oe.getScaleDefaults(r),o]):V.merge(e[t][a],o)}else V._merger(t,e,n,i)}})}function Xe(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=V.merge(a,[Oe.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ke(t){var e=t.options;V.each(t.scales,(function(e){ge.removeBox(t,e)})),e=Xe(z.global,z[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function $e(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qe=function(t,e){return this.construct(t,e),this};V.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(z.global,z[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);$e(i.position)!==$e(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;V.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ke(i),Le._invalidate(i),!1!==Le.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&V.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,"afterUpdate"),i._layers.sort(Je("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,"beforeLayout")&&(ge.update(this,this.width,this.height),t._layers=[],V.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,"afterScaleUpdate"),Le.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Le.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Le.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ye(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,"beforeRender")){var r=function(t){Le.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new Z({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=V.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});$.addAnimation(e,o,i,a)}else e.draw(),r(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),V.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Je("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),V.canvas.clear(n),Fe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,"destroy"),delete Qe.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};V.each(t.options.events,(function(i){Fe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Fe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,V.each(e,(function(e,n){Fe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),V.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!V.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Qe.instances={};var tn=Qe;Qe.Controller=Qe,Qe.types={},V.configMerge=Xe,V.scaleMerge=Ge;function en(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function nn(t){this.options=t||{}}V.extend(nn.prototype,{formats:en,parse:en,format:en,add:en,diff:en,startOf:en,endOf:en,_create:function(t){return t}}),nn.override=function(t){V.extend(nn.prototype,t)};var an={_date:nn},rn={formatters:{values:function(t){return V.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=V.isArray,sn=V.isNullOrUndef,ln=V.valueOrDefault,un=V.valueAtIndexOrDefault;function dn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function hn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[];for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,sn(s)||on(s)){if(on(s))for(r=0,o=s.length;r<o;++r)g=s[r],sn(g)||on(g)||(c=V.measureText(t,d.data,d.gc,c,g),f+=h)}else c=V.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2)}function _(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){V.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(Math.max.apply(null,b)),m=x.indexOf(Math.max.apply(null,x)),{first:_(0),last:_(v-1),widest:_(p),highest:_(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function fn(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function gn(t,e){return V.extend(V.options._parseFont({fontFamily:ln(e.fontFamily,t.fontFamily),fontSize:ln(e.fontSize,t.fontSize),fontStyle:ln(e.fontStyle,t.fontStyle),lineHeight:ln(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,z.global.defaultFontColor])})}function pn(t){var e=gn(t,t.minor);return{minor:e,major:t.major.enabled?gn(t,t.major):e}}function mn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function vn(t,e,n,i){var a,r,o,s,l=ln(n,0),u=Math.min(ln(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}z._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:rn.formatters.values,minor:{},major:{}}});var bn=X.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){V.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=V.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){V.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){V.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){V.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){V.callback(this.options.beforeDataLimits,[this])},determineDataLimits:V.noop,afterDataLimits:function(){V.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){V.callback(this.options.beforeBuildTicks,[this])},buildTicks:V.noop,afterBuildTicks:function(t){var e=this;return on(t)&&t.length?V.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=V.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){V.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){V.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){V.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-u.padding-fn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+fn(r)),u?s&&(e.height=cn(o)+fn(r)):e.height=t.maxHeight,a.display&&s){var d=pn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=V.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(sn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=hn(t.ctx,pn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return on(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:V.noop,getPixelForValue:V.noop,getValueForPixel:V.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),mn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=V.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)vn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,vn(t,i,V.isNullOrUndef(a)?0:d-a,d),vn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),mn(t)}return vn(t,i),mn(t)},_tickSize:function(){var t=this.options.ticks,e=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=cn(_),A=[],D=_.drawBorder?un(_.lineWidth,0,0):0,T=D/2,I=V._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},sn(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=un(_.lineWidth,n,1),p=un(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=dn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=pn(g),y=g.padding,_=cn(f.gridLines),k=-V.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,sn(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=on(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=V._alignPixel,h=n.drawBorder?un(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=un(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=un(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,on(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=ln(i.fontColor,z.global.defaultFontColor),s=V.options._parseFont(i),l=V.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});bn.prototype._draw=bn.prototype.draw;var xn=bn,yn=V.isNullOrUndef,_n=xn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;xn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),kn={position:"bottom"};_n._defaults=kn;var wn=V.noop,Mn=V.isNullOrUndef;var Sn=xn.extend({getRightValue:function(t){return"string"==typeof t?+t:xn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&Mn(d)&&Mn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(r*p/u/l)*l),s||Mn(c)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Mn(d)&&V.almostWhole(d/p,p/1e3)&&(i=d),!Mn(h)&&V.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=V.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Mn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Mn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=V.max(a),t.min=V.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),xn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;xn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Cn={position:"left",ticks:{callback:rn.formatters.linear}};function Pn(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function An(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Dn=Sn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?Pn(a,u,e,n):An(a,e,n);V.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(i)),a.max=Math.max(a.max,V.max(i))})),a.min=V.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=V.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=V.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Tn=Cn;Dn._defaults=Tn;var In=V.valueOrDefault,Fn=V.math.log10;var Ln={position:"left",ticks:{callback:rn.formatters.logarithmic}};function On(t,e){return V.isFinite(t)&&t>=0?t:e}var Rn=xn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}V.each(f,(function(t){if(t.length>0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=V.isFinite(o.min)?o.min:null,o.max=V.isFinite(o.max)?o.max:null,o.minNotZero=V.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=On(e.min,t.min),t.max=On(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Fn(t.min))-1),t.max=Math.pow(10,Math.floor(Fn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Fn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Fn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Fn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Fn(e.min)))),o=Math.floor(Fn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Fn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Fn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=In(t.max,r);return a.push(u),a}(i,t);t.max=V.max(a),t.min=V.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),xn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Fn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;xn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,z.global.defaultFontSize)/t._length),t._startValue=Fn(e),t._valueOffset=n,t._valueRange=(Fn(t.max)-Fn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Fn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),zn=Ln;Rn._defaults=zn;var Nn=V.valueOrDefault,Bn=V.valueAtIndexOrDefault,En=V.options.resolve,Wn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,z.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Un(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Gn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=V.isArray(u)?{w:V.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=V.toDegrees(h)%360,f=Hn(c,i.x,n.w,0,180),g=Hn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Yn(a),r=Yn(r),o=Yn(o),s=Yn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,o.lineWidth),u=Nn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Bn(i.fontColor,s,z.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=V.toDegrees(h);e.textAlign=jn(c),Un(c,t._pointLabelSizes[s],u),qn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,i-1),u=Bn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(En([s.borderDash,o.borderDash,[]])),a.lineDashOffset=En([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=Nn(n.fontColor,z.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop}),Xn=Wn;Gn._defaults=Xn;var Kn=V._deprecated,Zn=V.options.resolve,$n=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,ti={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ei=Object.keys(ti);function ni(t,e){return t-e}function ii(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function oi(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function si(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=oi(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function li(t,e,n,i){var a,r,o,s=ei.length;for(a=ei.indexOf(t);a<s-1;++a)if(o=(r=ti[ei[a]]).steps?r.steps:Qn,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ei[a];return ei[s-1]}function ui(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var di=xn.extend({initialize:function(){this.mergeTicksOptions(),xn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new an._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),xn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),xn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Qn,f=Jn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(si(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,V.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=si(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ni):g.sort(ni),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=si(s,ii(d))||c,f=si(s,ai(d))||f,c=c===Qn?+u.startOf(Date.now(),h):c,f=f===Jn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||li(s.minUnit,e,n,i),u=Zn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=si(i,ii(o))||a,r=si(i,ai(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?li(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ei.length-1;r>=ei.indexOf(n);r--)if(o=ei[r],ti[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ei[n?ei.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ei.indexOf(t)+1,n=ei.length;e<n;++e)if(ti[ei[e]].common)return ei[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=ri(t,"time",e[0],"pos"),s=1===e.length?1-r:(ri(t,"time",e[1],"pos")-r)/2,o=ri(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-ri(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),ui(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return V.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(
vendor: 4,555 bytes, line 23602
23602oi(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(oi(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=Zn([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=ri(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=si(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=ri(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=V.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=$n(e.fontSize,z.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,ui(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),hi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};di._defaults=hi;var ci={category:_n,linear:Dn,logarithmic:Rn,radialLinear:Gn,time:di},fi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};an._date.override("function"==typeof t?{_id:"moment",formats:function(){return fi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),z._set("global",{plugins:{filler:{propagate:!0}}});var gi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return V.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function pi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function mi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(V.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function vi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;
vendor: 19,430 bytes, lines 23602-23641
23602if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function bi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),gi[n](t))}function xi(t){return t&&!t.skip}function yi(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)V.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _i(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=xi(u),c=xi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(yi(t,m,v,b,x),b=x=0,m=[],v=[]));yi(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var ki={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof _t.Line&&(r={visible:t.isDatasetVisible(i),fill:pi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=vi(l,i,s),r.boundary=mi(r),r.mapper=bi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||z.global.defaultColor,o&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),_i(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},wi=V.rtl.getRtlAdapter,Mi=V.noop,Si=V.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Pi=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Mi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Mi,beforeSetDimensions:Mi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Mi,beforeBuildLabels:Mi,buildLabels:function(){var t=this,e=t.options.labels||{},n=V.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Mi,beforeFit:Mi,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=V.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=z.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=wi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Si(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Si(i.lineWidth,r.borderWidth);if(c.fillStyle=Si(i.fillStyle,a),c.lineCap=Si(i.lineCap,r.borderCapStyle),c.lineDashOffset=Si(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Si(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Si(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Si(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;V.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Ai(t,e){var n=new Pi({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Di={id:"legend",_element:Pi,beforeInit:function(t){var e=t.options.legend;e&&Ai(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,z.global.legend),n?(ge.configure(t,n,e),n.options=e):Ai(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ti=V.noop;z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ti,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ti,beforeSetDimensions:Ti,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ti,beforeBuildLabels:Ti,buildLabels:Ti,afterBuildLabels:Ti,beforeFit:Ti,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ti,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,z.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Fi(t,e){var n=new Ii({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.titleBlock=n}var Li={},Oi=ki,Ri=Di,zi={id:"title",_element:Ii,beforeInit:function(t){var e=t.options.title;e&&Fi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,z.global.title),n?(ge.configure(t,n,e),n.options=e):Fi(t,e)):n&&(ge.removeBox(t,n),delete t.titleBlock)}};for(var Ni in Li.filler=Oi,Li.legend=Ri,Li.title=zi,tn.helpers=V,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=V._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}V.where=function(t,e){if(V.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return V.each(t,(function(t){e(t)&&n.push(t)})),n},V.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)<n},V.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(V.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},V.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==V.isArray(u))h=V.measureText(t,a,r,h,u);else if(V.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||V.isArray(d)||(h=V.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},V.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=k?function(t){return t instanceof CanvasGradient&&(t=z.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=Z,tn.animationService=$,tn.controllers=$t,tn.DatasetController=nt,tn.defaults=z,tn.Element=X,tn.elements=_t,tn.Interaction=ae,tn.layouts=ge,tn.platform=Fe,tn.plugins=Le,tn.Scale=xn,tn.scaleService=Oe,tn.Ticks=rn,tn.Tooltip=Ue,tn.helpers.each(ci,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Ni)&&tn.plugins.register(Li[Ni]);tn.platform.initialize();var Bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=Li.legend._element,tn.Title=Li.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=Sn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bi}));
23603
23604;(function (root, factory) {
23605  if (typeof define === 'function' && define.amd) {
23606    // AMD. Register as an anonymous module unless amdModuleId is set
23607    define('Chartist', [], function () {
23608      return (root['Chartist'] = factory());
23609    });
23610  } else if (typeof module === 'object' && module.exports) {
23611    // Node. Does not work with strict CommonJS, but
23612    // only CommonJS-like environments that support module.exports,
23613    // like Node.
23614    module.exports = factory();
23615  } else {
23616    root['Chartist'] = factory();
23617  }
23618}(this, function () {
23619
23620/* Chartist.js 0.11.4
23621 * Copyright © 2019 Gion Kunz
23622 * Free to use under either the WTFPL license or the MIT license.
23623 * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL
23624 * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT
23625 */
23626/**
23627 * The core module of Chartist that is mainly providing static functions and higher level functions for chart modules.
23628 *
23629 * @module Chartist.Core
23630 */
23631var Chartist = {
23632  version: '0.11.4'
23633};
23634
23635(function (globalRoot, Chartist) {
23636  'use strict';
23637
23638  var window = globalRoot.window;
23639  var document = globalRoot.document;
23640
23641  /**
23642   * This object contains all namespaces used within Chartist.
23643   *
23644   * @memberof Chartist.Core
23645   * @type {{svg: string, xmlns: string, xhtml: string, xlink: string, ct: string}}
23646   */
23647  Chartist.namespaces = {
23648    svg: 'http://www.w3.org/2000/svg',
23649    xmlns: 'http://www.w3.org/2000/xmlns/',
23650    xhtml: 'http://www.w3.org/1999/xhtml',
23651    xlink: 'http://www.w3.org/1999/xlink',
23652    ct: 'http://gionkunz.github.com/chartist-js/ct'
23653  };
23654
23655  /**
23656   * Helps to simplify functional style code
23657   *
23658   * @memberof Chartist.Core
23659   * @param {*} n This exact value will be returned by the noop function
23660   * @return {*} The same value that was provided to the n parameter
23661   */
23662  Chartist.noop = function (n) {
23663    return n;
23664  };
23665
23666  /**
23667   * Generates a-z from a number 0 to 26
23668   *
23669   * @memberof Chartist.Core
23670   * @param {Number} n A number from 0 to 26 that will result in a letter a-z
23671   * @return {String} A character from a-z based on the input number n
23672   */
23673  Chartist.alphaNumerate = function (n) {
23674    // Limit to a-z
23675    return String.fromCharCode(97 + n % 26);
23676  };
23677
23678  /**
23679   * Simple recursive object extend
23680   *
23681   * @memberof Chartist.Core
23682   * @param {Object} target Target object where the source will be merged into
23683   * @param {Object...} sources This object (objects) will be merged into target and then target is returned
23684   * @return {Object} An object that has the same reference as target but is extended and merged with the properties of source
23685   */
23686  Chartist.extend = function (target) {
23687    var i, source, sourceProp;
23688    target = target || {};
23689
23690    for (i = 1; i < arguments.length; i++) {
23691      source = arguments[i];
23692      for (var prop in source) {
23693        sourceProp = source[prop];
23694        if (typeof sourceProp === 'object' && sourceProp !== null && !(sourceProp instanceof Array)) {
23695          target[prop] = Chartist.extend(target[prop], sourceProp);
23696        } else {
23697          target[prop] = sourceProp;
23698        }
23699      }
23700    }
23701
23702    return target;
23703  };
23704
23705  /**
23706   * Replaces all occurrences of subStr in str with newSubStr and returns a new string.
23707   *
23708   * @memberof Chartist.Core
23709   * @param {String} str
23710   * @param {String} subStr
23711   * @param {String} newSubStr
23712   * @return {String}
23713   */
23714  Chartist.replaceAll = function(str, subStr, newSubStr) {
23715    return str.replace(new RegExp(subStr, 'g'), newSubStr);
23716  };
23717
23718  /**
23719   * Converts a number to a string with a unit. If a string is passed then this will be returned unmodified.
23720   *
23721   * @memberof Chartist.Core
23722   * @param {Number} value
23723   * @param {String} unit
23724   * @return {String} Returns the passed number value with unit.
23725   */
23726  Chartist.ensureUnit = function(value, unit) {
23727    if(typeof value === 'number') {
23728      value = value + unit;
23729    }
23730
23731    return value;
23732  };
23733
23734  /**
23735   * Converts a number or string to a quantity object.
23736   *
23737   * @memberof Chartist.Core
23738   * @param {String|Number} input
23739   * @return {Object}
23739 Returns an object containing the value as number and the unit as string.
23740   */
23741  Chartist.quantity = function(input) {
23742    if (typeof input === 'string') {
23743      var match = (/^(\d+)\s*(.*)$/g).exec(input);
23744      return {
23745        value : +match[1],
23746        unit: match[2] || undefined
23747      };
23748    }
23749    return { value: input };
23750  };
23751
23752  /**
23753   * This is a wrapper around document.querySelector that will return the query if it's already of type Node
23754   *
23755   * @memberof Chartist.Core
23756   * @param {String|Node} query The query to use for selecting a Node or a DOM node that will be returned directly
23757   * @return {Node}
23758   */
23759  Chartist.querySelector = function(query) {
23760    return query instanceof Node ? query : document.querySelector(query);
23761  };
23762
23763  /**
23764   * Functional style helper to produce array with given length initialized with undefined values
23765   *
23766   * @memberof Chartist.Core
23767   * @param length
23768   * @return {Array}
23769   */
23770  Chartist.times = function(length) {
23771    return Array.apply(null, new Array(length));
23772  };
23773
23774  /**
23775   * Sum helper to be used in reduce functions
23776   *
23777   * @memberof Chartist.Core
23778   * @param previous
23779   * @param current
23780   * @return {*}
23781   */
23782  Chartist.sum = function(previous, current) {
23783    return previous + (current ? current : 0);
23784  };
23785
23786  /**
23787   * Multiply helper to be used in `Array.map` for multiplying each value of an array with a factor.
23788   *
23789   * @memberof Chartist.Core
23790   * @param {Number} factor
23791   * @returns {Function} Function that can be used in `Array.map` to multiply each value in an array
23792   */
23793  Chartist.mapMultiply = function(factor) {
23794    return function(num) {
23795      return num * factor;
23796    };
23797  };
23798
23799  /**
23800   * Add helper to be used in `Array.map` for adding a addend to each value of an array.
23801   *
23802   * @memberof Chartist.Core
23803   * @param {Number} addend
23804   * @returns {Function} Function that can be used in `Array.map` to add a addend to each value in an array
23805   */
23806  Chartist.mapAdd = function(addend) {
23807    return function(num) {
23808      return num + addend;
23809    };
23810  };
23811
23812  /**
23813   * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).
23814   *
23815   * @memberof Chartist.Core
23816   * @param arr
23817   * @param cb
23818   * @return {Array}
23819   */
23820  Chartist.serialMap = function(arr, cb) {
23821    var result = [],
23822        length = Math.max.apply(null, arr.map(function(e) {
23823          return e.length;
23824        }));
23825
23826    Chartist.times(length).forEach(function(e, index) {
23827      var args = arr.map(function(e) {
23828        return e[index];
23829      });
23830
23831      result[index] = cb.apply(null, args);
23832    });
23833
23834    return result;
23835  };
23836
23837  /**
23838   * This helper function can be used to round values with certain precision level after decimal. This is used to prevent rounding errors near float point precision limit.
23839   *
23840   * @memberof Chartist.Core
23841   * @param {Number} value The value that should be rounded with precision
23842   * @param {Number} [digits] The number of digits after decimal used to do the rounding
23843   * @returns {number} Rounded value
23844   */
23845  Chartist.roundWithPrecision = function(value, digits) {
23846    var precision = Math.pow(10, digits || Chartist.precision);
23847    return Math.round(value * precision) / precision;
23848  };
23849
23850  /**
23851   * Precision level used internally in Chartist for rounding. If you require more decimal places you can increase this number.
23852   *
23853   * @memberof Chartist.Core
23854   * @type {number}
23855   */
23856  Chartist.precision = 8;
23857
23858  /**
23859   * A map with characters to escape for strings to be safely used as attribute values.
23860   *
23861   * @memberof Chartist.Core
23862   * @type {Object}
23863   */
23864  Chartist.escapingMap = {
23865    '&': '&amp;',
23866    '<': '&lt;',
23867    '>': '&gt;',
23868    '"': '&quot;',
23869    '\'': '&#039;'
23870  };
23871
23872  /**
23873   * This function serializes arbitrary data to a string. In case of data that can't be easily converted to a string, this function will create a wrapper object and serialize the data using JSON.stringify. The outcoming string will always be escaped using Chartist.escapingMap.
23874   * If called with null or undefined the function will return immediately with null or undefined.
23875   *
23876   * @memberof Chartist.Core
23877   * @param {Number|String|Object} data
23878   * @return {String}
23879   */
23880  Chartist.serialize = function(data) {
23881    if(data === null || data === undefined) {
23882      return data;
23883    } else if(typeof data === 'number') {
23884      data = ''+data;
23885    } else if(typeof data === 'object') {
23886      data = JSON.stringify({data: data});
23887    }
23888
23889    return Object.keys(Chartist.escapingMap).reduce(function(result, key) {
23890      return Chartist.replaceAll(result, key, Chartist.escapingMap[key]);
23891    }, data);
23892  };
23893
23894  /**
23895   * This function de-serializes a string previously serialized with Chartist.serialize. The string will always be unescaped using Chartist.escapingMap before it's returned. Based on the input value the return type can be Number, String or Object. JSON.parse is used with try / catch to see if the unescaped string can be parsed into an Object and this Object will be returned on success.
23896   *
23897   * @memberof Chartist.Core
23898   * @param {String} data
23899   * @return {String|Number|Object}
23900   */
23901  Chartist.deserialize = function(data) {
23902    if(typeof data !== 'string') {
23903      return data;
23904    }
23905
23906    data = Object.keys(Chartist.escapingMap).reduce(function(result, key) {
23907      return Chartist.replaceAll(result, Chartist.escapingMap[key], key);
23908    }, data);
23909
23910    try {
23911      data = JSON.parse(data);
23912      data = data.data !== undefined ? data.data : data;
23913    } catch(e) {}
23914
23915    return data;
23916  };
23917
23918  /**
23919   * Create or reinitialize the SVG element for the chart
23920   *
23921   * @memberof Chartist.Core
23922   * @param {Node} container The containing DOM Node object that will be used to plant the SVG element
23923   * @param {String} width Set the width of the SVG element. Default is 100%
23924   * @param {String} height Set the height of the SVG element. Default is 100%
23925   * @param {String} className Specify a class to be added to the SVG element
23926   * @return {Object} The created/reinitialized SVG element
23927   */
23928  Chartist.createSvg = function (container, width, height, className) {
23929    var svg;
23930
23931    width = width || '100%';
23932    height = height || '100%';
23933
23934    // Check if there is a previous SVG element in the container that c
23934ontains the Chartist XML namespace and remove it
23935    // Since the DOM API does not support namespaces we need to manually search the returned list http://www.w3.org/TR/selectors-api/
23936    Array.prototype.slice.call(container.querySelectorAll('svg')).filter(function filterChartistSvgObjects(svg) {
23937      return svg.getAttributeNS(Chartist.namespaces.xmlns, 'ct');
23938    }).forEach(function removePreviousElement(svg) {
23939      container.removeChild(svg);
23940    });
23941
23942    // Create svg object with width and height or use 100% as default
23943    svg = new Chartist.Svg('svg').attr({
23944      width: width,
23945      height: height
23946    }).addClass(className);
23947
23948    svg._node.style.width = width;
23949    svg._node.style.height = height;
23950
23951    // Add the DOM node to our container
23952    container.appendChild(svg._node);
23953
23954    return svg;
23955  };
23956
23957  /**
23958   * Ensures that the data object passed as second argument to the charts is present and correctly initialized.
23959   *
23960   * @param  {Object} data The data object that is passed as second argument to the charts
23961   * @return {Object} The normalized data object
23962   */
23963  Chartist.normalizeData = function(data, reverse, multi) {
23964    var labelCount;
23965    var output = {
23966      raw: data,
23967      normalized: {}
23968    };
23969
23970    // Check if we should generate some labels based on existing series data
23971    output.normalized.series = Chartist.getDataArray({
23972      series: data.series || []
23973    }, reverse, multi);
23974
23975    // If all elements of the normalized data array are arrays we're dealing with
23976    // multi series data and we need to find the largest series if they are un-even
23977    if (output.normalized.series.every(function(value) {
23978        return value instanceof Array;
23979      })) {
23980      // Getting the series with the the most elements
23981      labelCount = Math.max.apply(null, output.normalized.series.map(function(series) {
23982        return series.length;
23983      }));
23984    } else {
23985      // We're dealing with Pie data so we just take the normalized array length
23986      labelCount = output.normalized.series.length;
23987    }
23988
23989    output.normalized.labels = (data.labels || []).slice();
23990    // Padding the labels to labelCount with empty strings
23991    Array.prototype.push.apply(
23992      output.normalized.labels,
23993      Chartist.times(Math.max(0, labelCount - output.normalized.labels.length)).map(function() {
23994        return '';
23995      })
23996    );
23997
23998    if(reverse) {
23999      Chartist.reverseData(output.normalized);
24000    }
24001
24002    return output;
24003  };
24004
24005  /**
24006   * This function safely checks if an objects has an owned property.
24007   *
24008   * @param {Object} object The object where to check for a property
24009   * @param {string} property The property name
24010   * @returns {boolean} Returns true if the object owns the specified property
24011   */
24012  Chartist.safeHasProperty = function(object, property) {
24013    return object !== null &&
24014      typeof object === 'object' &&
24015      object.hasOwnProperty(property);
24016  };
24017
24018  /**
24019   * Checks if a value is considered a hole in the data series.
24020   *
24021   * @param {*} value
24022   * @returns {boolean} True if the value is considered a data hole
24023   */
24024  Chartist.isDataHoleValue = function(value) {
24025    return value === null ||
24026      value === undefined ||
24027      (typeof value === 'number' && isNaN(value));
24028  };
24029
24030  /**
24031   * Reverses the series, labels and series data arrays.
24032   *
24033   * @memberof Chartist.Core
24034   * @param data
24035   */
24036  Chartist.reverseData = function(data) {
24037    data.labels.reverse();
24038    data.series.reverse();
24039    for (var i = 0; i < data.series.length; i++) {
24040      if(typeof(data.series[i]) === 'object' && data.series[i].data !== undefined) {
24041        data.series[i].data.reverse();
24042      } else if(data.series[i] instanceof Array) {
24043        data.series[i].reverse();
24044      }
24045    }
24046  };
24047
24048  /**
24049   * Convert data series into plain array
24050   *
24051   * @memberof Chartist.Core
24052   * @param {Object} data The series object that contains the data to be visualized in the chart
24053   * @param {Boolean} [reverse] If true the whole data is reversed by the getDataArray call. This will modify the data object passed as first parameter. The labels as well as the series order is reversed. The whole series data arrays are reversed too.
24054   * @param {Boolean} [multi] Create a multi dimensional array from a series data array where a value object with `x` and `y` values will be created.
24055   * @return {Array} A plain array that contains the data to be visualized in the chart
24056   */
24057  Chartist.getDataArray = function(data, reverse, multi) {
24058    // Recursively walks through nested arrays and convert string values to numbers and objects with value properties
24059    // to values. Check the tests in data core -> data normalization for a detailed specification of expected values
24060    function recursiveConvert(value) {
24061      if(Chartist.safeHasProperty(value, 'value')) {
24062        // We are dealing with value object notation so we need to recurse on value property
24063        return recursiveConvert(value.value);
24064      } else if(Chartist.safeHasProperty(value, 'data')) {
24065        // We are dealing with series object notation so we need to recurse on data property
24066        return recursiveConvert(value.data);
24067      } else if(value instanceof Array) {
24068        // Data is of type array so we need to recurse on the series
24069        return value.map(recursiveConvert);
24070      } else if(Chartist.isDataHoleValue(value)) {
24071        // We're dealing with a hole in the data and therefore need to return undefined
24072        // We're also returning undefined for multi value output
24073        return undefined;
24074      } else {
24075        // We need to prepare multi value output (x and y data)
24076        if(multi) {
24077          var multiValue = {};
24078
24079          // Single series value arrays are assumed to specify the Y-Axis value
24080          // For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]
24081          // If multi is a string then it's assumed that it specified which dimension should be filled as default
24082          if(typeof multi === 'string') {
24083            multiValue[multi] = Chartist.getNumberOrUndefined(value);
24084          } else {
24085            multiValue.y = Chartist.getNumberOrUndefined(value);
24086          }
24087
24088          multiValue.x = value.hasOwnProperty('x') ? Chartist.getNumberOrUndefined(value.x) : multiValue.x;
24089          multiValue.y = value.hasOwnProperty('y') ? Chartist.getNumberOrUndefined(value.y) : multiValue.y;
24090
24091          return multiValue;
24092
24093        } else {
24094          // We can return simple data
24095          return Chartist.getNumberOrUndefined(value);
24096        }
24097      }
24098    }
24099
24100    return data.series.map(recursiveConvert);
24101  };
24102
24103  /**
24104   * Converts a number into a padding object.
24105   *
24106   * @memberof Chartist.Core
24107   * @param {Object|Number} padding
24108   * @param {Number} [fallback] This value is used to fill missing values if a incomplete padding object was passed
24109   * @returns {Object}
24109 Returns a padding object containing top, right, bottom, left properties filled with the padding number passed in as argument. If the argument is something else than a number (presumably already a correct padding object) then this argument is directly returned.
24110   */
24111  Chartist.normalizePadding = function(padding, fallback) {
24112    fallback = fallback || 0;
24113
24114    return typeof padding === 'number' ? {
24115      top: padding,
24116      right: padding,
24117      bottom: padding,
24118      left: padding
24119    } : {
24120      top: typeof padding.top === 'number' ? padding.top : fallback,
24121      right: typeof padding.right === 'number' ? padding.right : fallback,
24122      bottom: typeof padding.bottom === 'number' ? padding.bottom : fallback,
24123      left: typeof padding.left === 'number' ? padding.left : fallback
24124    };
24125  };
24126
24127  Chartist.getMetaData = function(series, index) {
24128    var value = series.data ? series.data[index] : series[index];
24129    return value ? value.meta : undefined;
24130  };
24131
24132  /**
24133   * Calculate the order of magnitude for the chart scale
24134   *
24135   * @memberof Chartist.Core
24136   * @param {Number} value The value Range of the chart
24137   * @return {Number} The order of magnitude
24138   */
24139  Chartist.orderOfMagnitude = function (value) {
24140    return Math.floor(Math.log(Math.abs(value)) / Math.LN10);
24141  };
24142
24143  /**
24144   * Project a data length into screen coordinates (pixels)
24145   *
24146   * @memberof Chartist.Core
24147   * @param {Object} axisLength The svg element for the chart
24148   * @param {Number} length Single data value from a series array
24149   * @param {Object} bounds All the values to set the bounds of the chart
24150   * @return {Number} The projected data length in pixels
24151   */
24152  Chartist.projectLength = function (axisLength, length, bounds) {
24153    return length / bounds.range * axisLength;
24154  };
24155
24156  /**
24157   * Get the height of the area in the chart for the data series
24158   *
24159   * @memberof Chartist.Core
24160   * @param {Object} svg The svg element for the chart
24161   * @param {Object} options The Object that contains all the optional values for the chart
24162   * @return {Number} The height of the area in the chart for the data series
24163   */
24164  Chartist.getAvailableHeight = function (svg, options) {
24165    return Math.max((Chartist.quantity(options.height).value || svg.height()) - (options.chartPadding.top +  options.chartPadding.bottom) - options.axisX.offset, 0);
24166  };
24167
24168  /**
24169   * Get highest and lowest value of data array. This Array contains the data that will be visualized in the chart.
24170   *
24171   * @memberof Chartist.Core
24172   * @param {Array} data The array that contains the data to be visualized in the chart
24173   * @param {Object} options The Object that contains the chart options
24174   * @param {String} dimension Axis dimension 'x' or 'y' used to access the correct value and high / low configuration
24175   * @return {Object} An object that contains the highest and lowest value that will be visualized on the chart.
24176   */
24177  Chartist.getHighLow = function (data, options, dimension) {
24178    // TODO: Remove workaround for deprecated global high / low config. Axis high / low configuration is preferred
24179    options = Chartist.extend({}, options, dimension ? options['axis' + dimension.toUpperCase()] : {});
24180
24181    var highLow = {
24182        high: options.high === undefined ? -Number.MAX_VALUE : +options.high,
24183        low: options.low === undefined ? Number.MAX_VALUE : +options.low
24184      };
24185    var findHigh = options.high === undefined;
24186    var findLow = options.low === undefined;
24187
24188    // Function to recursively walk through arrays and find highest and lowest number
24189    function recursiveHighLow(data) {
24190      if(data === undefined) {
24191        return undefined;
24192      } else if(data instanceof Array) {
24193        for (var i = 0; i < data.length; i++) {
24194          recursiveHighLow(data[i]);
24195        }
24196      } else {
24197        var value = dimension ? +data[dimension] : +data;
24198
24199        if (findHigh && value > highLow.high) {
24200          highLow.high = value;
24201        }
24202
24203        if (findLow && value < highLow.low) {
24204          highLow.low = value;
24205        }
24206      }
24207    }
24208
24209    // Start to find highest and lowest number recursively
24210    if(findHigh || findLow) {
24211      recursiveHighLow(data);
24212    }
24213
24214    // Overrides of high / low based on reference value, it will make sure that the invisible reference value is
24215    // used to generate the chart. This is useful when the chart always needs to contain the position of the
24216    // invisible reference value in the view i.e. for bipolar scales.
24217    if (options.referenceValue || options.referenceValue === 0) {
24218      highLow.high = Math.max(options.referenceValue, highLow.high);
24219      highLow.low = Math.min(options.referenceValue, highLow.low);
24220    }
24221
24222    // If high and low are the same because of misconfiguration or flat data (only the same value) we need
24223    // to set the high or low to 0 depending on the polarity
24224    if (highLow.high <= highLow.low) {
24225      // If both values are 0 we set high to 1
24226      if (highLow.low === 0) {
24227        highLow.high = 1;
24228      } else if (highLow.low < 0) {
24229        // If we have the same negative value for the bounds we set bounds.high to 0
24230        highLow.high = 0;
24231      } else if (highLow.high > 0) {
24232        // If we have the same positive value for the bounds we set bounds.low to 0
24233        highLow.low = 0;
24234      } else {
24235        // If data array was empty, values are Number.MAX_VALUE and -Number.MAX_VALUE. Set bounds to prevent errors
24236        highLow.high = 1;
24237        highLow.low = 0;
24238      }
24239    }
24240
24241    return highLow;
24242  };
24243
24244  /**
24245   * Checks if a value can be safely coerced to a number. This includes all values except null which result in finite numbers when coerced. This excludes NaN, since it's not finite.
24246   *
24247   * @memberof Chartist.Core
24248   * @param value
24249   * @returns {Boolean}
24250   */
24251  Chartist.isNumeric = function(value) {
24252    return value === null ? false : isFinite(value);
24253  };
24254
24255  /**
24256   * Returns true on all falsey values except the numeric value 0.
24257   *
24258   * @memberof Chartist.Core
24259   * @param value
24260   * @returns {boolean}
24261   */
24262  Chartist.isFalseyButZero = function(value) {
24263    return !value && value !== 0;
24264  };
24265
24266  /**
24267   * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.
24268   *
24269   * @memberof Chartist.Core
24270   * @param value
24271   * @returns {*}
24272   */
24273  Chartist.getNumberOrUndefined = function(value) {
24274    return Chartist.isNumeric(value) ? +value : undefined;
24275  };
24276
24277  /**
24278   * Checks if provided value object is multi value (contains x or y properties)
24279   *
24280   * @memberof Chartist.Core
24281   * @param value
24282   */
24283  Chartist.isMultiValue = function(value) {
24284    return typeof value === 'object' && ('x' in value || 'y' in value);
24285  };
24286
24287  /**
24288   * Gets a value from a dimension `value.x` or `value.y` while returning value directly if it's a valid numeric value. If the value is not numeric and it's falsey this function will return `defaultValue`.
24289   *
24290   * @memberof Chartist.Core
24291   * @param value
24292   * @param dimension
24293   * @param defaultValue
24294   * @returns {*}
24295   */
24296  Chartist.getMultiValue = function(value, dimension) {
24297    if(Chartist.isMultiValue(value)) {
24298      return Chartist.getNumberOrUndefined(value[dimension || 'y']);
24299    } else {
24300      return Chartist.getNumberOrUndefined(value);
24301    }
24302  };
24303
24304  /**
24305   * Pollard Rho Algorithm to find smallest factor of an integer value. There are more efficient algorithms for factorization, but this one is quite efficient and not so complex.
24306   *
24307   * @memberof Chartist.Core
24308   * @param {Number} num An integer number where the smallest factor should be searched for
24309   * @returns {Number} The smallest integer factor of the parameter num.
24310   */
24311  Chartist.rho = function(num) {
24312    if(num === 1) {
24313      return num;
24314    }
24315
24316    function gcd(p, q) {
24317      if (p % q === 0) {
24318        return q;
24319      } else {
24320        return gcd(q, p % q);
24321      }
24322    }
24323
24324    function f(x) {
24325      return x * x + 1;
24326    }
24327
24328    var x1 = 2, x2 = 2, divisor;
24329    if (num % 2 === 0) {
24330      return 2;
24331    }
24332
24333    do {
24334      x1 = f(x1) % num;
24335      x2 = f(f(x2)) % num;
24336      divisor = gcd(Math.abs(x1 - x2), num);
24337    } while (divisor === 1);
24338
24339    return divisor;
24340  };
24341
24342  /**
24343   * Calculate and retrieve all the bounds for the chart and return them in one array
24344   *
24345   * @memberof Chartist.Core
24346   * @param {Number}
24346 axisLength The length of the Axis used for
24347   * @param {Object} highLow An object containing a high and low property indicating the value range of the chart.
24348   * @param {Number} scaleMinSpace The minimum projected length a step should result in
24349   * @param {Boolean} onlyInteger
24350   * @return {Object} All the values to set the bounds of the chart
24351   */
24352  Chartist.getBounds = function (axisLength, highLow, scaleMinSpace, onlyInteger) {
24353    var i,
24354      optimizationCounter = 0,
24355      newMin,
24356      newMax,
24357      bounds = {
24358        high: highLow.high,
24359        low: highLow.low
24360      };
24361
24362    bounds.valueRange = bounds.high - bounds.low;
24363    bounds.oom = Chartist.orderOfMagnitude(bounds.valueRange);
24364    bounds.step = Math.pow(10, bounds.oom);
24365    bounds.min = Math.floor(bounds.low / bounds.step) * bounds.step;
24366    bounds.max = Math.ceil(bounds.high / bounds.step) * bounds.step;
24367    bounds.range = bounds.max - bounds.min;
24368    bounds.numberOfSteps = Math.round(bounds.range / bounds.step);
24369
24370    // Optimize scale step by checking if subdivision is possible based on horizontalGridMinSpace
24371    // If we are already below the scaleMinSpace value we will scale up
24372    var length = Chartist.projectLength(axisLength, bounds.step, bounds);
24373    var scaleUp = length < scaleMinSpace;
24374    var smallestFactor = onlyInteger ? Chartist.rho(bounds.range) : 0;
24375
24376    // First check if we should only use integer steps and if step 1 is still larger than scaleMinSpace so we can use 1
24377    if(onlyInteger && Chartist.projectLength(axisLength, 1, bounds) >= scaleMinSpace) {
24378      bounds.step = 1;
24379    } else if(onlyInteger && smallestFactor < bounds.step && Chartist.projectLength(axisLength, smallestFactor, bounds) >= scaleMinSpace) {
24380      // If step 1 was too small, we can try the smallest factor of range
24381      // If the smallest factor is smaller than the current bounds.step and the projected length of smallest factor
24382      // is larger than the scaleMinSpace we should go for it.
24383      bounds.step = smallestFactor;
24384    } else {
24385      // Trying to divide or multiply by 2 and find the best step value
24386      while (true) {
24387        if (scaleUp && Chartist.projectLength(axisLength, bounds.step, bounds) <= scaleMinSpace) {
24388          bounds.step *= 2;
24389        } else if (!scaleUp && Chartist.projectLength(axisLength, bounds.step / 2, bounds) >= scaleMinSpace) {
24390          bounds.step /= 2;
24391          if(onlyInteger && bounds.step % 1 !== 0) {
24392            bounds.step *= 2;
24393            break;
24394          }
24395        } else {
24396          break;
24397        }
24398
24399        if(optimizationCounter++ > 1000) {
24400          throw new Error('Exceeded maximum number of iterations while optimizing scale step!');
24401        }
24402      }
24403    }
24404
24405    var EPSILON = 2.221E-16;
24406    bounds.step = Math.max(bounds.step, EPSILON);
24407    function safeIncrement(value, increment) {
24408      // If increment is too small use *= (1+EPSILON) as a simple nextafter
24409      if (value === (value += increment)) {
24410      	value *= (1 + (increment > 0 ? EPSILON : -EPSILON));
24411      }
24412      return value;
24413    }
24414
24415    // Narrow min and max based on new step
24416    newMin = bounds.min;
24417    newMax = bounds.max;
24418    while (newMin + bounds.step <= bounds.low) {
24419    	newMin = safeIncrement(newMin, bounds.step);
24420    }
24421    while (newMax - bounds.step >= bounds.high) {
24422    	newMax = safeIncrement(newMax, -bounds.step);
24423    }
24424    bounds.min = newMin;
24425    bounds.max = newMax;
24426    bounds.range = bounds.max - bounds.min;
24427
24428    var values = [];
24429    for (i = bounds.min; i <= bounds.max; i = safeIncrement(i, bounds.step)) {
24430      var value = Chartist.roundWithPrecision(i);
24431      if (value !== values[values.length - 1]) {
24432        values.push(value);
24433      }
24434    }
24435    bounds.values = values;
24436    return bounds;
24437  };
24438
24439  /**
24440   * Calculate cartesian coordinates of polar coordinates
24441   *
24442   * @memberof Chartist.Core
24443   * @param {Number} centerX X-axis coordinates of center point of circle segment
24444   * @param {Number} centerY X-axis coordinates of center point of circle segment
24445   * @param {Number} radius Radius of circle segment
24446   * @param {Number} angleInDegrees Angle of circle segment in degrees
24447   * @return {{x:Number, y:Number}} Coordinates of point on circumference
24448   */
24449  Chartist.polarToCartesian = function (centerX, centerY, radius, angleInDegrees) {
24450    var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
24451
24452    return {
24453      x: centerX + (radius * Math.cos(angleInRadians)),
24454      y: centerY + (radius * Math.sin(angleInRadians))
24455    };
24456  };
24457
24458  /**
24459   * Initialize chart drawing rectangle (area where chart is drawn) x1,y1 = bottom left / x2,y2 = top right
24460   *
24461   * @memberof Chartist.Core
24462   * @param {Object} svg The svg element for the chart
24463   * @param {Object} options The Object that contains all the optional values for the chart
24464   * @param {Number} [fallbackPadding] The fallback padding if partial padding objects are used
24465   * @return {Object} The chart rectangles coordinates inside the svg element plus the rectangles measurements
24466   */
24467  Chartist.createChartRect = function (svg, options, fallbackPadding) {
24468    var hasAxis = !!(options.axisX || options.axisY);
24469    var yAxisOffset = hasAxis ? options.axisY.offset : 0;
24470    var xAxisOffset = hasAxis ? options.axisX.offset : 0;
24471    // If width or height results in invalid value (including 0) we fallback to the unitless settings or even 0
24472    var width = svg.width() || Chartist.quantity(options.width).value || 0;
24473    var height = svg.height() || Chartist.quantity(options.height).value || 0;
24474    var normalizedPadding = Chartist.normalizePadding(options.chartPadding, fallbackPadding);
24475
24476    // If settings were to small to cope with offset (legacy) and padding, we'll adjust
24477    width = Math.max(width, yAxisOffset + normalizedPadding.left + normalizedPadding.right);
24478    height = Math.max(height, xAxisOffset + normalizedPadding.top + normalizedPadding.bottom);
24479
24480    var chartRect = {
24481      padding: normalizedPadding,
24482      width: function () {
24483        return this.x2 - this.x1;
24484      },
24485      height: function () {
24486        return this.y1 - this.y2;
24487      }
24488    };
24489
24490    if(hasAxis) {
24491      if (options.axisX.position === 'start') {
24492        chartRect.y2 = normalizedPadding.top + xAxisOffset;
24493        chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
24494      } else {
24495        chartRect.y2 = normalizedPadding.top;
24496        chartRect.y1 = Math.max(height - normalizedPadding.bottom - xAxisOffset, chartRect.y2 + 1);
24497      }
24498
24499      if (options.axisY.position === 'start') {
24500        chartRect.x1 = normalizedPadding.left + yAxisOffset;
24501        chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
24502      } else {
24503        chartRect.x1 = normalizedPadding.left;
24504        chartRect.x2 = Math.max(width - normalizedPadding.right - yAxisOffset, chartRect.x1 + 1);
24505      }
24506    } else {
24507      chartRect.x1 = normalizedPadding.left;
24508      chartRect.x2 = Math.max(width - normalizedPadding.right, chartRect.x1 + 1);
24509      chartRect.y2 = normalizedPadding.top;
24510      chartRect.y1 = Math.max(height - normalizedPadding.bottom, chartRect.y2 + 1);
24511    }
24512
24513    return chartRect;
24514  };
24515
24516  /**
24517   * Creates a grid line based on a projected value.
24518   *
24519   * @memberof Chartist.Core
24520   * @param position
24521   * @param index
24522   * @param axis
24523   * @param offset
24524   * @param length
24525   * @param group
24526   * @param classes
24527   * @param eventEmitter
24528   */
24529  Chartist.createGrid = function(position, index, axis, offset, length, group, classes, eventEmitter) {
24530    var positionalData = {};
24531    positionalData[axis.units.pos + '1'] = position;
24532    positionalData[axis.units.pos + '2'] = position;
24533    positionalData[axis.counterUnits.pos + '1'] = offset;
24534    positionalData[axis.counterUnits.pos + '2'] = offset + length;
24535
24536    var gridElement = group.elem('line', positionalData, classes.join(' '));
24537
24538    // Event for grid draw
24539    eventEmitter.emit('draw',
24540      Chartist.extend({
24541        type: 'grid',
24542        axis: axis,
24543        index: index,
24544        group: group,
24545        element: gridElement
24546      }, positionalData)
24547    );
24548  };
24549
24550  /**
24551   * Creates a grid background rect and emits the draw event.
24552   *
24553   * @memberof Chartist.Core
24554   * @param gridGroup
24555   * @param chartRect
24556   * @param className
24557   * @param eventEmitter
24558   */
24559  Chartist.createGridBackground = function (gridGroup, chartRect, className, eventEmitter) {
24560    var gridBackground = gridGroup.elem('rect', {
24561        x: chartRect.x1,
24562        y: chartRect.y2,
24563        width: chartRect.width(),
24564        height: chartRect.height(),
24565      }, className, true);
24566
24567      // Event for grid background draw
24568      eventEmitter.emit('draw', {
24569        type: 'gridBackground',
24570        group: gridGroup,
24571        element: gridBackground
24572      });
24573  };
24574
24575  /**
24576   * Creates a label based on a projected value and an axis.
24577   *
24578   * @memberof Chartist.Core
24579   * @param position
24580   * @param length
24581   * @param index
24582   * @param labels
24583   * @param axis
24584   * @param axisOffset
24585   * @param labelOffset
24586   * @param group
24587   * @param classes
24588   * @param useForeignObject
24589   * @param eventEmitter
24590   */
24591  Chartist.createLabel = function(position, length, index, labels, axis, axisOffset, labelOffset, group, classes, useForeignObject, eventEmitter) {
24592    var labelElement;
24593    var positionalData = {};
24594
24595    positionalData[axis.units.pos] = position + labelOffset[axis.units.pos];
24596    positionalData[axis.counterUnits.pos] = labelOffset[axis.counterUnits.pos];
24597    positionalData[axis.units.len] = length;
24598    positionalData[axis.counterUnits.len] = Math.max(0, axisOffset - 10);
24599
24600    if(useForeignObject) {
24601      // We need to set width and height explicitly to px as span will not expand with width and height being
24602      // 100% in all browsers
24603      var content = document.createElement('span');
24604      content.className = classes.join(' ');
24605      content.setAttribute('xmlns', Chartist.namespaces.xhtml);
24606      content.innerText = labels[index];
24607      content.style[axis.units.len] = Math.round(positionalData[axis.units.len]) + 'px';
24608      content.style[axis.counterUnits.len] = Math.round(positionalData[axis.counterUnits.len]) + 'px';
24609
24610      labelElement = group.foreignObject(content, Chartist.extend({
24611        style: 'overflow: visible;'
24612      }, positionalData));
24613    } else {
24614      labelElement = group.elem('text', positionalData, classes.join(' ')).text(labels[index]);
24615    }
24616
24617    eventEmitter.emit('draw', Chartist.extend({
24618      type: 'label',
24619      axis: axis,
24620      index: index,
24621      group: group,
24622      element: labelElement,
24623      text: labels[index]
24624    }, positionalData));
24625  };
24626
24627  /**
24628   * Helper to read series specific options from options object. It automatically falls back to the global option if
24629   * there is no option in the series options.
24630   *
24631   * @param {Object} series Series object
24632   * @param {Object} options Chartist options object
24633   * @param {string} key The options key that should be used to obtain the options
24634   * @returns {*}
24635   */
24636  Chartist.getSeriesOption = function(series, options, key) {
24637    if(series.name && options.series && options.series[series.name]) {
24638      var seriesOptions = options.series[series.name];
24639      return seriesOptions.hasOwnProperty(key) ? seriesOptions[key] : options[key];
24640    } else {
24641      return options[key];
24642    }
24643  };
24644
24645  /**
24646   * Provides options handling functionality with callback for options changes triggered by responsive options and media query matches
24647   *
24648   * @memberof Chartist.Core
24649   * @param {Object} options Options set by user
24650   * @param {Array} responsiveOptions Optional functions to add responsive behavior to chart
24651   * @param {Object} eventEmitter The event emitter that will be used to emit the options changed events
24652   * @return {Object} The consolidated options object from the defaults, base and matching responsive options
24653   */
24654  Chartist.optionsProvider = function (options, responsiveOptions, eventEmitter) {
24655    var baseOptions = Chartist.extend({}, options),
24656      currentOptions,
24657      mediaQueryListeners = [],
24658      i;
24659
24660    function updateCurrentOptions(mediaEvent) {
24661      var previousOptions = currentOptions;
24662      currentOptions = Chartist.extend({}, baseOptions);
24663
24664      if (responsiveOptions) {
24665        for (i = 0; i < responsiveOptions.length; i++) {
24666          var mql = window.matchMedia(responsiveOptions[i][0]);
24667          if (mql.matches) {
24668            currentOptions = Chartist.extend(currentOptions, responsiveOptions[i][1]);
24669          }
24670        }
24671      }
24672
24673      if(eventEmitter && mediaEvent) {
24674        eventEmitter.emit('optionsChanged', {
24675          previousOptions: previousOptions,
24676          currentOptions: currentOptions
24677        });
24678      }
24679    }
24680
24681    function removeMediaQueryListeners() {
24682      mediaQueryListeners.forEach(function(mql) {
24683        mql.removeListener(updateCurrentOptions);
24684      });
24685    }
24686
24687    if (!window.matchMedia) {
24688      throw 'window.matchMedia not found! Make sure you\'re using a polyfill.';
24689    } else if (responsiveOptions) {
24690
24691      for (i = 0; i < responsiveOptions.length; i++) {
24692        var mql = window.matchMedia(responsiveOptions[i][0]);
24693        mql.addListener(updateCurrentOptions);
24694        mediaQueryListeners.push(mql);
24695      }
24696    }
24697    // Execute initially without an event argument so we get the correct options
24698    updateCurrentOptions();
24699
24700    return {
24701      removeMediaQueryListeners: removeMediaQueryListeners,
24702      getCurrentOptions: function getCurrentOptions() {
24703        return Chartist.extend({}, currentOptions);
24704      }
24705    };
24706  };
24707
24708
24709  /**
24710   * Splits a list of coordinates and associated values into segments. Each returned segment contains a pathCoordinates
24711   * valueData property describing the segment.
24712   *
24713   * With the default options, segments consist of contiguous sets of points that do not have an undefined value. Any
24714   * points with undefined values are discarded.
24715   *
24716   * **Options**
24717   * The following options are used to determine how segments are formed
24718   * ```javascript
24719   * var options = {
24720   *   // If fillHoles is true, undefined values are simply discarded without creating a new segment. Assuming other options are default, this returns single segment.
24721   *   fillHoles: false,
24722   *   // If increasingX is true, the coordinates in all segments have strictly increasing x-values.
24723   *   increasingX: false
24724   * };
24725   * ```
24726   *
24727   * @memberof Chartist.Core
24728   * @param {Array} pathCoordinates List of point coordinates to be split in the form [x1, y1, x2, y2 ... xn, yn]
24729   * @param {Array} values List of associated point values in the form [v1, v2 .. vn]
24730   * @param {Object} options Options set by user
24731   * @return {Array} List of segments, each containing a pathCoordinates and valueData property.
24732   */
24733  Chartist.splitIntoSegments = function(pathCoordinates, valueData, options) {
24734    var defaultOptions = {
24735      increasingX: false,
24736      fillHoles: false
24737    };
24738
24739    options = Chartist.extend({}, defaultOptions, options);
24740
24741    var segments = [];
24742    var hole = true;
24743
24744    for(var i = 0; i < pathCoordinates.length; i += 2) {
24745      // If this value is a "hole" we set the hole flag
24746      if(Chartist.getMultiValue(valueData[i / 2].value) === undefined) {
24747      // if(valueData[i / 2].value === undefined) {
24748        if(!options.fillHoles) {
24749          hole = true;
24750        }
24751      } else {
24752        if(options.increasingX && i >= 2 && pathCoordinates[i] <= pathCoordinates[i-2]) {
24753          // X is not increasing, so we need to make sure we start a new segment
24754          hole = true;
24755        }
24756
24757
24758        // If it's a valid value we need to check if we're coming out of a hole and create a new empty segment
24759        if(hole) {
24760          segments.push({
24761            pathCoordinates: [],
24762            valueData: []
24763          });
24764          // As we have a valid value now, we are not in a "hole" anymore
24765          hole = false;
24766        }
24767
24768        // Add to the segment pathCoordinates and valueData
24769        segments[segments.length - 1].pathCoordinates.push(pathCoordinates[i], pathCoordinates[i + 1]);
24770        segments[segments.length - 1].valueData.push(valueData[i / 2]);
24771      }
24772    }
24773
24774    return segments;
24775  };
24776}(this || global, Chartist));
24777;/**
24778 * Chartist path interpolation functions.
24779 *
24780 * @module Chartist.Interpolation
24781 */
24782/* global Chartist */
24783(function(globalRoot, Chartist) {
24784  'use strict';
24785
24786  Chartist.Interpolation = {};
24787
24788  /**
24789   * This interpolation function does not smooth the path and the result is only containing lines and no curves.
24790   *
24791   * @example
24792   * var chart = new Chartist.Line('.ct-chart', {
24793   *   labels: [1, 2, 3, 4, 5],
24794   *   series: [[1, 2, 8, 1, 7]]
24795   * }, {
24796   *   lineSmooth: Chartist.Interpolation.none({
24797   *     fillHoles: false
24798   *   })
24799   * });
24800   *
24801   *
24802   * @memberof Chartist.Interpolation
24803   * @return {Function}
24804   */
24805  Chartist.Interpolation.none = function(options) {
24806    var defaultOptions = {
24807      fillHoles: false
24808    };
24809    options = Chartist.extend({}, defaultOptions, options);
24810    return function none(pathCoordinates, valueData) {
24811      var path = new Chartist.Svg.Path();
24812      var hole = true;
24813
24814      for(var i = 0; i < pathCoordinates.length; i += 2) {
24815        var currX = pathCoordinates[i];
24816        var currY = pathCoordinates[i + 1];
24817        var currData = valueData[i / 2];
24818
24819        if(Chartist.getMultiValue(currData.value) !== undefined) {
24820
24821          if(hole) {
24822            path.move(currX, currY, false, currData);
24823          } else {
24824            path.line(currX, currY, false, currData);
24825          }
24826
24827          hole = false;
24828        } else if(!options.fillHoles) {
24829          hole = true;
24830        }
24831      }
24832
24833      return path;
24834    };
24835  };
24836
24837  /**
24838   * Simple smoothing creates horizontal handles that are positioned with a fraction of the length between two data points. You can use the divisor option to specify the amount of smoothing.
24839   *
24840   * Simple smoothing can be used instead of `Chartist.Smoothing.cardinal` if you'd like to get rid of the artifacts it produces sometimes. Simple smoothing produces less flowing lines but is accurate by hitting the points and it also doesn't swing below or above the given data point.
24841   *
24842   * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.
24843   *
24844   * @example
24845   * var chart = new Chartist.Line('.ct-chart', {
24846   *   labels: [1, 2, 3, 4, 5],
24847   *   series: [[1, 2, 8, 1, 7]]
24848   * }, {
24849   *   lineSmooth: Chartist.Interpolation.simple({
24850   *     divisor: 2,
24851   *     fillHoles: false
24852   *   })
24853   * });
24854   *
24855   *
24856   * @memberof Chartist.Interpolation
24857   * @param {Object} options The options of the simple interpolation factory function.
24858   * @return {Function}
24859   */
24860  Chartist.Interpolation.simple = function(options) {
24861    var defaultOptions = {
24862      divisor: 2,
24863      fillHoles: false
24864    };
24865    options = Chartist.extend({}, defaultOptions, options);
24866
24867    var d = 1 / Math.max(1, options.divisor);
24868
24869    return function simple(pathCoordinates, valueData) {
24870      var path = new Chartist.Svg.Path();
24871      var prevX, prevY, prevData;
24872
24873      for(var i = 0; i < pathCoordinates.length; i += 2) {
24874        var currX = pathCoordinates[i];
24875        var currY = pathCoordinates[i + 1];
24876        var length = (currX - prevX) * d;
24877        var currData = valueData[i / 2];
24878
24879        if(currData.value !== undefined) {
24880
24881          if(prevData === undefined) {
24882            path.move(currX, currY, false, currData);
24883          } else {
24884            path.curve(
24885              prevX + length,
24886              prevY,
24887              currX - length,
24888              currY,
24889              currX,
24890              currY,
24891              false,
24892              currData
24893            );
24894          }
24895
24896          prevX = currX;
24897          prevY = currY;
24898          prevData = currData;
24899        } else if(!options.fillHoles) {
24900          prevX = currX = prevData = undefined;
24901        }
24902      }
24903
24904      return path;
24905    };
24906  };
24907
24908  /**
24909   * Cardinal / Catmull-Rome spline interpolation is the default smoothing function in Chartist. It produces nice results where the splines will always meet the points. It produces some artifacts though when data values are increased or decreased rapidly. The line may not follow a very accurate path and if the line should be accurate this smoothing function does not produce the best results.
24910   *
24911   * Cardinal splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
24912   *
24913   * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.
24914   *
24915   * @example
24916   * var chart = new Chartist.Line('.ct-chart', {
24917   *   labels: [1, 2, 3, 4, 5],
24918   *   series: [[1, 2, 8, 1, 7]]
24919   * }, {
24920   *   lineSmooth: Chartist.Interpolation.cardinal({
24921   *     tension: 1,
24922   *     fillHoles: false
24923   *   })
24924   * });
24925   *
24926   * @memberof Chartist.Interpolation
24927   * @param {Object} options The options of the cardinal factory function.
24928   * @return {Function}
24929   */
24930  Chartist.Interpolation.cardinal = function(options) {
24931    var defaultOptions = {
24932      tension: 1,
24933      fillHoles: false
24934    };
24935
24936    options = Chartist.extend({}, defaultOptions, options);
24937
24938    var t = Math.min(1, Math.max(0, options.tension)),
24939      c = 1 - t;
24940
24941    return function cardinal(pathCoordinates, valueData) {
24942      // First we try to split the coordinates into segments
24943      // This is necessary to treat "holes" in line charts
24944      var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
24945        fillHoles: options.fillHoles
24946      });
24947
24948      if(!segments.length) {
24949        // If there were no segments return 'Chartist.Interpolation.none'
24950        return Chartist.Interpolation.none()([]);
24951      } else if(segments.length > 1) {
24952        // If the split resulted in more that one segment we need to interpolate each segment individually and join them
24953        // afterwards together into a single path.
24954          var paths = [];
24955        // For each segment we will recurse the cardinal function
24956        segments.forEach(function(segment) {
24957          paths.push(cardinal(segment.pathCoordinates, segment.valueData));
24958        });
24959        // Join the segment path data into a single path and return
24960        return Chartist.Svg.Path.join(paths);
24961      } else {
24962        // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
24963        // segment
24964        pathCoordinates = segments[0].pathCoordinates;
24965        valueData = segments[0].valueData;
24966
24967        // If less than two points we need to fallback to no smoothing
24968        if(pathCoordinates.length <= 4) {
24969          return Chartist.Interpolation.none()(pathCoordinates, valueData);
24970        }
24971
24972        var path = new Chartist.Svg.Path().move(pathCoordinates[0], pathCoordinates[1], false, valueData[0]),
24973          z;
24974
24975        for (var i = 0, iLen = pathCoordinates.length; iLen - 2 * !z > i; i += 2) {
24976          var p = [
24977            {x: +pathCoordinates[i - 2], y: +pathCoordinates[i - 1]},
24978            {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]},
24979            {x: +pathCoordinates[i + 2], y: +pathCoordinates[i + 3]},
24980            {x: +pathCoordinates[i + 4], y: +pathCoordinates[i + 5]}
24981          ];
24982          if (z) {
24983            if (!i) {
24984              p[0] = {x: +pathCoordinates[iLen - 2], y: +pathCoordinates[iLen - 1]};
24985            } else if (iLen - 4 === i) {
24986              p[3] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
24987            } else if (iLen - 2 === i) {
24988              p[2] = {x: +pathCoordinates[0], y: +pathCoordinates[1]};
24989              p[3] = {x: +pathCoordinates[2], y: +pathCoordinates[3]};
24990            }
24991          } else {
24992            if (iLen - 4 === i) {
24993              p[3] = p[2];
24994            } else if (!i) {
24995              p[0] = {x: +pathCoordinates[i], y: +pathCoordinates[i + 1]};
24996            }
24997          }
24998
24999          path.curve(
25000            (t * (-p[0].x + 6 * p[1].x + p[2].x) / 6) + (c * p[2].x),
25001            (t * (-p[0].y + 6 * p[1].y + p[2].y) / 6) + (c * p[2].y),
25002            (t * (p[1].x + 6 * p[2].x - p[3].x) / 6) + (c * p[2].x),
25003            (t * (p[1].y + 6 * p[2].y - p[3].y) / 6) + (c * p[2].y),
25004            p[2].x,
25005            p[2].y,
25006            false,
25007            valueData[(i + 2) / 2]
25008          );
25009        }
25010
25011        return path;
25012      }
25013    };
25014  };
25015
25016  /**
25017   * Monotone Cubic spline interpolation produces a smooth curve which preserves monotonicity. Unlike cardinal splines, the curve will not extend beyond the range of y-values of the original data points.
25018   *
25019   * Monotone Cubic splines can only be created if there are more than two data points. If this is not the case this smoothing will fallback to `Chartist.Smoothing.none`.
25020   *
25021   * The x-values of subsequent points must be increasing to fit a Monotone Cubic spline. If this condition is not met for a pair of adjacent points, then there will be a break in the curve between those data points.
25022   *
25023   * All smoothing functions within Chartist are factory functions that accept an options parameter.
25024   *
25025   * @example
25026   * var chart = new Chartist.Line('.ct-chart', {
25027   *   labels: [1, 2, 3, 4, 5],
25028   *   series: [[1, 2, 8, 1, 7]]
25029   * }, {
25030   *   lineSmooth: Chartist.Interpolation.monotoneCubic({
25031   *     fillHoles: false
25032   *   })
25033   * });
25034   *
25035   * @memberof Chartist.Interpolation
25036   * @param {Object} options The options of the monotoneCubic factory function.
25037   * @return {Function}
25038   */
25039  Chartist.Interpolation.monotoneCubic = function(options) {
25040    var defaultOptions = {
25041      fillHoles: false
25042    };
25043
25044    options = Chartist.extend({}, defaultOptions, options);
25045
25046    return function monotoneCubic(pathCoordinates, valueData) {
25047      // First we try to split the coordinates into segments
25048      // This is necessary to treat "holes" in line charts
25049      var segments = Chartist.splitIntoSegments(pathCoordinates, valueData, {
25050        fillHoles: options.fillHoles,
25051        increasingX: true
25052      });
25053
25054      if(!segments.length) {
25055        // If there were no segments return 'Chartist.Interpolation.none'
25056        return Chartist.Interpolation.none()([]);
25057      } else if(segments.length > 1) {
25058        // If the split resulted in more that one segment we need to interpolate each segment individually and join them
25059        // afterwards together into a single path.
25060          var paths = [];
25061        // For each segment we will recurse the monotoneCubic fn function
25062        segments.forEach(function(segment) {
25063          paths.push(monotoneCubic(segment.pathCoordinates, segment.valueData));
25064        });
25065        // Join the segment path data into a single path and return
25066        return Chartist.Svg.Path.join(paths);
25067      } else {
25068        // If there was only one segment we can proceed regularly by using pathCoordinates and valueData from the first
25069        // segment
25070        pathCoordinates = segments[0].pathCoordinates;
25071        valueData = segments[0].valueData;
25072
25073        // If less than three points we need to fallback to no smoothing
25074        if(pathCoordinates.length <= 4) {
25075          return Chartist.Interpolation.none()(pathCoordinates, valueData);
25076        }
25077
25078        var xs = [],
25079          ys = [],
25080          i,
25081          n = pathCoordinates.length / 2,
25082          ms = [],
25083          ds = [], dys = [], dxs = [],
25084          path;
25085
25086        // Populate x and y coordinates into separate arrays, for readability
25087
25088        for(i = 0; i < n; i++) {
25089          xs[i] = pathCoordinates[i * 2];
25090          ys[i] = pathCoordinates[i * 2 + 1];
25091        }
25092
25093        // Calculate deltas and derivative
25094
25095        for(i = 0; i < n - 1; i++) {
25096          dys[i] = ys[i + 1] - ys[i];
25097          dxs[i] = xs[i + 1] - xs[i];
25098          ds[i] = dys[i] / dxs[i];
25099        }
25100
25101        // Determine desired slope (m) at each point using Fritsch-Carlson method
25102        // See: http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation
25103
25104        ms[0] = ds[0];
25105        ms[n - 1] = ds[n - 2];
25106
25107        for(i = 1; i < n - 1; i++) {
25108          if(ds[i] === 0 || ds[i - 1] === 0 || (ds[i - 1] > 0) !== (ds[i] > 0)) {
25109            ms[i] = 0;
25110          } else {
25111            ms[i] = 3 * (dxs[i - 1] + dxs[i]) / (
25112              (2 * dxs[i] + dxs[i - 1]) / ds[i - 1] +
25113              (dxs[i] + 2 * dxs[i - 1]) / ds[i]);
25114
25115            if(!isFinite(ms[i])) {
25116              ms[i] = 0;
25117            }
25118          }
25119        }
25120
25121        // Now build a path from the slopes
25122
25123        path = new Chartist.Svg.Path().move(xs[0], ys[0], false, valueData[0]);
25124
25125        for(i = 0; i < n - 1; i++) {
25126          path.curve(
25127            // First control point
25128            xs[i] + dxs[i] / 3,
25129            ys[i] + ms[i] * dxs[i] / 3,
25130            // Second control point
25131            xs[i + 1] - dxs[i] / 3,
25132            ys[i + 1] - ms[i + 1] * dxs[i] / 3,
25133            // End point
25134            xs[i + 1],
25135            ys[i + 1],
25136
25137            false,
25138            valueData[i + 1]
25139          );
25140        }
25141
25142        return path;
25143      }
25144    };
25145  };
25146
25147  /**
25148   * Step interpolation will cause the line chart to move in steps rather than diagonal or smoothed lines. This interpolation will create additional points that will also be drawn when the `showPoint` option is enabled.
25149   *
25150   * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.
25151   *
25152   * @example
25153   * var chart = new Chartist.Line('.ct-chart', {
25154   *   labels: [1, 2, 3, 4, 5],
25155   *   series: [[1, 2, 8, 1, 7]]
25156   * }, {
25157   *   lineSmooth: Chartist.Interpolation.step({
25158   *     postpone: true,
25159   *     fillHoles: false
25160   *   })
25161   * });
25162   *
25163   * @memberof Chartist.Interpolation
25164   * @param options
25165   * @returns {Function}
25166   */
25167  Chartist.Interpolation.step = function(options) {
25168    var defaultOptions = {
25169      postpone: true,
25170      fillHoles: false
25171    };
25172
25173    options = Chartist.extend({}, defaultOptions, options);
25174
25175    return function step(pathCoordinates, valueData) {
25176      var path = new Chartist.Svg.Path();
25177
25178      var prevX, prevY, prevData;
25179
25180      for (var i = 0; i < pathCoordinates.length; i += 2) {
25181        var currX = pathCoordinates[i];
25182        var currY = pathCoordinates[i + 1];
25183        var currData = valueData[i / 2];
25184
25185        // If the current point is also not a hole we can draw the step lines
25186        if(currData.value !== undefined) {
25187          if(prevData === undefined) {
25188            path.move(currX, currY, false, currData);
25189          } else {
25190            if(options.postpone) {
25191              // If postponed we should draw the step line with the value of the previous value
25192              path.line(currX, prevY, false, prevData);
25193            } else {
25194              // If not postponed we should draw the step line with the value of the current value
25195              path.line(prevX, currY, false, currData);
25196            }
25197            // Line to the actual point (this should only be a Y-Axis movement
25198            path.line(currX, currY, false, currData);
25199          }
25200
25201          prevX = currX;
25202          prevY = currY;
25203          prevData = currData;
25204        } else if(!options.fillHoles) {
25205          prevX = prevY = prevData = undefined;
25206        }
25207      }
25208
25209      return path;
25210    };
25211  };
25212
25213}(this || global, Chartist));
25214;/**
25215 * A very basic event module that helps to generate and catch events.
25216 *
25217 * @module Chartist.Event
25218 */
25219/* global Chartist */
25220(function (globalRoot, Chartist) {
25221  'use strict';
25222
25223  Chartist.EventEmitter = function () {
25224    var handlers = [];
25225
25226    /**
25227     * Add an event handler for a specific event
25228     *
25229     * @memberof Chartist.Event
25230     * @param {String} event The event name
25231     * @param {Function} handler A event handler function
25232     */
25233    function addEventHandler(event, handler) {
25234      handlers[event] = handlers[event] || [];
25235      handlers[event].push(handler);
25236    }
25237
25238    /**
25239     * Remove an event handler of a specific event name or remove all event handlers for a specific event.
25240     *
25241     * @memberof Chartist.Event
25242     * @param {String} event The event name where a specific or all handlers should be removed
25243     * @param {Function} [handler] An optional event handler function. If specified only this 
25243specific handler will be removed and otherwise all handlers are removed.
25244     */
25245    function removeEventHandler(event, handler) {
25246      // Only do something if there are event handlers with this name existing
25247      if(handlers[event]) {
25248        // If handler is set we will look for a specific handler and only remove this
25249        if(handler) {
25250          handlers[event].splice(handlers[event].indexOf(handler), 1);
25251          if(handlers[event].length === 0) {
25252            delete handlers[event];
25253          }
25254        } else {
25255          // If no handler is specified we remove all handlers for this event
25256          delete handlers[event];
25257        }
25258      }
25259    }
25260
25261    /**
25262     * Use this function to emit an event. All handlers that are listening for this event will be triggered with the data parameter.
25263     *
25264     * @memberof Chartist.Event
25265     * @param {String} event The event name that should be triggered
25266     * @param {*} data Arbitrary data that will be passed to the event handler callback functions
25267     */
25268    function emit(event, data) {
25269      // Only do something if there are event handlers with this name existing
25270      if(handlers[event]) {
25271        handlers[event].forEach(function(handler) {
25272          handler(data);
25273        });
25274      }
25275
25276      // Emit event to star event handlers
25277      if(handlers['*']) {
25278        handlers['*'].forEach(function(starHandler) {
25279          starHandler(event, data);
25280        });
25281      }
25282    }
25283
25284    return {
25285      addEventHandler: addEventHandler,
25286      removeEventHandler: removeEventHandler,
25287      emit: emit
25288    };
25289  };
25290
25291}(this || global, Chartist));
25292;/**
25293 * This module provides some basic prototype inheritance utilities.
25294 *
25295 * @module Chartist.Class
25296 */
25297/* global Chartist */
25298(function(globalRoot, Chartist) {
25299  'use strict';
25300
25301  function listToArray(list) {
25302    var arr = [];
25303    if (list.length) {
25304      for (var i = 0; i < list.length; i++) {
25305        arr.push(list[i]);
25306      }
25307    }
25308    return arr;
25309  }
25310
25311  /**
25312   * Method to extend from current prototype.
25313   *
25314   * @memberof Chartist.Class
25315   * @param {Object} properties The object that serves as definition for the prototype that gets created for the new class. This object should always contain a constructor property that is the desired constructor for the newly created class.
25316   * @param {Object} [superProtoOverride] By default extens will use the current class prototype or Chartist.class. With this parameter you can specify any super prototype that will be used.
25317   * @return {Function} Constructor function of the new class
25318   *
25319   * @example
25320   * var Fruit = Class.extend({
25321     * color: undefined,
25322     *   sugar: undefined,
25323     *
25324     *   constructor: function(color, sugar) {
25325     *     this.color = color;
25326     *     this.sugar = sugar;
25327     *   },
25328     *
25329     *   eat: function() {
25330     *     this.sugar = 0;
25331     *     return this;
25332     *   }
25333     * });
25334   *
25335   * var Banana = Fruit.extend({
25336     *   length: undefined,
25337     *
25338     *   constructor: function(length, sugar) {
25339     *     Banana.super.constructor.call(this, 'Yellow', sugar);
25340     *     this.length = length;
25341     *   }
25342     * });
25343   *
25344   * var banana = new Banana(20, 40);
25345   * console.log('banana instanceof Fruit', banana instanceof Fruit);
25346   * console.log('Fruit is prototype of banana', Fruit.prototype.isPrototypeOf(banana));
25347   * console.log('bananas prototype is Fruit', Object.getPrototypeOf(banana) === Fruit.prototype);
25348   * console.log(banana.sugar);
25349   * console.log(banana.eat().sugar);
25350   * console.log(banana.color);
25351   */
25352  function extend(properties, superProtoOverride) {
25353    var superProto = superProtoOverride || this.prototype || Chartist.Class;
25354    var proto = Object.create(superProto);
25355
25356    Chartist.Class.cloneDefinitions(proto, properties);
25357
25358    var constr = function() {
25359      var fn = proto.constructor || function () {},
25360        instance;
25361
25362      // If this is linked to the Chartist namespace the constructor was not called with new
25363      // To provide a fallback we will instantiate here and return the instance
25364      instance = this === Chartist ? Object.create(proto) : this;
25365      fn.apply(instance, Array.prototype.slice.call(arguments, 0));
25366
25367      // If this constructor was not called with new we need to return the instance
25368      // This will not harm when the constructor has been called with new as the returned value is ignored
25369      return instance;
25370    };
25371
25372    constr.prototype = proto;
25373    constr.super = superProto;
25374    constr.extend = this.extend;
25375
25376    return constr;
25377  }
25378
25379  // Variable argument list clones args > 0 into args[0] and retruns modified args[0]
25380  function cloneDefinitions() {
25381    var args = listToArray(arguments);
25382    var target = args[0];
25383
25384    args.splice(1, args.length - 1).forEach(function (source) {
25385      Object.getOwnPropertyNames(source).forEach(function (propName) {
25386        // If this property already exist in target we delete it first
25387        delete target[propName];
25388        // Define the property with the descriptor from source
25389        Object.defineProperty(target, propName,
25390          Object.getOwnPropertyDescriptor(source, propName));
25391      });
25392    });
25393
25394    return target;
25395  }
25396
25397  Chartist.Class = {
25398    extend: extend,
25399    cloneDefinitions: cloneDefinitions
25400  };
25401
25402}(this || global, Chartist));
25403;/**
25404 * Base for all chart types. The methods in Chartist.Base are inherited to all chart types.
25405 *
25406 * @module Chartist.Base
25407 */
25408/* global Chartist */
25409(function(globalRoot, Chartist) {
25410  'use strict';
25411
25412  var window = globalRoot.window;
25413
25414  // TODO: Currently we need to re-draw the chart on window resize. This is usually very bad and will affect performance.
25415  // This is done because we can't work with relative coordinates when drawing the chart because SVG Path does not
25416  // work with relative positions yet. We need to check if we can do a viewBox hack to switch to percentage.
25417  // See http://mozilla.6506.n7.nabble.com/Specyfing-paths-with-percentages-unit-td247474.html
25418  // Update: can be done using the above method tested here: http://codepen.io/gionkunz/pen/KDvLj
25419  // The problem is with the label offsets that can't be converted into percentage and affecting the chart container
25420  /**
25421   * Updates the chart which currently does a full reconstruction of the SVG DOM
25422   *
25423   * @param {Object} [data] Optional data you'd like to set for the chart before it will update. If not specified the update method will use the data that is already configured with the chart.
25424   * @param {Object} [options] Optional options you'd like to add to the previous options for the chart before it will update. If not specified the update method will use the options that have been already configured with the chart.
25425   * @param {Boolean} [override] If set to true, the passed options will be used to extend the options that have been configured already. Otherwise the chart default options will be used as the base
25426   * @memberof Chartist.Base
25427   */
25428  function update(data, options, override) {
25429    if(data) {
25430      this.data = data || {};
25431      this.data.labels = this.data.labels || [];
25432      this.data.series = this.data.series || [];
25433      // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
25434      this.eventEmitter.emit('data', {
25435        type: 'update',
25436        data: this.data
25437      });
25438    }
25439
25440    if(options) {
25441      this.options = Chartist.extend({}, override ? this.options : this.defaultOptions, options);
25442
25443      // If chartist was not initialized yet, we just set the options and leave the rest to the initialization
25444      // Otherwise we re-create the optionsProvider at this point
25445      if(!this.initializeTimeoutId) {
25446        this.optionsProvider.removeMediaQueryListeners();
25447        this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
25448      }
25449    }
25450
25451    // Only re-created the chart if it has been initialized yet
25452    if(!this.initializeTimeoutId) {
25453      this.createChart(this.optionsProvider.getCurrentOptions());
25454    }
25455
25456    // Return a reference to the chart object to chain up calls
25457    return this;
25458  }
25459
25460  /**
25461   * This method can be called on the API object of each chart and will un-register all event listeners that were added to other components. This currently includes a window.resize listener as well as media query listeners if any responsive options have been provided. Use this function if you need to destroy and recreate Chartist charts dynamically.
25462   *
25463   * @memberof Chartist.Base
25464   */
25465  function detach() {
25466    // Only detach if initialization already occurred on this chart. If this chart still hasn't initialized (therefore
25467    // the initializationTimeoutId is still a valid timeout reference, we will clear the timeout
25468    if(!this.initializeTimeoutId) {
25469      window.removeEventListener('resize', this.resizeListener);
25470      this.optionsProvider.removeMediaQueryListeners();
25471    } else {
25472      window.clearTimeout(this.initializeTimeoutId);
25473    }
25474
25475    return this;
25476  }
25477
25478  /**
25479   * Use this function to register event handlers. The handler callbacks are synchronous and will run in the main thread rather than the event loop.
25480   *
25481   * @memberof Chartist.Base
25482   * @param {String} event Name of the event. Check the examples for supported events.
25483   * @param {Function} handler The handler function that will be called when an event with the given name was emitted. This function will receive a data argument which contains event data. See the example for more details.
25484   */
25485  function on(event, handler) {
25486    this.eventEmitter.addEventHandler(event, handler);
25487    return this;
25488  }
25489
25490  /**
25491   * Use this function to un-register event handlers. If the handler function parameter is omitted all handlers for the given event will be un-registered.
25492   *
25493   * @memberof Chartist.Base
25494   * @param {String} event Name of the event for which a handler should be removed
25495   * @param {Function} [handler] The handler function that that was previously used to register a new event handler. This handler will be removed from the event handler list. If this parameter is omitted then all event handlers for the given event are removed from the list.
25496   */
25497  function off(event, handler) {
25498    this.eventEmitter.removeEventHandler(event, handler);
25499    return this;
25500  }
25501
25502  function initialize() {
25503    // Add window resize listener that re-creates the chart
25504    window.addEventListener('resize', this.resizeListener);
25505
25506    // Obtain current options based on matching media queries (if responsive options are given)
25507    // This will also register a listener that is re-creating the chart based on media changes
25508    this.optionsProvider = Chartist.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter);
25509    // Register options change listener that will trigger a chart update
25510    this.eventEmitter.addEventHandler('optionsChanged', function() {
25511      this.update();
25512    }.bind(this));
25513
25514    // Before the first chart creation we need to register us with all plugins that are configured
25515    // Initialize all relevant plugins with our chart object and the plugin options specified in the config
25516    if(this.options.plugins) {
25517      this.options.plugins.forEach(function(plugin) {
25518        if(plugin instanceof Array) {
25519          plugin[0](this, plugin[1]);
25520        } else {
25521          plugin(this);
25522        }
25523      }.bind(this));
25524    }
25525
25526    // Event for data transformation that allows to manipulate the data before it gets rendered in the charts
25527    this.eventEmitter.emit('data', {
25528      type: 'initial',
25529      data: this.data
25530    });
25531
25532    // Create the first chart
25533    this.createChart(this.optionsProvider.getCurrentOptions());
25534
25535    // As chart is initialized from the event loop now we can reset our timeout reference
25536    // This is important if the chart gets initialized on the same element twice
25537    this.initializeTimeoutId = undefined;
25538  }
25539
25540  /**
25541   * Constructor of chart base class.
25542   *
25543   * @param query
25544   * @param data
25545   * @param defaultOptions
25546   * @param options
25547   * @param responsiveOptions
25548   * @constructor
25549   */
25550  function Base(query, data, defaultOptions, options, responsiveOptions) {
25551    this.container = Chartist.querySelector(query);
25552    this.data = data || {};
25553    this.data.labels = this.data.labels || [];
25554    this.data.series = this.data.series || [];
25555    this.defaultOptions = defaultOptions;
25556    this.options = options;
25557    this.responsiveOptions = responsiveOptions;
25558    this.eventEmitter = Chartist.EventEmitter();
25559    this.supportsForeignObject = Chartist.Svg.isSupported('Extensibility');
25560    this.supportsAnimations = Chartist.Svg.isSupported('AnimationEventsAttribute');
25561    this.resizeListener = function resizeListener(){
25562      this.update();
25563    }.bind(this);
25564
25565    if(this.container) {
25566      // If chartist was already initialized in this container we are detaching all event listeners first
25567      if(this.container.__chartist__) {
25568        this.container.__chartist__.detach();
25569      }
25570
25571      this.container.__chartist__ = this;
25572    }
25573
25574    // Using event loop for first draw to make it possible to register event listeners in the same call stack where
25575    // the chart was created.
25576    this.initializeTimeoutId = setTimeout(initialize.bind(this), 0);
25577  }
25578
25579  // Creating the chart base class
25580  Chartist.Base = Chartist.Class.extend({
25581    constructor: Base,
25582    optionsProvider: undefined,
25583    container: undefined,
25584    svg: undefined,
25585    eventEmitter: undefined,
25586    createChart: function() {
25587      throw new Error('Base chart type can\'t be instantiated!');
25588    },
25589    update: update,
25590    detach: detach,
25591    on: on,
25592    off: off,
25593    version: Chartist.version,
25594    supportsForeignObject: false
25595  });
25596
25597}(this || global, Chartist));
25598;/**
25599 * Chartist SVG module for simple SVG DOM abstraction
25600 *
25601 * @module Chartist.Svg
25602 */
25603/* global Chartist */
25604(function(globalRoot, Chartist) {
25605  'use strict';
25606
25607  var document = globalRoot.document;
25608
25609  /**
25610   * Chartist.Svg creates a new SVG object wrapper with a starting element. You can use the wrapper to fluently create sub-elements and modify them.
25611   *
25612   * @memberof Chartist.Svg
25613   * @constructor
25614   * @param {String|Element} name The name of the SVG element to create or an SVG dom element which should be wrapped into Chartist.Svg
25615   * @param {Object} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
25616   * @param {String} className This class or class list will be added to the SVG element
25617   * @param {Object} parent The parent SVG wrapper object where this newly created wrapper and it's element will be attached to as child
25618   * @param {Boolean} insertFirst If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
25619   */
25620  function Svg(name, attributes, className, parent, insertFirst) {
25621    // If Svg is getting called with an SVG element we just return the wrapper
25622    if(name instanceof Element) {
25623      this._node = name;
25624    } else {
25625      this._node = document.createElementNS(Chartist.namespaces.svg, name);
25626
25627      // If this is an SVG element created then custom namespace
25628      if(name === 'svg') {
25629        this.attr({
25630          'xmlns:ct': Chartist.namespaces.ct
25631        });
25632      }
25633    }
25634
25635    if(attributes) {
25636      this.attr(attributes);
25637    }
25638
25639    if(className) {
25640      this.addClass(className);
25641    }
25642
25643    if(parent) {
25644      if (insertFirst && parent._node.firstChild) {
25645        parent._node.insertBefore(this._node, parent._node.firstChild);
25646      } else {
25647        parent._node.appendChild(this._node);
25648      }
25649    }
25650  }
25651
25652  /**
25653   * Set attributes on the current SVG element of the wrapper you're currently working on.
25654   *
25655   * @memberof Chartist.Svg
25656   * @param {Object|String} attributes An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added. If this parameter is a String then the function is used as a getter and will return the attribute value.
25657   * @param {String} [ns] If specified, the attribute will be obtained using getAttributeNs. In order to write namepsaced attributes you can use the namespace:attribute notation within the attributes object.
25658   * @return {Object|String} The current wrapper object will be returned so it can be used for chaining or the attribute value if used as getter function.
25659   */
25660  function attr(attributes, ns) {
25661    if(typeof attributes === 'string') {
25662      if(ns) {
25663        return this._node.getAttributeNS(ns, attributes);
25664      } else {
25665        return this._node.getAttribute(attributes);
25666      }
25667    }
25668
25669    Object.keys(attributes).forEach(function(key) {
25670      // If the attribute value is undefined we can skip this one
25671      if(attributes[key] === undefined) {
25672        return;
25673      }
25674
25675      if (key.indexOf(':') !== -1) {
25676        var namespacedAttribute = key.split(':');
25677        this._node.setAttributeNS(Chartist.namespaces[namespacedAttribute[0]], key, attributes[key]);
25678      } else {
25679        this._node.setAttribute(key, attributes[key]);
25680      }
25681    }.bind(this));
25682
25683    return this;
25684  }
25685
25686  /**
25687   * Create a new SVG element whose wrapper object will be selected for further operations. This way you can also create nested groups easily.
25688   *
25689   * @memberof Chartist.Svg
25690   * @param {String} name The name of the SVG element that should be created as child element of the currently selected element wrapper
25691   * @param {Object} [attributes] An object with properties that will be added as attributes to the SVG element that is created. Attributes with undefined values will not be added.
25692   * @param {String} [className] This class or class list will be added to the SVG element
25693   * @param {Boolean} [insertFirst] If this param is set to true in conjunction with a parent element the newly created element will be added as first child element in the parent element
25694   * @return {Chartist.Svg} Returns a Chartist.Svg wrapper object that can be used to modify the containing SVG data
25695   */
25696  function elem(name, attributes, className, insertFirst) {
25697    return new Chartist.Svg(name, attributes, className, this, insertFirst);
25698  }
25699
25700  /**
25701   * Returns the parent Chartist.SVG wrapper object
25702   *
25703   * @memberof Chartist.Svg
25704   * @return {Chartist.Svg} Returns a Chartist.Svg wrapper around the parent node of the current node. If the parent node is not existing or it's not an SVG node then this function will return null.
25705   */
25706  function parent() {
25707    return this._node.parentNode instanceof SVGElement ? new Chartist.Svg(this._node.parentNode) : null;
25708  }
25709
25710  /**
25711   * This method returns a Chartist.Svg wrapper around the root SVG element of the current tree.
25712   *
25713   * @memberof Chartist.Svg
25714   * @return {Chartist.Svg} The root SVG element wrapped in a Chartist.Svg element
25715   */
25716  function root() {
25717    var node = this._node;
25718    while(node.nodeName !== 'svg') {
25719      node = node.parentNode;
25720    }
25721    return new Chartist.Svg(node);
25722  }
25723
25724  /**
25725   * Find the first child SVG element of the current element that matches a CSS selector. The returned object is a Chartist.Svg wrapper.
25726   *
25727   * @memberof Chartist.Svg
25728   * @param {String} selector A CSS selector that is used to query for child SVG elements
25729   * @return {Chartist.Svg} The SVG wrapper for the element found or null if no element was found
25730   */
25731  function querySelector(selector) {
25732    var foundNode = this._node.querySelector(selector);
25733    return foundNode ? new Chartist.Svg(foundNode) : null;
25734  }
25735
25736  /**
25737   * Find the all child SVG elements of the current element that match a CSS selector. The returned object is a Chartist.Svg.List wrapper.
25738   *
25739   * @memberof Chartist.Svg
25740   * @param {String} selector A CSS selector that is used to query for child SVG elements
25741   * @return {Chartist.Svg.List} The SVG wrapper list for the element found or null if no element was found
25742   */
25743  function querySelectorAll(selector) {
25744    var foundNodes = this._node.querySelectorAll(selector);
25745    return foundNodes.length ? new Chartist.Svg.List(foundNodes) : null;
25746  }
25747
25748  /**
25749   * Returns the underlying SVG node for the current element.
25750   *
25751   * @memberof Chartist.Svg
25752   * @returns {Node}
25753   */
25754  function getNode() {
25755    return this._node;
25756  }
25757
25758  /**
25759   * This method creates a foreignObject (see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject) that allows to embed HTML content into a SVG graphic. With the help of foreignObjects you can enable the usage of regular HTML elements inside of SVG where they are subject for SVG positioning and transformation but the Browser will use the HTML rendering capabilities for the containing DOM.
25760   *
25761   * @memberof Chartist.Svg
25762   * @param {Node|String} content The DOM Node, or HTML string that will be converted to a DOM Node, that is then placed into and wrapped by the foreignObject
25763   * @param {String} [attributes] An object with properties that will be added as attributes to the foreignObject element that is created. Attributes with undefined values will not be added.
25764   * @param {String} [className] This class or class list will be added to the SVG element
25765   * @param {Boolean} [insertFirst] Specifies if the foreignObject should be inserted as first child
25766   * @return {Chartist.Svg} New wrapper object that wraps the foreignObject element
25767   */
25768  function foreignObject(content, attributes, className, insertFirst) {
25769    // If content is string then we convert it to DOM
25770    // TODO: Handle case where content is not a string nor a DOM Node
25771    if(typeof content === 'string') {
25772      var container = document.createElement('div');
25773      container.innerHTML = content;
25774      content = container.firstChild;
25775    }
25776
25777    // Adding namespace to content element
25778    content.setAttribute('xmlns', Chartist.namespaces.xmlns);
25779
25780    // Creating the foreignObject without required extension attribute (as described here
25781    // http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement)
25782    var fnObj = this.elem('foreignObject', attributes, className, insertFirst);
25783
25784    // Add content to foreignObjectElement
25785    fnObj._node.appendChild(content);
25786
25787    return fnObj;
25788  }
25789
25790  /**
25791   * This method adds a new text element to the current Chartist.Svg wrapper.
25792   *
25793   * @memberof Chartist.Svg
25794   * @param {String} t The text that should be added to the text element that is created
25795   * @return {Chartist.Svg} The same wrapper object that was used to add the newly created element
25796   */
25797  function text(t) {
25798    this._node.appendChild(document.createTextNode(t));
25799    return this;
25800  }
25801
25802  /**
25803   * This method will clear all child nodes of the current wrapper object.
25804   *
25805   * @memberof Chartist.Svg
25806   * @return {Chartist.Svg} The same wrapper object that got emptied
25807   */
25808  function empty() {
25809    while (this._node.firstChild) {
25810      this._node.removeChild(this._node.firstChild);
25811    }
25812
25813    return this;
25814  }
25815
25816  /**
25817   * This method will cause the current wrapper to remove itself from its parent wrapper. Use this method if you'd like to get rid of an element in a given DOM structure.
25818   *
25819   * @memberof Chartist.Svg
25820   * @return {Chartist.Svg} The parent wrapper object of the element that got removed
25821   */
25822  function remove() {
25823    this._node.parentNode.removeChild(this._node);
25824    return this.parent();
25825  }
25826
25827  /**
25828   * This method will replace the element with a new element that can be created outside of the current DOM.
25829   *
25830   * @memberof Chartist.Svg
25831   * @param {Chartist.Svg} newElement The new Chartist.Svg object that will be used to replace the current wrapper object
25832   * @return {Chartist.Svg} The wrapper of the new element
25833   */
25834  function replace(newElement) {
25835    this._node.parentNode.replaceChild(newElement._node, this._node);
25836    return newElement;
25837  }
25838
25839  /**
25840   * This method will append an element to the current element as a child.
25841   *
25842   * @memberof Chartist.Svg
25843   * @param {Chartist.Svg} element The Chartist.Svg element that should be added as a child
25844   * @param {Boolean} [insertFirst] Specifies if the element should be inserted as first child
25845   * @return {Chartist.Svg} The wrapper of the appended object
25846   */
25847  function append(element, insertFirst) {
25848    if(insertFirst && this._node.firstChild) {
25849      this._node.insertBefore(element._node, this._node.firstChild);
25850    } else {
25851      this._node.appendChild(element._node);
25852    }
25853
25854    return this;
25855  }
25856
25857  /**
25858   * Returns an array of class names that are attached to the current wrapper element. This method can not be chained further.
25859   *
25860   * @memberof Chartist.Svg
25861   * @return {Array} A list of classes or an empty array if there are no classes on the current element
25862   */
25863  function classes() {
25864    return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\s+/) : [];
25865  }
25866
25867  /**
25868   * Adds one or a space separated list of classes to the current element and ensures the classes are only existing once.
25869   *
25870   * @memberof Chartist.Svg
25871   * @param {String} names A white space separated list of class names
25872   * @return {Chartist.Svg} The wrapper of the current element
25873   */
25874  function addClass(names) {
25875    this._node.setAttribute('class',
25876      this.classes(this._node)
25877        .concat(names.trim().split(/\s+/))
25878        .filter(function(elem, pos, self) {
25879          return self.indexOf(elem) === pos;
25880        }).join(' ')
25881    );
25882
25883    return this;
25884  }
25885
25886  /**
25887   * Removes one or a space separated list of classes from the current element.
25888   *
25889   * @memberof Chartist.Svg
25890   * @param {String} names A white space separated list of class names
25891   * @return {Chartist.Svg} The wrapper of the current element
25892   */
25893  function removeClass(names) {
25894    var removedClasses = names.trim().split(/\s+/);
25895
25896    this._node.setAttribute('class', this.classes(this._node).filter(function(name) {
25897      return removedClasses.indexOf(name) === -1;
25898    }).join(' '));
25899
25900    return this;
25901  }
25902
25903  /**
25904   * Removes all classes from the current element.
25905   *
25906   * @memberof Chartist.Svg
25907   * @return {Chartist.Svg} The wrapper of the current element
25908   */
25909  function removeAllClasses() {
25910    this._node.setAttribute('class', '');
25911
25912    return this;
25913  }
25914
25915  /**
25916   * Get element height using `getBoundingClientRect`
25917   *
25918   * @memberof Chartist.Svg
25919   * @return {Number} The elements height in pixels
25920   */
25921  function height() {
25922    return this._node.getBoundingClientRect().height;
25923  }
25924
25925  /**
25926   * Get element width using `getBoundingClientRect`
25927   *
25928   * @memberof Chartist.Core
25929   * @return {Number} The elements width in pixels
25930   */
25931  function width() {
25932    return this._node.getBoundingClientRect().width;
25933  }
25934
25935  /**
25936   * The animate function lets you animate the current element with SMIL animations. You can add animations for multiple attributes at the same time by using an animation definition object. This object should contain SMIL animation attributes. Please refer to http://www.w3.org/TR/SVG/animate.html for a detailed specification about the available animation attributes. Additionally an easing property can be passed in the animation definition object. This can be a string with a name of an easing function in `Chartist.Svg.Easing` or an array with four numbers specifying a cubic Bézier curve.
25937   * **An animations object could look like this:**
25938   * ```javascript
25939   * element.animate({
25940   *   opacity: {
25941   *     dur: 1000,
25942   *     from: 0,
25943   *     to: 1
25944   *   },
25945   *   x1: {
25946   *     dur: '1000ms',
25947   *     from: 100,
25948   *     to: 200,
25949   *     easing: 'easeOutQuart'
25950   *   },
25951   *   y1: {
25952   *     dur: '2s',
25953   *     from: 0,
25954   *     to: 100
25955   *   }
25956   * });
25957   * ```
25958   * **Automatic unit conversion**
25959   * For the `dur` and the `begin` animate attribute you can also omit a unit by passing a number. The number will automatically be converted to milli seconds.
25960   * **Guided mode**
25961   * The default behavior of SMIL animations with offset using the `begin` attribute is that the attribute will keep it's original value until the animation starts. Mostly this behavior is not desired as you'd like to have your element attributes already initialized with the animation `from` value even before the animation starts. Also if you don't specify `fill="freeze"` on an animate element or if you delete the animation after it's done (which is done in guided mode) the attribute will switch back to the initial value. This behavior is also not desired when performing simple one-time animations. For one-time animations you'd want to trigger animations immediately instead of relative to the document begin time. That's why in guided mode Chartist.Svg will also use the `begin` property to schedule a timeout and manually start the animation after the timeout. If you're using multiple SMIL definition objects for an attribute (in an array), guided mode will be disabled for this attribute, even if you explicitly enabled it.
25962   * If guided mode is enabled the following behavior is added:
25963   * - Before the animation starts (even when delayed with `begin`) the animated attribute will be set already to the `from` value of the animation
25964   * - `begin` is explicitly set to `indefinite` so it can be started manually without relying on document begin time (creation)
25965   * - The animate element will be forced to use `fill="freeze"`
25966   * - The animation will be triggered with `beginElement()` in a timeout where `begin` of the definition object is interpreted in milli seconds. If no `begin` was specified the timeout is triggered immediately.
25967   * - After the animation the element attribute value will be set to the `to` value of the animation
25968   * - The animate element is deleted from the DOM
25969   *
25970   * @memberof Chartist.Svg
25971   * @param {Object} animations An animations object where the property keys are the attributes you'd like to animate. The properties should be objects again that contain the SMIL animation attributes (usually begin, dur, from, and to). The property begin and dur is auto converted (see Automatic unit conversion). You can also schedule multiple animations for the same attribute by passing an Array of SMIL definition objects. Attributes that contain an array of SMIL definition objects will not be executed in guided mode.
25972   * @param {Boolean} guided Specify if guided mode should be activated for this animation (see Guided mode). If not otherwise specified, guided mode will be activated.
25973   * @param {Object} eventEmitter If specified, this event emitter will be notified when an animation starts or ends.
25974   * @return {Chartist.Svg} The current element where the animation was added
25975   */
25976  function animate(animations, guided, eventEmitter) {
25977    if(guided === undefined) {
25978      guided = true;
25979    }
25980
25981    Object.keys(animations).forEach(function createAnimateForAttributes(attribute) {
25982
25983      function createAnimate(animationDefinition, guided) {
25984        var attributeProperties = {},
25985          animate,
25986          timeout,
25987          easing;
25988
25989        // Check if an easing is specified in the definition object and delete it from the object as it will not
25990        // be part of the animate element attributes.
25991        if(animationDefinition.easing) {
25992          // If already an easing Bézier curve array we take it or we lookup a easing array in the Easing object
25993          easing = animationDefinition.easing instanceof Array ?
25994            animationDefinition.easing :
25995            Chartist.Svg.Easing[animationDefinition.easing];
25996          delete animationDefinition.easing;
25997        }
25998
25999        // If numeric dur or begin was provided we assume milli seconds
26000        animationDefinition.begin = Chartist.ensureUnit(animationDefinition.begin, 'ms');
26001        animationDefinition.dur = Chartist.ensureUnit(animationDefinition.dur, 'ms');
26002
26003        if(easing) {
26004          animationDefinition.calcMode = 'spline';
26005          animationDefinition.keySplines = easing.join(' ');
26006          animationDefinition.keyTimes = '0;1';
26007        }
26008
26009        // Adding "fill: freeze" if we are in guided mode and set initial attribute values
26010        if(guided) {
26011          animationDefinition.fill = 'freeze';
26012          // Animated property on our element should already be set to the animation from value in guided mode
26013          attributeProperties[attribute] = animationDefinition.from;
26014          this.attr(attributeProperties);
26015
26016          // In guided mode we also set begin to indefinite so we can trigger the start manually and put the begin
26017          // which needs to be in ms aside
26018          timeout = Chartist.quantity(animationDefinition.begin || 0).value;
26019          animationDefinition.begin = 'indefinite';
26020        }
26021
26022        animate = this.elem('animate', Chartist.extend({
26023          attributeName: attribute
26024        }, animationDefinition));
26025
26026        if(guided) {
26027          // If guided we take the value that was put aside in timeout and trigger the animation manually with a timeout
26028          setTimeout(function() {
26029            // If beginElement fails we set the animated attribute to the end position and remove the animate element
26030            // This happens if the SMIL ElementTimeControl interface is not supported or any other problems occured in
26031            // the browser. (Currently FF 34 does not support animate elements in foreignObjects)
26032            try {
26033              animate._node.beginElement();
26034            } catch(err) {
26035              // Set animated attribute to current animated value
26036              attributeProperties[attribute] = animationDefinition.to;
26037              this.attr(attributeProperties);
26038              // Remove the animate element as it's no longer required
26039              animate.remove();
26040            }
26041          }.bind(this), timeout);
26042        }
26043
26044        if(eventEmitter) {
26045          animate._node.addEventListener('beginEvent', function handleBeginEvent() {
26046            eventEmitter.emit('animationBegin', {
26047              element: this,
26048              animate: animate._node,
26049              params: animationDefinition
26050            });
26051          }.bind(this));
26052        }
26053
26054        animate._node.addEventListener('endEvent', function handleEndEvent() {
26055          if(eventEmitter) {
26056            eventEmitter.emit('animationEnd', {
26057              element: this,
26058              animate: animate._node,
26059              params: animationDefinition
26060            });
26061          }
26062
26063          if(guided) {
26064            // Set animated attribute to current animated value
26065            attributeProperties[attribute] = animationDefinition.to;
26066            this.attr(attributeProperties);
26067            // Remove the animate element as it's no longer required
26068            animate.remove();
26069          }
26070        }.bind(this));
26071      }
26072
26073      // If current attribute is an array of definition objects we create an animate for each and disable guided mode
26074      if(animations[attribute] instanceof Array) {
26075        animations[attribute].forEach(function(animationDefinition) {
26076          createAnimate.bind(this)(animationDefinition, false);
26077        }.bind(this));
26078      } else {
26079        createAnimate.bind(this)(animations[attribute], guided);
26080      }
26081
26082    }.bind(this));
26083
26084    return this;
26085  }
26086
26087  Chartist.Svg = Chartist.Class.extend({
26088    constructor: Svg,
26089    attr: attr,
26090    elem: elem,
26091    parent: parent,
26092    root: root,
26093    querySelector: querySelector,
26094    querySelectorAll: querySelectorAll,
26095    getNode: getNode,
26096    foreignObject: foreignObject,
26097    text: text,
26098    empty: empty,
26099    remove: remove,
26100    replace: replace,
26101    append: append,
26102    classes: classes,
26103    addClass: addClass,
26104    removeClass: removeClass,
26105    removeAllClasses: removeAllClasses,
26106    height: height,
26107    width: width,
26108    animate: animate
26109  });
26110
26111  /**
26112   * This method checks for support of a given SVG feature like Extensibility, SVG-animation or the like. Check http://www.w3.org/TR/SVG11/feature for a detailed list.
26113   *
26114   * @memberof Chartist.Svg
26115   * @param {String} feature The SVG 1.1 feature that should be checked for support.
26116   * @return {Boolean} True of false if the feature is supported or not
26117   */
26118  Chartist.Svg.isSupported = function(feature) {
26119    return document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + feature, '1.1');
26120  };
26121
26122  /**
26123   * This Object contains some standard easing cubic bezier curves. Then can be used with their name in the `Chartist.Svg.animate`. You can also extend the list and use your own name in the `animate` function. Click the show code button to see the available bezier functions.
26124   *
26125   * @memberof Chartist.Svg
26126   */
26127  var easingCubicBeziers = {
26128    easeInSine: [0.47, 0, 0.745, 0.715],
26129    easeOutSine: [0.39, 0.575, 0.565, 1],
26130    easeInOutSine: [0.445, 0.05, 0.55, 0.95],
26131    easeInQuad: [0.55, 0.085, 0.68, 0.53],
26132    easeOutQuad: [0.25, 0.46, 0.45, 0.94],
26133    easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
26134    easeInCubic: [0.55, 0.055, 0.675, 0.19],
26135    easeOutCubic: [0.215, 0.61, 0.355, 1],
26136    easeInOutCubic: [0.645, 0.045, 0.355, 1],
26137    easeInQuart: [0.895, 0.03, 0.685, 0.22],
26138    easeOutQuart: [0.165, 0.84, 0.44, 1],
26139    easeInOutQuart: [0.77, 0, 0.175, 1],
26140    easeInQuint: [0.755, 0.05, 0.855, 0.06],
26141    easeOutQuint: [0.23, 1, 0.32, 1],
26142    easeInOutQuint: [0.86, 0, 0.07, 1],
26143    easeInExpo: [0.95, 0.05, 0.795, 0.035],
26144    easeOutExpo: [0.19, 1, 0.22, 1],
26145    easeInOutExpo: [1, 0, 0, 1],
26146    easeInCirc: [0.6, 0.04, 0.98, 0.335],
26147    easeOutCirc: [0.075, 0.82, 0.165, 1],
26148    easeInOutCirc: [0.785, 0.135, 0.15, 0.86],
26149    easeInBack: [0.6, -0.28, 0.735, 0.045],
26150    easeOutBack: [0.175, 0.885, 0.32, 1.275],
26151    easeInOutBack: [0.68, -0.55, 0.265, 1.55]
26152  };
26153
26154  Chartist.Svg.Easing = easingCubicBeziers;
26155
26156  /**
26157   * This helper class is to wrap multiple `Chartist.Svg` elements into a list where you can call the `Chartist.Svg` functions on all elements in the list with one call. This is helpful when you'd like to perform calls with `Chartist.Svg` on multiple elements.
26158   * An instance of this class is also returned by `Chartist.Svg.querySelectorAll`.
26159   *
26160   * @memberof Chartist.Svg
26161   * @param {Array<Node>|NodeList} nodeList An Array of SVG DOM nodes or a SVG DOM NodeList (as returned by document.querySelectorAll)
26162   * @constructor
26163   */
26164  function SvgList(nodeList) {
26165    var list = this;
26166
26167    this.svgElements = [];
26168    for(var i = 0; i < nodeList.length; i++) {
26169      this.svgElements.push(new Chartist.Svg(nodeList[i]));
26170    }
26171
26172    // Add delegation methods for Chartist.Svg
26173    Object.keys(Chartist.Svg.prototype).filter(function(prototypeProperty) {
26174      return ['constructor',
26175          'parent',
26176          'querySelector',
26177          'querySelectorAll',
26178          'replace',
26179          'append',
26180          'classes',
26181          'height',
26182          'width'].indexOf(prototypeProperty) === -1;
26183    }
26183).forEach(function(prototypeProperty) {
26184      list[prototypeProperty] = function() {
26185        var args = Array.prototype.slice.call(arguments, 0);
26186        list.svgElements.forEach(function(element) {
26187          Chartist.Svg.prototype[prototypeProperty].apply(element, args);
26188        });
26189        return list;
26190      };
26191    });
26192  }
26193
26194  Chartist.Svg.List = Chartist.Class.extend({
26195    constructor: SvgList
26196  });
26197}(this || global, Chartist));
26198;/**
26199 * Chartist SVG path module for SVG path description creation and modification.
26200 *
26201 * @module Chartist.Svg.Path
26202 */
26203/* global Chartist */
26204(function(globalRoot, Chartist) {
26205  'use strict';
26206
26207  /**
26208   * Contains the descriptors of supported element types in a SVG path. Currently only move, line and curve are supported.
26209   *
26210   * @memberof Chartist.Svg.Path
26211   * @type {Object}
26212   */
26213  var elementDescriptions = {
26214    m: ['x', 'y'],
26215    l: ['x', 'y'],
26216    c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'],
26217    a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y']
26218  };
26219
26220  /**
26221   * Default options for newly created SVG path objects.
26222   *
26223   * @memberof Chartist.Svg.Path
26224   * @type {Object}
26225   */
26226  var defaultOptions = {
26227    // The accuracy in digit count after the decimal point. This will be used to round numbers in the SVG path. If this option is set to false then no rounding will be performed.
26228    accuracy: 3
26229  };
26230
26231  function element(command, params, pathElements, pos, relative, data) {
26232    var pathElement = Chartist.extend({
26233      command: relative ? command.toLowerCase() : command.toUpperCase()
26234    }, params, data ? { data: data } : {} );
26235
26236    pathElements.splice(pos, 0, pathElement);
26237  }
26238
26239  function forEachParam(pathElements, cb) {
26240    pathElements.forEach(function(pathElement, pathElementIndex) {
26241      elementDescriptions[pathElement.command.toLowerCase()].forEach(function(paramName, paramIndex) {
26242        cb(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
26243      });
26244    });
26245  }
26246
26247  /**
26248   * Used to construct a new path object.
26249   *
26250   * @memberof Chartist.Svg.Path
26251   * @param {Boolean} close If set to true then this path will be closed when stringified (with a Z at the end)
26252   * @param {Object} options Options object that overrides the default objects. See default options for more details.
26253   * @constructor
26254   */
26255  function SvgPath(close, options) {
26256    this.pathElements = [];
26257    this.pos = 0;
26258    this.close = close;
26259    this.options = Chartist.extend({}, defaultOptions, options);
26260  }
26261
26262  /**
26263   * Gets or sets the current position (cursor) inside of the path. You can move around the cursor freely but limited to 0 or the count of existing elements. All modifications with element functions will insert new elements at the position of this cursor.
26264   *
26265   * @memberof Chartist.Svg.Path
26266   * @param {Number} [pos] If a number is passed then the cursor is set to this position in the path element array.
26267   * @return {Chartist.Svg.Path|Number} If the position parameter was passed then the return value will be the path object for easy call chaining. If no position parameter was passed then the current position is returned.
26268   */
26269  function position(pos) {
26270    if(pos !== undefined) {
26271      this.pos = Math.max(0, Math.min(this.pathElements.length, pos));
26272      return this;
26273    } else {
26274      return this.pos;
26275    }
26276  }
26277
26278  /**
26279   * Removes elements from the path starting at the current position.
26280   *
26281   * @memberof Chartist.Svg.Path
26282   * @param {Number} count Number of path elements that should be removed from the current position.
26283   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26284   */
26285  function remove(count) {
26286    this.pathElements.splice(this.pos, count);
26287    return this;
26288  }
26289
26290  /**
26291   * Use this function to add a new move SVG path element.
26292   *
26293   * @memberof Chartist.Svg.Path
26294   * @param {Number} x The x coordinate for the move element.
26295   * @param {Number} y The y coordinate for the move element.
26296   * @param {Boolean} [relative] If set to true the move element will be created with relative coordinates (lowercase letter)
26297   * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
26298   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26299   */
26300  function move(x, y, relative, data) {
26301    element('M', {
26302      x: +x,
26303      y: +y
26304    }, this.pathElements, this.pos++, relative, data);
26305    return this;
26306  }
26307
26308  /**
26309   * Use this function to add a new line SVG path element.
26310   *
26311   * @memberof Chartist.Svg.Path
26312   * @param {Number} x The x coordinate for the line element.
26313   * @param {Number} y The y coordinate for the line element.
26314   * @param {Boolean} [relative] If set to true the line element will be created with relative coordinates (lowercase letter)
26315   * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
26316   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26317   */
26318  function line(x, y, relative, data) {
26319    element('L', {
26320      x: +x,
26321      y: +y
26322    }, this.pathElements, this.pos++, relative, data);
26323    return this;
26324  }
26325
26326  /**
26327   * Use this function to add a new curve SVG path element.
26328   *
26329   * @memberof Chartist.Svg.Path
26330   * @param {Number} x1 The x coordinate for the first control point of the bezier curve.
26331   * @param {Number} y1 The y coordinate for the first control point of the bezier curve.
26332   * @param {Number} x2 The x coordinate for the second control point of the bezier curve.
26333   * @param {Number} y2 The y coordinate for the second control point of the bezier curve.
26334   * @param {Number} x The x coordinate for the target point of the curve element.
26335   * @param {Number} y The y coordinate for the target point of the curve element.
26336   * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
26337   * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
26338   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26339   */
26340  function curve(x1, y1, x2, y2, x, y, relative, data) {
26341    element('C', {
26342      x1: +x1,
26343      y1: +y1,
26344      x2: +x2,
26345      y2: +y2,
26346      x: +x,
26347      y: +y
26348    }, this.pathElements, this.pos++, relative, data);
26349    return this;
26350  }
26351
26352  /**
26353   * Use this function to add a new non-bezier curve SVG path element.
26354   *
26355   * @memberof Chartist.Svg.Path
26356   * @param {Number} rx The radius to be used for the x-axis of the arc.
26357   * @param {Number} ry The radius to be used for the y-axis of the arc.
26358   * @param {Number} xAr Defines the orientation of the arc
26359   * @param {Number} lAf Large arc flag
26360   * @param {Number} sf Sweep flag
26361   * @param {Number} x The x coordinate for the target point of the curve element.
26362   * @param {Number} y The y coordinate for the target point of the curve element.
26363   * @param {Boolean} [relative] If set to true the curve element will be created with relative coordinates (lowercase letter)
26364   * @param {*} [data] Any data that should be stored with the element object that will be accessible in pathElement
26365   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26366   */
26367  function arc(rx, ry, xAr, lAf, sf, x, y, relative, data) {
26368    element('A', {
26369      rx: +rx,
26370      ry: +ry,
26371      xAr: +xAr,
26372      lAf: +lAf,
26373      sf: +sf,
26374      x: +x,
26375      y: +y
26376    }, this.pathElements, this.pos++, relative, data);
26377    return this;
26378  }
26379
26380  /**
26381   * Parses an SVG path seen in the d attribute of path elements, and inserts the parsed elements into the existing path object at the current cursor position. Any closing path indicators (Z at the end of the path) will be ignored by the parser as this is provided by the close option in the options of the path object.
26382   *
26383   * @memberof Chartist.Svg.Path
26384   * @param {String} path Any SVG path that contains move (m), line (l) or curve (c) components.
26385   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26386   */
26387  function parse(path) {
26388    // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]
26389    var chunks = path.replace(/([A-Za-z])([0-9])/g, '$1 $2')
26390      .replace(/([0-9])([A-Za-z])/g, '$1 $2')
26391      .split(/[\s,]+/)
26392      .reduce(function(result, element) {
26393        if(element.match(/[A-Za-z]/)) {
26394          result.push([]);
26395        }
26396
26397        result[result.length - 1].push(element);
26398        return result;
26399      }, []);
26400
26401    // If this is a closed path we remove the Z at the end because this is determined by the close option
26402    if(chunks[chunks.length - 1][0].toUpperCase() === 'Z') {
26403      chunks.pop();
26404    }
26405
26406    // Using svgPathElementDescriptions to map raw path arrays into objects that contain the command and the parameters
26407    // For example {command: 'M', x: '10', y: '10'}
26408    var elements = chunks.map(function(chunk) {
26409        var command = chunk.shift(),
26410          description = elementDescriptions[command.toLowerCase()];
26411
26412        return Chartist.extend({
26413          command: command
26414        }, description.reduce(function(result, paramName, index) {
26415          result[paramName] = +chunk[index];
26416          return result;
26417        }, {}));
26418      });
26419
26420    // Preparing a splice call with the elements array as var arg params and insert the parsed elements at the current position
26421    var spliceArgs = [this.pos, 0];
26422    Array.prototype.push.apply(spliceArgs, elements);
26423    Array.prototype.splice.apply(this.pathElements, spliceArgs);
26424    // Increase the internal position by the element count
26425    this.pos += elements.length;
26426
26427    return this;
26428  }
26429
26430  /**
26431   * This function renders to current SVG path object into a final SVG string that can be used in the d attribute of SVG path elements. It uses the accuracy option to round big decimals. If the close parameter was set in the constructor of this path object then a path closing Z will be appended to the output string.
26432   *
26433   * @memberof Chartist.Svg.Path
26434   * @return {String}
26435   */
26436  function stringify() {
26437    var accuracyMultiplier = Math.pow(10, this.options.accuracy);
26438
26439    return this.pathElements.reduce(function(path, pathElement) {
26440        var params = elementDescriptions[pathElement.command.toLowerCase()].map(function(paramName) {
26441          return this.options.accuracy ?
26442            (Math.round(pathElement[paramName] * accuracyMultiplier) / accuracyMultiplier) :
26443            pathElement[paramName];
26444        }.bind(this));
26445
26446        return path + pathElement.command + params.join(',');
26447      }.bind(this), '') + (this.close ? 'Z' : '');
26448  }
26449
26450  /**
26451   * Scales all elements in the current SVG path object. There is an individual parameter for each coordinate. Scaling will also be done for control points of curves, affecting the given coordinate.
26452   *
26453   * @memberof Chartist.Svg.Path
26454   * @param {Number} x The number which will be used to scale the x, x1 and x2 of all path elements.
26455   * @param {Number} y The number which will be used to scale the y, y1 and y2 of all path elements.
26456   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26457   */
26458  function scale(x, y) {
26459    forEachParam(this.pathElements, function(pathElement, paramName) {
26460      pathElement[paramName] *= paramName[0] === 'x' ? x : y;
26461    });
26462    return this;
26463  }
26464
26465  /**
26466   * Translates all elements in the current SVG path object. The translation is relative and there is an individual parameter for each coordinate. Translation will also be done for control points of curves, affecting the given coordinate.
26467   *
26468   * @memberof Chartist.Svg.Path
26469   * @param {Number} x The number which will be used to translate the x, x1 and x2 of all path elements.
26470   * @param {Number} y The number which will be used to translate the y, y1 and y2 of all path elements.
26471   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26472   */
26473  function translate(x, y) {
26474    forEachParam(this.pathElements, function(pathElement, paramName) {
26475      pathElement[paramName] += paramName[0] === 'x' ? x : y;
26476    });
26477    return this;
26478  }
26479
26480  /**
26481   * This function will run over all existing path elements and then loop over their attributes. The callback function will be called for every path element attribute that exists in the current path.
26482   * The method signature of the callback function looks like this:
26483   * ```javascript
26484   * function(pathElement, paramName, pathElementIndex, paramIndex, pathElements)
26485   * ```
26486   * If something else than undefined is returned by the callback function, this value will be used to replace the old value. This allows you to build custom transformations of path objects that can't be achieved using the basic transformation functions scale and translate.
26487   *
26488   * @memberof Chartist.Svg.Path
26489   * @param {Function} transformFnc The callback function for the transformation. Check the signature in the function description.
26490   * @return {Chartist.Svg.Path} The current path object for easy call chaining.
26491   */
26492  function transform(transformFnc) {
26493    forEachParam(this.pathElements, function(pathElement, paramName, pathElementIndex, paramIndex, pathElements) {
26494      var transformed = transformFnc(pathElement, paramName, pathElementIndex, paramIndex, pathElements);
26495      if(transformed || transformed === 0) {
26496        pathElement[paramName] = transformed;
26497      }
26498    });
26499    return this;
26500  }
26501
26502  /**
26503   * This function clones a whole path object with all its properties. This is a deep clone and path element objects will also be cloned.
26504   *
26505   * @memberof Chartist.Svg.Path
26506   * @param {Boolean} [close] Optional option to set the new cloned path to closed. If not specified or false, the original path close option will be used.
26507   * @return {Chartist.Svg.Path}
26508   */
26509  function clone(close) {
26510    var c = new Chartist.Svg.Path(close || this.close);
26511    c.pos = this.pos;
26512    c.pathElements = this.pathElements.slice().map(function cloneElements(pathElement) {
26513      return Chartist.extend({}, pathElement);
26514    });
26515    c.options = Chartist.extend({}, this.options);
26516    return c;
26517  }
26518
26519  /**
26520   * Split a Svg.Path object by a specific command in the path chain. The path chain will be split and an array of newly created paths objects will be returned. This is useful if you'd like to split an SVG path by it's move commands, for example, in order to isolate chunks of drawings.
26521   *
26522   * @memberof Chartist.Svg.Path
26523   * @param {String} command The command you'd like to use to split the path
26524   * @return {Array<Chartist.Svg.Path>}
26525   */
26526  function splitByCommand(command) {
26527    var split = [
26528      new Chartist.Svg.Path()
26529    ];
26530
26531    this.pathElements.forEach(function(pathElement) {
26532      if(pathElement.command === command.toUpperCase() && split[split.length - 1].pathElements.length !== 0) {
26533        split.push(new Chartist.Svg.Path());
26534      }
26535
26536      split[split.length - 1].pathElements.push(pathElement);
26537    });
26538
26539    return split;
26540  }
26541
26542  /**
26543   * This static function on `Chartist.Svg.Path` is joining multiple paths together into one paths.
26544   *
26545   * @memberof Chartist.Svg.Path
26546   * @param {Array<Chartist.Svg.Path>} paths A list of paths to be joined together. The order is important.
26547   * @param {boolean} close If the newly created path should be a closed path
26548   * @param {Object} options Path options for the newly created path.
26549   * @return {Chartist.Svg.Path}
26550   */
26551
26552  function join(paths, close, options) {
26553    var joinedPath = new Chartist.Svg.Path(close, options);
26554    for(var i = 0; i < paths.length; i++) {
26555      var path = paths[i];
26556      for(var j = 0; j < path.pathElements.length; j++) {
26557        joinedPath.pathElements.push(path.pathElements[j]);
26558      }
26559    }
26560    return joinedPath;
26561  }
26562
26563  Chartist.Svg.Path = Chartist.Class.extend({
26564    constructor: SvgPath,
26565    position: position,
26566    remove: remove,
26567    move: move,
26568    line: line,
26569    curve: curve,
26570    arc: arc,
26571    scale: scale,
26572    translate: translate,
26573    transform: transform,
26574    parse: parse,
26575    stringify: stringify,
26576    clone: clone,
26577    splitByCommand: splitByCommand
26578  });
26579
26580  Chartist.Svg.Path.elementDescriptions = elementDescriptions;
26581  Chartist.Svg.Path.join = join;
26582}(this || global, Chartist));
26583;/* global Chartist */
26584(function (globalRoot, Chartist) {
26585  'use strict';
26586
26587  var window = globalRoot.window;
26588  var document = globalRoot.document;
26589
26590  var axisUnits = {
26591    x: {
26592      pos: 'x',
26593      len: 'width',
26594      dir: 'horizontal',
26595      rectStart: 'x1',
26596      rectEnd: 'x2',
26597      rectOffset: 'y2'
26598    },
26599    y: {
26600      pos: 'y',
26601      len: 'height',
26602      dir: 'vertical',
26603      rectStart: 'y2',
26604      rectEnd: 'y1',
26605      rectOffset: 'x1'
26606    }
26607  };
26608
26609  function Axis(units, chartRect, ticks, options) {
26610    this.units = units;
26611    this.counterUnits = units === axisUnits.x ? axisUnits.y : axisUnits.x;
26612    this.chartRect = chartRect;
26613    this.axisLength = chartRect[units.rectEnd] - chartRect[units.rectStart];
26614    this.gridOffset = chartRect[units.rectOffset];
26615    this.ticks = ticks;
26616    this.options = options;
26617  }
26618
26619  function createGridAndLabels(gridGroup, labelGroup, useForeignObject, chartOptions, eventEmitter) {
26620    var axisOptions = chartOptions['axis' + this.units.pos.toUpperCase()];
26621    var projectedValues = this.ticks.map(this.projectValue.bind(this));
26622    var labelValues = this.ticks.map(axisOptions.labelInterpolationFnc);
26623
26624    projectedValues.forEach(function(projectedValue, index) {
26625      var labelOffset = {
26626        x: 0,
26627        y: 0
26628      };
26629
26630      // TODO: Find better solution for solving this problem
26631      // Calculate how much space we have available for the label
26632      var labelLength;
26633      if(projectedValues[index + 1]) {
26634        // If we still have one label ahead, we can calculate the distance to the next tick / label
26635        labelLength = projectedValues[index + 1] - projectedValue;
26636      } else {
26637        // If we don't have a label ahead and we have only two labels in total, we just take the remaining distance to
26638        // on the whole axis length. We limit that to a minimum of 30 pixel, so that labels close to the border will
26639        // still be visible inside of the chart padding.
26640        labelLength = Math.max(this.axisLength - projectedValue, 30);
26641      }
26642
26643      // Skip grid lines and labels where interpolated label values are falsey (execpt for 0)
26644      if(Chartist.isFalseyButZero(labelValues[index]) && labelValues[index] !== '') {
26645        return;
26646      }
26647
26648      // Transform to global coordinates using the chartRect
26649      // We also need to set the label offset for the createLabel function
26650      if(this.units.pos === 'x') {
26651        projectedValue = this.chartRect.x1 + projectedValue;
26652        labelOffset.x = chartOptions.axisX.labelOffset.x;
26653
26654        // If the labels should be positioned in start position (top side for vertical axis) we need to set a
26655        // different offset as for positioned with end (bottom)
26656        if(chartOptions.axisX.position === 'start') {
26657          labelOffset.y = this.chartRect.padding.top + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
26658        } else {
26659          labelOffset.y = this.chartRect.y1 + chartOptions.axisX.labelOffset.y + (useForeignObject ? 5 : 20);
26660        }
26661      } else {
26662        projectedValue = this.chartRect.y1 - projectedValue;
26663        labelOffset.y = chartOptions.axisY.labelOffset.y - (useForeignObject ? labelLength : 0);
26664
26665        // If the labels should be positioned in start position (left side for horizontal axis) we need to set a
26666        // different offset as for positioned with end (right side)
26667        if(chartOptions.axisY.position === 'start') {
26668          labelOffset.x = useForeignObject ? this.chartRect.padding.left + chartOptions.axisY.labelOffset.x : this.chartRect.x1 - 10;
26669        } else {
26670          labelOffset.x = this.chartRect.x2 + chartOptions.axisY.labelOffset.x + 10;
26671        }
26672      }
26673
26674      if(axisOptions.showGrid) {
26675        Chartist.createGrid(projectedValue, index, this, this.gridOffset, this.chartRect[this.counterUnits.len](), gridGroup, [
26676          chartOptions.classNames.grid,
26677          chartOptions.classNames[this.units.dir]
26678        ], eventEmitter);
26679      }
26680
26681      if(axisOptions.showLabel) {
26682        Chartist.createLabel(projectedValue, labelLength, index, labelValues, this, axisOptions.offset, labelOffset, labelGroup, [
26683          chartOptions.classNames.label,
26684          chartOptions.classNames[this.units.dir],
26685          (axisOptions.position === 'start' ? chartOptions.classNames[axisOptions.position] : chartOptions.classNames['end'])
26686        ], useForeignObject, eventEmitter);
26687      }
26688    }.bind(this));
26689  }
26690
26691  Chartist.Axis = Chartist.Class.extend({
26692    constructor: Axis,
26693    createGridAndLabels: createGridAndLabels,
26694    projectValue: function(value, index, data) {
26695      throw new Error('Base axis can\'t be instantiated!');
26696    }
26697  });
26698
26699  Chartist.Axis.units = axisUnits;
26700
26701}(this || global, Chartist));
26702;/**
26703 * The auto scale axis uses standard linear scale projection of values along an axis. It uses order of magnitude to find a scale automatically and evaluates the available space in order to find the perfect amount of ticks for your chart.
26704 * **Options**
26705 * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
26706 * ```javascript
26707 * var options = {
26708 *   // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
26709 *   high: 100,
26710 *   // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
26711 *   low: 0,
26712 *   // This option will be used when finding the right scale division settings. The amount of ticks on the scale will be determined so that as many ticks as possible will be displayed, while not violating this minimum required space (in pixel).
26713 *   scaleMinSpace: 20,
26714 *   // Can be set to true or false. If set to true, the scale will be generated with whole numbers only.
26715 *   onlyInteger: true,
26716 *   // The reference value can be used to make sure that this value will always be on the chart. This is especially useful on bipolar charts where the bipolar center always needs to be part of the chart.
26717 *   referenceValue: 5
26718 * };
26719 * ```
26720 *
26721 * @module Chartist.AutoScaleAxis
26722 */
26723/* global Chartist */
26724(function (globalRoot, Chartist) {
26725  'use strict';
26726
26727  var window = globalRoot.window;
26728  var document = globalRoot.document;
26729
26730  function AutoScaleAxis(axisUnit, data, chartRect, options) {
26731    // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options
26732    var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
26733    this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger);
26734    this.range = {
26735      min: this.bounds.min,
26736      max: this.bounds.max
26737    };
26738
26739    Chartist.AutoScaleAxis.super.constructor.call(this,
26740      axisUnit,
26741      chartRect,
26742      this.bounds.values,
26743      options);
26744  }
26745
26746  function projectValue(value) {
26747    return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.bounds.min) / this.bounds.range;
26748  }
26749
26750  Chartist.AutoScaleAxis = Chartist.Axis.extend({
26751    constructor: AutoScaleAxis,
26752    projectValue: projectValue
26753  });
26754
26755}(this || global, Chartist));
26756;/**
26757 * The fixed scale axis uses standard linear projection of values along an axis. It makes use of a divisor option to divide the range provided from the minimum and maximum value or the options high and low that will override the computed minimum and maximum.
26758 * **Options**
26759 * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
26760 * ```javascript
26761 * var options = {
26762 *   // If high is specified then the axis will display values explicitly up to this value and the computed maximum from the data is ignored
26763 *   high: 100,
26764 *   // If low is specified then the axis will display values explicitly down to this value and the computed minimum from the data is ignored
26765 *   low: 0,
26766 *   // If specified then the value range determined from minimum to maximum (or low and high) will be divided by this number and ticks will be generated at those division points. The default divisor is 1.
26767 *   divisor: 4,
26768 *   // If ticks is explicitly set, then the axis will not compute the ticks with the divisor, but directly use the data in ticks to determine at what points on the axis a tick need to be generated.
26769 *   ticks: [1, 10, 20, 30]
26770 * };
26771 * ```
26772 *
26773 * @module Chartist.FixedScaleAxis
26774 */
26775/* global Chartist */
26776(function (globalRoot, Chartist) {
26777  'use strict';
26778
26779  var window = globalRoot.window;
26780  var document = globalRoot.document;
26781
26782  function FixedScaleAxis(axisUnit, data, chartRect, options) {
26783    var highLow = options.highLow || Chartist.getHighLow(data, options, axisUnit.pos);
26784    this.divisor = options.divisor || 1;
26785    this.ticks = options.ticks || Chartist.times(this.divisor).map(function(value, index) {
26786      return highLow.low + (highLow.high - highLow.low) / this.divisor * index;
26787    }.bind(this));
26788    this.ticks.sort(function(a, b) {
26789      return a - b;
26790    });
26791    this.range = {
26792      min: highLow.low,
26793      max: highLow.high
26794    };
26795
26796    Chartist.FixedScaleAxis.super.constructor.call(this,
26797      axisUnit,
26798      chartRect,
26799      this.ticks,
26800      options);
26801
26802    this.stepLength = this.axisLength / this.divisor;
26803  }
26804
26805  function projectValue(value) {
26806    return this.axisLength * (+Chartist.getMultiValue(value, this.units.pos) - this.range.min) / (this.range.max - this.range.min);
26807  }
26808
26809  Chartist.FixedScaleAxis = Chartist.Axis.extend({
26810    constructor: FixedScaleAxis,
26811    projectValue: projectValue
26812  });
26813
26814}(this || global, Chartist));
26815;/**
26816 * The step axis for step based charts like bar chart or step based line charts. It uses a fixed amount of ticks that will be equally distributed across the whole axis length. The projection is done using the index of the data value rather than the value itself and therefore it's only useful for distribution purpose.
26817 * **Options**
26818 * The following options are used by this axis in addition to the default axis options outlined in the axis configuration of the chart default settings.
26819 * ```javascript
26820 * var options = {
26821 *   // Ticks to be used to distribute across the axis length. As this axis type relies on the index of the value rather than the value, arbitrary data that can be converted to a string can be used as ticks.
26822 *   ticks: ['One', 'Two', 'Three'],
26823 *   // If set to true the full width will be used to distribute the values where the last value will be at the maximum of the axis length. If false the spaces between the ticks will be evenly distributed instead.
26824 *   stretch: true
26825 * };
26826 * ```
26827 *
26828 * @module Chartist.StepAxis
26829 */
26830/* global Chartist */
26831(function (globalRoot, Chartist) {
26832  'use strict';
26833
26834  var window = globalRoot.window;
26835  var document = globalRoot.document;
26836
26837  function StepAxis(axisUnit, data, chartRect, options) {
26838    Chartist.StepAxis.super.constructor.call(this,
26839      axisUnit,
26840      chartRect,
26841      options.ticks,
26842      options);
26843
26844    var calc = Math.max(1, options.ticks.length - (options.stretch ? 1 : 0));
26845    this.stepLength = this.axisLength / calc;
26846  }
26847
26848  function projectValue(value, index) {
26849    return this.stepLength * index;
26850  }
26851
26852  Chartist.StepAxis = Chartist.Axis.extend({
26853    constructor: StepAxis,
26854    projectValue: projectValue
26855  });
26856
26857}(this || global, Chartist));
26858;/**
26859 * The Chartist line chart can be used to draw Line or Scatter charts. If used in the browser you can access the global `Chartist` namespace where you find the `Line` function as a main entry point.
26860 *
26861 * For examples on how to use the line chart please check the examples of the `Chartist.Line` method.
26862 *
26863 * @module Chartist.Line
26864 */
26865/* global Chartist */
26866(function(globalRoot, Chartist){
26867  'use strict';
26868
26869  var window = globalRoot.window;
26870  var document = globalRoot.document;
26871
26872  /**
26873   * Default options in line charts. Expand the code view to see a detailed list of options with comments.
26874   *
26875   * @memberof Chartist.Line
26876   */
26877  var defaultOptions = {
26878    // Options for X-Axis
26879    axisX: {
26880      // The offset of the labels to the chart area
26881      offset: 30,
26882      // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
26883      position: 'end',
26884      // Allows you to correct label positioning on this axis by positive or negative x and y offset.
26885      labelOffset: {
26886        x: 0,
26887        y: 0
26888      },
26889      // If labels should be shown or not
26890      showLabel: true,
26891      // If the axis grid should be drawn or not
26892      showGrid: true,
26893      // Interpolation function that allows you to intercept the value from the axis label
26894      labelInterpolationFnc: Chartist.noop,
26895      // Set the axis type to be used to project values on this axis. If not defined, Chartist.StepAxis will be used for the X-Axis, where the ticks option will be set to the labels in the data and the stretch option will be set to the global fullWidth option. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
26896      type: undefined
26897    },
26898    // Options for Y-Axis
26899    axisY: {
26900      // The offset of the labels to the chart area
26901      offset: 40,
26902      // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
26903      position: 'start',
26904      // Allows you to correct label positioning on this axis by positive or negative x and y offset.
26905      labelOffset: {
26906        x: 0,
26907        y: 0
26908      },
26909      // If labels should be shown or not
26910      showLabel: true,
26911      // If the axis grid should be drawn or not
26912      showGrid: true,
26913      // Interpolation function that allows you to intercept the value from the axis label
26914      labelInterpolationFnc: Chartist.noop,
26915      // Set the axis type to be used to project values on this axis. If not defined, Chartist.AutoScaleAxis will be used for the Y-Axis, where the high and low options will be set to the global high and low options. This type can be changed to any axis constructor available (e.g. Chartist.FixedScaleAxis), where all axis options should be present here.
26916      type: undefined,
26917      // This value specifies the minimum height in pixel of the scale steps
26918      scaleMinSpace: 20,
26919      // Use only integer values (whole numbers) for the scale steps
26920      onlyInteger: false
26921    },
26922    // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
26923    width: undefined,
26924    // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
26925    height: undefined,
26926    // If the line should be drawn or not
26927    showLine: true,
26928    // If dots should be drawn or not
26929    showPoint: true,
26930    // If the line chart should draw an area
26931    showArea: false,
26932    // The base for the area chart that will be used to close the area shape (is normally 0)
26933    areaBase: 0,
26934    // Specify if the lines should be smoothed. This value can be true or false where true will result in smoothing using the default smoothing interpolation function Chartist.Interpolation.cardinal and false results in Chartist.Interpolation.none. You can also choose other smoothing / interpolation functions available in the Chartist.Interpolation module, or write your own interpolation function. Check the examples for a brief description.
26935    lineSmooth: true,
26936    // If the line chart should add a background fill to the .ct-grids group.
26937    showGridBackground: false,
26938    // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
26939    low: undefined,
26940    // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
26941    high: undefined,
26942    // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left: 5}
26943    chartPadding: {
26944      top: 15,
26945      right: 15,
26946      bottom: 5,
26947      left: 10
26948    },
26949    // When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler.
26950    fullWidth: false,
26951    // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
26952    reverseData: false,
26953    // Override the class names that get used to generate the SVG structure of the chart
26954    classNames: {
26955      chart: 'ct-chart-line',
26956      label: 'ct-label',
26957      labelGroup: 'ct-labels',
26958      series: 'ct-series',
26959      line: 'ct-line',
26960      point: 'ct-point',
26961      area: 'ct-area',
26962      grid: 'ct-grid',
26963      gridGroup: 'ct-grids',
26964      gridBackground: 'ct-grid-background',
26965      vertical: 'ct-vertical',
26966      horizontal: 'ct-horizontal',
26967      start: 'ct-start',
26968      end: 'ct-end'
26969    }
26970  };
26971
26972  /**
26973   * Creates a new chart
26974   *
26975   */
26976  function createChart(options) {
26977    var data = Chartist.normalizeData(this.data, options.reverseData, true);
26978
26979    // Create new svg object
26980    this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart);
26981    // Create groups for labels, grid and series
26982    var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
26983    var seriesGroup = this.svg.elem('g');
26984    var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
26985
26986    var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
26987    var axisX, axisY;
26988
26989    if(options.axisX.type === undefined) {
26990      axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
26991        ticks: data.normalized.labels,
26992        stretch: options.fullWidth
26993      }));
26994    } else {
26995      axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
26996    }
26997
26998    if(options.axisY.type === undefined) {
26999      axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
27000        high: Chartist.isNumeric(options.high) ? options.high : options.axisY.high,
27001        low: Chartist.isNumeric(options.low) ? options.low : options.axisY.low
27002      }));
27003    } else {
27004      axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
27005    }
27006
27007    axisX.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
27008    axisY.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
27009
27010    if (options.showGridBackground) {
27011      Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
27012    }
27013
27014    // Draw the series
27015    data.raw.series.forEach(function(series, seriesIndex) {
27016      var seriesElement = seriesGroup.elem('g');
27017
27018      // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
27019      seriesElement.attr({
27020        'ct:series-name': series.name,
27021        'ct:meta': Chartist.serialize(series.meta)
27022      });
27023
27024      // Use series class from series data or if not set generate one
27025      seriesElement.addClass([
27026        options.classNames.series,
27027        (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
27028      ].join(' '));
27029
27030      var pathCoordinates = [],
27031        pathData = [];
27032
27033      data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
27034        var p = {
27035          x: chartRect.x1 + axisX.projectValue(value, valueIndex, data.normalized.series[seriesIndex]),
27036          y: chartRect.y1 - axisY.projectValue(value, valueIndex, data.normalized.series[seriesIndex])
27037        };
27038        pathCoordinates.push(p.x, p.y);
27039        pathData.push({
27040          value: value,
27041          valueIndex: valueIndex,
27042          meta: Chartist.getMetaData(series, valueIndex)
27043        });
27044      }.bind(this));
27045
27046      var seriesOptions = {
27047        lineSmooth: Chartist.getSeriesOption(series, options, 'lineSmooth'),
27048        showPoint: Chartist.getSeriesOption(series, options, 'showPoint'),
27049        showLine: Chartist.getSeriesOption(series, options, 'showLine'),
27050        showArea: Chartist.getSeriesOption(series, options, 'showArea'),
27051        areaBase: Chartist.getSeriesOption(series, options, 'areaBase')
27052      };
27053
27054      var smoothing = typeof seriesOptions.lineSmooth === 'function' ?
27055        seriesOptions.lineSmooth : (seriesOptions.lineSmooth ? Chartist.Interpolation.monotoneCubic() : Chartist.Interpolation.none());
27056      // Interpolating path where pathData will be used to annotate each path element so we can trace back the original
27057      // index, value and meta data
27058      var path = smoothing(pathCoordinates, pathData);
27059
27060      // If we should show points we need to create them now to avoid secondary loop
27061      // Points are drawn from the pathElements returned by the interpolation function
27062      // Small offset for Firefox to render squares correctly
27063      if (seriesOptions.showPoint) {
27064
27065        path.pathElements.forEach(function(pathElement) {
27066          var point = seriesElement.elem('line', {
27067            x1: pathElement.x,
27068            y1: pathElement.y,
27069            x2: pathElement.x + 0.01,
27070            y2: pathElement.y
27071          }, options.classNames.point).attr({
27072            'ct:value': [pathElement.data.value.x, pathElement.data.value.y].filter(Chartist.isNumeric).join(','),
27073            'ct:meta': Chartist.serialize(pathElement.data.meta)
27074          });
27075
27076          this.eventEmitter.emit('draw', {
27077            type: 'point',
27078            value: pathElement.data.value,
27079            index: pathElement.data.valueIndex,
27080            meta: pathElement.data.meta,
27081            series: series,
27082            seriesIndex: seriesIndex,
27083            axisX: axisX,
27084            axisY: axisY,
27085            group: seriesElement,
27086            element: point,
27087            x: pathElement.x,
27088            y: pathElement.y
27089          });
27090        }.bind(this));
27091      }
27092
27093      if(seriesOptions.showLine) {
27094        var line = seriesElement.elem('path', {
27095          d: path.stringify()
27096        }, options.classNames.line, true);
27097
27098        this.eventEmitter.emit('draw', {
27099          type: 'line',
27100          values: data.normalized.series[seriesIndex],
27101          path: path.clone(),
27102          chartRect: chartRect,
27103          index: seriesIndex,
27104          series: series,
27105          seriesIndex: seriesIndex,
27106          seriesMeta: series.meta,
27107          axisX: axisX,
27108          axisY: axisY,
27109          group: seriesElement,
27110          element: line
27111        });
27112      }
27113
27114      // Area currently only works with axes that support a range!
27115      if(seriesOptions.showArea && axisY.range) {
27116        // If areaBase is outside the chart area (< min or > max) we need to set it respectively so that
27117        // the area is not drawn outside the chart area.
27118        var areaBase = Math.max(Math.min(seriesOptions.areaBase, axisY.range.max), axisY.range.min);
27119
27120        // We project the areaBase value into screen coordinates
27121        var areaBaseProjected = chartRect.y1 - axisY.projectValue(areaBase);
27122
27123        // In order to form the area we'll first split the path by move commands so we can chunk it up into segments
27124        path.splitByCommand('M').filter(function onlySolidSegments(pathSegment) {
27125          // We filter only "solid" segments that contain more than one point. Otherwise there's no need for an area
27126          return pathSegment.pathElements.length > 1;
27127        }).map(function convertToArea(solidPathSegments) {
27128          // Receiving the filtered solid path segments we can now convert those segments into fill areas
27129          var firstElement = solidPathSegments.pathElements[0];
27130          var lastElement = solidPathSegments.pathElements[solidPathSegments.pathElements.length - 1];
27131
27132          // Cloning the solid path segment with closing option and removing the first move command from the clone
27133          // We then insert a new move that should start at the area base and draw a straight line up or down
27134          // at the end of the path we add an additional straight line to the projected area base value
27135          // As the closing option is set our path will be automatically closed
27136          return solidPathSegments.clone(true)
27137            .position(0)
27138            .remove(1)
27139            .move(firstElement.x, areaBaseProjected)
27140            .line(firstElement.x, firstElement.y)
27141            .position(solidPathSegments.pathElements.length + 1)
27142            .line(lastElement.x, areaBaseProjected);
27143
27144        }
27144).forEach(function createArea(areaPath) {
27145          // For each of our newly created area paths, we'll now create path elements by stringifying our path objects
27146          // and adding the created DOM elements to the correct series group
27147          var area = seriesElement.elem('path', {
27148            d: areaPath.stringify()
27149          }, options.classNames.area, true);
27150
27151          // Emit an event for each area that was drawn
27152          this.eventEmitter.emit('draw', {
27153            type: 'area',
27154            values: data.normalized.series[seriesIndex],
27155            path: areaPath.clone(),
27156            series: series,
27157            seriesIndex: seriesIndex,
27158            axisX: axisX,
27159            axisY: axisY,
27160            chartRect: chartRect,
27161            index: seriesIndex,
27162            group: seriesElement,
27163            element: area
27164          });
27165        }.bind(this));
27166      }
27167    }.bind(this));
27168
27169    this.eventEmitter.emit('created', {
27170      bounds: axisY.bounds,
27171      chartRect: chartRect,
27172      axisX: axisX,
27173      axisY: axisY,
27174      svg: this.svg,
27175      options: options
27176    });
27177  }
27178
27179  /**
27180   * This method creates a new line chart.
27181   *
27182   * @memberof Chartist.Line
27183   * @param {String|Node} query A selector query string or directly a DOM element
27184   * @param {Object} data The data object that needs to consist of a labels and a series array
27185   * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
27186   * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
27187   * @return {Object} An object which exposes the API for the created chart
27188   *
27189   * @example
27190   * // Create a simple line chart
27191   * var data = {
27192   *   // A labels array that can contain any sort of values
27193   *   labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
27194   *   // Our series array that contains series objects or in this case series data arrays
27195   *   series: [
27196   *     [5, 2, 4, 2, 0]
27197   *   ]
27198   * };
27199   *
27200   * // As options we currently only set a static size of 300x200 px
27201   * var options = {
27202   *   width: '300px',
27203   *   height: '200px'
27204   * };
27205   *
27206   * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options
27207   * new Chartist.Line('.ct-chart', data, options);
27208   *
27209   * @example
27210   * // Use specific interpolation function with configuration from the Chartist.Interpolation module
27211   *
27212   * var chart = new Chartist.Line('.ct-chart', {
27213   *   labels: [1, 2, 3, 4, 5],
27214   *   series: [
27215   *     [1, 1, 8, 1, 7]
27216   *   ]
27217   * }, {
27218   *   lineSmooth: Chartist.Interpolation.cardinal({
27219   *     tension: 0.2
27220   *   })
27221   * });
27222   *
27223   * @example
27224   * // Create a line chart with responsive options
27225   *
27226   * var data = {
27227   *   // A labels array that can contain any sort of values
27228   *   labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
27229   *   // Our series array that contains series objects or in this case series data arrays
27230   *   series: [
27231   *     [5, 2, 4, 2, 0]
27232   *   ]
27233   * };
27234   *
27235   * // In addition to the regular options we specify responsive option overrides that will override the default configutation based on the matching media queries.
27236   * var responsiveOptions = [
27237   *   ['screen and (min-width: 641px) and (max-width: 1024px)', {
27238   *     showPoint: false,
27239   *     axisX: {
27240   *       labelInterpolationFnc: function(value) {
27241   *         // Will return Mon, Tue, Wed etc. on medium screens
27242   *         return value.slice(0, 3);
27243   *       }
27244   *     }
27245   *   }],
27246   *   ['screen and (max-width: 640px)', {
27247   *     showLine: false,
27248   *     axisX: {
27249   *       labelInterpolationFnc: function(value) {
27250   *         // Will return M, T, W etc. on small screens
27251   *         return value[0];
27252   *       }
27253   *     }
27254   *   }]
27255   * ];
27256   *
27257   * new Chartist.Line('.ct-chart', data, null, responsiveOptions);
27258   *
27259   */
27260  function Line(query, data, options, responsiveOptions) {
27261    Chartist.Line.super.constructor.call(this,
27262      query,
27263      data,
27264      defaultOptions,
27265      Chartist.extend({}, defaultOptions, options),
27266      responsiveOptions);
27267  }
27268
27269  // Creating line chart type in Chartist namespace
27270  Chartist.Line = Chartist.Base.extend({
27271    constructor: Line,
27272    createChart: createChart
27273  });
27274
27275}(this || global, Chartist));
27276;/**
27277 * The bar chart module of Chartist that can be used to draw unipolar or bipolar bar and grouped bar charts.
27278 *
27279 * @module Chartist.Bar
27280 */
27281/* global Chartist */
27282(function(globalRoot, Chartist){
27283  'use strict';
27284
27285  var window = globalRoot.window;
27286  var document = globalRoot.document;
27287
27288  /**
27289   * Default options in bar charts. Expand the code view to see a detailed list of options with comments.
27290   *
27291   * @memberof Chartist.Bar
27292   */
27293  var defaultOptions = {
27294    // Options for X-Axis
27295    axisX: {
27296      // The offset of the chart drawing area to the border of the container
27297      offset: 30,
27298      // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
27299      position: 'end',
27300      // Allows you to correct label positioning on this axis by positive or negative x and y offset.
27301      labelOffset: {
27302        x: 0,
27303        y: 0
27304      },
27305      // If labels should be shown or not
27306      showLabel: true,
27307      // If the axis grid should be drawn or not
27308      showGrid: true,
27309      // Interpolation function that allows you to intercept the value from the axis label
27310      labelInterpolationFnc: Chartist.noop,
27311      // This value specifies the minimum width in pixel of the scale steps
27312      scaleMinSpace: 30,
27313      // Use only integer values (whole numbers) for the scale steps
27314      onlyInteger: false
27315    },
27316    // Options for Y-Axis
27317    axisY: {
27318      // The offset of the chart drawing area to the border of the container
27319      offset: 40,
27320      // Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis and `end` is equivalent to right or bottom on horizontal axis.
27321      position: 'start',
27322      // Allows you to correct label positioning on this axis by positive or negative x and y offset.
27323      labelOffset: {
27324        x: 0,
27325        y: 0
27326      },
27327      // If labels should be shown or not
27328      showLabel: true,
27329      // If the axis grid should be drawn or not
27330      showGrid: true,
27331      // Interpolation function that allows you to intercept the value from the axis label
27332      labelInterpolationFnc: Chartist.noop,
27333      // This value specifies the minimum height in pixel of the scale steps
27334      scaleMinSpace: 20,
27335      // Use only integer values (whole numbers) for the scale steps
27336      onlyInteger: false
27337    },
27338    // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
27339    width: undefined,
27340    // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
27341    height: undefined,
27342    // Overriding the natural high of the chart allows you to zoom in or limit the charts highest displayed value
27343    high: undefined,
27344    // Overriding the natural low of the chart allows you to zoom in or limit the charts lowest displayed value
27345    low: undefined,
27346    // Unless low/high are explicitly set, bar chart will be centered at zero by default. Set referenceValue to null to auto scale.
27347    referenceValue: 0,
27348    // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left
27348: 5}
27349    chartPadding: {
27350      top: 15,
27351      right: 15,
27352      bottom: 5,
27353      left: 10
27354    },
27355    // Specify the distance in pixel of bars in a group
27356    seriesBarDistance: 15,
27357    // If set to true this property will cause the series bars to be stacked. Check the `stackMode` option for further stacking options.
27358    stackBars: false,
27359    // If set to 'overlap' this property will force the stacked bars to draw from the zero line.
27360    // If set to 'accumulate' this property will form a total for each series point. This will also influence the y-axis and the overall bounds of the chart. In stacked mode the seriesBarDistance property will have no effect.
27361    stackMode: 'accumulate',
27362    // Inverts the axes of the bar chart in order to draw a horizontal bar chart. Be aware that you also need to invert your axis settings as the Y Axis will now display the labels and the X Axis the values.
27363    horizontalBars: false,
27364    // If set to true then each bar will represent a series and the data array is expected to be a one dimensional array of data values rather than a series array of series. This is useful if the bar chart should represent a profile rather than some data over time.
27365    distributeSeries: false,
27366    // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
27367    reverseData: false,
27368    // If the bar chart should add a background fill to the .ct-grids group.
27369    showGridBackground: false,
27370    // Override the class names that get used to generate the SVG structure of the chart
27371    classNames: {
27372      chart: 'ct-chart-bar',
27373      horizontalBars: 'ct-horizontal-bars',
27374      label: 'ct-label',
27375      labelGroup: 'ct-labels',
27376      series: 'ct-series',
27377      bar: 'ct-bar',
27378      grid: 'ct-grid',
27379      gridGroup: 'ct-grids',
27380      gridBackground: 'ct-grid-background',
27381      vertical: 'ct-vertical',
27382      horizontal: 'ct-horizontal',
27383      start: 'ct-start',
27384      end: 'ct-end'
27385    }
27386  };
27387
27388  /**
27389   * Creates a new chart
27390   *
27391   */
27392  function createChart(options) {
27393    var data;
27394    var highLow;
27395
27396    if(options.distributeSeries) {
27397      data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
27398      data.normalized.series = data.normalized.series.map(function(value) {
27399        return [value];
27400      });
27401    } else {
27402      data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');
27403    }
27404
27405    // Create new svg element
27406    this.svg = Chartist.createSvg(
27407      this.container,
27408      options.width,
27409      options.height,
27410      options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')
27411    );
27412
27413    // Drawing groups in correct order
27414    var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);
27415    var seriesGroup = this.svg.elem('g');
27416    var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);
27417
27418    if(options.stackBars && data.normalized.series.length !== 0) {
27419
27420      // If stacked bars we need to calculate the high low from stacked values from each series
27421      var serialSums = Chartist.serialMap(data.normalized.series, function serialSums() {
27422        return Array.prototype.slice.call(arguments).map(function(value) {
27423          return value;
27424        }).reduce(function(prev, curr) {
27425          return {
27426            x: prev.x + (curr && curr.x) || 0,
27427            y: prev.y + (curr && curr.y) || 0
27428          };
27429        }, {x: 0, y: 0});
27430      });
27431
27432      highLow = Chartist.getHighLow([serialSums], options, options.horizontalBars ? 'x' : 'y');
27433
27434    } else {
27435
27436      highLow = Chartist.getHighLow(data.normalized.series, options, options.horizontalBars ? 'x' : 'y');
27437    }
27438
27439    // Overrides of high / low from settings
27440    highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);
27441    highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);
27442
27443    var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
27444
27445    var valueAxis,
27446      labelAxisTicks,
27447      labelAxis,
27448      axisX,
27449      axisY;
27450
27451    // We need to set step count based on some options combinations
27452    if(options.distributeSeries && options.stackBars) {
27453      // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should
27454      // use only the first label for the step axis
27455      labelAxisTicks = data.normalized.labels.slice(0, 1);
27456    } else {
27457      // If distributed series are enabled but stacked bars aren't, we should use the series labels
27458      // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array
27459      // as the bars are normalized
27460      labelAxisTicks = data.normalized.labels;
27461    }
27462
27463    // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.
27464    if(options.horizontalBars) {
27465      if(options.axisX.type === undefined) {
27466        valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
27467          highLow: highLow,
27468          referenceValue: 0
27469        }));
27470      } else {
27471        valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {
27472          highLow: highLow,
27473          referenceValue: 0
27474        }));
27475      }
27476
27477      if(options.axisY.type === undefined) {
27478        labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, {
27479          ticks: labelAxisTicks
27480        });
27481      } else {
27482        labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);
27483      }
27484    } else {
27485      if(options.axisX.type === undefined) {
27486        labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, {
27487          ticks: labelAxisTicks
27488        });
27489      } else {
27490        labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);
27491      }
27492
27493      if(options.axisY.type === undefined) {
27494        valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
27495          highLow: highLow,
27496          referenceValue: 0
27497        }));
27498      } else {
27499        valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {
27500          highLow: highLow,
27501          referenceValue: 0
27502        }));
27503      }
27504    }
27505
27506    // Projected 0 point
27507    var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.project
27507Value(0)) : (chartRect.y1 - valueAxis.projectValue(0));
27508    // Used to track the screen coordinates of stacked bars
27509    var stackedBarValues = [];
27510
27511    labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
27512    valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);
27513
27514    if (options.showGridBackground) {
27515      Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
27516    }
27517
27518    // Draw the series
27519    data.raw.series.forEach(function(series, seriesIndex) {
27520      // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.
27521      var biPol = seriesIndex - (data.raw.series.length - 1) / 2;
27522      // Half of the period width between vertical grid lines used to position bars
27523      var periodHalfLength;
27524      // Current series SVG element
27525      var seriesElement;
27526
27527      // We need to set periodHalfLength based on some options combinations
27528      if(options.distributeSeries && !options.stackBars) {
27529        // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array
27530        // which is the series count and divide by 2
27531        periodHalfLength = labelAxis.axisLength / data.normalized.series.length / 2;
27532      } else if(options.distributeSeries && options.stackBars) {
27533        // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis
27534        // length by 2
27535        periodHalfLength = labelAxis.axisLength / 2;
27536      } else {
27537        // On regular bar charts we should just use the series length
27538        periodHalfLength = labelAxis.axisLength / data.normalized.series[seriesIndex].length / 2;
27539      }
27540
27541      // Adding the series group to the series element
27542      seriesElement = seriesGroup.elem('g');
27543
27544      // Write attributes to series group element. If series name or meta is undefined the attributes will not be written
27545      seriesElement.attr({
27546        'ct:series-name': series.name,
27547        'ct:meta': Chartist.serialize(series.meta)
27548      });
27549
27550      // Use series class from series data or if not set generate one
27551      seriesElement.addClass([
27552        options.classNames.series,
27553        (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))
27554      ].join(' '));
27555
27556      data.normalized.series[seriesIndex].forEach(function(value, valueIndex) {
27557        var projected,
27558          bar,
27559          previousStack,
27560          labelAxisValueIndex;
27561
27562        // We need to set labelAxisValueIndex based on some options combinations
27563        if(options.distributeSeries && !options.stackBars) {
27564          // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection
27565          // on the step axis for label positioning
27566          labelAxisValueIndex = seriesIndex;
27567        } else if(options.distributeSeries && options.stackBars) {
27568          // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use
27569          // 0 for projection on the label step axis
27570          labelAxisValueIndex = 0;
27571        } else {
27572          // On regular bar charts we just use the value index to project on the label step axis
27573          labelAxisValueIndex = valueIndex;
27574        }
27575
27576        // We need to transform coordinates differently based on the chart layout
27577        if(options.horizontalBars) {
27578          projected = {
27579            x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized.series[seriesIndex]),
27580            y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized.series[seriesIndex])
27581          };
27582        } else {
27583          projected = {
27584            x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized.series[seriesIndex]),
27585            y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized.series[seriesIndex])
27586          }
27587        }
27588
27589        // If the label axis is a step based axis we will offset the bar into the middle of between two steps using
27590        // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using
27591        // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not
27592        // add any automated positioning.
27593        if(labelAxis instanceof Chartist.StepAxis) {
27594          // Offset to center bar between grid lines, but only if the step axis is not stretched
27595          if(!labelAxis.options.stretch) {
27596            projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);
27597          }
27598          // Using bi-polar offset for multiple series if no stacked bars or series distribution is used
27599          projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);
27600        }
27601
27602        // Enter value in stacked bar values used to remember previous screen value for stacking up bars
27603        previousStack = stackedBarValues[valueIndex] || zeroPoint;
27604        stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);
27605
27606        // Skip if value is undefined
27607        if(value === undefined) {
27608          return;
27609        }
27610
27611        var positions = {};
27612        positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];
27613        positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];
27614
27615        if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {
27616          // Stack mode: accumulate (default)
27617          // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line
27618          // We want backwards compatibility, so the expected fallback without the 'stackMode' option
27619          // to be the original behaviour (accumulate)
27620          positions[labelAxis.counterUnits.pos + '1'] = previousStack;
27621          positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];
27622        } else {
27623          // Draw from the zero line normally
27624          // This is also the same code for Stack mode: overlap
27625          positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;
27626          positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];
27627        }
27628
27629        // Limit x and y so that they are within the chart rect
27630        positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);
27631        positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);
27632        positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);
27633        positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);
27634
27635        var metaData = Chartist.getMetaData(series, valueIndex);
27636
27637        // Create bar element
27638        bar = seriesElement.elem('line', positions, options.classNames.bar).attr({
27639          'ct:value': [value.x, value.y].filter(Chartist.isNumeric).join(','),
27640          'ct:meta': Chartist.serialize(metaData)
27641        });
27642
27643        this.eventEmitter.emit('draw', Chartist.extend({
27644          type: 'bar',
27645          value: value,
27646          index: valueIndex,
27647          meta: metaData,
27648          series: series,
27649          seriesIndex: seriesIndex,
27650          axisX: axisX,
27651          axisY: axisY,
27652          chartRect: chartRect,
27653          group: seriesElement,
27654          element: bar
27655        }, positions));
27656      }.bind(this));
27657    }.bind(this));
27658
27659    this.eventEmitter.emit('created', {
27660      bounds: valueAxis.bounds,
27661      chartRect: chartRect,
27662      axisX: axisX,
27663      axisY: axisY,
27664      svg: this.svg,
27665      options: options
27666    });
27667  }
27668
27669  /**
27670   * This method creates a new bar chart and returns API object that you can use for later changes.
27671   *
27672   * @memberof Chartist.Bar
27673   * @param {String|Node} query A selector query string or directly a DOM element
27674   * @param {Object} data The data object that needs to consist of a labels and a series array
27675   * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
27676   * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
27677   * @return {Object} An object which exposes the API for the created chart
27678   *
27679   * @example
27680   * // Create a simple bar chart
27681   * var data = {
27682   *   labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
27683   *   series: [
27684   *     [5, 2, 4, 2, 0]
27685   *   ]
27686   * };
27687   *
27688   * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
27689   * new Chartist.Bar('.ct-chart', data);
27690   *
27691   * @example
27692   * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10
27693   * new Chartist.Bar('.ct-chart', {
27694   *   labels: [1, 2, 3, 4, 5, 6, 7],
27695   *   series: [
27696   *     [1, 3, 2, -5, -3, 1, -6],
27697   *     [-5, -2, -4, -1, 2, -3, 1]
27698   *   ]
27699   * }, {
27700   *   seriesBarDistance: 12,
27701   *   low: -10,
27702   *   high: 10
27703   * });
27704   *
27705   */
27706  function Bar(query, data, options, responsiveOptions) {
27707    Chartist.Bar.super.constructor.call(this,
27708      query,
27709      data,
27710      defaultOptions,
27711      Chartist.extend({}, defaultOptions, options),
27712      responsiveOptions);
27713  }
27714
27715  // Creating bar chart type in Chartist namespace
27716  Chartist.Bar = Chartist.Base.extend({
27717    constructor: Bar,
27718    createChart: createChart
27719  });
27720
27721}(this || global, Chartist));
27722;/**
27723 * The pie chart module of Chartist that can be used to draw pie, donut or gauge charts
27724 *
27725 * @module Chartist.Pie
27726 */
27727/* global Chartist */
27728(function(globalRoot, Chartist) {
27729  'use strict';
27730
27731  var window = globalRoot.window;
27732  var document = globalRoot.document;
27733
27734  /**
27735   * Default options in line charts. Expand the code view to see a detailed list of options with comments.
27736   *
27737   * @memberof Chartist.Pie
27738   */
27739  var defaultOptions = {
27740    // Specify a fixed width for the chart as a string (i.e. '100px' or '50%')
27741    width: undefined,
27742    // Specify a fixed height for the chart as a string (i.e. '100px' or '50%')
27743    height: undefined,
27744    // Padding of the chart drawing area to the container element and labels as a number or padding object {top: 5, right: 5, bottom: 5, left
27744: 5}
27745    chartPadding: 5,
27746    // Override the class names that are used to generate the SVG structure of the chart
27747    classNames: {
27748      chartPie: 'ct-chart-pie',
27749      chartDonut: 'ct-chart-donut',
27750      series: 'ct-series',
27751      slicePie: 'ct-slice-pie',
27752      sliceDonut: 'ct-slice-donut',
27753      sliceDonutSolid: 'ct-slice-donut-solid',
27754      label: 'ct-label'
27755    },
27756    // The start angle of the pie chart in degrees where 0 points north. A higher value offsets the start angle clockwise.
27757    startAngle: 0,
27758    // An optional total you can specify. By specifying a total value, the sum of the values in the series must be this total in order to draw a full pie. You can use this parameter to draw only parts of a pie or gauge charts.
27759    total: undefined,
27760    // If specified the donut CSS classes will be used and strokes will be drawn instead of pie slices.
27761    donut: false,
27762    // If specified the donut segments will be drawn as shapes instead of strokes.
27763    donutSolid: false,
27764    // Specify the donut stroke width, currently done in javascript for convenience. May move to CSS styles in the future.
27765    // This option can be set as number or string to specify a relative width (i.e. 100 or '30%').
27766    donutWidth: 60,
27767    // If a label should be shown or not
27768    showLabel: true,
27769    // Label position offset from the standard position which is half distance of the radius. This value can be either positive or negative. Positive values will position the label away from the center.
27770    labelOffset: 0,
27771    // This option can be set to 'inside', 'outside' or 'center'. Positioned with 'inside' the labels will be placed on half the distance of the radius to the border of the Pie by respecting the 'labelOffset'. The 'outside' option will place the labels at the border of the pie and 'center' will place the labels in the absolute center point of the chart. The 'center' option only makes sense in conjunction with the 'labelOffset' option.
27772    labelPosition: 'inside',
27773    // An interpolation function for the label value
27774    labelInterpolationFnc: Chartist.noop,
27775    // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
27776    labelDirection: 'neutral',
27777    // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
27778    reverseData: false,
27779    // If true empty values will be ignored to avoid drawing unncessary slices and labels
27780    ignoreEmptyValues: false
27781  };
27782
27783  /**
27784   * Determines SVG anchor position based on direction and center parameter
27785   *
27786   * @param center
27787   * @param label
27788   * @param direction
27789   * @return {string}
27790   */
27791  function determineAnchorPosition(center, label, direction) {
27792    var toTheRight = label.x > center.x;
27793
27794    if(toTheRight && direction === 'explode' ||
27795      !toTheRight && direction === 'implode') {
27796      return 'start';
27797    } else if(toTheRight && direction === 'implode' ||
27798      !toTheRight && direction === 'explode') {
27799      return 'end';
27800    } else {
27801      return 'middle';
27802    }
27803  }
27804
27805  /**
27806   * Creates the pie chart
27807   *
27808   * @param options
27809   */
27810  function createChart(options) {
27811    var data = Chartist.normalizeData(this.data);
27812    var seriesGroups = [],
27813      labelsGroup,
27814      chartRect,
27815      radius,
27816      labelRadius,
27817      totalDataSum,
27818      startAngle = options.startAngle;
27819
27820    // Create SVG.js draw
27821    this.svg = Chartist.createSvg(this.container, options.width, options.height,options.donut ? options.classNames.chartDonut : options.classNames.chartPie);
27822    // Calculate charting rect
27823    chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);
27824    // Get biggest circle radius possible within chartRect
27825    radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);
27826    // Calculate total of all series to get reference value or use total reference from optional options
27827    totalDataSum = options.total || data.normalized.series.reduce(function(previousValue, currentValue) {
27828      return previousValue + currentValue;
27829    }, 0);
27830
27831    var donutWidth = Chartist.quantity(options.donutWidth);
27832    if (donutWidth.unit === '%') {
27833      donutWidth.value *= radius / 100;
27834    }
27835
27836    // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside
27837    // Unfortunately this is not possible with the current SVG Spec
27838    // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html
27839    radius -= options.donut && !options.donutSolid ? donutWidth.value / 2  : 0;
27840
27841    // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,
27842    // if regular pie chart it's half of the radius
27843    if(options.labelPosition === 'outside' || options.donut && !options.donutSolid) {
27844      labelRadius = radius;
27845    } else if(options.labelPosition === 'center') {
27846      // If labelPosition is center we start with 0 and will later wait for the labelOffset
27847      labelRadius = 0;
27848    } else if(options.donutSolid) {
27849      labelRadius = radius - donutWidth.value / 2;
27850    } else {
27851      // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie
27852      // slice
27853      labelRadius = radius / 2;
27854    }
27855    // Add the offset to the labelRadius where a negative offset means closed to the center of the chart
27856    labelRadius += options.labelOffset;
27857
27858    // Calculate end angle based on total sum and current data value and offset with padding
27859    var center = {
27860      x: chartRect.x1 + chartRect.width() / 2,
27861      y: chartRect.y2 + chartRect.height() / 2
27862    };
27863
27864    // Check if there is only one non-zero value in the series array.
27865    var hasSingleValInSeries = data.raw.series.filter(function(val) {
27866      return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;
27867    }).length === 1;
27868
27869    // Creating the series groups
27870    data.raw.series.forEach(function(series, index) {
27871      seriesGroups[index] = this.svg.elem('g', null, null);
27872    }.bind(this));
27873    //if we need to show labels we create the label group now
27874    if(options.showLabel) {
27875      labelsGroup = this.svg.elem('g', null, null);
27876    }
27877
27878    // Draw the series
27879    // initialize series groups
27880    data.raw.series.forEach(function(series, index) {
27881      // If current value is zero and we are ignoring empty values then skip to next value
27882      if (data.normalized.series[index] === 0 && options.ignoreEmptyValues) return;
27883
27884      // If the series is an object and contains a name or meta data we add a custom attribute
27885      seriesGroups[index].attr({
27886        'ct:series-name': series.name
27887      });
27888
27889      // Use series class from series data or if not set generate one
27890      seriesGroups[index].addClass([
27891        options.classNames.series,
27892        (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(index))
27893      ].join(' '));
27894
27895      // If the whole dataset is 0 endAngle should be zero. Can't divide by 0.
27896      var endAngle = (totalDataSum > 0 ? startAngle + data.normalized.series[index] / totalDataSum * 360 : 0);
27897
27898      // Use slight offset so there are no transparent hairline issues
27899      var overlappigStartAngle = Math.max(0, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
27900
27901      // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle
27902      // with Z and use 359.99 degrees
27903      if(endAngle - overlappigStartAngle >= 359.99) {
27904        endAngle = overlappigStartAngle + 359.99;
27905      }
27906
27907      var start = Chartist.polarToCartesian(center.x, center.y, radius, overlappigStartAngle),
27908        end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);
27909
27910      var innerStart,
27911        innerEnd,
27912        donutSolidRadius;
27913
27914      // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke
27915      var path = new Chartist.Svg.Path(!options.donut || options.donutSolid)
27916        .move(end.x, end.y)
27917        .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);
27918
27919      // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie
27920      if(!options.donut) {
27921        path.line(center.x, center.y);
27922      } else if (options.donutSolid) {
27923        donutSolidRadius = radius - donutWidth.value;
27924        innerStart = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, startAngle - (index === 0 || hasSingleValInSeries ? 0 : 0.2));
27925        innerEnd = Chartist.polarToCartesian(center.x, center.y, donutSolidRadius, endAngle);
27926        path.line(innerStart.x, innerStart.y);
27927        path.arc(donutSolidRadius, donutSolidRadius, 0, endAngle - startAngle  > 180, 1, innerEnd.x, innerEnd.y);
27928      }
27929
27930      // Create the SVG path
27931      // If this is a donut chart we add the donut class, otherwise just a regular slice
27932      var pathClassName = options.classNames.slicePie;
27933      if (options.donut) {
27934        pathClassName = options.classNames.sliceDonut;
27935        if (options.donutSolid) {
27936          pathClassName = options.classNames.sliceDonutSolid;
27937        }
27938      }
27939      var pathElement = seriesGroups[index].elem('path', {
27940        d: path.stringify()
27941      }, pathClassName);
27942
27943      // Adding the pie series value to the path
27944      pathElement.attr({
27945        'ct:value': data.normalized.series[index],
27946        'ct:meta': Chartist.serialize(series.meta)
27947      });
27948
27949      // If this is a donut, we add the stroke-width as style attribute
27950      if(options.donut && !options.donutSolid) {
27951        pathElement._node.style.strokeWidth = donutWidth.value + 'px';
27952      }
27953
27954      // Fire off draw event
27955      this.eventEmitter.emit('draw', {
27956        type: 'slice',
27957        value: data.normalized.series[index],
27958        totalDataSum: totalDataSum,
27959        index: index,
27960        meta: series.meta,
27961        series: series,
27962        group: seriesGroups[index],
27963        element: pathElement,
27964        path: path.clone(),
27965        center: center,
27966        radius: radius,
27967        startAngle: startAngle,
27968        endAngle: endAngle
27969      });
27970
27971      // If we need to show labels we need to add the label for this slice now
27972      if(options.showLabel) {
27973        var labelPosition;
27974        if(data.raw.series.length === 1) {
27975          // If we have only 1 series, we can position the label in the center of the pie
27976          labelPosition = {
27977            x: center.x,
27978            y: center.y
27979          };
27980        } else {
27981          // Position at the labelRadius distance from center and between start and end angle
27982          labelPosition = Chartist.polarToCartesian(
27983            center.x,
27984            center.y,
27985            labelRadius,
27986            startAngle + (endAngle - startAngle) / 2
27987          );
27988        }
27989
27990        var rawValue;
27991        if(data.normalized.labels && !Chartist.isFalseyButZero(data.normalized.labels[index])) {
27992          rawValue = data.normalized.labels[index];
27993        } else {
27994          rawValue = data.normalized.series[index];
27995        }
27996
27997        var interpolatedValue = options.labelInterpolationFnc(rawValue, index);
27998
27999        if(interpolatedValue || interpolatedValue === 0) {
28000          var labelElement = labelsGroup.elem('text', {
28001            dx: labelPosition.x,
28002            dy: labelPosition.y,
28003            'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)
28004          }, options.classNames.label).text('' + interpolatedValue);
28005
28006          // Fire off draw event
28007          this.eventEmitter.emit('draw', {
28008            type: 'label',
28009            index: index,
28010            group: labelsGroup,
28011            element: labelElement,
28012            text: '' + interpolatedValue,
28013            x: labelPosition.x,
28014            y: labelPosition.y
28015          });
28016        }
28017      }
28018
28019      // Set next startAngle to current endAngle.
28020      // (except for last slice)
28021      startAngle = endAngle;
28022    }.bind(this));
28023
28024    this.eventEmitter.emit('created', {
28025      chartRect: chartRect,
28026      svg: this.svg,
28027      options: options
28028    });
28029  }
28030
28031  /**
28032   * This method creates a new pie chart and returns an object that can be used to redraw the chart.
28033   *
28034   * @memberof Chartist.Pie
28035   * @param {String|Node} query A selector query string or directly a DOM element
28036   * @param {Object} data The data object in the pie chart needs to have a series property with a one dimensional data array. The values will be normalized against each other and don't necessarily need to be in percentage. The series property can also be an array of value objects that contain a value property and a className property to override the CSS class name for the series group.
28037   * @param {Object} [options] The options object with options that override the default options. Check the examples for a detailed list.
28038   * @param {Array} [responsiveOptions] Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
28039   * @return {Object} An object with a version and an update method to manually redraw the chart
28040   *
28041   * @example
28042   * // Simple pie chart example with four series
28043   * new Chartist.Pie('.ct-chart', {
28044   *   series: [10, 2, 4, 3]
28045   * });
28046   *
28047   * @example
28048   * // Drawing a donut chart
28049   * new Chartist.Pie('.ct-chart', {
28050   *   series: [10, 2, 4, 3]
28051   * }, {
28052   *   donut: true
28053   * });
28054   *
28055   * @example
28056   * // Using donut, startAngle and total to draw a gauge chart
28057   * new Chartist.Pie('.ct-chart', {
28058   *   series: [20, 10, 30, 40]
28059   * }, {
28060   *   donut: true,
28061   *   donutWidth: 20,
28062   *   startAngle: 270,
28063   *   total: 200
28064   * });
28065   *
28066   * @example
28067   * // Drawing a pie chart with padding and labels that are outside the pie
28068   * new Chartist.Pie('.ct-chart', {
28069   *   series: [20, 10, 30, 40]
28070   * }, {
28071   *   chartPadding: 30,
28072   *   labelOffset: 50,
28073   *   labelDirection: 'explode'
28074   * });
28075   *
28076   * @example
28077   * // Overriding the class names for individual series as well as a name and meta data.
28078   * // The name will be written as ct:series-name attribute and the meta data will be serialized and written
28079   * // to a ct:meta attribute.
28080   * new Chartist.Pie('.ct-chart', {
28081   *   series: [{
28082   *     value: 20,
28083   *     name: 'Series 1',
28084   *     className: 'my-custom-class-one',
28085   *     meta: 'Meta One'
28086   *   }, {
28087   *     value: 10,
28088   *     name: 'Series 2',
28089   *     className: 'my-custom-class-two',
28090   *     meta: 'Meta Two'
28091   *   }, {
28092   *     value: 70,
28093   *     name: 'Series 3',
28094   *     className: 'my-custom-class-three',
28095   *     meta: 'Meta Three'
28096   *   }]
28097   * });
28098   */
28099  function Pie(query, data, options, responsiveOptions) {
28100    Chartist.Pie.super.constructor.call(this,
28101      query,
28102      data,
28103      defaultOptions,
28104      Chartist.extend({}, defaultOptions, options),
28105      responsiveOptions);
28106  }
28107
28108  // Creating pie chart type in Chartist namespace
28109  Chartist.Pie = Chartist.Base.extend({
28110    constructor: Pie,
28111    createChart: createChart,
28112    determineAnchorPosition: determineAnchorPosition
28113  });
28114
28115}(this || global, Chartist));
28116
28117return Chartist;
28118
28119}));
28120
28121;/*!
28122 * jQuery twitter bootstrap wizard plugin
28123 * Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard
28124 * version 1.0
28125 * Requires jQuery v1.3.2 or later
28126 * Supports Bootstrap 2.2.x, 2.3.x, 3.0
28127 * Dual licensed under the MIT and GPL licenses:
28128 * http://www.opensource.org/licenses/mit-license.php
28129 * http://www.gnu.org/licenses/gpl.html
28130 * Authors: Vadim Vincent Gabriel (http://vadimg.com), Jason Gill (www.gilluminate.com)
28131 */
28132;(function($) {
28133var bootstrapWizardCreate = function(element, options) {
28134	var element = $(element);
28135	var obj = this;
28136	
28137	// selector skips any 'li' elements that do not contain a child with a tab data-toggle
28138	var baseItemSelector = 'li:has([data-toggle="tab"])';
28139	var historyStack = [];
28140
28141	// Merge options with defaults
28142	var $settings = $.extend({}, $.fn.bootstrapWizard.defaults, options);
28143	var $activeTab = null;
28144	var $navigation = null;
28145	
28146	this.rebindClick = function(selector, fn)
28147	{
28148		selector.unbind('click', fn).bind('click', fn);
28149	}
28150
28151	this.fixNavigationButtons = function() {
28152		// Get the current active tab
28153		if(!$activeTab.length) {
28154			// Select first one
28155			$navigation.find('a:first').tab('show');
28156			$activeTab = $navigation.find(baseItemSelector + ':first');
28157		}
28158
28159		// See if we're currently in the first/last then disable the previous and last buttons
28160		$($settings.previousSelector, element).toggleClass('disabled', (obj.firstIndex() >= obj.currentIndex()));
28161		$($settings.nextSelector, element).toggleClass('disabled', (obj.currentIndex() >= obj.navigationLength()));
28162		$($settings.nextSelector, element).toggleClass('hidden', (obj.currentIndex() >= obj.navigationLength() && $($settings.finishSelector, element).length > 0));
28163		$($settings.lastSelector, element).toggleClass('hidden', (obj.currentIndex() >= obj.navigationLength() && $($settings.finishSelector, element).length > 0));
28164		$($settings.finishSelector, element).toggleClass('hidden', (obj.currentIndex() < obj.navigationLength()));
28165		$($settings.backSelector, element).toggleClass('disabled', (historyStack.length == 0));
28166		$($settings.backSelector, element).toggleClass('hidden', (obj.currentIndex() >= obj.navigationLength() && $($settings.finishSelector, element).length > 0));
28167
28168		// We are unbinding and rebinding to ensure single firing and no double-click errors
28169		obj.rebindClick($($settings.nextSelector, element), obj.next);
28170		obj.rebindClick($($settings.previousSelector, element), obj.previous);
28171		obj.rebindClick($($settings.lastSelector, element), obj.last);
28172		obj.rebindClick($($settings.firstSelector, element), obj.first);
28173		obj.rebindClick($($settings.finishSelector, element), obj.finish);
28174		obj.rebindClick($($settings.backSelector, element), obj.back);
28175
28176		if($settings.onTabShow && typeof $settings.onTabShow === 'function' && $settings.onTabShow($activeTab, $navigation, obj.currentIndex())===false){
28177			return false;
28178		}
28179	};
28180
28181	this.next = function(e) {
28182		// If we clicked the last then dont activate this
28183		if(element.hasClass('last')) {
28184			return false;
28185		}
28186
28187		if($settings.onNext && typeof $settings.onNext === 'function' && $settings.onNext($activeTab, $navigation, obj.nextIndex())===false){
28188			return false;
28189		}
28190
28191		var formerIndex = obj.currentIndex();
28192		$index = obj.nextIndex();
28193
28194	  // Did we click the last button
28195		if($index > obj.navigationLength()) {
28196		} else {
28197		  historyStack.push(formerIndex);
28198		  $navigation.find(baseItemSelector + ':eq(' + $index + ') a').tab('show');
28199		}
28200	};
28201
28202	this.previous = function(e) {
28203		// If we clicked the first then dont activate this
28204		if(element.hasClass('first')) {
28205			return false;
28206		}
28207
28208		if($settings.onPrevious && typeof $settings.onPrevious === 'function' && $settings.onPrevious($activeTab, $navigation, obj.previousIndex())===false){
28209			return false;
28210		}
28211
28212		var formerIndex = obj.currentIndex();
28213		$index = obj.previousIndex();
28214
28215		if($index < 0) {
28216		} else {
28217		  historyStack.push(formerIndex);
28218		  $navigation.find(baseItemSelector + ':eq(' + $index + ') a').tab('show');
28219		}
28220	};
28221
28222	this.first = function (e) {
28223		if($settings.onFirst && typeof $settings.onFirst === 'function' && $settings.onFirst($activeTab, $navigation, obj.firstIndex())===false){
28224			return false;
28225		}
28226
28227		// If the element is disabled then we won't do anything
28228		if(element.hasClass('disabled')) {
28229			return false;
28230		}
28231
28232		historyStack.push(obj.currentIndex());
28233		$navigation.find(baseItemSelector + ':eq(0) a').tab('show');
28234	};
28235
28236	this.last = function(e) {
28237		if($settings.onLast && typeof $settings.onLast === 'function' && $settings.onLast($activeTab, $navigation, obj.lastIndex())===false){
28238			return false;
28239		}
28240
28241		// If the element is disabled then we won't do anything
28242		if(element.hasClass('disabled')) {
28243			return false;
28244		}
28245
28246		historyStack.push(obj.currentIndex());
28247		$navigation.find(baseItemSelector + ':eq(' + obj.navigationLength() + ') a').tab('show');
28248	};
28249
28250	this.finish = function (e) {
28251	  if ($settings.onFinish && typeof $settings.onFinish === 'function') {
28252	    $settings.onFinish($activeTab, $navigation, obj.lastIndex());
28253	  }
28254	};
28255
28256	this.back = function () {
28257	  if (historyStack.length == 0) {
28258	    return null;
28259	  }
28260
28261	  var formerIndex = historyStack.pop();
28262	  if ($settings.onBack && typeof $settings.onBack === 'function' && $settings.onBack($activeTab, $navigation, formerIndex) === false) {
28263	    historyStack.push(formerIndex);
28264	    return false;
28265	  }
28266
28267	  element.find(baseItemSelector + ':eq(' + formerIndex + ') a').tab('show');
28268	};
28269
28270	this.currentIndex = function() {
28271		return $navigation.find(baseItemSelector).index($activeTab);
28272	};
28273
28274	this.firstIndex = function() {
28275		return 0;
28276	};
28277
28278	this.lastIndex = function() {
28279		return obj.navigationLength();
28280	};
28281	this.getIndex = function(e) {
28282		return $navigation.find(baseItemSelector).index(e);
28283	};
28284	this.nextIndex = function() {
28285		return $navigation.find(baseItemSelector).index($activeTab) + 1;
28286	};
28287	this.previousIndex = function() {
28288		return $navigation.find(baseItemSelector).index($activeTab) - 1;
28289	};
28290	this.navigationLength = function() {
28291		return $navigation.find(baseItemSelector).length - 1;
28292	};
28293	this.activeTab = function() {
28294		return $activeTab;
28295	};
28296	this.nextTab = function() {
28297		return $navigation.find(baseItemSelector + ':eq('+(obj.currentIndex()+1)+')').length ? $navigation.find(baseItemSelector + ':eq('+(obj.currentIndex()+1)+')') : null;
28298	};
28299	this.previousTab = function() {
28300		if(obj.currentIndex() <= 0) {
28301			return null;
28302		}
28303		return $navigation.find(baseItemSelector + ':eq('+parseInt(obj.currentIndex()-1)+')');
28304	};
28305	this.show = function(index) {
28306	  var tabToShow = isNaN(index) ? 
28307      element.find(baseItemSelector + ' a[href=#' + index + ']') : 
28308      element.find(baseItemSelector + ':eq(' + index + ') a');
28309	  if (tabToShow.length > 0) {
28310	    historyStack.push(obj.currentIndex());
28311	    tabToShow.tab('show');
28312	  }
28313	};
28314	this.disable = function (index) {
28315		$navigation.find(baseItemSelector + ':eq('+index+')').addClass('disabled');
28316	};
28317	this.enable = function(index) {
28318		$navigation.find(baseItemSelector + ':eq('+index+')').removeClass('disabled');
28319	};
28320	this.hide = function(index) {
28321		$navigation.find(baseItemSelector + ':eq('+index+')').hide();
28322	};
28323	this.display = function(index) {
28324		$navigation.find(baseItemSelector + ':eq('+index+')').show();
28325	};
28326	this.remove = function(args) {
28327		var $index = args[0];
28328		var $removeTabPane = typeof args[1] != 'undefined' ? args[1] : false;
28329		var $item = $navigation.find(baseItemSelector + ':eq('+$index+')');
28330
28331		// Remove the tab pane first if needed
28332		if($removeTabPane) {
28333			var $href = $item.find('a').attr('href');
28334			$($href).remove();
28335		}
28336
28337		// Remove menu item
28338		$item.remove();
28339	};
28340	
28341	var innerTabClick = function (e) {
28342		// Get the index of the clicked tab
28343		var $ul = $navigation.find(baseItemSelector);
28344		var clickedIndex = $ul.index($(e.currentTarget).parent(baseItemSelector));
28345		var $clickedTab = $( $ul[clickedIndex] );
28346		if($settings.onTabClick && typeof $settings.onTabClick === 'function' && $settings.onTabClick($activeTab, $navigation, obj.currentIndex(), clickedIndex, $clickedTab)===false){
28347		    return false;
28348		}
28349	};
28350	
28351	var innerTabShown = function (e) {  // use shown instead of show to help prevent double firing
28352		$element = $(e.target).parent();
28353		var nextTab = $navigation.find(baseItemSelector).index($element);
28354
28355		// If it's disabled then do not change
28356		if($element.hasClass('disabled')) {
28357			return false;
28358		}
28359
28360		if($settings.onTabChange && typeof $settings.onTabChange === 'function' && $settings.onTabChange($activeTab, $navigation, obj.currentIndex(), nextTab)===false){
28361				return false;
28362		}
28363
28364		$activeTab = $element; // activated tab
28365		obj.fixNavigationButtons();
28366	};
28367	
28368	this.resetWizard = function() {
28369		
28370		// remove the existing handlers
28371		$('a[data-toggle="tab"]', $navigation).off('click', innerTabClick);
28372		$('a[data-toggle="tab"]', $navigation).off('shown shown.bs.tab', innerTabShown);
28373		
28374		// reset elements based on current state of the DOM
28375		$navigation = element.find('ul:first', element);
28376		$activeTab = $navigation.find(baseItemSelector + '.active', element);
28377		
28378		// re-add handlers
28379		$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);
28380		$('a[data-toggle="tab"]', $navigation).on('shown shown.bs.tab', innerTabShown);
28381		
28382		obj.fixNavigationButtons();
28383	};
28384
28385	$navigation = element.find('ul:first', element);
28386	$activeTab = $navigation.find(baseItemSelector + '.active', element);
28387
28388	if(!$navigation.hasClass($settings.tabClass)) {
28389		$navigation.addClass($settings.tabClass);
28390	}
28391
28392	// Load onInit
28393	if($settings.onInit && typeof $settings.onInit === 'function'){
28394		$settings.onInit($activeTab, $navigation, 0);
28395	}
28396
28397	// Load onShow
28398	if($settings.onShow && typeof $settings.onShow === 'function'){
28399		$settings.onShow($activeTab, $navigation, obj.nextIndex());
28400	}
28401
28402	$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);
28403
28404	// attach to both shown and shown.bs.tab to support Bootstrap versions 2.3.2 and 3.0.0
28405	$('a[data-toggle="tab"]', $navigation).on('shown shown.bs.tab', innerTabShown);
28406};
28407$.fn.bootstrapWizard = function(options) {
28408	//expose methods
28409	if (typeof options == 'string') {
28410		var args = Array.prototype.slice.call(arguments, 1)
28411		if(args.length === 1) {
28412			args.toString();
28413		}
28414		return this.data('bootstrapWizard')[options](args);
28415	}
28416	return this.each(function(index){
28417		var element = $(this);
28418		// Return early if this element already has a plugin instance
28419		if (element.data('bootstrapWizard')) return;
28420		// pass options to plugin constructor
28421		var wizard = new bootstrapWizardCreate(element, options);
28422		// Store plugin object in this element's data
28423		element.data('bootstrapWizard', wizard);
28424		// and then trigger initial change
28425		wizard.fixNavigationButtons();
28426	});
28427};
28428
28429// expose options
28430$.fn.bootstrapWizard.defaults = {
28431	tabClass:         'nav nav-pills',
28432	nextSelector:     '.wizard li.next',
28433	previousSelector: '.wizard li.previous',
28434	firstSelector:    '.wizard li.first',
28435	lastSelector:     '.wizard li.last',
28436  finishSelector:   '.wizard li.finish',
28437	backSelector:     '.wizard li.back',
28438	onShow:           null,
28439	onInit:           null,
28440	onNext:           null,
28441	onPrevious:       null,
28442	onLast:           null,
28443	onFirst:          null,
28444  onFinish:         null,
28445  onBack:           null,
28446	onTabChange:      null, 
28447	onTabClick:       null,
28448	onTabShow:        null
28449};
28450
28451})(jQuery);
28452
28453;/*
28454* Project: Bootstrap Notify = v3.1.3
28455* Description: Turns standard Bootstrap alerts into "Growl-like" notifications.
28456* Author: Mouse0270 aka Robert McIntosh
28457* License: MIT License
28458* Website: https://github.com/mouse0270/bootstrap-growl
28459*/
28460(function (factory) {
28461	if (typeof define === 'function' && define.amd) {
28462		// AMD. Register as an anonymous module.
28463		define(['jquery'], factory);
28464	} else if (typeof exports === 'object') {
28465		// Node/CommonJS
28466		factory(require('jquery'));
28467	} else {
28468		// Browser globals
28469		factory(jQuery);
28470	}
28471}(function ($) {
28472	// Create the defaults once
28473	var defaults = {
28474			element: 'body',
28475			position: null,
28476			type: "info",
28477			allow_dismiss: true,
28478			newest_on_top: false,
28479			showProgressbar: false,
28480			placement: {
28481				from: "top",
28482				align: "right"
28483			},
28484			offset: 20,
28485			spacing: 10,
28486			z_index: 1031,
28487			delay: 5000,
28488			timer: 1000,
28489			url_target: '_blank',
28490			mouse_over: null,
28491			animate: {
28492				enter: 'animated fadeInDown',
28493				exit: 'animated fadeOutUp'
28494			},
28495			onShow: null,
28496			onShown: null,
28497			onClose: null,
28498			onClosed: null,
28499			icon_type: 'class',
28500			template: '<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'
28501		};
28502
28503	String.format = function() {
28504		var str = arguments[0];
28505		for (var i = 1; i < arguments.length; i++) {
28506			str = str.replace(RegExp("\\{" + (i - 1) + "\\}", "gm"), arguments[i]);
28507		}
28508		return str;
28509	};
28510
28511	function Notify ( element, content, options ) {
28512		// Setup Content of Notify
28513		var content = {
28514			content: {
28515				message: typeof content == 'object' ? content.message : content,
28516				title: content.title ? content.title : '',
28517				icon: content.icon ? content.icon : '',
28518				url: content.url ? content.url : '#',
28519				target: content.target ? content.target : '-'
28520			}
28521		};
28522
28523		options = $.extend(true, {}, content, options);
28524		this.settings = $.extend(true, {}, defaults, options);
28525		this._defaults = defaults;
28526		if (this.settings.content.target == "-") {
28527			this.settings.content.target = this.settings.url_target;
28528		}
28529		this.animations = {
28530			start: 'webkitAnimationStart oanimationstart MSAnimationStart animationstart',
28531			end: 'webkitAnimationEnd oanimationend MSAnimationEnd animationend'
28532		}
28533
28534		if (typeof this.settings.offset == 'number') {
28535		    this.settings.offset = {
28536		    	x: this.settings.offset,
28537		    	y: this.settings.offset
28538		    };
28539		}
28540
28541		this.init();
28542	};
28543
28544	$.extend(Notify.prototype, {
28545		init: function () {
28546			var self = this;
28547
28548			this.buildNotify();
28549			if (this.settings.content.icon) {
28550				this.setIcon();
28551			}
28552			if (this.settings.content.url != "#") {
28553				this.styleURL();
28554			}
28555			this.styleDismiss();
28556			this.placement();
28557			this.bind();
28558
28559			this.notify = {
28560				$ele: this.$ele,
28561				update: function(command, update) {
28562					var commands = {};
28563					if (typeof command == "string") {
28564						commands[command] = update;
28565					}else{
28566						commands = command;
28567					}
28568					for (var command in commands) {
28569						switch (command) {
28570							case "type":
28571								this.$ele.removeClass('alert-' + self.settings.type);
28572								this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-' + self.settings.type);
28573								self.settings.type = commands[command];
28574								this.$ele.addClass('alert-' + commands[command]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + commands[command]);
28575								break;
28576							case "icon":
28577								var $icon = this.$ele.find('[data-notify="icon"]');
28578								if (self.settings.icon_type.toLowerCase() == 'class') {
28579									$icon.removeClass(self.settings.content.icon).addClass(commands[command]);
28580								}else{
28581									if (!$icon.is('img')) {
28582										$icon.find('img');
28583									}
28584									$icon.attr('src', commands[command]);
28585								}
28586								break;
28587							case "progress":
28588								var newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100));
28589								this.$ele.data('notify-delay', newDelay);
28590								this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[command]).css('width', commands[command] + '%');
28591								break;
28592							case "url":
28593								this.$ele.find('[data-notify="url"]').attr('href', commands[command]);
28594								break;
28595							case "target":
28596								this.$ele.find('[data-notify="url"]').attr('target', commands[command]);
28597								break;
28598							default:
28599								this.$ele.find('[data-notify="' + command +'"]').html(commands[command]);
28600						};
28601					}
28602					var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y);
28603					self.reposition(posX);
28604				},
28605				close: function() {
28606					self.close();
28607				}
28608			};
28609		},
28610		buildNotify: function () {
28611			var content = this.settings.content;
28612			this.$ele = $(String.format(this.settings.template, this.settings.type, content.title, content.message, content.url, content.target));
28613			this.$ele.attr('data-notify-position', this.settings.placement.from + '-' + this.settings.placement.align);
28614			if (!this.settings.allow_dismiss) {
28615				this.$ele.find('[data-notify="dismiss"]').css('display', 'none');
28616			}
28617			if ((this.settings.delay <= 0 && !this.settings.showProgressbar) || !this.settings.showProgressbar) {
28618				this.$ele.find('[data-notify="progressbar"]').remove();
28619			}
28620		},
28621		setIcon: function() {
28622			if (this.settings.icon_type.toLowerCase() == 'class') {
28623				this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon);
28624			}else{
28625				if (this.$ele.find('[data-notify="icon"]').is('img')) {
28626					this.$ele.find('[data-notify="icon"]').attr('src', this.settings.content.icon);
28627				}else{
28628					this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />');
28629				}
28630			}
28631		},
28632		styleDismiss: function() {
28633			this.$ele.find('[data-notify="dismiss"]').css({
28634				position: 'absolute',
28635				right: '10px',
28636				top: '5px',
28637				zIndex: this.settings.z_index + 2
28638			});
28639		},
28640		styleURL: function() {
28641			this.$ele.find('[data-notify="url"]').css({
28642				backgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)',
28643				height: '100%',
28644				left: '0px',
28645				position: 'absolute',
28646				top: '0px',
28647				width: '100%',
28648				zIndex: this.settings.z_index + 1
28649			});
28650		},
28651		placement: function() {
28652			var self = this,
28653				offsetAmt = this.settings.offset.y,
28654				css = {
28655					display: 'inline-block',
28656					margin: '0px auto',
28657					position: this.settings.position ?  this.settings.position : (this.settings.element === 'body' ? 'fixed' : 'absolute'),
28658					transition: 'all .5s ease-in-out',
28659					zIndex: this.settings.z_index
28660				},
28661				hasAnimation = false,
28662				settings = this.settings;
28663
28664			$('[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])').each(function() {
28665				return offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) +  parseInt($(this).outerHeight()) +  parseInt(settings.spacing));
28666			});
28667			if (this.settings.newest_on_top == true) {
28668				offsetAmt = this.settings.offset.y;
28669			}
28670			css[this.settings.placement.from] = offsetAmt+'px';
28671
28672			switch (this.settings.placement.align) {
vendor: 5,037 bytes, lines 28673-28837
28673				case "left":
28674				case "right":
28675					css[this.settings.placement.align] = this.settings.offset.x+'px';
28676					break;
28677				case "center":
28678					css.left = 0;
28679					css.right = 0;
28680					break;
28681			}
28682			this.$ele.css(css).addClass(this.settings.animate.enter);
28683			$.each(Array('webkit-', 'moz-', 'o-', 'ms-', ''), function(index, prefix) {
28684				self.$ele[0].style[prefix+'AnimationIterationCount'] = 1;
28685			});
28686
28687			$(this.settings.element).append(this.$ele);
28688
28689			if (this.settings.newest_on_top == true) {
28690				offsetAmt = (parseInt(offsetAmt)+parseInt(this.settings.spacing)) + this.$ele.outerHeight();
28691				this.reposition(offsetAmt);
28692			}
28693
28694			if ($.isFunction(self.settings.onShow)) {
28695				self.settings.onShow.call(this.$ele);
28696			}
28697
28698			this.$ele.one(this.animations.start, function(event) {
28699				hasAnimation = true;
28700			}).one(this.animations.end, function(event) {
28701				if ($.isFunction(self.settings.onShown)) {
28702					self.settings.onShown.call(this);
28703				}
28704			});
28705
28706			setTimeout(function() {
28707				if (!hasAnimation) {
28708					if ($.isFunction(self.settings.onShown)) {
28709						self.settings.onShown.call(this);
28710					}
28711				}
28712			}, 600);
28713		},
28714		bind: function() {
28715			var self = this;
28716
28717			this.$ele.find('[data-notify="dismiss"]').on('click', function() {
28718				self.close();
28719			})
28720
28721			this.$ele.mouseover(function(e) {
28722				$(this).data('data-hover', "true");
28723			}).mouseout(function(e) {
28724				$(this).data('data-hover', "false");
28725			});
28726			this.$ele.data('data-hover', "false");
28727
28728			if (this.settings.delay > 0) {
28729				self.$ele.data('notify-delay', self.settings.delay);
28730				var timer = setInterval(function() {
28731					var delay = parseInt(self.$ele.data('notify-delay')) - self.settings.timer;
28732					if ((self.$ele.data('data-hover') === 'false' && self.settings.mouse_over == "pause") || self.settings.mouse_over != "pause") {
28733						var percent = ((self.settings.delay - delay) / self.settings.delay) * 100;
28734						self.$ele.data('notify-delay', delay);
28735						self.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', percent).css('width', percent + '%');
28736					}
28737					if (delay <= -(self.settings.timer)) {
28738						clearInterval(timer);
28739						self.close();
28740					}
28741				}, self.settings.timer);
28742			}
28743		},
28744		close: function() {
28745			var self = this,
28746				$successors = null,
28747				posX = parseInt(this.$ele.css(this.settings.placement.from)),
28748				hasAnimation = false;
28749
28750			this.$ele.data('closing', 'true').addClass(this.settings.animate.exit);
28751			self.reposition(posX);
28752
28753			if ($.isFunction(self.settings.onClose)) {
28754				self.settings.onClose.call(this.$ele);
28755			}
28756
28757			this.$ele.one(this.animations.start, function(event) {
28758				hasAnimation = true;
28759			}).one(this.animations.end, function(event) {
28760				$(this).remove();
28761				if ($.isFunction(self.settings.onClosed)) {
28762					self.settings.onClosed.call(this);
28763				}
28764			});
28765
28766			setTimeout(function() {
28767				if (!hasAnimation) {
28768					self.$ele.remove();
28769					if (self.settings.onClosed) {
28770						self.settings.onClosed(self.$ele);
28771					}
28772				}
28773			}, 600);
28774		},
28775		reposition: function(posX) {
28776			var self = this,
28777				notifies = '[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])',
28778				$elements = this.$ele.nextAll(notifies);
28779			if (this.settings.newest_on_top == true) {
28780				$elements = this.$ele.prevAll(notifies);
28781			}
28782			$elements.each(function() {
28783				$(this).css(self.settings.placement.from, posX);
28784				posX = (parseInt(posX)+parseInt(self.settings.spacing)) + $(this).outerHeight();
28785			});
28786		}
28787	});
28788
28789	$.notify = function ( content, options ) {
28790		var plugin = new Notify( this, content, options );
28791		return plugin.notify;
28792	};
28793	$.notifyDefaults = function( options ) {
28794		defaults = $.extend(true, {}, defaults, options);
28795		return defaults;
28796	};
28797	$.notifyClose = function( command ) {
28798		if (typeof command === "undefined" || command == "all") {
28799			$('[data-notify]').find('[data-notify="dismiss"]').trigger('click');
28800		}else{
28801			$('[data-notify-position="'+command+'"]').find('[data-notify="dismiss"]').trigger('click');
28802		}
28803	};
28804
28805}));
28806
28807;/**!
28808 * easy-pie-chart
28809 * Lightweight plugin to render simple, animated and retina optimized pie charts
28810 *
28811 * @license 
28812 * @author Robert Fleischmann <[email protected]> (http://robert-fleischmann.de)
28813 * @version 2.1.7
28814 **/
28815
28816(function (root, factory) {
28817  if (typeof define === 'function' && define.amd) {
28818    // AMD. Register as an anonymous module unless amdModuleId is set
28819    define(["jquery"], function (a0) {
28820      return (factory(a0));
28821    });
28822  } else if (typeof exports === 'object') {
28823    // Node. Does not work with strict CommonJS, but
28824    // only CommonJS-like environments that support module.exports,
28825    // like Node.
28826    module.exports = factory(require("jquery"));
28827  } else {
28828    factory(jQuery);
28829  }
28830}(this, function ($) {
28831
28832/**
28833 * Renderer to render the chart on a canvas object
28834 * @param {DOMElement} el      DOM element to host the canvas (root of the plugin)
28835 * @param {object}     options options object of the plugin
28836 */
28837var CanvasRenderer = function(el, options) {
28838	var cachedBackground;
28839	var canvas = document.createElement('canvas');
28840
28841	el.appendChild(canvas);
28842
28843	if (typeof(G_vmlCanvasManager) === 'object') {
28844		G_vmlCanvasManager.initElement(canvas);
28845	}
28846
28847	var ctx = canvas.getContext('2d');
28848
28849	canvas.width = canvas.height = options.size;
28850
28851	// canvas on retina devices
28852	var scaleBy = 1;
28853	if (window.devicePixelRatio > 1) {
28854		scaleBy = window.devicePixelRatio;
28855		canvas.style.width = canvas.style.height = [options.size, 'px'].join('');
28856		canvas.width = canvas.height = options.size * scaleBy;
28857		ctx.scale(scaleBy, scaleBy);
28858	}
28859
28860	// move 0,0 coordinates to the center
28861	ctx.translate(options.size / 2, options.size / 2);
28862
28863	// rotate canvas -90deg
28864	ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);
28865
28866	var radius = (options.size - options.lineWidth) / 2;
28867	if (options.scaleColor && options.scaleLength) {
28868		radius -= options.scaleLength + 2; // 2 is the distance between scale and bar
28869	}
28870
28871	// IE polyfill for Date
28872	Date.now = Date.now || function() {
28873		return +(new Date());
28874	};
28875
28876	/**
28877	 * Draw a circle around the center of the canvas
28878	 * @param {strong} color     Valid CSS color string
28879	 * @param {number} lineWidth Width of the line in px
28880	 * @param {number} percent   Percentage to draw (float between -1 and 1)
28881	 */
28882	var drawCircle = function(color, lineWidth, percent) {
28883		percent = Math.min(Math.max(-1, percent || 0), 1);
28884		var isNegative = percent <= 0 ? true : false;
28885
28886		ctx.beginPath();
28887		ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);
28888
28889		ctx.strokeStyle = color;
28890		ctx.lineWidth = lineWidth;
28891
28892		ctx.stroke();
28893	};
28894
28895	/**
28896	 * Draw the scale of the chart
28897	 */
28898	var drawScale = function() {
28899		var offset;
28900		var length;
28901
28902		ctx.lineWidth = 1;
28903		ctx.fillStyle = options.scaleColor;
28904
28905		ctx.save();
28906		for (var i = 24; i > 0; --i) {
28907			if (i % 6 === 0) {
28908				length = options.scaleLength;
28909				offset = 0;
28910			} else {
28911				length = options.scaleLength * 0.6;
28912				offset = options.scaleLength - length;
28913			}
28914			ctx.fillRect(-options.size/2 + offset, 0, length, 1);
28915			ctx.rotate(Math.PI / 12);
28916		}
28917		ctx.restore();
28918	};
28919
28920	/**
28921	 * Request animation frame wrapper with polyfill
28922	 * @return {function} Request animation frame method or timeout fallback
28923	 */
28924	var reqAnimationFrame = (function() {
28925		return  window.requestAnimationFrame ||
28926				window.webkitRequestAnimationFrame ||
28927				window.mozRequestAnimationFrame ||
28928				function(callback) {
28929					window.setTimeout(callback, 1000 / 60);
28930				};
28931	}());
28932
28933	/**
28934	 * Draw the background of the plugin including the scale and the track
28935	 */
28936	var drawBackground = function() {
28937		if(options.scaleColor) drawScale();
28938		if(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1);
28939	};
28940
28941  /**
28942    * Canvas accessor
28943   */
28944  this.getCanvas = function() {
28945    return canvas;
28946  };
28947
28948  /**
28949    * Canvas 2D context 'ctx' accessor
28950   */
28951  this.getCtx = function() {
28952    return ctx;
28953  };
28954
28955	/**
28956	 * Clear the complete canvas
28957	 */
28958	this.clear = function() {
28959		ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);
28960	};
28961
28962	/**
28963	 * Draw the complete chart
28964	 * @param {number} percent Percent shown by the chart between -100 and 100
28965	 */
28966	this.draw = function(percent) {
28967		// do we need to render a background
28968		if (!!options.scaleColor || !!options.trackColor) {
28969			// getImageData and putImageData are supported
28970			if (ctx.getImageData && ctx.putImageData) {
28971				if (!cachedBackground) {
28972					drawBackground();
28973					cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);
28974				} else {
28975					ctx.putImageData(cachedBackground, 0, 0);
28976				}
28977			} else {
28978				this.clear();
28979				drawBackground();
28980			}
28981		} else {
28982			this.clear();
28983		}
28984
28985		ctx.lineCap = options.lineCap;
28986
28987		// if barcolor is a function execute it and pass the percent as a value
28988		var color;
28989		if (typeof(options.barColor) === 'function') {
28990			color = options.barColor(percent);
28991		} else {
28992			color = options.barColor;
28993		}
28994
28995		// draw bar
28996		drawCircle(color, options.lineWidth, percent / 100);
28997	}.bind(this);
28998
28999	/**
29000	 * Animate from some percent to some other percentage
29001	 * @param {number} from Starting percentage
29002	 * @param {number} to   Final percentage
29003	 */
29004	this.animate = function(from, to) {
29005		var startTime = Date.now();
29006		options.onStart(from, to);
29007		var animation = function() {
29008			var process = Math.min(Date.now() - startTime, options.animate.duration);
29009			var currentValue = options.easing(this, process, from, to - from, options.animate.duration);
29010			this.draw(currentValue);
29011			options.onStep(from, to, currentValue);
29012			if (process >= options.animate.duration) {
29013				options.onStop(from, to);
29014			} else {
29015				reqAnimationFrame(animation);
29016			}
29017		}.bind(this);
29018
29019		reqAnimationFrame(animation);
29020	}.bind(this);
29021};
29022
29023var EasyPieChart = function(el, opts) {
29024	var defaultOptions = {
29025		barColor: '#ef1e25',
29026		trackColor: '#f9f9f9',
29027		scaleColor: '#dfe0e0',
29028		scaleLength: 5,
29029		lineCap: 'round',
29030		lineWidth: 3,
29031		trackWidth: undefined,
29032		size: 110,
29033		rotate: 0,
29034		animate: {
29035			duration: 1000,
29036			enabled: true
29037		},
29038		easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/
29039			t = t / (d/2);
29040			if (t < 1) {
29041				return c / 2 * t * t + b;
29042			}
29043			return -c/2 * ((--t)*(t-2) - 1) + b;
29044		},
29045		onStart: function(from, to) {
29046			return;
29047		},
29048		onStep: function(from, to, currentValue) {
29049			return;
29050		},
29051		onStop: function(from, to) {
29052			return;
29053		}
29054	};
29055
29056	// detect present renderer
29057	if (typeof(CanvasRenderer) !== 'undefined') {
29058		defaultOptions.renderer = CanvasRenderer;
29059	} else if (typeof(SVGRenderer) !== 'undefined') {
29060		defaultOptions.renderer = SVGRenderer;
29061	} else {
29062		throw new Error('Please load either the SVG- or the CanvasRenderer');
29063	}
29064
29065	var options = {};
29066	var currentValue = 0;
29067
29068	/**
29069	 * Initialize the plugin by creating the options object and initialize rendering
29070	 */
29071	var init = function() {
29072		this.el = el;
29073		this.options = options;
29074
29075		// merge user options into default options
29076		for (var i in defaultOptions) {
29077			if (defaultOptions.hasOwnProperty(i)) {
29078				options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];
29079				if (typeof(options[i]) === 'function') {
29080					options[i] = options[i].bind(this);
29081				}
29082			}
29083		}
29084
29085		// check for jQuery easing
29086		if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {
29087			options.easing = jQuery.easing[options.easing];
29088		} else {
29089			options.easing = defaultOptions.easing;
29090		}
29091
29092		// process earlier animate option to avoid bc breaks
29093		if (typeof(options.animate) === 'number') {
29094			options.animate = {
29095				duration: options.animate,
29096				enabled: true
29097			};
29098		}
29099
29100		if (typeof(options.animate) === 'boolean' && !options.animate) {
29101			options.animate = {
29102				duration: 1000,
29103				enabled: options.animate
29104			};
29105		}
29106
29107		// create renderer
29108		this.renderer = new options.renderer(el, options);
29109
29110		// initial draw
29111		this.renderer.draw(currentValue);
29112
29113		// initial update
29114		if (el.dataset && el.dataset.percent) {
29115			this.update(parseFloat(el.dataset.percent));
29116		} else if (el.getAttribute && el.getAttribute('data-percent')) {
29117			this.update(parseFloat(el.getAttribute('data-percent')));
29118		}
29119	}.bind(this);
29120
29121	/**
29122	 * Update the value of the chart
29123	 * @param  {number} newValue Number between 0 and 100
29124	 * @return {object}          Instance of the plugin for method chaining
29125	 */
29126	this.update = function(newValue) {
29127		newValue = parseFloat(newValue);
29128		if (options.animate.enabled) {
29129			this.renderer.animate(currentValue, newValue);
29130		} else {
29131			this.renderer.draw(newValue);
29132		}
29133		currentValue = newValue;
29134		return this;
29135	}.bind(this);
29136
29137	/**
29138	 * Disable animation
29139	 * @return {object} Instance of the plugin for method chaining
29140	 */
29141	this.disableAnimation = function() {
29142		options.animate.enabled = false;
29143		return this;
29144	};
29145
29146	/**
29147	 * Enable animation
29148	 * @return {object} Instance of the plugin for method chaining
29149	 */
29150	this.enableAnimation = function() {
29151		options.animate.enabled = true;
29152		return this;
29153	};
29154
29155	init();
29156};
29157
29158$.fn.easyPieChart = function(options) {
29159	return this.each(function() {
29160		var instanceOptions;
29161
29162		if (!$.data(this, 'easyPieChart')) {
29163			instanceOptions = $.extend({}, options, $(this).data());
29164			$.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));
29165		}
29166	});
29167};
29168
29169
29170}));
29171
29172;/*!
29173 * FullCalendar v3.10.1
29174 * Docs & License: https://fullcalendar.io/
29175 * (c) 2019 Adam Shaw
29176 */
29177!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("moment"),require("jquery")):"function"==typeof define&&define.amd?define(["moment","jquery"],e):"object"==typeof exports?exports.FullCalendar=e(require("moment"),require("jquery")):t.FullCalendar=e(t.moment,t.jQuery)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=256)}([function(e,n){e.exports=t},,function(t,e){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e.__extends=function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}},function(t,n){t.exports=e},function(t,e,n){function r(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function i(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function o(){ht("body").addClass("fc-not-allowed")}function s(){ht("body").removeClass("fc-not-allowed")}function a(t,e,n){var r=Math.floor(e/t.length),i=Math.floor(e-r*(t.length-1)),o=[],s=[],a=[],u=0;l(t),t.each(function(e,n){var l=e===t.length-1?i:r,d=ht(n).outerHeight(!0);d<l?(o.push(n),s.push(d),a.push(ht(n).height())):u+=d}),n&&(e-=u,r=Math.floor(e/o.length),i=Math.floor(e-r*(o.length-1))),ht(o).each(function(t,e){var n=t===o.length-1?i:r,l=s[t],u=a[t],d=n-(l-u);l<n&&ht(e).height(d)})}function l(t){t.height("")}function u(t){var e=0;return t.find("> *").each(function(t,n){var r=ht(n).outerWidth();r>e&&(e=r)}),e++,t.width(e),e}function d(t,e){var n,r=t.add(e);return r.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),r.css({position:"",left:""}),n}function c(t){var e=t.css("position"),n=t.parents().filter(function(){var t=ht(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&n.length?n:ht(t[0].ownerDocument||document)}function p(t,e){var n=t.offset(),r=n.left-(e?e.left:0),i=n.top-(e?e.top:0);return{left:r,right:r+t.outerWidth(),top:i,bottom:i+t.outerHeight()}}function h(t,e){var n=t.offset(),r=g(t),i=n.left+b(t,"border-left-width")+r.left-(e?e.left:0),o=n.top+b(t,"border-top-width")+r.top-(e?e.top:0);return{left:i,right:i+t[0].clientWidth,top:o,bottom:o+t[0].clientHeight}}function f(t,e){var n=t.offset(),r=n.left+b(t,"border-left-width")+b(t,"padding-left")-(e?e.left:0),i=n.top+b(t,"border-top-width")+b(t,"padding-top")-(e?e.top:0);return{left:r,right:r+t.width(),top:i,bottom:i+t.height()}}function g(t){var e,n=t[0].offsetWidth-t[0].clientWidth,r=t[0].offsetHeight-t[0].clientHeight;return n=v(n),r=v(r),e={left:0,right:0,top:0,bottom:r},y()&&"rtl"===t.css("direction")?e.left=n:e.right=n,e}function v(t){return t=Math.max(0,t),t=Math.round(t)}function y(){return null===ft&&(ft=m()),ft}function m(){var t=ht("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),e=t.children(),n=e.offset().left>t.offset().left;return t.remove(),n}function b(t,e){return parseFloat(t.css(e))||0}function w(t){return 1===t.which&&!t.ctrlKey}function D(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageX:t.pageX}function E(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageY:t.pageY}function S(t){return/^touch/.test(t.type)}function C(t){t.addClass("fc-unselectable").on("selectstart",T)}function R(t){t.removeClass("fc-unselectable").off("selectstart",T)}function T(t){t.preventDefault()}function M(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function I(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function H(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function P(t,e){return{left:t.left-e.left,top:t.top-e.top}}function _(t){var e,n,r=[],i=[];for("string"==typeof t?i=t.split(/\s*,\s*/):"function"==typeof t?i=[t]:ht.isArray(t)&&(i=t),e=0;e<i.length;e++)n=i[e],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function x(t,e,n,r,i){var o,s;for(o=0;o<n.length;o++)if(s=O(t,e,n[o],r,i))return s;return 0}function O(t,e,n,r,i){if(n.func)return n.func(t,e);var o=t[n.field],s=e[n.field];
29177return null==o&&r&&(o=r[n.field]),null==s&&i&&(s=i[n.field]),F(o,s)*(n.order||1)}function F(t,e){return t||e?null==e?-1:null==t?1:"string"===ht.type(t)||"string"===ht.type(e)?String(t).localeCompare(String(e)):t-e:0}function z(t,e){return pt.duration({days:t.clone().stripTime().diff(e.clone().stripTime(),"days"),ms:t.time()-e.time()})}function B(t,e){return pt.duration({days:t.clone().stripTime().diff(e.clone().stripTime(),"days")})}function A(t,e,n){return pt.duration(Math.round(t.diff(e,n,!0)),n)}function k(t,n){var r,i,o;for(r=0;r<e.unitsDesc.length&&(i=e.unitsDesc[r],!((o=V(i,t,n))>=1&&ut(o)));r++);return i}function L(t,e){var n=k(t);return"week"===n&&"object"==typeof e&&e.days&&(n="day"),n}function V(t,e,n){return null!=n?n.diff(e,t,!0):pt.isDuration(e)?e.as(t):e.end.diff(e.start,t,!0)}function G(t,e,n){var r;return U(n)?(e-t)/n:(r=n.asMonths(),Math.abs(r)>=1&&ut(r)?e.diff(t,"months",!0)/r:e.diff(t,"days",!0)/n.asDays())}function N(t,e){var n,r;return U(t)||U(e)?t/e:(n=t.asMonths(),r=e.asMonths(),Math.abs(n)>=1&&ut(n)&&Math.abs(r)>=1&&ut(r)?n/r:t.asDays()/e.asDays())}function j(t,e){var n;return U(t)?pt.duration(t*e):(n=t.asMonths(),Math.abs(n)>=1&&ut(n)?pt.duration({months:n*e}):pt.duration({days:t.asDays()*e}))}function U(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function W(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function q(t){return"string"==typeof t&&/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function Y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=window.console;if(n&&n.log)return n.log.apply(n,t)}function Z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=window.console;return n&&n.warn?n.warn.apply(n,t):Y.apply(null,t)}function X(t,e){var n,r,i,o,s,a,l={};if(e)for(n=0;n<e.length;n++){for(r=e[n],i=[],o=t.length-1;o>=0;o--)if("object"==typeof(s=t[o][r]))i.unshift(s);else if(void 0!==s){l[r]=s;break}i.length&&(l[r]=X(i))}for(n=t.length-1;n>=0;n--){a=t[n];for(r in a)r in l||(l[r]=a[r])}return l}function Q(t,e){for(var n in t)$(t,n)&&(e[n]=t[n])}function $(t,e){return gt.call(t,e)}function K(t,e,n){if(ht.isFunction(t)&&(t=[t]),t){var r=void 0,i=void 0;for(r=0;r<t.length;r++)i=t[r].apply(e,n)||i;return i}}function J(t,e){for(var n=0,r=0;r<t.length;)e(t[r])?(t.splice(r,1),n++):r++;return n}function tt(t,e){for(var n=0,r=0;r<t.length;)t[r]===e?(t.splice(r,1),n++):r++;return n}function et(t,e){var n,r=t.length;if(null==r||r!==e.length)return!1;for(n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;n++)if(void 0!==t[n])return t[n]}function rt(t){return(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function it(t){return t.replace(/&.*?;/g,"")}function ot(t){var e=[];return ht.each(t,function(t,n){null!=n&&e.push(t+":"+n)}),e.join(";")}function st(t){var e=[];return ht.each(t,function(t,n){null!=n&&e.push(t+'="'+rt(n)+'"')}),e.join(" ")}function at(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lt(t,e){return t-e}function ut(t){return t%1==0}function dt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function ct(t,e,n){void 0===n&&(n=!1);var r,i,o,s,a,l=function(){var u=+new Date-s;u<e?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))};return function(){o=this,i=arguments,s=+new Date;var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a}}Object.defineProperty(e,"__esModule",{value:!0});var pt=n(0),ht=n(3);e.compensateScroll=r,e.uncompensateScroll=i,e.disableCursor=o,e.enableCursor=s,e.distributeHeight=a,e.undistributeHeight=l,e.matchCellWidths=u,e.subtractInnerElHeight=d,e.getScrollParent=c,e.getOuterRect=p,e.getClientRect=h,e.getContentRect=f,e.getScrollbarWidths=g;var ft=null;e.isPrimaryMouseButton=w,e.getEvX=D,e.getEvY=E,e.getEvIsTouch=S,e.preventSelection=C,e.allowSelection=R,e.preventDefault=T,e.intersectRects=M,e.constrainPoint=I,e.getRectCenter=H,e.diffPoints=P,e.parseFieldSpecs=_,e.compareByFieldSpecs=x,e.compareByFieldSpec=O,e.flexibleCompare=F,e.dayIDs=["sun","mon","tue","wed","thu","fri","sat"],e.unitsDesc=["year","month","week","day","hour","minute","second","millisecond"],e.diffDayTime=z,e.diffDay=B,e.diffByUnit=A,e.computeGreatestUnit=k,e.computeDurationGreatestUnit=L,e.divideRangeByDuration=G,e.divideDurationByDuration=N,e.multiplyDuration=j,e.durationHasTime=U,e.isNativeDate=W,e.isTimeStr
29177ing=q,e.log=Y,e.warn=Z;var gt={}.hasOwnProperty;e.mergeProps=X,e.copyOwnProps=Q,e.hasOwnProp=$,e.applyAll=K,e.removeMatching=J,e.removeExact=tt,e.isArraysEqual=et,e.firstDefined=nt,e.htmlEscape=rt,e.stripHtmlEntities=it,e.cssToStr=ot,e.attrsToStr=st,e.capitaliseFirstLetter=at,e.compareNumbers=lt,e.isInt=ut,e.proxy=dt,e.debounce=ct},function(t,e,n){function r(t,e){return t.startMs-e.startMs}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=n(11),s=function(){function t(t,e){this.isStart=!0,this.isEnd=!0,i.isMoment(t)&&(t=t.clone().stripZone()),i.isMoment(e)&&(e=e.clone().stripZone()),t&&(this.startMs=t.valueOf()),e&&(this.endMs=e.valueOf())}return t.invertRanges=function(e,n){var i,o,s=[],a=n.startMs;for(e.sort(r),i=0;i<e.length;i++)o=e[i],o.startMs>a&&s.push(new t(a,o.startMs)),o.endMs>a&&(a=o.endMs);return a<n.endMs&&s.push(new t(a,n.endMs)),s},t.prototype.intersect=function(e){var n=this.startMs,r=this.endMs,i=null;return null!=e.startMs&&(n=null==n?e.startMs:Math.max(n,e.startMs)),null!=e.endMs&&(r=null==r?e.endMs:Math.min(r,e.endMs)),(null==n||null==r||n<r)&&(i=new t(n,r),i.isStart=this.isStart&&n===this.startMs,i.isEnd=this.isEnd&&r===this.endMs),i},t.prototype.intersectsWith=function(t){return(null==this.endMs||null==t.startMs||this.endMs>t.startMs)&&(null==this.startMs||null==t.endMs||this.startMs<t.endMs)},t.prototype.containsRange=function(t){return(null==this.startMs||null!=t.startMs&&t.startMs>=this.startMs)&&(null==this.endMs||null!=t.endMs&&t.endMs<=this.endMs)},t.prototype.containsDate=function(t){var e=t.valueOf();return(null==this.startMs||e>=this.startMs)&&(null==this.endMs||e<this.endMs)},t.prototype.constrainDate=function(t){var e=t.valueOf();return null!=this.startMs&&e<this.startMs&&(e=this.startMs),null!=this.endMs&&e>=this.endMs&&(e=this.endMs-1),e},t.prototype.equals=function(t){return this.startMs===t.startMs&&this.endMs===t.endMs},t.prototype.clone=function(){var e=new t(this.startMs,this.endMs);return e.isStart=this.isStart,e.isEnd=this.isEnd,e},t.prototype.getStart=function(){return null!=this.startMs?o.default.utc(this.startMs).stripZone():null},t.prototype.getEnd=function(){return null!=this.endMs?o.default.utc(this.endMs).stripZone():null},t.prototype.as=function(t){return i.utc(this.endMs).diff(i.utc(this.startMs),t,!0)},t}();e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(52),s=n(35),a=n(36),l=function(t){function e(n){var r=t.call(this)||this;return r.calendar=n,r.className=[],r.uid=String(e.uuid++),r}return r.__extends(e,t),e.parse=function(t,e){var n=new this(e);return!("object"!=typeof t||!n.applyProps(t))&&n},e.normalizeId=function(t){return t?String(t):null},e.prototype.fetch=function(t,e,n){},e.prototype.removeEventDefsById=function(t){},e.prototype.removeAllEventDefs=function(){},e.prototype.getPrimitive=function(t){},e.prototype.parseEventDefs=function(t){var e,n,r=[];for(e=0;e<t.length;e++)(n=this.parseEventDef(t[e]))&&r.push(n);return r},e.prototype.parseEventDef=function(t){var e=this.calendar.opt("eventDataTransform"),n=this.eventDataTransform;return e&&(t=e(t,this.calendar)),n&&(t=n(t,this.calendar)),a.default.parse(t,this)},e.prototype.applyManualStandardProps=function(t){return null!=t.id&&(this.id=e.normalizeId(t.id)),i.isArray(t.className)?this.className=t.className:"string"==typeof t.className&&(this.className=t.className.split(/\s+/)),!0},e.uuid=0,e.defineStandardProps=o.default.defineStandardProps,e.copyVerbatimStandardProps=o.default.copyVerbatimStandardProps,e}(s.default);e.default=l,o.default.mixInto(l),l.defineStandardProps({id:!1,className:!1,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0,editable:!0,startEditable:!0,durationEditable:!0,rendering:!0,overlap:!0,constraint:!0,allDayDefault:!0,eventDataTransform:!0})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(15),s=0,a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.listenTo=function(t,e,n){if("object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&this.listenTo(t,r,e[r]);else"string"==typeof e&&t.on(e+"."+this.getListenerNamespace(),i.proxy(n,this))},e.prototype.stopListeningTo=function(t,e){t.off((e||"")+"."+this.getListenerNamespace())},e.prototype.getListenerNamespace=function(){return null==this.listenerId&&(this.listenerId=s++),"_listener"+this.listenerId},e}(o.default);e.default=a}
29177,,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(37),o=n(53),s=n(16),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.buildInstances=function(){return[this.buildInstance()]},e.prototype.buildInstance=function(){return new o.default(this,this.dateProfile)},e.prototype.isAllDay=function(){return this.dateProfile.isAllDay()},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e.dateProfile=this.dateProfile,e},e.prototype.rezone=function(){var t=this.source.calendar,e=this.dateProfile;this.dateProfile=new s.default(t.moment(e.start),e.end?t.moment(e.end):null,t)},e.prototype.applyManualStandardProps=function(e){var n=t.prototype.applyManualStandardProps.call(this,e),r=s.default.parse(e,this.source);return!!r&&(this.dateProfile=r,null!=e.date&&(this.miscProps.date=e.date),n)},e}(i.default);e.default=a,a.defineStandardProps({start:!1,date:!1,end:!1,allDay:!1})},,function(t,e,n){function r(t,e){return c.format.call(t,e)}function i(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r,i,d,c,p=t[0],h=1===t.length&&"string"==typeof p;return o.isMoment(p)||a.isNativeDate(p)||void 0===p?c=o.apply(null,t):(r=!1,i=!1,h?l.test(p)?(p+="-01",t=[p],r=!0,i=!0):(d=u.exec(p))&&(r=!d[5],i=!0):s.isArray(p)&&(i=!0),c=e||r?o.utc.apply(o,t):o.apply(null,t),r?(c._ambigTime=!0,c._ambigZone=!0):n&&(i?c._ambigZone=!0:h&&c.utcOffset(p))),c._fullCalendar=!0,c}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=n(3),a=n(4),l=/^\s*\d{4}-\d\d$/,u=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,d=o.fn;e.newMomentProto=d;var c=s.extend({},d);e.oldMomentProto=c;var p=o.momentProperties;p.push("_fullCalendar"),p.push("_ambigTime"),p.push("_ambigZone"),e.oldMomentFormat=r;var h=function(){return i(arguments)};e.default=h,h.utc=function(){var t=i(arguments,!0);return t.hasTime()&&t.utc(),t},h.parseZone=function(){return i(arguments,!0,!0)},d.week=d.weeks=function(t){var e=this._locale._fullCalendar_weekCalc;return null==t&&"function"==typeof e?e(this):"ISO"===e?c.isoWeek.apply(this,arguments):c.week.apply(this,arguments)},d.time=function(t){if(!this._fullCalendar)return c.time.apply(this,arguments);if(null==t)return o.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,o.isDuration(t)||o.isMoment(t)||(t=o.duration(t));var e=0;return o.isDuration(t)&&(e=24*Math.floor(t.asDays())),this.hours(e+t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds())},d.stripTime=function(){return this._ambigTime||(this.utc(!0),this.set({hours:0,minutes:0,seconds:0,ms:0}),this._ambigTime=!0,this._ambigZone=!0),this},d.hasTime=function(){return!this._ambigTime},d.stripZone=function(){var t;return this._ambigZone||(t=this._ambigTime,this.utc(!0),this._ambigTime=t||!1,this._ambigZone=!0),this},d.hasZone=function(){return!this._ambigZone},d.local=function(t){return c.local.call(this,this._ambigZone||t),this._ambigTime=!1,this._ambigZone=!1,this},d.utc=function(t){return c.utc.call(this,t),this._ambigTime=!1,this._ambigZone=!1,this},d.utcOffset=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),c.utcOffset.apply(this,arguments)}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.isAllDay=!1,this.unzonedRange=t,this.isAllDay=e}return t.prototype.toLegacy=function(t){return{start:t.msToMoment(this.unzonedRange.startMs,this.isAllDay),end:t.msToMoment(this.unzonedRange.endMs,this.isAllDay)}},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.on=function(t,e){return i(this).on(t,this._prepareIntercept(e)),this},e.prototype.one=function(t,e){return i(this).one(t,this._prepareIntercept(e)),this},e.prototype._prepareIntercept=function(t){var e=function(e,n){return t.apply(n.context||this,n.args||[])};return t.guid||(t.guid=i.guid++),e.guid=t.guid,e},e.prototype.off=function(t,e){return i(this).off(t,e),this},e.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return i(this).triggerHandler(t,{args:e}),this},e.prototype.triggerWith=function(t,e,n){return i(this).triggerHandler(t,{context:e,args:n}),this},e.prototype.hasHandlers=function(t){var e=i._data(this,"events");return e&&e[t]&&e[t].length>0},e}(o.default);e.default=s}
29177,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.view=t._getView(),this.component=t}return t.prototype.opt=function(t){return this.view.opt(t)},t.prototype.end=function(){},t}();e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.mixInto=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){t.prototype[n]||(t.prototype[n]=e.prototype[n])})},t.mixOver=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){t.prototype[n]=e.prototype[n]})},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=function(){function t(t,e,n){this.start=t,this.end=e||null,this.unzonedRange=this.buildUnzonedRange(n)}return t.parse=function(e,n){var r=e.start||e.date,i=e.end;if(!r)return!1;var o=n.calendar,s=o.moment(r),a=i?o.moment(i):null,l=e.allDay,u=o.opt("forceEventDuration");return!!s.isValid()&&(null==l&&null==(l=n.allDayDefault)&&(l=o.opt("allDayDefault")),!0===l?(s.stripTime(),a&&a.stripTime()):!1===l&&(s.hasTime()||s.time(0),a&&!a.hasTime()&&a.time(0)),!a||a.isValid()&&a.isAfter(s)||(a=null),!a&&u&&(a=o.getDefaultEventEnd(!s.hasTime(),s)),new t(s,a,o))},t.isStandardProp=function(t){return"start"===t||"date"===t||"end"===t||"allDay"===t},t.prototype.isAllDay=function(){return!(this.start.hasTime()||this.end&&this.end.hasTime())},t.prototype.buildUnzonedRange=function(t){var e=this.start.clone().stripZone().valueOf(),n=this.getEnd(t).stripZone().valueOf();return new r.default(e,n)},t.prototype.getEnd=function(t){return this.end?this.end.clone():t.getDefaultEventEnd(this.isAllDay(),this.start)},t}();e.default=i},function(t,e,n){function r(t,e){return!t&&!e||!(!t||!e)&&(t.component===e.component&&i(t,e)&&i(e,t))}function i(t,e){for(var n in t)if(!/^(component|left|right|top|bottom)$/.test(n)&&t[n]!==e[n])return!1;return!0}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),s=n(4),a=n(59),l=function(t){function e(e,n){var r=t.call(this,n)||this;return r.component=e,r}return o.__extends(e,t),e.prototype.handleInteractionStart=function(e){var n,r,i,o=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),e?(r={left:s.getEvX(e),top:s.getEvY(e)},i=r,o&&(n=s.getOuterRect(o),i=s.constrainPoint(i,n)),this.origHit=this.queryHit(i.left,i.top),o&&this.options.subjectCenter&&(this.origHit&&(n=s.intersectRects(this.origHit,n)||n),i=s.getRectCenter(n)),this.coordAdjust=s.diffPoints(i,r)):(this.origHit=null,this.coordAdjust=null),t.prototype.handleInteractionStart.call(this,e)},e.prototype.handleDragStart=function(e){var n;t.prototype.handleDragStart.call(this,e),(n=this.queryHit(s.getEvX(e),s.getEvY(e)))&&this.handleHitOver(n)},e.prototype.handleDrag=function(e,n,i){var o;t.prototype.handleDrag.call(this,e,n,i),o=this.queryHit(s.getEvX(i),s.getEvY(i)),r(o,this.hit)||(this.hit&&this.handleHitOut(),o&&this.handleHitOver(o))},e.prototype.handleDragEnd=function(e){this.handleHitDone(),t.prototype.handleDragEnd.call(this,e)},e.prototype.handleHitOver=function(t){var e=r(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},e.prototype.handleHitOut=function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},e.prototype.handleHitDone=function(){this.hit&&this.trigger("hitDone",this.hit)},e.prototype.handleInteractionEnd=function(e,n){t.prototype.handleInteractionEnd.call(this,e,n),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},e.prototype.handleScrollEnd=function(){t.prototype.handleScrollEnd.call(this),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},e.prototype.queryHit=function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)},e}(a.default);e.default=l},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.version="3.10.1",e.internalApiVersion=12;var r=n(4);e.applyAll=r.applyAll,e.debounce=r.debounce,e.isInt=r.isInt,e.htmlEscape=r.htmlEscape,e.cssToStr=r.cssToStr,e.proxy=r.proxy,e.capitaliseFirstLetter=r.capitaliseFirstLetter,e.getOuterRect=r.getOuterRect,e.getClientRect=r.getClientRect,e.getContentRect=r.getContentRect,e.getScrollbarWidths=r.getScrollbarWidths,e.preventDefault=r.preventDefault,e.parseFieldSpecs=r.parseFieldSpecs,e.compareByFieldSpecs=r.compareByFieldSpecs,e.compareByFieldSpec=r.compareByFieldSpec,e.flexibleCompare=r.flexibleCompare,e.computeGreatestUnit=r.computeGreatestUnit,e.divideRangeByDuration=r.divideRangeByDuration,e.divideDurationByDuration=r.divideDurationByDuration,e.multiplyDuration=r.multiplyDuration,e.durationHasTime=r.durationHasTime,e.log=r.log,e.warn=r.warn,e.removeExact=r.removeExact,e.intersectRects=r.intersectRects,e.allowSelection=r.allowSelection,e.attrsToStr=r.attrsToStr,e.compareNumbers=r.compareNumbers,e.compensateScroll=r.compensateScroll,e.computeDurationGreatestUnit=r.computeDurationGreatestUnit,e.constrainPoint=r.constrainPoint,e.copyOwnProps=r.copyOwnProps,e.diffByUnit=r.diffByUnit,e.diffDay=r.diffDay,e.diffDayTime=r.diffDayTime,e.diffPoints=r.diffPoints,e.disableCursor=r.disableCursor,e.distributeHeight=r.distributeHeight,e.enableCursor=r.enableCursor,e.firstDefined=r.firstDefined,e.getEvIsTouch=r.getEvIsTouch,e.getEvX=r.getEvX,e.getEvY=r.getEvY,e.getRectCenter=r.getRectCenter,e.getScrollParent=r.getScrollParent,e.hasOwnProp=r.hasOwnProp,e.isArraysEqual=r.isArraysEqual,e.isNativeDate=r.isNativeDate,e.isPrimaryMouseButton=r.isPrimaryMouseButton,e.isTimeStr
29177ing=r.isTimeString,e.matchCellWidths=r.matchCellWidths,e.mergeProps=r.mergeProps,e.preventSelection=r.preventSelection,e.removeMatching=r.removeMatching,e.stripHtmlEntities=r.stripHtmlEntities,e.subtractInnerElHeight=r.subtractInnerElHeight,e.uncompensateScroll=r.uncompensateScroll,e.undistributeHeight=r.undistributeHeight,e.dayIDs=r.dayIDs,e.unitsDesc=r.unitsDesc;var i=n(49);e.formatDate=i.formatDate,e.formatRange=i.formatRange,e.queryMostGranularFormatUnit=i.queryMostGranularFormatUnit;var o=n(32);e.datepickerLocale=o.datepickerLocale,e.locale=o.locale,e.getMomentLocaleData=o.getMomentLocaleData,e.populateInstanceComputableOptions=o.populateInstanceComputableOptions;var s=n(19);e.eventDefsToEventInstances=s.eventDefsToEventInstances,e.eventFootprintToComponentFootprint=s.eventFootprintToComponentFootprint,e.eventInstanceToEventRange=s.eventInstanceToEventRange,e.eventInstanceToUnzonedRange=s.eventInstanceToUnzonedRange,e.eventRangeToEventFootprint=s.eventRangeToEventFootprint;var a=n(11);e.moment=a.default;var l=n(13);e.EmitterMixin=l.default;var u=n(7);e.ListenerMixin=u.default;var d=n(51);e.Model=d.default;var c=n(217);e.Constraints=c.default;var p=n(55);e.DateProfileGenerator=p.default;var h=n(5);e.UnzonedRange=h.default;var f=n(12);e.ComponentFootprint=f.default;var g=n(218);e.BusinessHourGenerator=g.default;var v=n(219);e.EventPeriod=v.default;var y=n(220);e.EventManager=y.default;var m=n(37);e.EventDef=m.default;var b=n(39);e.EventDefMutation=b.default;var w=n(36);e.EventDefParser=w.default;var D=n(53);e.EventInstance=D.default;var E=n(50);e.EventRange=E.default;var S=n(54);e.RecurringEventDef=S.default;var C=n(9);e.SingleEventDef=C.default;var R=n(40);e.EventDefDateMutation=R.default;var T=n(16);e.EventDateProfile=T.default;var M=n(38);e.EventSourceParser=M.default;var I=n(6);e.EventSource=I.default;var H=n(57);e.defineThemeSystem=H.defineThemeSystem,e.getThemeSystemClass=H.getThemeSystemClass;var P=n(20);e.EventInstanceGroup=P.default;var _=n(56);e.ArrayEventSource=_.default;var x=n(223);e.FuncEventSource=x.default;var O=n(224);e.JsonFeedEventSource=O.default;var F=n(34);e.EventFootprint=F.default;var z=n(35);e.Class=z.default;var B=n(15);e.Mixin=B.default;var A=n(58);e.CoordCache=A.default;var k=n(225);e.Iterator=k.default;var L=n(59);e.DragListener=L.default;var V=n(17);e.HitDragListener=V.default;var G=n(226);e.MouseFollower=G.default;var N=n(52);e.ParsableModelMixin=N.default;var j=n(227);e.Popover=j.default;var U=n(21);e.Promise=U.default;var W=n(228);e.TaskQueue=W.default;var q=n(229);e.RenderQueue=q.default;var Y=n(41);e.Scroller=Y.default;var Z=n(22);e.Theme=Z.default;var X=n(230);e.Component=X.default;var Q=n(231);e.DateComponent=Q.default;var $=n(42);e.InteractiveDateComponent=$.default;var K=n(232);e.Calendar=K.default;var J=n(43);e.View=J.default;var tt=n(24);e.defineView=tt.defineView,e.getViewConfig=tt.getViewConfig;var et=n(60);e.DayTableMixin=et.default;var nt=n(61);e.BusinessHourRenderer=nt.default;var rt=n(44);e.EventRenderer=rt.default;var it=n(62);e.FillRenderer=it.default;var ot=n(63);e.HelperRenderer=ot.default;var st=n(233);e.ExternalDropping=st.default;var at=n(234);e.EventResizing=at.default;var lt=n(64);e.EventPointing=lt.default;var ut=n(235);e.EventDragging=ut.default;var dt=n(236);e.DateSelecting=dt.default;var ct=n(237);e.DateClicking=ct.default;var pt=n(14);e.Interaction=pt.default;var ht=n(65);e.StandardInteractionsMixin=ht.default;var ft=n(238);e.AgendaView=ft.default;var gt=n(239);e.TimeGrid=gt.default;var vt=n(240);e.TimeGridEventRenderer=vt.default;var yt=n(242);e.TimeGridFillRenderer=yt.default;var mt=n(241);e.TimeGridHelperRenderer=mt.default;var bt=n(66);e.DayGrid=bt.default;var wt=n(243);e.DayGridEventRenderer=wt.default;var Dt=n(245);e.DayGridFillRenderer=Dt.default;var Et=n(244);e.DayGridHelperRenderer=Et.default;var St=n(67);e.BasicView=St.default;var Ct=n(68);e.BasicViewDateProfileGenerator=Ct.default;var Rt=n(246);e.MonthView=Rt.default;var Tt=n(247);e.MonthViewDateProfileGenerator=Tt.default;var Mt=n(248);e.ListView=Mt.default;var It=n(250);e.ListEventPointing=It.default;var Ht=n(249);e.ListEventRenderer=Ht.default},function(t,e,n){function r(t,e){var n,r=[];for(n=0;n<t.length;n++)r.push.apply(r,t[n].buildInstances(e));return r}function i(t){return new l.default(t.dateProfile.unzonedRange,t.def,t)}function o(t){return new u.default(new d.default(t.unzonedRange,t.eventDef.isAllDay()),t.eventDef,t.eventInstance)}function s(t){return t.dateProfile.unzonedRange}function a(t){return t.componentFootprint}
29177Object.defineProperty(e,"__esModule",{value:!0});var l=n(50),u=n(34),d=n(12);e.eventDefsToEventInstances=r,e.eventInstanceToEventRange=i,e.eventRangeToEventFootprint=o,e.eventInstanceToUnzonedRange=s,e.eventFootprintToComponentFootprint=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(19),o=n(50),s=function(){function t(t){this.eventInstances=t||[]}return t.prototype.getAllEventRanges=function(t){return t?this.sliceNormalRenderRanges(t):this.eventInstances.map(i.eventInstanceToEventRange)},t.prototype.sliceRenderRanges=function(t){return this.isInverse()?this.sliceInverseRenderRanges(t):this.sliceNormalRenderRanges(t)},t.prototype.sliceNormalRenderRanges=function(t){var e,n,r,i=this.eventInstances,s=[];for(e=0;e<i.length;e++)n=i[e],(r=n.dateProfile.unzonedRange.intersect(t))&&s.push(new o.default(r,n.def,n));return s},t.prototype.sliceInverseRenderRanges=function(t){var e=this.eventInstances.map(i.eventInstanceToUnzonedRange),n=this.getEventDef();return e=r.default.invertRanges(e,t),e.map(function(t){return new o.default(t,n)})},t.prototype.isInverse=function(){return this.getEventDef().hasInverseRendering()},t.prototype.getEventDef=function(){return this.explicitEventDef||this.eventInstances[0].def},t}();e.default=s},function(t,e,n){function r(t,e){t.then=function(n){return"function"==typeof n?s.resolve(n(e)):t}}function i(t){t.then=function(e,n){return"function"==typeof n&&n(),t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),s={construct:function(t){var e=o.Deferred(),n=e.promise();return"function"==typeof t&&t(function(t){e.resolve(t),r(n,t)},function(){e.reject(),i(n)}),n},resolve:function(t){var e=o.Deferred().resolve(t),n=e.promise();return r(n,t),n},reject:function(){var t=o.Deferred().reject(),e=t.promise();return i(e),e}};e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(){function t(t){this.optionsManager=t,this.processIconOverride()}return t.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.optionsManager.get(this.iconOverrideOption))},t.prototype.setIconOverride=function(t){var e,n;if(r.isPlainObject(t)){e=r.extend({},this.iconClasses);for(n in t)e[n]=this.applyIconOverridePrefix(t[n]);this.iconClasses=e}else!1===t&&(this.iconClasses={})},t.prototype.applyIconOverridePrefix=function(t){var e=this.iconOverridePrefix;return e&&0!==t.indexOf(e)&&(t=e+t),t},t.prototype.getClass=function(t){return this.classes[t]||""},t.prototype.getIconClass=function(t){var e=this.iconClasses[t];return e?this.baseIconClass+" "+e:""},t.prototype.getCustomButtonIconClass=function(t){var e;return this.iconOverrideCustomButtonOption&&(e=t[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(e):""},t}();e.default=i,i.prototype.classes={},i.prototype.iconClasses={},i.prototype.baseIconClass="",i.prototype.iconOverridePrefix=""},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(18),o=n(13),s=n(7);i.touchMouseIgnoreWait=500;var a=null,l=0,u=function(){function t(){this.isTouching=!1,this.mouseIgnoreDepth=0}return t.get=function(){return a||(a=new t,a.bind()),a},t.needed=function(){t.get(),l++},t.unneeded=function(){--l||(a.unbind(),a=null)},t.prototype.bind=function(){var t=this;this.listenTo(r(document),{touchstart:this.handleTouchStart,
29178touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(e){t.handleTouchMove(r.Event(e))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(e){t.handleScroll(r.Event(e))},!0)},t.prototype.unbind=function(){this.stopListeningTo(r(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy,{passive:!1}),window.removeEventListener("scroll",this.handleScrollProxy,!0)},t.prototype.handleTouchStart=function(t){this.stopTouch(t,!0),this.isTouching=!0,this.trigger("touchstart",t)},t.prototype.handleTouchMove=function(t){this.isTouching&&this.trigger("touchmove",t)},t.prototype.handleTouchCancel=function(t){this.isTouching&&(this.trigger("touchcancel",t),this.stopTouch(t))},t.prototype.handleTouchEnd=function(t){this.stopTouch(t)},t.prototype.handleMouseDown=function(t){this.shouldIgnoreMouse()||this.trigger("mousedown",t)},t.prototype.handleMouseMove=function(t){this.shouldIgnoreMouse()||this.trigger("mousemove",t)},t.prototype.handleMouseUp=function(t){this.shouldIgnoreMouse()||this.trigger("mouseup",t)},t.prototype.handleClick=function(t){this.shouldIgnoreMouse()||this.trigger("click",t)},t.prototype.handleSelectStart=function(t){this.trigger("selectstart",t)},t.prototype.handleContextMenu=function(t){this.trigger("contextmenu",t)},t.prototype.handleScroll=function(t){this.trigger("scroll",t)},t.prototype.stopTouch=function(t,e){void 0===e&&(e=!1),this.isTouching&&(this.isTouching=!1,this.trigger("touchend",t),e||this.startTouchMouseIgnore())},t.prototype.startTouchMouseIgnore=function(){var t=this,e=i.touchMouseIgnoreWait;e&&(this.mouseIgnoreDepth++,setTimeout(function(){t.mouseIgnoreDepth--},e))},t.prototype.shouldIgnoreMouse=function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)},t}();e.default=u,s.default.mixInto(u),o.default.mixInto(u)},function(t,e,n){function r(t,n){e.viewHash[t]=n}function i(t){return e.viewHash[t]}
29178Object.defineProperty(e,"__esModule",{value:!0});var o=n(18);e.viewHash={},o.views=e.viewHash,e.defineView=r,e.getViewConfig=i},,,,,,,,function(t,e,n){function r(t){a.each(f,function(e,n){null==t[e]&&(t[e]=n(t))})}function i(t,n,r){var i=e.localeOptionHash[t]||(e.localeOptionHash[t]={});i.isRTL=r.isRTL,i.weekNumberTitle=r.weekHeader,a.each(p,function(t,e){i[t]=e(r)});var o=a.datepicker;o&&(o.regional[n]=o.regional[t]=r,o.regional.en=o.regional[""],o.setDefaults(r))}function o(t,n){var r,i;r=e.localeOptionHash[t]||(e.localeOptionHash[t]={}),n&&(r=e.localeOptionHash[t]=d.mergeOptions([r,n])),i=s(t),a.each(h,function(t,e){null==r[t]&&(r[t]=e(i,r))}),d.globalDefaults.locale=t}function s(t){return l.localeData(t)||l.localeData("en")}Object.defineProperty(e,"__esModule",{value:!0});var a=n(3),l=n(0),u=n(18),d=n(33),c=n(4);e.localeOptionHash={},u.locales=e.localeOptionHash;var p={buttonText:function(t){return{prev:c.stripHtmlEntities(t.prevText),next:c.stripHtmlEntities(t.nextText),today:c.stripHtmlEntities(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},h={dayOfMonthFormat:function(t,e){var n=t.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(t){return t.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}},f={smallDayDateFormat:function(t){return t.isRTL?"D dd":"dd D"},weekFormat:function(t){return t.isRTL?"w[ "+t.weekNumberTitle+"]":"["+t.weekNumberTitle+" ]w"},smallWeekFormat:function(t){return t.isRTL?"w["+t.weekNumberTitle+"]":"["+t.weekNumberTitle+"]w"}};e.populateInstanceComputableOptions=r,e.datepickerLocale=i,e.locale=o,e.getMomentLocaleData=s,o("en",d.englishDefaults)},function(t,e,n){function r(t){return i.mergeProps(t,o)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(4);e.globalDefaults={titleRangeSeparator:" – ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",columnHeader:!0,defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,locale:null,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},allDayText:"all-day",agendaEventMinHeight:0,theme:!1,dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},e.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},e.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var o=["header","footer","buttonText","buttonIcons","themeButtonIcons"];e.mergeOptions=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.componentFootprint=t,this.eventDef=e,n&&(this.eventInstance=n)}return t.prototype.getEventLegacy=function(){return(this.eventInstance||this.eventDef).toLegacy()},t}();e.default=n}
29178,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=function(){function t(){}return t.extend=function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(this);return i.copyOwnProps(t,e.prototype),e},t.mixin=function(t){i.copyOwnProps(t,this.prototype)},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(4),o=n(9),s=n(54);e.default={parse:function(t,e){return i.isTimeString(t.start)||r.isDuration(t.start)||i.isTimeString(t.end)||r.isDuration(t.end)?s.default.parse(t,e):o.default.parse(t,e)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(52),o=function(){function t(t){this.source=t,this.className=[],this.miscProps={}}return t.parse=function(t,e){var n=new this(e);return!!n.applyProps(t)&&n},t.normalizeId=function(t){return String(t)},t.generateId=function(){return"_fc"+t.uuid++},t.prototype.clone=function(){var e=new this.constructor(this.source);return e.id=this.id,e.rawId=this.rawId,e.uid=this.uid,t.copyVerbatimStandardProps(this,e),e.className=this.className.slice(),e.miscProps=r.extend({},this.miscProps),e},t.prototype.hasInverseRendering=function(){return"inverse-background"===this.getRendering()},t.prototype.hasBgRendering=function(){var t=this.getRendering();return"inverse-background"===t||"background"===t},t.prototype.getRendering=function(){return null!=this.rendering?this.rendering:this.source.rendering},t.prototype.getConstraint=function(){return null!=this.constraint?this.constraint:null!=this.source.constraint?this.source.constraint:this.source.calendar.opt("eventConstraint")},t.prototype.getOverlap=function(){return null!=this.overlap?this.overlap:null!=this.source.overlap?this.source.overlap:this.source.calendar.opt("eventOverlap")},t.prototype.isStartExplicitlyEditable=function(){return null!=this.startEditable?this.startEditable:this.source.startEditable},t.prototype.isDurationExplicitlyEditable=function(){return null!=this.durationEditable?this.durationEditable:this.source.durationEditable},t.prototype.isExplicitlyEditable=function(){return null!=this.editable?this.editable:this.source.editable},t.prototype.toLegacy=function(){var e=r.extend({},this.miscProps);return e._id=this.uid,e.source=this.source,e.className=this.className.slice(),e.allDay=this.isAllDay(),null!=this.rawId&&(e.id=this.rawId),t.copyVerbatimStandardProps(this,e),e},t.prototype.applyManualStandardProps=function(e){return null!=e.id?this.id=t.normalizeId(this.rawId=e.id):this.id=t.generateId(),null!=e._id?this.uid=String(e._id):this.uid=t.generateId(),r.isArray(e.className)&&(this.className=e.className),"string"==typeof e.className&&(this.className=e.className.split(/\s+/)),!0},t.prototype.applyMiscProps=function(t){r.extend(this.miscProps,t)},t.uuid=0,t.defineStandardProps=i.default.defineStandardProps,t.copyVerbatimStandardProps=i.default.copyVerbatimStandardProps,t}();e.default=o,i.default.mixInto(o),o.defineStandardProps({_id:!1,id:!1,className:!1,source:!1,title:!0,url:!0,rendering:!0,constraint:!0,overlap:!0,editable:!0,startEditable:!0,durationEditable:!0,color:!0,backgroundColor:!0,borderColor:!0,textColor:!0})},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={sourceClasses:[],registerClass:function(t){this.sourceClasses.unshift(t)},parse:function(t,e){var n,r,i=this.sourceClasses;for(n=0;n<i.length;n++)if(r=i[n].parse(t,e))return r}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),i=n(16),o=n(37),s=n(40),a=n(9),l=function(){function t(){}return t.createFromRawProps=function(e,n,a){var l,u,d,c,p=e.def,h={},f={},g={},v={},y=null,m=null;for(l in n)i.default.isStandardProp(l)?h[l]=n[l]:p.isStandardProp(l)?f[l]=n[l]:p.miscProps[l]!==n[l]&&(g[l]=n[l]);return u=i.default.parse(h,p.source),u&&(d=s.default.createFromDiff(e.dateProfile,u,a)),f.id!==p.id&&(y=f.id),r.isArraysEqual(f.className,p.className)||(m=f.className),o.default.copyVerbatimStandardProps(f,v),c=new t,c.eventDefId=y,c.className=m,c.verbatimStandardProps=v,c.miscProps=g,d&&(c.dateMutation=d),c},t.prototype.mutateSingle=function(t){var e;return this.dateMutation&&(e=t.dateProfile,t.dateProfile=this.dateMutation.buildNewDateProfile(e,t.s
29178ource.calendar)),null!=this.eventDefId&&(t.id=o.default.normalizeId(t.rawId=this.eventDefId)),this.className&&(t.className=this.className),this.verbatimStandardProps&&a.default.copyVerbatimStandardProps(this.verbatimStandardProps,t),this.miscProps&&t.applyMiscProps(this.miscProps),e?function(){t.dateProfile=e}:function(){}},t.prototype.setDateMutation=function(t){t&&!t.isEmpty()?this.dateMutation=t:this.dateMutation=null},t.prototype.isEmpty=function(){return!this.dateMutation},t}();e.default=l},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),i=n(16),o=function(){function t(){this.clearEnd=!1,this.forceTimed=!1,this.forceAllDay=!1}return t.createFromDiff=function(e,n,i){function o(t,e){return i?r.diffByUnit(t,e,i):n.isAllDay()?r.diffDay(t,e):r.diffDayTime(t,e)}var s,a,l,u,d=e.end&&!n.end,c=e.isAllDay()&&!n.isAllDay(),p=!e.isAllDay()&&n.isAllDay();return s=o(n.start,e.start),n.end&&(a=o(n.unzonedRange.getEnd(),e.unzonedRange.getEnd()),l=a.subtract(s)),u=new t,u.clearEnd=d,u.forceTimed=c,u.forceAllDay=p,u.setDateDelta(s),u.setEndDelta(l),u},t.prototype.buildNewDateProfile=function(t,e){var n=t.start.clone(),r=null,o=!1;return t.end&&!this.clearEnd?r=t.end.clone():this.endDelta&&!r&&(r=e.getDefaultEventEnd(t.isAllDay(),n)),this.forceTimed?(o=!0,n.hasTime()||n.time(0),r&&!r.hasTime()&&r.time(0)):this.forceAllDay&&(n.hasTime()&&n.stripTime(),r&&r.hasTime()&&r.stripTime()),this.dateDelta&&(o=!0,n.add(this.dateDelta),r&&r.add(this.dateDelta)),this.endDelta&&(o=!0,r.add(this.endDelta)),this.startDelta&&(o=!0,n.add(this.startDelta)),o&&(n=e.applyTimezone(n),r&&(r=e.applyTimezone(r))),!r&&e.opt("forceEventDuration")&&(r=e.getDefaultEventEnd(t.isAllDay(),n)),new i.default(n,r,e)},t.prototype.setDateDelta=function(t){t&&t.valueOf()?this.dateDelta=t:this.dateDelta=null},t.prototype.setStartDelta=function(t){t&&t.valueOf()?this.startDelta=t:this.startDelta=null},t.prototype.setEndDelta=function(t){t&&t.valueOf()?this.endDelta=t:this.endDelta=null},t.prototype.isEmpty=function(){return!(this.clearEnd||this.forceTimed||this.forceAllDay||this.dateDelta||this.startDelta||this.endDelta)},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(35),a=function(t){function e(e){var n=t.call(this)||this;return e=e||{},n.overflowX=e.overflowX||e.overflow||"auto",n.overflowY=e.overflowY||e.overflow||"auto",n}return r.__extends(e,t),e.prototype.render=function(){this.el=this.renderEl(),this.applyOverflow()},e.prototype.renderEl=function(){return this.scrollEl=i('<div class="fc-scroller"></div>')},e.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},e.prototype.destroy=function(){this.el.remove()},e.prototype.applyOverflow=function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},e.prototype.lockOverflow=function(t){var e=this.overflowX,n=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},e.prototype.setHeight=function(t){this.scrollEl.height(t)},e.prototype.getScrollTop=function(){return this.scrollEl.scrollTop()},e.prototype.setScrollTop=function(t){this.scrollEl.scrollTop(t)},e.prototype.getClientWidth=function(){return this.scrollEl[0].clientWidth},e.prototype.getClientHeight=function(){return this.scrollEl[0].clientHeight},e.prototype.getScrollbarWidths=function(){return o.getScrollbarWidths(this.scrollEl)},e}(s.default);e.default=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(231),a=n(23),l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.segSelector=".fc-event-container > *",r.dateSelectingClass&&(r.dateClicking=new r.dateClickingClass(r)),r.dateSelectingClass&&(r.dateSelecting=new r.dateSelectingClass(r)),r.eventPointingClass&&(r.eventPointing=new r.eventPointingClass(r)),r.eventDraggingClass&&r.eventPointing&&(r.eventDragging=new r.eventDraggingClass(r,r.eventPointing)),r.eventResizingClass&&r.eventPointing&&(r.eventResizing=new r.eventResizingClass(r,r.eventPointing)),r.externalDroppingClass&&(r.externalDropping=new r.externalDroppingClass(r)),r}return r.__extends(e,t),e.prototype.setElement=function(e){t.prototype.setElement.call(this,e),this.dateClicking&&this.dateClicking.bindToEl(e),this.dateSelecting&&this.dateSelecting.bindToEl(e),this.bindAllSegHandlersToEl(e)},e.prototype.removeElement=function(){this.endInteractions(),t.prototype.removeElement.call(this)},e.prototype.executeEventUnrender=function(){this.endInteractions(),t.prototype.executeEventUnrender.call(this)},e.prototype.bindGlobalHandlers=function(){t.prototype.bindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.bindToDocument()},e.prototype.unbindGlobalHandlers=function(){t.prototype.unbindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.unbindFromDocument()},e.prototype.bindDateHandlerToEl=function(t,e,n){var r=this;this.el.on(e,function(t){if(!i(t.target).is(r.segSelector+":not(.fc-helper),"+r.segSelector+":not(.fc-helper) *,.fc-more,a[data-goto]"))return n.call(r,t)})},e.prototype.bindAllSegHandlersToEl=function(t){[this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(e){e&&e.bindToEl(t)})},e.prototype.bindSegHandlerToEl=function(t,e,n){var r=this;t.on(e,this.segSelector,function(t){var e=i(t.currentTarget);if(!e.is(".fc-helper")){var o=e.data("fc-seg");if(o&&!r.shouldIgnoreEventPointing())return n.call(r,o,t)}})},e.prototype.shouldIgnoreMouse=function(){return a.default.get().shouldIgnoreMouse()},e.prototype.shouldIgnoreTouch=function(){var t=this._getView();return t.isSelected||t.selectedEvent},e.prototype.shouldIgnoreEventPointing=function(){return this.eventDragging&&this.eventDragging.isDragging||this.eventResizing&&this.eventResizing.isResizing},e.prototype.canStartSelection=function(t,e){return o.getEvIsTouch(e)&&!this.canStartResize(t,e)&&(this.isEventDefDraggable(t.footprint.eventDef)||this.isEventDefResizable(t.footprint.eventDef))},e.prototype.canStartDrag=function(t,e){return!this.canStartResize(t,e)&&this.isEventDefDraggable(t.footprint.eventDef)},e.prototype.canStartResize=function(t,e){var n=this._getView(),r=t.footprint.eventDef;return(!o.getEvIsTouch(e)||n.isEventDefSelected(r))&&this.isEventDefResizable(r)&&i(e.target).is(".fc-resizer")},e.prototype.endInteractions=function(){[this.dateClicking,this.dateSelecting,this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(t){t&&t.end()})},e.prototype.isEventDefDraggable=function(t){return this.isEventDefStartEditable(t)},e.prototype.isEventDefStartEditable=function(t){var e=t.isStartExplicitlyEditable();return null==e&&null==(e=this.opt("eventStartEditable"))&&(e=this.isEventDefGenerallyEditable(t)),e},e.prototype.isEventDefGenerallyEditable=function(t){var e=t.isExplicitlyEditable();return null==e&&(e=this.opt("editable")),e},e.prototype.isEventDefResizableFromStart=function(t){return this.opt("eventResizableFromStart")&&this.isEventDefResizable(t)},e.prototype.isEventDefResizableFromEnd=function(t){return this.isEventDefResizable(t)},e.prototype.isEventDefResizable=function(t){var e=t.isDurationExplicitlyEditable();return null==e&&null==(e=this.opt("eventDurationEditable"))&&(e=this.isEventDefGenerallyEditable(t)),e},e.prototype.diffDates=function(t,e){return this.largeUnit?o.diffByUnit(t,e,this.largeUnit):o.diffDayTime(t,e)},e.prototype.isEventInstanceGroupAllowed=function(t){var e,n=this._getView(),r=this.dateProfile,i=this.eventRangesToEventFootprints(t.getAllEventRanges());for(e=0;e<i.length;e++)if(!r.validUnzonedRange.containsRange(i[e].componentFootprint.unzonedRange))return!1;return n.calendar.constraints.isEventInstanceGroupAllowed(t)},e.prototype.isExternalInstanceGroupAllowed=function(t){var e,n=this._getView(),r=this.dateProfile,i=this.eventRangesToEventFootprints(t.getAllEventRanges());for(e=0;e<i.length;e++)if(!r.validUnzonedRange.containsRange(i[e].componentFootprint.unzonedRange))return!1;for(e=0;e<i.length;e++)if(!n.calendar.constraints.isSelectionFootprintAllowed(i[e].componentFootprint))return!1;return!0},e}(s.default);e.default=l}
29178,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(0),s=n(4),a=n(229),l=n(55),u=n(42),d=n(23),c=n(5),p=function(t){function e(e,n){var r=t.call(this,null,n.options)||this;return r.batchRenderDepth=0,r.isSelected=!1,r.calendar=e,r.viewSpec=n,r.type=n.type,r.name=r.type,r.initRenderQueue(),r.initHiddenDays(),r.dateProfileGenerator=new r.dateProfileGeneratorClass(r),r.bindBaseRenderHandlers(),r.eventOrderSpecs=s.parseFieldSpecs(r.opt("eventOrder")),r.initialize&&r.initialize(),r}return r.__extends(e,t),e.prototype._getView=function(){return this},e.prototype.opt=function(t){return this.options[t]},e.prototype.initRenderQueue=function(){this.renderQueue=new a.default({event:this.opt("eventRenderWait")}),this.renderQueue.on("start",this.onRenderQueueStart.bind(this)),this.renderQueue.on("stop",this.onRenderQueueStop.bind(this)),this.on("before:change",this.startBatchRender),this.on("change",this.stopBatchRender)},e.prototype.onRenderQueueStart=function(){this.calendar.freezeContentHeight(),this.addScroll(this.queryScroll())},e.prototype.onRenderQueueStop=function(){this.calendar.updateViewSize()&&this.popScroll(),this.calendar.thawContentHeight()},e.prototype.startBatchRender=function(){this.batchRenderDepth++||this.renderQueue.pause()},e.prototype.stopBatchRender=function(){--this.batchRenderDepth||this.renderQueue.resume()},e.prototype.requestRender=function(t,e,n){this.renderQueue.queue(t,e,n)},e.prototype.whenSizeUpdated=function(t){this.renderQueue.isRunning?this.renderQueue.one("stop",t.bind(this)):t.call(this)},e.prototype.computeTitle=function(t){var e;return e=/^(year|month)$/.test(t.currentRangeUnit)?t.currentUnzonedRange:t.activeUnzonedRange,this.formatRange({start:this.calendar.msToMoment(e.startMs,t.isRangeAllDay),end:this.calendar.msToMoment(e.endMs,t.isRangeAllDay)},t.isRangeAllDay,this.opt("titleFormat")||this.computeTitleFormat(t),this.opt("titleRangeSeparator"))},e.prototype.computeTitleFormat=function(t){var e=t.currentRangeUnit;return"year"===e?"YYYY":"month"===e?this.opt("monthYearFormat"):t.currentUnzonedRange.as("days")>1?"ll":"LL"},e.prototype.setDate=function(t){var e=this.get("dateProfile"),n=this.dateProfileGenerator.build(t,void 0,!0);e&&e.activeUnzonedRange.equals(n.activeUnzonedRange)||this.set("dateProfile",n)},e.prototype.unsetDate=function(){this.unset("dateProfile")},e.prototype.fetchInitialEvents=function(t){var e=this.calendar,n=t.isRangeAllDay&&!this.usesMinMaxTime;return e.requestEvents(e.msToMoment(t.activeUnzonedRange.startMs,n),e.msToMoment(t.activeUnzonedRange.endMs,n))},e.prototype.bindEventChanges=function(){this.listenTo(this.calendar,"eventsReset",this.resetEvents)},e.prototype.unbindEventChanges=function(){this.stopListeningTo(this.calendar,"eventsReset")},e.prototype.setEvents=function(t){this.set("currentEvents",t),this.set("hasEvents",!0)},e.prototype.unsetEvents=function(){this.unset("currentEvents"),this.unset("hasEvents")},e.prototype.resetEvents=function(t){this.startBatchRender(),this.unsetEvents(),this.setEvents(t),this.stopBatchRender()},e.prototype.requestDateRender=function(t){var e=this;this.requestRender(function(){e.executeDateRender(t)},"date","init")},e.prototype.requestDateUnrender=function(){var t=this;this.requestRender(function(){t.executeDateUnrender()},"date","destroy")},e.prototype.executeDateRender=function(e){t.prototype.executeDateRender.call(this,e),this.render&&this.render(),this.trigger("datesRendered"),this.addScroll({isDateInit:!0}),this.startNowIndicator()},e.prototype.executeDateUnrender=function(){this.unselect(),this.stopNowIndicator(),this.trigger("before:datesUnrendered"),this.destroy&&this.destroy(),t.prototype.executeDateUnrender.call(this)},e.prototype.bindBaseRenderHandlers=function(){var t=this;this.on("datesRendered",function(){t.whenSizeUpdated(t.triggerViewRender)}),this.on("before:datesUnrendered",function(){t.triggerViewDestroy()})},e.prototype.triggerViewRender=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},e.prototype.triggerViewDestroy=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},e.prototype.requestEventsRender=function(t){var e=this;this.requestRender(function(){e.executeEventRender(t),e.whenSizeUpdated(e.triggerAfterEventsRendered)},"event","init")},e.prototype.requestEventsUnrender=function(){var t=this;this.requestRender(function(){t.triggerBeforeEventsDestroyed(),t.executeEventUnrender()},"event","destroy")},e.prototype.requestBusinessHoursRender=function(t){var e=this;this.requestRender(function(){e.renderBusinessHours(t)},"businessHours","init")},e.prototype.requestBusinessHoursUnrender=function(){var t=this;this.requestRender(function(){t.unrenderBusinessHours()},"businessHours","destroy")},e.prototype.bindGlobalHandlers=function(){t.prototype.bindGlobalHandlers.call(this),this.listenTo(d.default.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},e.prototype.unbindGlobalHandlers=function(){t.prototype.unbindGlobalHandlers.call(this),this.stopListeningTo(d.default.get())},e.prototype.startNowIndicator=function(){var t,e,n,r=this;
29178this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit())&&(e=s.proxy(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),n=this.initialNowDate.clone().startOf(t).add(1,t).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,e(),n=+o.duration(1,t),n=Math.max(100,n),r.nowIndicatorIntervalID=setInterval(e,n)},n))},e.prototype.updateNowIndicator=function(){this.isDatesRendered&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add((new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},e.prototype.stopNowIndicator=function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},e.prototype.updateSize=function(e,n,r){this.setHeight?this.setHeight(e,n):t.prototype.updateSize.call(this,e,n,r),this.updateNowIndicator()},e.prototype.addScroll=function(t){var e=this.queuedScroll||(this.queuedScroll={});i.extend(e,t)},e.prototype.popScroll=function(){this.applyQueuedScroll(),this.queuedScroll=null},e.prototype.applyQueuedScroll=function(){this.queuedScroll&&this.applyScroll(this.queuedScroll)},e.prototype.queryScroll=function(){var t={};return this.isDatesRendered&&i.extend(t,this.queryDateScroll()),t},e.prototype.applyScroll=function(t){t.isDateInit&&this.isDatesRendered&&i.extend(t,this.computeInitialDateScroll()),this.isDatesRendered&&this.applyDateScroll(t)},e.prototype.computeInitialDateScroll=function(){return{}},e.prototype.queryDateScroll=function(){return{}},e.prototype.applyDateScroll=function(t){},e.prototype.reportEventDrop=function(t,e,n,r){var i=this.calendar.eventManager,s=i.mutateEventsWithId(t.def.id,e),a=e.dateMutation;a&&(t.dateProfile=a.buildNewDateProfile(t.dateProfile,this.calendar)),this.triggerEventDrop(t,a&&a.dateDelta||o.duration(),s,n,r)},e.prototype.triggerEventDrop=function(t,e,n,r,i){this.publiclyTrigger("eventDrop",{context:r[0],args:[t.toLegacy(),e,n,i,{},this]})},e.prototype.reportExternalDrop=function(t,e,n,r,i,o){e&&this.calendar.eventManager.addEventDef(t,n),this.triggerExternalDrop(t,e,r,i,o)},e.prototype.triggerExternalDrop=function(t,e,n,r,i){this.publiclyTrigger("drop",{context:n[0],args:[t.dateProfile.start.clone(),r,i,this]}),e&&this.publiclyTrigger("eventReceive",{context:this,args:[t.buildInstance().toLegacy(),this]})},e.prototype.reportEventResize=function(t,e,n,r){var i=this.calendar.eventManager,o=i.mutateEventsWithId(t.def.id,e);t.dateProfile=e.dateMutation.buildNewDateProfile(t.dateProfile,this.calendar);var s=e.dateMutation.endDelta||e.dateMutation.startDelta;this.triggerEventResize(t,s,o,n,r)},e.prototype.triggerEventResize=function(t,e,n,r,i){this.publiclyTrigger("eventResize",{context:r[0],args:[t.toLegacy(),e,n,i,{},this]})},e.prototype.select=function(t,e){this.unselect(e),this.renderSelectionFootprint(t),this.reportSelection(t,e)},e.prototype.renderSelectionFootprint=function(e){this.renderSelection?this.renderSelection(e.toLegacy(this.calendar)):t.prototype.renderSelectionFootprint.call(this,e)},e.prototype.reportSelection=function(t,e){this.isSelected=!0,this.triggerSelect(t,e)},e.prototype.triggerSelect=function(t,e){var n=this.calendar.footprintToDateProfile(t);this.publiclyTrigger("select",{context:this,args:[n.start,n.end,e,this]})},e.prototype.unselect=function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.publiclyTrigger("unselect",{context:this,args:[t,this]}))},e.prototype.selectEventInstance=function(t){this.selectedEventInstance&&this.selectedEventInstance===t||(this.unselectEventInstance(),this.getEventSegs().forEach(function(e){e.footprint.eventInstance===t&&e.el&&e.el.addClass("fc-selected")}),this.selectedEventInstance=t)},e.prototype.unselectEventInstance=function(){this.selectedEventInstance&&(this.getEventSegs().forEac
29178h(function(t){t.el&&t.el.removeClass("fc-selected")}),this.selectedEventInstance=null)},e.prototype.isEventDefSelected=function(t){return this.selectedEventInstance&&this.selectedEventInstance.def.id===t.id},e.prototype.handleDocumentMousedown=function(t){s.isPrimaryMouseButton(t)&&this.processUnselect(t)},e.prototype.processUnselect=function(t){this.processRangeUnselect(t),this.processEventUnselect(t)},e.prototype.processRangeUnselect=function(t){var e;this.isSelected&&this.opt("unselectAuto")&&((e=this.opt("unselectCancel"))&&i(t.target).closest(e).length||this.unselect(t))},e.prototype.processEventUnselect=function(t){this.selectedEventInstance&&(i(t.target).closest(".fc-selected").length||this.unselectEventInstance())},e.prototype.triggerBaseRendered=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},e.prototype.triggerBaseUnrendered=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},e.prototype.triggerDayClick=function(t,e,n){var r=this.calendar.footprintToDateProfile(t);this.publiclyTrigger("dayClick",{context:e,args:[r.start,n,this]})},e.prototype.isDateInOtherMonth=function(t,e){return!1},e.prototype.getUnzonedRangeOption=function(t){var e=this.opt(t);if("function"==typeof e&&(e=e.apply(null,Array.prototype.slice.call(arguments,1))),e)return this.calendar.parseUnzonedRange(e)},e.prototype.initHiddenDays=function(){var t,e=this.opt("hiddenDays")||[],n=[],r=0;for(!1===this.opt("weekends")&&e.push(0,6),t=0;t<7;t++)(n[t]=-1!==i.inArray(t,e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(t){var e=t.getStart(),n=t.getEnd();return e&&(e=this.skipHiddenDays(e)),n&&(n=this.skipHiddenDays(n,-1,!0)),null===e||null===n||e<n?new c.default(e,n):null},e.prototype.isHiddenDay=function(t){return o.isMoment(t)&&(t=t.day()),this.isHiddenDayHash[t]},e.prototype.skipHiddenDays=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var r=t.clone();this.isHiddenDayHash[(r.day()+(n?e:0)+7)%7];)r.add(e,"days");return r},e}(u.default);e.default=p,p.prototype.usesMinMaxTime=!1,p.prototype.dateProfileGeneratorClass=l.default,p.watch("displayingDates",["isInDom","dateProfile"],function(t){this.requestDateRender(t.dateProfile)},function(){this.requestDateUnrender()}),p.watch("displayingBusinessHours",["displayingDates","businessHourGenerator"],function(t){this.requestBusinessHoursRender(t.businessHourGenerator)},function(){this.requestBusinessHoursUnrender()}),p.watch("initialEvents",["dateProfile"],function(t){return this.fetchInitialEvents(t.dateProfile)}),p.watch("bindingEvents",["initialEvents"],function(t){this.setEvents(t.initialEvents),this.bindEventChanges()},function(){this.unbindEventChanges(),this.unsetEvents()}),p.watch("displayingEvents",["displayingDates","hasEvents"],function(){this.requestEventsRender(this.get("currentEvents"))},function(){this.requestEventsUnrender()}),p.watch("title",["dateProfile"],function(t){return this.title=this.computeTitle(t.dateProfile)}),p.watch("legacyDateProps",["dateProfile"],function(t){var e=this.calendar,n=t.dateProfile;this.start=e.msToMoment(n.activeUnzonedRange.startMs,n.isRangeAllDay),this.end=e.msToMoment(n.activeUnzonedRange.endMs,n.isRangeAllDay),this.intervalStart=e.msToMoment(n.currentUnzonedRange.startMs,n.isRangeAllDay),this.intervalEnd=e.msToMoment(n.currentUnzonedRange.endMs,n.isRangeAllDay)})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=function(){function t(t,e){this.view=t._getView(),this.component=t,this.fillRenderer=e}return t.prototype.opt=function(t){return this.view.opt(t)},t.prototype.rangeUpdated=function(){var t,e
29179;this.eventTimeFormat=this.opt("eventTimeFormat")||this.opt("timeFormat")||this.computeEventTimeFormat(),t=this.opt("displayEventTime"),null==t&&(t=this.computeDisplayEventTime()),e=this.opt("displayEventEnd"),null==e&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},t.prototype.render=function(t){var e,n,r,i=this.component._getDateProfile(),o=[],s=[];for(e in t)n=t[e],r=n.sliceRenderRanges(i.activeUnzonedRange),n.getEventDef().hasBgRendering()?o.push.apply(o,r):s.push.apply(s,r);this.renderBgRanges(o),this.renderFgRanges(s)},t.prototype.unrender=function(){this.unrenderBgRanges(),this.unrenderFgRanges()},t.prototype.renderFgRanges=function(t){var e=this.component.eventRangesToEventFootprints(t),n=this.component.eventFootprintsToSegs(e);n=this.renderFgSegEls(n),!1!==this.renderFgSegs(n)&&(this.fgSegs=n)},t.prototype.unrenderFgRanges=function(){this.unrenderFgSegs(this.fgSegs||[]),this.fgSegs=null},t.prototype.renderBgRanges=function(t){var e=this.component.eventRangesToEventFootprints(t),n=this.component.eventFootprintsToSegs(e);!1!==this.renderBgSegs(n)&&(this.bgSegs=n)},t.prototype.unrenderBgRanges=function(){this.unrenderBgSegs(),this.bgSegs=null},t.prototype.getSegs=function(){return(this.bgSegs||[]).concat(this.fgSegs||[])},t.prototype.renderFgSegs=function(t){return!1},t.prototype.unrenderFgSegs=function(t){},t.prototype.renderBgSegs=function(t){var e=this;if(!this.fillRenderer)return!1;this.fillRenderer.renderSegs("bgEvent",t,{getClasses:function(t){return e.getBgClasses(t.footprint.eventDef)},getCss:function(t){return{"background-color":e.getBgColor(t.footprint.eventDef)}},filterEl:function(t,n){return e.filterEventRenderEl(t.footprint,n)}})},t.prototype.unrenderBgSegs=function(){this.fillRenderer&&this.fillRenderer.unrender("bgEvent")},t.prototype.renderFgSegEls=function(t,e){var n=this;void 0===e&&(e=!1);var i,o=this.view.hasPublicHandlers("eventRender"),s="",a=[];if(t.length){for(i=0;i<t.length;i++)this.beforeFgSegHtml(t[i]),s+=this.fgSegHtml(t[i],e);r(s).each(function(e,i){var s=t[e],l=r(i);o&&(l=n.filterEventRenderEl(s.footprint,l)),l&&(l.data("fc-seg",s
29179),s.el=l,a.push(s))})}return a},t.prototype.beforeFgSegHtml=function(t){},t.prototype.fgSegHtml=function(t,e){},t.prototype.getSegClasses=function(t,e,n){var r=["fc-event",t.isStart?"fc-start":"fc-not-start",t.isEnd?"fc-end":"fc-not-end"].concat(this.getClasses(t.footprint.eventDef));return e&&r.push("fc-draggable"),n&&r.push("fc-resizable"),this.view.isEventDefSelected(t.footprint.eventDef)&&r.push("fc-selected"),r},t.prototype.filterEventRenderEl=function(t,e){var n=t.getEventLegacy(),i=this.view.publiclyTrigger("eventRender",{context:n,args:[n,e,this.view]});return!1===i?e=null:i&&!0!==i&&(e=r(i)),e},t.prototype.getTimeText=function(t,e,n){return this._getTimeText(t.eventInstance.dateProfile.start,t.eventInstance.dateProfile.end,t.componentFootprint.isAllDay,e,n)},t.prototype._getTimeText=function(t,e,n,r,i){return null==r&&(r=this.eventTimeFormat),null==i&&(i=this.displayEventEnd),this.displayEventTime&&!n?i&&e?this.view.formatRange({start:t,end:e},!1,r):t.format(r):""},t.prototype.computeEventTimeFormat=function(){return this.opt("smallTimeFormat")},t.prototype.computeDisplayEventTime=function(){return!0},t.prototype.computeDisplayEventEnd=function(){return!0},t.prototype.getBgClasses=function(t){var e=this.getClasses(t);return e.push("fc-bgevent"),e},t.prototype.getClasses=function(t){var e,n=this.getStylingObjs(t),r=[];for(e=0;e<n.length;e++)r.push.apply(r,n[e].eventClassName||n[e].className||[]);return r},t.prototype.getSkinCss=function(t){return{"background-color":this.getBgColor(t),"border-color":this.getBorderColor(t),color:this.getTextColor(t)}},t.prototype.getBgColor=function(t){var e,n,r=this.getStylingObjs(t);for(e=0;e<r.length&&!n;e++)n=r[e].eventBackgroundColor||r[e].eventColor||r[e].backgroundColor||r[e].color;return n||(n=this.opt("eventBackgroundColor")||this.opt("eventColor")),n},t.prototype.getBorderColor=function(t){var e,n,r=this.getStylingObjs(t);for(e=0;e<r.length&&!n;e++)n=r[e].eventBorderColor||r[e].eventColor||r[e].borderColor||r[e].color;return n||(n=this.opt("eventBorderColor")||this.opt("eventColor")),n},t.prototype.getTextColor=function(t){var e,n,r=this.getStylingObjs(t);for(e=0;e<r.length&&!n;e++)n=r[e].eventTextColor||r[e].textColor;return n||(n=this.opt("eventTextColor")),n},t.prototype.getStylingObjs=function(t){var e=this.getFallbackStylingObjs(t);return e.unshift(t),e},t.prototype.getFallbackStylingObjs=function(t){return[t.source]},t.prototype.sortEventSegs=function(t){t.sort(i.proxy(this,"compareEventSegs"))},t.prototype.compareEventSegs=function(t,e){var n=t.footprint,r=e.footprint,o=n.componentFootprint,s=r.componentFootprint,a=o.unzonedRange,l=s.unzonedRange;return a.startMs-l.startMs||l.endMs-l.startMs-(a.endMs-a.startMs)||s.isAllDay-o.isAllDay||i.compareByFieldSpecs(n.eventDef,r.eventDef,this.view.eventOrderSpecs,n.eventDef.miscProps,r.eventDef.miscProps)},t}();e.default=o},,,,,function(t,e,n){function r(t){return"en"!==t.locale()?t.clone().locale("en"):t}function i(t,e){return h(a(e).fakeFormatString,t)}function o(t,e,n,r,i){var o;return t=y.default.parseZone(t),e=y.default.parseZone(e),o=t.localeData(),n=o.longDateFormat(n)||n,s(a(n),t,e,r||" - ",i)}function s(t,e,n,r,i){var o,s,a,l=t.sameUnits,u=e.clone().stripZone(),d=n.clone().stripZone(),c=f(t.fakeFormatString,e),p=f(t.fakeFormatString,n),h="",v="",y="",m="",b="";for(o=0;o<l.length&&(!l[o]||u.isSame(d,l[o]));o++)h+=c[o];for(s=l.length-1;s>o&&(!l[s]||u.isSame(d,l[s]))&&(s-1!==o||"."!==c[s]);s--)v=c[s]+v;for(a=o;a<=s;a++)y+=c[a],m+=p[a];
29179return(y||m)&&(b=i?m+r+y:y+r+m),g(h+b+v)}function a(t){return C[t]||(C[t]=l(t))}function l(t){var e=u(t);return{fakeFormatString:c(e),sameUnits:p(e)}}function u(t){for(var e,n=[],r=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=r.exec(t);)e[1]?n.push.apply(n,d(e[1])):e[2]?n.push({maybe:u(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push.apply(n,d(e[5]));return n}function d(t){return". "===t?["."," "]:[t]}function c(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t[e],"string"==typeof n?r.push("["+n+"]"):n.token?n.token in E?r.push(b+"["+n.token+"]"):r.push(n.token):n.maybe&&r.push(w+c(n.maybe)+w);return r.join(m)}function p(t){var e,n,r,i=[];for(e=0;e<t.length;e++)n=t[e],n.token?(r=S[n.token.charAt(0)],i.push(r?r.unit:"second")):n.maybe?i.push.apply(i,p(n.maybe)):i.push(null);return i}function h(t,e){return g(f(t,e).join(""))}function f(t,e){var n,r,i=[],o=y.oldMomentFormat(e,t),s=o.split(m);for(n=0;n<s.length;n++)r=s[n],r.charAt(0)===b?i.push(E[r.substring(1)](e)):i.push(r);return i}function g(t){return t.replace(D,function(t,e){return e.match(/[1-9]/)?e:""})}function v(t){var e,n,r,i,o=u(t);for(e=0;e<o.length;e++)n=o[e],n.token&&(r=S[n.token.charAt(0)])&&(!i||r.value>i.value)&&(i=r);return i?i.unit:null}Object.defineProperty(e,"__esModule",{value:!0});var y=n(11);y.newMomentProto.format=function(){return this._fullCalendar&&arguments[0]?i(this,arguments[0]):this._ambigTime?y.oldMomentFormat(r(this),"YYYY-MM-DD"):this._ambigZone?y.oldMomentFormat(r(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?y.oldMomentFormat(r(this)):y.oldMomentProto.format.apply(this,arguments)},y.newMomentProto.toISOString=function(){return this._ambigTime?y.oldMomentFormat(r(this),"YYYY-MM-DD"):this._ambigZone?y.oldMomentFormat(r(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?y.oldMomentProto.toISOString.apply(r(this),arguments):y.oldMomentProto.toISOString.apply(this,arguments)};var m="\v",b="�",w="�",D=new RegExp(w+"([^"+w+"]*)"+w,"g"),E={t:function(t){return y.oldMomentFormat(t,"a").charAt(0)},T:function(t){return y.oldMomentFormat(t,"A").charAt(0)}},S={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}};e.formatDate=i,e.formatRange=o;var C={};e.queryMostGranularFormatUnit=v},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.unzonedRange=t,this.eventDef=e,n&&(this.eventInstance=n)}return t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(35),o=n(13),s=n(7),a=function(t){function e(){var e=t.call(this)||this;return e._watchers={},e._props={},e.applyGlobalWatchers(),e.constructed(),e}return r.__extends(e,t),e.watch=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.prototype.hasOwnProperty("_globalWatchArgs")||(this.prototype._globalWatchArgs=Object.create(this.prototype._globalWatchArgs)),this.prototype._globalWatchArgs[t]=e},e.prototype.constructed=function(){},e.prototype.applyGlobalWatchers=function(){var t,e=this._globalWatchArgs;for(t in e)this.watch.apply(this,[t].concat(e[t]))},e.prototype.has=function(t){return t in this._props},e.prototype.get=function(t){return void 0===t?this._props:this._props[t]},e.prototype.set=function(t,e){var n;"string"==typeof t?(n={},n[t]=void 0===e?null:e):n=t,this.setProps(n)},e.prototype.reset=function(t){var e,n=this._props,r={};for(e in n)r[e]=void 0;for(e in t)r[e]=t[e];this.setProps(r)},e.prototype.unset=function(t){var e,n,r={};for(e="string"==typeof t?[t]:t,n=0;n<e.length;n++)r[e[n]]=void 0;this.setProps(r)},e.prototype.setProps=function(t){var e,n,r={},i=0;for(e in t)"object"!=typeof(n=t[e])&&n===this._props[e]||(r[e]=n,i++);if(i){this.trigger("before:batchChange",r);for(e in r)n=r[e],this.trigger("before:change",e,n),this.trigger("before:change:"+e,n);for(e in r)n=r[e],void 0===n?delete this._props[e]:this._props[e]=n,this.trigger("change:"+e,n),this.trigger("change",e,n);this.trigger("batchChange",r)}},e.prototype.watch=function(t,e,n,r){var i=this;this.unwatch(t),this._watchers[t]=this._watchDeps(e,function(e){var r=n.call(i,e);r&&r.then?(i.unset(t),r.then(function(e){i.set(t,e)})):i.set(t,r)},function(e){i.unset(t),r&&r.call(i,e)})},e.prototype.unwatch=function(t){var e=this._watchers[t];e&&(delete this._watchers[t],e.teardown())},e.prototype._watchDeps=function(t,e,n){var r=this,i=0,o=t.length,s=0,a={},l=[],u=!1,d=function(t,e,r){1===++i&&s===o&&(u=!0,n(a),u=!1)},c=function(t,n,r){void 0===n?(r||void 0===a[t]||s--,delete a[t]):(r||void 0!==a[t]||s++,a[t]=n),--i||s===o&&(u||e(a))},p=function(t,e){r.on(t,e),l.push([t,e])};return t.forEach(function(t){var e=!1;"?"===t.charAt(0)&&(t=t.substring(1),e=!0),p("before:change:"+t,function(t){d()}),p("change:"+t,function(n){c(t,n,e)})}),t.forEach(function(t){var e=!1;"?"===t.charAt(0)&&(t=t.substring(1),e=!0),r.has(t)?(a[t]=r.get(t),s++):e&&s++}),s===o&&e(a),{teardown:function(){for(var t=0;t<l.length;t++)r.off(l[t][0],l[t][1]);l=null,s===o&&n()},flash:function(){s===o&&(n(),e(a))}}},e.prototype.flash=function(t){var e=this._watchers[t];e&&e.flash()},e}(i.default);e.default=a,a.prototype._globalWatchArgs={},o.default.mixInto(a),s.default.mixInto(a)}
29179,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.defineStandardProps=function(t){var e=this.prototype;e.hasOwnProperty("standardPropMap")||(e.standardPropMap=Object.create(e.standardPropMap)),i.copyOwnProps(t,e.standardPropMap)},e.copyVerbatimStandardProps=function(t,e){var n,r=this.prototype.standardPropMap;for(n in r)null!=t[n]&&!0===r[n]&&(e[n]=t[n])},e.prototype.applyProps=function(t){var e,n=this.standardPropMap,r={},i={};for(e in t)!0===n[e]?this[e]=t[e]:!1===n[e]?r[e]=t[e]:i[e]=t[e];return this.applyMiscProps(i),this.applyManualStandardProps(r)},e.prototype.applyManualStandardProps=function(t){return!0},e.prototype.applyMiscProps=function(t){},e.prototype.isStandardProp=function(t){return t in this.standardPropMap},e}(o.default);e.default=s,s.prototype.standardPropMap={}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.def=t,this.dateProfile=e}return t.prototype.toLegacy=function(){var t=this.dateProfile,e=this.def.toLegacy();return e.start=t.start.clone(),e.end=t.end?t.end.clone():null,e},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(0),s=n(37),a=n(53),l=n(16),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.isAllDay=function(){return!this.startTime&&!this.endTime},e.prototype.buildInstances=function(t){for(var e,n,r,i=this.source.calendar,o=t.getStart(),s=t.getEnd(),u=[];o.isBefore(s);)this.dowHash&&!this.dowHash[o.day()]||(e=i.applyTimezone(o),n=e.clone(),r=null,this.startTime?n.time(this.startTime):n.stripTime(),this.endTime&&(r=e.clone().time(this.endTime)),u.push(new a.default(this,new l.default(n,r,i)))),o.add(1,"days");return u},e.prototype.setDow=function(t){this.dowHash||(this.dowHash={});for(var e=0;e<t.length;e++)this.dowHash[t[e]]=!0},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e.startTime&&(e.startTime=o.duration(this.startTime)),e.endTime&&(e.endTime=o.duration(this.endTime)),this.dowHash&&(e.dowHash=i.extend({},this.dowHash)),e},e}(s.default);e.default=u,u.prototype.applyProps=function(t){var e=s.default.prototype.applyProps.call(this,t);return t.start&&(this.startTime=o.duration(t.start)),t.end&&(this.endTime=o.duration(t.end)),t.dow&&this.setDow(t.dow),e},u.defineStandardProps({start:!1,end:!1,dow:!1})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(4),o=n(5),s=function(){function t(t){this._view=t}return t.prototype.opt=function(t){return this._view.opt(t)},t.prototype.trimHiddenDays=function(t){return this._view.trimHiddenDays(t)},t.prototype.msToUtcMoment=function(t,e){return this._view.calendar.msToUtcMoment(t,e)},t.prototype.buildPrev=function(t){var e=t.date.clone().startOf(t.currentRangeUnit).subtract(t.dateIncrement);return this.build(e,-1)},t.prototype.buildNext=function(t){var e=t.date.clone().startOf(t.currentRangeUnit).add(t.dateIncrement);return this.build(e,1)},t.prototype.build=function(t,e,n){void 0===n&&(n=!1);var i,o,s,a,l,u,d=!t.hasTime(),c=null,p=null;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(t=this.msToUtcMoment(i.constrainDate(t),d)),o=this.buildCurrentRangeInfo(t,e),s=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.unzonedRange),o.unit,s),a=this.trimHiddenDays(a),l=a.clone(),this.opt("showNonCurrentDates")||(l=l.intersect(o.unzonedRange)),c=r.duration(this.opt("minTime")),p=r.duration(this.opt("maxTime")),l=this.adjustActiveRange(l,c,p),l=l.intersect(i),l&&(t=this.msToUtcMoment(l.constrainDate(t),d)),u=o.unzonedRange.intersectsWith(i),{validUnzonedRange:i,currentUnzonedRange:o.unzonedRange,currentRangeUnit:o.unit,isRangeAllDay:s,activeUnzonedRange:l,renderUnzonedRange:a,minTime:c,maxTime:p,isValid:u,date:t,dateIncrement:this.buildDateIncrement(o.duration)}},t.prototype.buildValidRange=function(){return this._view.getUnzonedRangeOption("validRange",this._view.calendar.getNow())||new o.default},t.prototype.buildCurrentRangeInfo=function(t,e){var n,r=this._view.viewSpec,o=null,s=null,a=null;return r.duration?(o=r.duration,s=r.durationUnit,a=this.buildRangeFromDuration(t,e,o,s)):(n=this.opt("dayCount"))?(s="day",a=this.buildRangeFromDayCount(t,e,n)):(a=this.buildCustomVisibleRange(t))?s=i.computeGreatestUnit(a.getStart(),a.getEnd()):(o=this.getFallbackDuration(),s=i.computeGreatestUnit(o),a=this.buildRangeFromDuration(t,e,o,s)),{duration:o,unit:s,unzonedRange:a}},t.prototype.getFallbackDuration=function(){return r.duration({days:1})},t.prototype.adjustActiveRange=function(t,e,n){var r=t.getStart(),i=t.getEnd();return this._view.usesMinMaxTime&&(e<0&&r.time(0).add(e),n>864e5&&i.time(n-864e5)),new o.default(r,i)},t.prototype.buildRangeFromDuration=function(t,e,n,s){function a(){d=t.clone().startOf(h),c=d.clone().add(n),p=new o.default(d,c)}var l,u,d,c,p,h=this.opt("dateAlignment");return h||(l=this.opt("dateIncrement"),l?(u=r.duration(l),h=u<n?
29179i.computeDurationGreatestUnit(u,l):s):h=s),n.as("days")<=1&&this._view.isHiddenDay(d)&&(d=this._view.skipHiddenDays(d,e),d.startOf("day")),a(),this.trimHiddenDays(p)||(t=this._view.skipHiddenDays(t,e),a()),p},t.prototype.buildRangeFromDayCount=function(t,e,n){var r,i,s=this.opt("dateAlignment"),a=0;if(s||-1!==e){r=t.clone(),s&&r.startOf(s),r.startOf("day"),r=this._view.skipHiddenDays(r),i=r.clone();do{i.add(1,"day"),this._view.isHiddenDay(i)||a++}while(a<n)}else{i=t.clone().startOf("day").add(1,"day"),i=this._view.skipHiddenDays(i,-1,!0),r=i.clone();do{r.add(-1,"day"),this._view.isHiddenDay(r)||a++}while(a<n)}return new o.default(r,i)},t.prototype.buildCustomVisibleRange=function(t){var e=this._view.getUnzonedRangeOption("visibleRange",this._view.calendar.applyTimezone(t));return!e||null!=e.startMs&&null!=e.endMs?e:null},t.prototype.buildRenderRange=function(t,e,n){return t.clone()},t.prototype.buildDateIncrement=function(t){var e,n=this.opt("dateIncrement");return n?r.duration(n):(e=this.opt("dateAlignment"))?r.duration(1,e):t||r.duration({days:1})},t}();e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(21),a=n(6),l=n(9),u=function(t){function e(e){var n=t.call(this,e)||this;return n.eventDefs=[],n}return r.__extends(e,t),e.parse=function(t,e){var n;return i.isArray(t.events)?n=t:i.isArray(t)&&(n={events:t}),!!n&&a.default.parse.call(this,n,e)},e.prototype.setRawEventDefs=function(t){this.rawEventDefs=t,this.eventDefs=this.parseEventDefs(t)},e.prototype.fetch=function(t,e,n){var r,i=this.eventDefs;if(null!=this.currentTimezone&&this.currentTimezone!==n)for(r=0;r<i.length;r++)i[r]instanceof l.default&&i[r].rezone();return this.currentTimezone=n,s.default.resolve(i)},e.prototype.addEventDef=function(t){this.eventDefs.push(t)},e.prototype.removeEventDefsById=function(t){return o.removeMatching(this.eventDefs,function(e){return e.id===t})},e.prototype.removeAllEventDefs=function(){this.eventDefs=[]},e.prototype.getPrimitive=function(){return this.rawEventDefs},e.prototype.applyManualStandardProps=function(e){var n=t.prototype.applyManualStandardProps.call(this,e);return this.setRawEventDefs(e.events),n},e}(a.default);e.default=u,u.defineStandardProps({events:!1})},function(t,e,n){function r(t,e){a[t]=e}function i(t){return t?!0===t?s.default:a[t]:o.default}Object.defineProperty(e,"__esModule",{value:!0});var o=n(221),s=n(222),a={};e.defineThemeSystem=r,e.getThemeSystemClass=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=function(){function t(t){this.isHorizontal=!1,this.isVertical=!1,this.els=r(t.els),this.isHorizontal=t.isHorizontal,this.isVertical=t.isVertical,this.forcedOffsetParentEl=t.offsetParent?r(t.offsetParent):null}return t.prototype.build=function(){var t=this.forcedOffsetParentEl;!t&&this.els.length>0&&(t=this.els.eq(0).offsetParent()),this.origin=t?t.offset():null,this.boundingRect=this.queryBoundingRect
29179(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},t.prototype.clear=function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},t.prototype.ensureBuilt=function(){this.origin||this.build()},t.prototype.buildElHorizontals=function(){var t=[],e=[];this.els.each(function(n,i){var o=r(i),s=o.offset().left,a=o.outerWidth();t.push(s),e.push(s+a)}),this.lefts=t,this.rights=e},t.prototype.buildElVerticals=function(){var t=[],e=[];this.els.each(function(n,i){var o=r(i),s=o.offset().top,a=o.outerHeight();t.push(s),e.push(s+a)}),this.tops=t,this.bottoms=e},t.prototype.getHorizontalIndex=function(t){this.ensureBuilt();var e,n=this.lefts,r=this.rights,i=n.length;for(e=0;e<i;e++)if(t>=n[e]&&t<r[e])return e},t.prototype.getVerticalIndex=function(t){this.ensureBuilt();var e,n=this.tops,r=this.bottoms,i=n.length;for(e=0;e<i;e++)if(t>=n[e]&&t<r[e])return e},t.prototype.getLeftOffset=function(t){return this.ensureBuilt(),this.lefts[t]},t.prototype.getLeftPosition=function(t){return this.ensureBuilt(),this.lefts[t]-this.origin.left},t.prototype.getRightOffset=function(t){return this.ensureBuilt(),this.rights[t]},t.prototype.getRightPosition=function(t){return this.ensureBuilt(),this.rights[t]-this.origin.left},t.prototype.getWidth=function(t){return this.ensureBuilt(),this.rights[t]-this.lefts[t]},t.prototype.getTopOffset=function(t){return this.ensureBuilt(),this.tops[t]},t.prototype.getTopPosition=function(t){return this.ensureBuilt(),this.tops[t]-this.origin.top},t.prototype.getBottomOffset=function(t){return this.ensureBuilt(),this.bottoms[t]},t.prototype.getBottomPosition=function(t){return this.ensureBuilt(),this.bottoms[t]-this.origin.top},t.prototype.getHeight=function(t){return this.ensureBuilt(),this.bottoms[t]-this.tops[t]},t.prototype.queryBoundingRect=function(){var t;return this.els.length>0&&(t=i.getScrollParent(this.els.eq(0)),!t.is(document)&&!t.is("html,body"))?i.getClientRect(t):null},t.prototype.isPointInBounds=function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},t.prototype.isLeftInBounds=function(t){return!this.boundingRect||t>=this.boundingRect.left&&t<this.boundingRect.right},t.prototype.isTopInBounds=function(t){return!this.boundingRect||t>=this.boundingRect.top&&t<this.boundingRect.bottom},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n(7),s=n(23),a=function(){function t(t){this.isInteracting=!1,this.isDistanceSurpassed=!1,this.isDelayEnded=!1,this.isDragging=!1,this.isTouch=!1,this.isGeneric=!1,this.shouldCancelTouchScroll=!0,this.scrollAlwaysKills=!1,this.isAutoScroll=!1,this.scrollSensitivity=30,this.scrollSpeed=200,this.scrollIntervalMs=50,this.options=t||{}}return t.prototype.startInteraction=function(t,e){if(void 0===e&&(e={}),"mousedown"===t.type){if(s.default.get().shouldIgnoreMouse())return;if(!i.isPrimaryMouseButton(t))return;t.preventDefault()}this.isInteracting||(this.delay=i.firstDefined(e.delay,this.options.delay,0),this.minDistance=i.firstDefined(e.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,i.preventSelection(r("body")),this.isInteracting=!0,this.isTouch=i.getEvIsTouch(t),this.isGeneric="dragstart"===t.type,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=i.getEvX(t),this.originY=i.getEvY(t),this.scrollEl=i.getScrollParent(r(t.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(t),this.startDelay(t),this.minDistance||this.handleDistanceSurpassed(t))},t.prototype.handleInteractionStart=function(t){this.trigger("interactionStart",t)},t.prototype.endInteraction=function(t,e){this.isInteracting&&(this.endDrag(t),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(t,e),i.allowSelection(r("body")))},t.prototype.handleInteractionEnd=function(t,e){this.trigger("interactionEnd",t,e||!1)},t.prototype.bindHandlers=function(){var t=s.default.get();this.isGeneric?this.listenTo(r(document),{drag:this.handleMove,dragstop:this.endInteraction}):this.isTouch?this.listenTo(t,{touchmove:this.handleTouchMove,touchend:this.endInteraction,scroll:this.handleTouchScroll}):this.listenTo(t,{mousemove:this.handleMouseMove,mouseup:this.endInteraction}),this.listenTo(t,{selectstart:i.preventDefault,contextmenu:i.preventDefault})},t.prototype.unbindHandlers=function(){this.stopListeningTo(s.default.get()),this.stopListeningTo(r(document))},t.prototype.startDrag=function(t,e){this.startInteraction(t,e),this.isDragging||(this.isDragging=!0,this.handleDragStart(t))},t.prototype.handleDragStart=function(t){this.trigger("dragStart",t)},t.prototype.handleMove=function(t){var e=i.getEvX(t)-this.originX,n=i.getEvY(t)-this.originY,r=this.minDistance;this.isDistanceSurpassed||e*e+n*n>=r*r&&this.handleDistanceSurpassed(t),this.isDragging&&this.handleDrag(e,n,t)},t.prototype.handleDrag=function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},t.prototype.endDrag=function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},t.prototype.handleDragEnd=function(t){this.trigger("dragEnd",t)},t.prototype.startDelay=function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},t.prototype.handleDelayEnd=function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},t.prototype.handleDistanceSurpassed=function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},t.prototype.handleTouchMove=function(t){this.isDragging&&this.shouldCancelTouchScroll&&t.preventDefault(),this.handleMove(t)},t.prototype.handleMouseMove=function(t){this.handleMove(t)},t.prototype.handleTouchScroll=function(t){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(t,!0)},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.options[t]&&this.options[t].apply(this,e),this["_"+t]&&this["_"+t].apply(this,e)},t.prototype.initAutoScroll=function(){var t=this.scrollEl;
29179this.isAutoScroll=this.options.scroll&&t&&!t.is(window)&&!t.is(document),this.isAutoScroll&&this.listenTo(t,"scroll",i.debounce(this.handleDebouncedScroll,100))},t.prototype.destroyAutoScroll=function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},t.prototype.computeScrollBounds=function(){this.isAutoScroll&&(this.scrollBounds=i.getOuterRect(this.scrollEl))},t.prototype.updateAutoScroll=function(t){var e,n,r,o,s=this.scrollSensitivity,a=this.scrollBounds,l=0,u=0;a&&(e=(s-(i.getEvY(t)-a.top))/s,n=(s-(a.bottom-i.getEvY(t)))/s,r=(s-(i.getEvX(t)-a.left))/s,o=(s-(a.right-i.getEvX(t)))/s,e>=0&&e<=1?l=e*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),r>=0&&r<=1?u=r*this.scrollSpeed*-1:o>=0&&o<=1&&(u=o*this.scrollSpeed)),this.setScrollVel(l,u)},t.prototype.setScrollVel=function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(i.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},t.prototype.constrainScrollVel=function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},t.prototype.scrollIntervalFunc=function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},t.prototype.endAutoScroll=function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},t.prototype.handleDebouncedScroll=function(){this.scrollIntervalId||this.handleScrollEnd()},t.prototype.handleScrollEnd=function(){},t}();e.default=a,o.default.mixInto(a)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.updateDayTable=function(){for(var t,e,n,r=this,i=r.view,o=i.calendar,s=o.msToUtcMoment(r.dateProfile.renderUnzonedRange.startMs,!0),a=o.msToUtcMoment(r.dateProfile.renderUnzonedRange.endMs,!0),l=-1,u=[],d=[];s.isBefore(a);)i.isHiddenDay(s)?u.push(l+.5):(l++,u.push(l),d.push(s.clone())),s.add(1,"days");if(this.breakOnWeeks){for(e=d[0].day(),t=1;t<d.length&&d[t].day()!==e;t++);n=Math.ceil(d.length/t)}else n=1,t=d.length;this.dayDates=d,this.dayIndices=u,this.daysPerRow=t,this.rowCnt=n,this.updateDayTableCols()},e.prototype.updateDayTableCols=function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.opt("columnHeaderFormat")||this.opt("columnFormat")||this.computeColHeadFormat()},e.prototype.computeColCnt=function(){return this.daysPerRow},e.prototype.getCellDate=function(t,e){return this.dayDates[this.getCellDayIndex(t,e)].clone()},e.prototype.getCellRange=function(t,e){var n=this.getCellDate(t,e);return{start:n,end:n.clone().add(1,"days")}},e.prototype.getCellDayIndex=function(t,e){return t*this.daysPerRow+this.getColDayIndex(e)},e.prototype.getColDayIndex=function(t){return this.isRTL?this.colCnt-1-t:t},e.prototype.getDateDayIndex=function(t){var e=this.dayIndices,n=t.diff(this.dayDates[0],"days");return n<0?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},e.prototype.computeColHeadFormat=function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.opt("dayOfMonthFormat"):"dddd"},e.prototype.sliceRangeByRow=function(t){var e,n,r,i,o,s=this.daysPerRow,a=this.view.computeDayRange(t),l=this.getDateDayIndex(a.start),u=this.getDateDayIndex(a.end.clone().subtract(1,"days")),d=[];for(e=0;e<this.rowCnt;e++)n=e*s,r=n+s-1,i=Math.max(l,n),o=Math.min(u,r),i=Math.ceil(i),o=Math.floor(o),i<=o&&d.push({row:e,firstRowDayIndex:i-n,lastRowDayIndex:o-n,isStart:i===l,isEnd:o===u});return d},e.prototype.sliceRangeByDay=function(t){var e,n,r,i,o,s,a=this.daysPerRow,l=this.view.computeDayRange(t),u=this.getDateDayIndex(l.start),d=this.getDateDayIndex(l.end.clone().subtract(1,"days")),c=[];for(e=0;e<this.rowCnt;e++)for(n=e*a,r=n+a-1,i=n;i<=r;i++)o=Math.max(u,i),s=Math.min(d,i),o=Math.ceil(o),s=Math.floor(s),o<=s&&c.push({row:e,firstRowDayIndex:o-n,lastRowDayIndex:s-n,isStart:o===u,isEnd:s===d});return c},e.prototype.renderHeadHtml=function(){var t=this.view.calendar.theme;return'<div class="fc-row '+t.getClass("headerRow")+'"><table class="'+t.getClass("tableGrid")+'"><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},e.prototype.renderHeadIntroHtml=function(){return this.renderIntroHtml()},e.prototype.renderHeadTrHtml=function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},e.prototype.renderHeadDateCellsHtml=function(){var t,e,n=[];for(t=0;t<this.colCnt;t++)e=this.getCellDate(0,t),n.push(this.renderHeadDateCellHtml(e));return n.join("")},e.prototype.renderHeadDateCellHtml=function(t,e,n){var r,o=this,s=o.view,a=o.dateProfile.activeUnzonedRange.containsDate(t),l=["fc-day-header",s.calendar.theme.getClass("widgetHeader")];return r="function"==typeof o.opt("columnHeaderHtml")?o.opt("columnHeaderHtml")(t):"function"==typeof o.opt("columnHeaderText")?i.htmlEscape(o.opt("columnHeaderText")(t)):i.htmlEscape(t.format(o.colHeadFormat)),1===o.rowCnt?l=l.concat(o.getDayClasses(t,!0)):l.push("fc-"+i.dayIDs[t.day()]),'<th class="'+l.join(" ")+'"'+(1===(a&&o.rowCnt)?' data-date="'+t.format("YYYY-MM-DD")+'"':"")+(e>1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+(a?s.buildGotoAnchorHtml({date:t,forceOff:o.rowCnt>1||1===o.colCnt},r):r)+"</th>"},e.prototype.renderBgTrHtml=function(t){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+"</tr>"},e.prototype.renderBgIntroHtml=function(t){return this.renderIntroHtml()},e.prototype.renderBgCellsHtml=function(t){var e,n,r=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),r.push(this.renderBgCellHtml(n));return r.join("")},e.prototype.renderBgCellHtml=function(t,e){var n=this,r=n.view,i=n.dateProfile.activeUnzonedRange.containsDate(t),o=n.getDayClasses(t);return o.unshift("fc-day",r.calendar.theme.getClass("widgetContent")),'<td class="'+o.join(" ")+'"'+(i?' data-date="'+t.format("YYYY-MM-DD")+'"':"")+(e?" "+e:"")+"></td>"},e.prototype.renderIntroHtml=function(){},e.prototype.bookendCells=function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))},e}(o.default);e.default=s}
29179,function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.component=t,this.fillRenderer=e}
29180return t.prototype.render=function(t){var e=this.component,n=e._getDateProfile().activeUnzonedRange,r=t.buildEventInstanceGroup(e.hasAllDayBusinessHours,n),i=r?e.eventRangesToEventFootprints(r.sliceRenderRanges(n)):[];this.renderEventFootprints(i)},t.prototype.renderEventFootprints=function(t){var e=this.component.eventFootprintsToSegs(t);this.renderSegs(e),this.segs=e},t.prototype.renderSegs=function(t){this.fillRenderer&&this.fillRenderer.renderSegs("businessHours",t,{getClasses:function(t){return["fc-nonbusiness","fc-bgevent"]}})},t.prototype.unrender=function(){this.fillRenderer&&this.fillRenderer.unrender("businessHours"),this.segs=null},t.prototype.getSegs=function(){return this.segs||[]},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=function(){function t(t){this.fillSegTag="div",this.component=t,this.elsByFill={}}return t.prototype.renderFootprint=function(t,e,n){this.renderSegs(t,this.component.componentFootprintToSegs(e),n)},t.prototype.renderSegs=function(t,e,n){var r;return e=this.buildSegEls(t,e,n),r=this.attachSegEls(t,e),r&&this.reportEls(t,r),e},t.prototype.unrender=function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},t.prototype.buildSegEls=function(t,e,n){var i,o=this,s="",a=[];if(e.length){for(i=0;i<e.length;i++)s+=this.buildSegHtml(t,e[i],n);r(s).each(function(t,i){var s=e[t],l=r(i);n.filterEl&&(l=n.filterEl(s,l)),l&&(l=r(l),l.is(o.fillSegTag)&&(s.el=l,a.push(s)))})}return a},t.prototype.buildSegHtml=function(t,e,n){var r=n.getClasses?n.getClasses(e):[],o=i.cssToStr(n.getCss?n.getCss(e):{});return"<"+this.fillSegTag+(r.length?' class="'+r.join(" ")+'"':"")+(o?' style="'+o+'"':"")+" />"},t.prototype.attachSegEls=function(t,e){},t.prototype.reportEls=function(t,e){this.elsByFill[t]?this.elsByFill[t]=this.elsByFill[t].add(e):this.elsByFill[t]=r(e)},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(34),o=n(6),s=function(){function t(t,e){this.view=t._getView(),this.component=t,this.eventRenderer=e}return t.prototype.renderComponentFootprint=function(t){this.renderEventFootprints([this.fabricateEventFootprint(t)])},t.prototype.renderEventDraggingFootprints=function(t,e,n){this.renderEventFootprints(t,e,"fc-dragging",n?null:this.view.opt("dragOpacity"))},t.prototype.renderEventResizingFootprints=function(t,e,n){this.renderEventFootprints(t,e,"fc-resizing")},t.prototype.renderEventFootprints=function(t,e,n,r){var i,o=this.component.eventFootprintsToSegs(t),s="fc-helper "+(n||"");for(o=this.eventRenderer.renderFgSegEls(o),i=0;i<o.length;i++)o[i].el.addClass(s);if(null!=r)for(i=0;i<o.length;i++)o[i].el.css("opacity",r);this.helperEls=this.renderSegs(o,e)},t.prototype.renderSegs=function(t,e){},t.prototype.unrender=function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},t.prototype.fabricateEventFootprint=function(t){var e,n=this.view.calendar,s=n.footprintToDateProfile(t),a=new r.default(new o.default(n));return a.dateProfile=s,e=a.buildInstance(),new i.default(t,a,e)},t}();e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(14),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.bindToEl=function(t){var e=this.component;e.bindSegHandlerToEl(t,"click",this.handleClick.bind(this)),e.bindSegHandlerToEl(t,"mouseenter",this.handleMouseover.bind(this)),e.bindSegHandlerToEl(t,"mouseleave",this.handleMouseout.bind(this))},e.prototype.handleClick=function(t,e){!1===this.component.publiclyTrigger("eventClick",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,this.view]})&&e.preventDefault()},e.prototype.handleMouseover=function(t,e){i.default.get().shouldIgnoreMouse()||this.mousedOverSeg||(this.mousedOverSeg=t,this.view.isEventDefResizable(t.footprint.eventDef)&&t.el.addClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseover",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,this.view]}))},e.prototype.handleMouseout=function(t,e){this.mousedOverSeg&&(this.mousedOverSeg=null,this.view.isEventDefResizable(t.footprint.eventDef)&&t.el.removeClass("fc-allow-mouse-resize"),this.component.publiclyTrigger("eventMouseout",{context:t.el[0],args:[t.footprint.getEventLegacy(),e||{},this.view]}))},e.prototype.end=function(){this.mousedOverSeg&&this.handleMouseout(this.mousedOverSeg)},e}(o.default);e.default=s}
29180,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(15),o=n(237),s=n(236),a=n(64),l=n(235),u=n(234),d=n(233),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(i.default);e.default=c,c.prototype.dateClickingClass=o.default,c.prototype.dateSelectingClass=s.default,c.prototype.eventPointingClass=a.default,c.prototype.eventDraggingClass=l.default,c.prototype.eventResizingClass=u.default,c.prototype.externalDroppingClass=d.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(58),a=n(227),l=n(5),u=n(12),d=n(34),c=n(61),p=n(65),h=n(42),f=n(60),g=n(243),v=n(244),y=n(245),m=function(t){function e(e){var n=t.call(this,e)||this;return n.cellWeekNumbersVisible=!1,n.bottomCoordPadding=0,n.isRigid=!1,n.hasAllDayBusinessHours=!0,n}return r.__extends(e,t),e.prototype.componentFootprintToSegs=function(t){var e,n,r=this.sliceRangeByRow(t.unzonedRange);for(e=0;e<r.length;e++)n=r[e],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return r},e.prototype.renderDates=function(t){this.dateProfile=t,this.updateDayTable(),this.renderGrid()},e.prototype.unrenderDates=function(){this.removeSegPopover()},e.prototype.renderGrid=function(){var t,e,n=this.view,r=this.rowCnt,i=this.colCnt,o="";for(this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),t=0;t<r;t++)o+=this.renderDayRowHtml(t,this.isRigid);for(this.el.html(o),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day, .fc-disabled-day"),this.rowCoordCache=new s.default({els:this.rowEls,isVertical:!0}),this.colCoordCache=new s.default({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),t=0;t<r;t++)for(e=0;e<i;e++)this.publiclyTrigger("dayRender",{context:n,args:[this.getCellDate(t,e),this.getCellEl(t,e),n]})},e.prototype.renderDayRowHtml=function(t,e){var n=this.view.calendar.theme,r=["fc-row","fc-week",n.getClass("dayRow")];return e&&r.push("fc-rigid"),'<div class="'+r.join(" ")+'"><div class="fc-bg"><table class="'+n.getClass("tableGrid")+'">'+this.renderBgTrHtml(t)+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(t)+"</thead>":"")+"</table></div></div>"},e.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.cellWeekNumbersVisible},e.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},e.prototype.renderNumberTrHtml=function(t){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+"</tr>"},e.prototype.renderNumberIntroHtml=function(t){return this.renderIntroHtml()},e.prototype.renderNumberCellsHtml=function(t){var e,n,r=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),r.push(this.renderNumberCellHtml(n));return r.join("")},e.prototype.renderNumberCellHtml=function(t){var e,n,r=this.view,i="",o=this.dateProfile.activeUnzonedRange.containsDate(t),s=this.getIsDayNumbersVisible()&&o;return s||this.cellWeekNumbersVisible?(e=this.getDayClasses(t),e.unshift("fc-day-top"),this.cellWeekNumbersVisible&&(n="ISO"===t._locale._fullCalendar_weekCalc?1:t._locale.firstDayOfWeek()),i+='<td class="'+e.join(" ")+'"'+(o?' data-date="'+t.format()+'"':"")+">",this.cellWeekNumbersVisible&&t.day()===n&&(i+=r.buildGotoAnchorHtml({date:t,type:"week"},{class:"fc-week-number"},t.format("w"))),s&&(i+=r.buildGotoAnchorHtml(t,{class:"fc-day-number"},t.format("D"))),i+="</td>"):"<td/>"},e.prototype.prepareHits=function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},e.prototype.releaseHits=function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},e.prototype.queryHit=function(t,e){if(this.colCoordCache.isLeftInBounds(t)&&this.rowCoordCache.isTopInBounds(e)){var n=this.colCoordCache.getHorizontalIndex(t),r=this.rowCoordCache.getVerticalIndex(e);if(null!=r&&null!=n)return this.getCellHit(r,n)}},e.prototype.getHitFootprint=function(t){var e=this.getCellRange(t.row,t.col);return new u.default(new l.default(e.start,e.end),!0)},e.prototype.getHitEl=function(t){return this.getCellEl(t.row,t.col)},e.prototype.getCellHit=function(t,e){return{row:t,col:e,component:this,left:this.colCoordCache.getLeftOffset(e),right:this.colCoordCache.getRightOffset(e),top:this.rowCoordCache.getTopOffset(t),bottom:this.rowCoordCache.getBottomOffset(t)}},e.prototype.getCellEl=function(t,e){return this.cellEls.eq(t*this.colCnt+e)},e.prototype.executeEventUnrender=function(){this.removeSegPopover(),t.prototype.executeEventUnrender.call(this)},e.prototype.getOwnEventSegs=function(){return t.prototype.getOwnEventSegs.call(this).concat(this.popoverSegs||[])},e.prototype.renderDrag=function(t,e,n){var r;for(r=0;r<t.length;r++)this.renderHighlight(t[r].componentFootprint);if(t.length&&e&&e.component!==this)return this.helperRenderer.renderEventDraggingFootprints(t,e,n),!0},e.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},e.prototype.renderEventResize=function(t,e,n){var r;for(r=0;r<t.length;r++)this.renderHighlight(t[r].componentFootprint);this.helperRenderer.renderEventResizingFootprints(t,e,n)},e.prototype.unrenderEventResize=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},e.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},e.prototype.limitRows=function(t){var e,n,r=this.eventRenderer.rowStructs||[];for(e=0;e<r.length;e++)this.unlimitRow(e),!1!==(n=!!t&&("number"==typeof t?t:this.computeRowLevelLimit(e)))&&this.limitRow(e,n)},e.prototype.computeRowLevelLimit=function(t){function e(t,e){o=Math.max(o,i(e).outerHeight())}var n,r,o,s=this.rowEls.eq(t),a=s.height(),l=this.eventRenderer.rowStructs[t].tbodyEl.children();for(n=0;n<l.length;n++)if(r=l.eq(n).removeClass("fc-limited"),o=0,r.find("> td > :first-child").each(e),r.position().top+o>a)return n;return!1},e.prototype.limitRow=function(t,e){var n,r,o,s,a,l,u,d,c,p,h,f,g,v,y,m=this,b=this.eventRenderer.rowStructs[t],w=[],D=0,E=function(n){for(;D<n;)l=m.getCellSegs(t,D,e),l.length&&(c=r[e-1][D],y=m.renderMoreLink(t,D,l),v=i("<div/>").append(y),c.append(v),w.push(v[0])),D++};if(e&&e<b.segLevels.length){for(n=b.segLevels[e-1],r=b.cellMatrix,o=b.tbodyEl.children().slice(e).addClass("fc-limited").get(),s=0;s<n.length;s++){for(a=n[s],E(a.leftCol),d=[],u=0;D<=a.rightCol;)l=this.getCellSegs(t,D,e),d.push(l),u+=l.length,D++;if(u){for(c=r[e-1][a.leftCol],p=c.attr("rowspan")||1,h=[],f=0;f<d.length;f++)g=i('<td class="fc-more-cell"/>').attr("rowspan",p),l=d[f],y=this.renderMoreLink(t,a.leftCol+f,[a].concat(l)),v=i("<div/>").append(y),g.append(v),h.push(g[0]),w.push(g[0]);
29180c.addClass("fc-limited").after(i(h)),o.push(c[0])}}E(this.colCnt),b.moreEls=i(w),b.limitedEls=i(o)}},e.prototype.unlimitRow=function(t){var e=this.eventRenderer.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},e.prototype.renderMoreLink=function(t,e,n){var r=this,o=this.view;return i('<a class="fc-more"/>').text(this.getMoreLinkText(n.length)).on("click",function(s){var a=r.opt("eventLimitClick"),l=r.getCellDate(t,e),u=i(s.currentTarget),d=r.getCellEl(t,e),c=r.getCellSegs(t,e),p=r.resliceDaySegs(c,l),h=r.resliceDaySegs(n,l);"function"==typeof a&&(a=r.publiclyTrigger("eventLimitClick",{context:o,args:[{date:l.clone(),dayEl:d,moreEl:u,segs:p,hiddenSegs:h},s,o]})),"popover"===a?r.showSegPopover(t,e,u,p):"string"==typeof a&&o.calendar.zoomTo(l,a)})},e.prototype.showSegPopover=function(t,e,n,r){var i,o,s=this,l=this.view,u=n.parent();i=1===this.rowCnt?l.el:this.rowEls.eq(t),o={className:"fc-more-popover "+l.calendar.theme.getClass("popover"),content:this.renderSegPopoverContent(t,e,r),parentEl:l.el,top:i.offset().top,autoHide:!0,viewportConstrain:this.opt("popoverViewportConstrain"),hide:function(){s.popoverSegs&&s.triggerBeforeEventSegsDestroyed(s.popoverSegs),s.segPopover.removeElement(),s.segPopover=null,s.popoverSegs=null}},this.isRTL?o.right=u.offset().left+u.outerWidth()+1:o.left=u.offset().left-1,this.segPopover=new a.default(o),this.segPopover.show(),this.bindAllSegHandlersToEl(this.segPopover.el),this.triggerAfterEventSegsRendered(r)},e.prototype.renderSegPopoverContent=function(t,e,n){var r,s=this.view,a=s.calendar.theme,l=this.getCellDate(t,e).format(this.opt("dayPopoverFormat")),u=i('<div class="fc-header '+a.getClass("popoverHeader")+'"><span class="fc-close '+a.getIconClass("close")+'"></span><span class="fc-title">'+o.htmlEscape(l)+'</span><div class="fc-clear"/></div><div class="fc-body '+a.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>'),d=u.find(".fc-event-container");for(n=this.eventRenderer.renderFgSegEls(n,!0),this.popoverSegs=n,r=0;r<n.length;r++)this.hitsNeeded(),n[r].hit=this.getCellHit(t,e),this.hitsNotNeeded(),d.append(n[r].el);return u},e.prototype.resliceDaySegs=function(t,e){var n,r,o,s=e.clone(),a=s.clone().add(1,"days"),c=new l.default(s,a),p=[];for(n=0;n<t.length;n++)r=t[n],(o=r.footprint.componentFootprint.unzonedRange.intersect(c))&&p.push(i.extend({},r,{footprint:new d.default(new u.default(o,r.footprint.componentFootprint.isAllDay),r.footprint.eventDef,r.footprint.eventInstance),isStart:r.isStart&&o.isStart,isEnd:r.isEnd&&o.isEnd}));return this.eventRenderer.sortEventSegs(p),p},e.prototype.getMoreLinkText=function(t){var e=this.opt("eventLimitText");return"function"==typeof e?e(t):"+"+t+" "+e},e.prototype.getCellSegs=function(t,e,n){for(var r,i=this.eventRenderer.rowStructs[t].segMatrix,o=n||0,s=[];o<i.length;)r=i[o][e],r&&s.push(r),o++;return s},e}(h.default);e.default=m,m.prototype.eventRendererClass=g.default,m.prototype.businessHourRendererClass=c.default,m.prototype.helperRendererClass=v.default,m.prototype.fillRendererClass=y.default,p.default.mixInto(m),f.default.mixInto(m)},function(t,e,n){function r(t){return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.colWeekNumbersVisible=!1,e}return i.__extends(e,t),e.prototype.renderHeadIntroHtml=function(){var t=this.view;return this.colWeekNumbersVisible?'<th class="fc-week-number '+t.calendar.theme.getClass("widgetHeader")+'" '+t.weekNumberStyleAttr()+"><span>"+s.htmlEscape(this.opt("weekNumberTitle"))+"</span></th>":""},e.prototype.renderNumberIntroHtml=function(t){var e=this.view,n=this.getCellDate(t,0);return this.colWeekNumbersVisible?'<td class="fc-week-number" '+e.weekNumberStyleAttr()+">"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"</td>":""},e.prototype.renderBgIntroHtml=function(){var t=this.view;return this.colWeekNumbersVisible?'<td class="fc-week-number '+t.calendar.theme.getClass("widgetContent")+'" '+t.weekNumberStyleAttr()+"></td>":""},e.prototype.renderIntroHtml=function(){var t=this.view;return this.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"></td>":""},e.prototype.getIsNumbersVisible=function(){return d.default.prototype.getIsNumbersVisible.apply(this,arguments)||this.colWeekNumbersVisible},e}(t)}
29180Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(3),s=n(4),a=n(41),l=n(43),u=n(68),d=n(66),c=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.dayGrid=r.instantiateDayGrid(),r.dayGrid.isRigid=r.hasRigidRows(),r.opt("weekNumbers")&&(r.opt("weekNumbersWithinDays")?(r.dayGrid.cellWeekNumbersVisible=!0,r.dayGrid.colWeekNumbersVisible=!1):(r.dayGrid.cellWeekNumbersVisible=!1,r.dayGrid.colWeekNumbersVisible=!0)),r.addChild(r.dayGrid),r.scroller=new a.default({overflowX:"hidden",overflowY:"auto"}),r}return i.__extends(e,t),e.prototype.instantiateDayGrid=function(){return new(r(this.dayGridClass))(this)},e.prototype.executeDateRender=function(e){this.dayGrid.breakOnWeeks=/year|month|week/.test(e.currentRangeUnit),t.prototype.executeDateRender.call(this,e)},e.prototype.renderSkeleton=function(){var t,e;this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.scroller.render(),t=this.scroller.el.addClass("fc-day-grid-container"),e=o('<div class="fc-day-grid" />').appendTo(t),this.el.find(".fc-body > tr > td").append(t),this.dayGrid.headContainerEl=this.el.find(".fc-head-container"),this.dayGrid.setElement(e)},e.prototype.unrenderSkeleton=function(){this.dayGrid.removeElement(),this.scroller.destroy()},e.prototype.renderSkeletonHtml=function(){var t=this.calendar.theme;return'<table class="'+t.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+t.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+t.getClass("widgetContent")+'"></td></tr></tbody></table>'},e.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},e.prototype.hasRigidRows=function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},e.prototype.updateSize=function(e,n,r){var i,o,a=this.opt("eventLimit"),l=this.dayGrid.headContainerEl.find(".fc-row");if(!this.dayGrid.rowEls)return void(n||(i=this.computeScrollerHeight(e),this.scroller.setHeight(i)));t.prototype.updateSize.call(this,e,n,r),this.dayGrid.colWeekNumbersVisible&&(this.weekNumberWidth=s.matchCellWidths(this.el.find(".fc-week-number"))),this.scroller.clear(),s.uncompensateScroll(l),this.dayGrid.removeSegPopover(),a&&"number"==typeof a&&this.dayGrid.limitRows(a),i=this.computeScrollerHeight(e),this.setGridHeight(i,n),a&&"number"!=typeof a&&this.dayGrid.limitRows(a),n||(this.scroller.setHeight(i),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(s.compensateScroll(l,o),i=this.computeScrollerHeight(e),this.scroller.setHeight(i)),this.scroller.lockOverflow(o))},e.prototype.computeScrollerHeight=function(t){return t-s.subtractInnerElHeight(this.el,this.scroller.el)},e.prototype.setGridHeight=function(t,e){e?s.undistributeHeight(this.dayGrid.rowEls):s.distributeHeight(this.dayGrid.rowEls,t,!0)},e.prototype.computeInitialDateScroll=function(){return{top:0}},e.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},e.prototype.applyDateScroll=function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},e}(l.default);e.default=c,c.prototype.dateProfileGeneratorClass=u.default,c.prototype.dayGridClass=d.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(5),o=n(55),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.buildRenderRange=function(e,n,r){var o=t.prototype.buildRenderRange.call(this,e,n,r),s=this.msToUtcMoment(o.startMs,r),a=this.msToUtcMoment(o.endMs,r);return/^(year|month)$/.test(n)&&(s.startOf("week"),a.weekday()&&a.add(1,"week").startOf("week")),new i.default(s,a)},e}(o.default);e.default=s},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){function r(t,e,n){var r;for(r=0;r<t.length;r++)if(!e(t[r].eventInstance.toLegacy(),n?n.toLegacy():null))return!1;return!0}function i(t,e){var n,r,i,o,s=e.toLegacy();for(n=0;n<t.length;n++){if(r=t[n].eventInstance,i=r.def,!1===(o=i.getOverlap()))return!1;if("function"==typeof o&&!o(r.toLegacy(),s))return!1}return!0}
29180Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),s=n(12),a=n(36),l=n(6),u=n(19),d=function(){function t(t,e){this.eventManager=t,this._calendar=e}return t.prototype.opt=function(t){return this._calendar.opt(t)},t.prototype.isEventInstanceGroupAllowed=function(t){var e,n=t.getEventDef(),r=this.eventRangesToEventFootprints(t.getAllEventRanges()),i=this.getPeerEventInstances(n),o=i.map(u.eventInstanceToEventRange),s=this.eventRangesToEventFootprints(o),a=n.getConstraint(),l=n.getOverlap(),d=this.opt("eventAllow");for(e=0;e<r.length;e++)if(!this.isFootprintAllowed(r[e].componentFootprint,s,a,l,r[e].eventInstance))return!1;if(d)for(e=0;e<r.length;e++)if(!1===d(r[e].componentFootprint.toLegacy(this._calendar),r[e].getEventLegacy()))return!1;return!0},t.prototype.getPeerEventInstances=function(t){return this.eventManager.getEventInstancesWithoutId(t.id)},t.prototype.isSelectionFootprintAllowed=function(t){var e,n=this.eventManager.getEventInstances(),r=n.map(u.eventInstanceToEventRange),i=this.eventRangesToEventFootprints(r);return!!this.isFootprintAllowed(t,i,this.opt("selectConstraint"),this.opt("selectOverlap"))&&(!(e=this.opt("selectAllow"))||!1!==e(t.toLegacy(this._calendar)))},t.prototype.isFootprintAllowed=function(t,e,n,o,s){var a,l;if(null!=n&&(a=this.constraintValToFootprints(n,t.isAllDay),!this.isFootprintWithinConstraints(t,a)))return!1;if(l=this.collectOverlapEventFootprints(e,t),!1===o){if(l.length)return!1}else if("function"==typeof o&&!r(l,o,s))return!1;return!(s&&!i(l,s))},t.prototype.isFootprintWithinConstraints=function(t,e){var n;for(n=0;n<e.length;n++)if(this.footprintContainsFootprint(e[n],t))return!0;return!1},t.prototype.constraintValToFootprints=function(t,e){var n;return"businessHours"===t?this.buildCurrentBusinessFootprints(e):"object"==typeof t?(n=this.parseEventDefToInstances(t),n?this.eventInstancesToFootprints(n):this.parseFootprints(t)):null!=t?(n=this.eventManager.getEventInstancesWithId(t),this.eventInstancesToFootprints(n)):void 0},t.prototype.buildCurrentBusinessFootprints=function(t){var e=this._calendar.view,n=e.get("businessHourGenerator"),r=e.dateProfile.activeUnzonedRange,i=n.buildEventInstanceGroup(t,r);return i?this.eventInstancesToFootprints(i.eventInstances):[]},t.prototype.eventInstancesToFootprints=function(t){var e=t.map(u.eventInstanceToEventRange);return this.eventRangesToEventFootprints(e).map(u.eventFootprintToComponentFootprint)},t.prototype.collectOverlapEventFootprints=function(t,e){var n,r=[];for(n=0;n<t.length;n++)this.footprintsIntersect(e,t[n].componentFootprint)&&r.push(t[n]);return r},t.prototype.parseEventDefToInstances=function(t){var e=this.eventManager,n=a.default.parse(t,new l.default(this._calendar));return!!n&&n.buildInstances(e.currentPeriod.unzonedRange)},t.prototype.eventRangesToEventFootprints=function(t){var e,n=[];for(e=0;e<t.length;e++)n.push.apply(n,this.eventRangeToEventFootprints(t[e]));return n},t.prototype.eventRangeToEventFootprints=function(t){return[u.eventRangeToEventFootprint(t)]},t.prototype.parseFootprints=function(t){var e,n;return t.start&&(e=this._calendar.moment(t.start),e.isValid()||(e=null)),t.end&&(n=this._calendar.moment(t.end),n.isValid()||(n=null)),[new s.default(new o.default(e,n),e&&!e.hasTime()||n&&!n.hasTime())]},t.prototype.footprintContainsFootprint=function(t,e){return t.unzonedRange.containsRange(e.unzonedRange)},t.prototype.footprintsIntersect=function(t,e){return t.unzonedRange.intersectsWith(e.unzonedRange)},t}();e.default=d},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(19),o=n(20),s=n(54),a=n(6),l={start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},u=function(){function t(t,e){this.rawComplexDef=t,this.calendar=e}return t.prototype.buildEventInstanceGroup=function(t,e){var n,r=this.buildEventDefs(t);if(r.length)return n=new o.default(i.eventDefsToEventInstances(r,e)),n.explicitEventDef=r[0],n},t.prototype.buildEventDefs=function(t){var e,n=this.rawComplexDef,i=[],o=!1,s=[];for(!0===n?i=[{}]:r.isPlainObject(n)?i=[n]:r.isArray(n)&&(i=n,o=!0),e=0;e<i.length;e++)o&&!i[e].dow||s.push(this.buildEventDef(t,i[e]));return s},t.prototype.buildEventDef=function(t,e){var n=r.extend({},l,e);return t&&(n.start=null,n.end=null),s.default.parse(n,new a.default(this.calendar))},t}();e.default=u}
29180,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n(21),s=n(13),a=n(5),l=n(20),u=function(){function t(t,e,n){this.pendingCnt=0,this.freezeDepth=0,this.stuntedReleaseCnt=0,this.releaseCnt=0,this.start=t,this.end=e,this.timezone=n,this.unzonedRange=new a.default(t.clone().stripZone(),e.clone().stripZone()),this.requestsByUid={},this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={}}return t.prototype.isWithinRange=function(t,e){return!t.isBefore(this.start)&&!e.isAfter(this.end)},t.prototype.requestSources=function(t){this.freeze();for(var e=0;e<t.length;e++)this.requestSource(t[e]);this.thaw()},t.prototype.requestSource=function(t){var e=this,n={source:t,status:"pending",eventDefs:null};this.requestsByUid[t.uid]=n,this.pendingCnt+=1,t.fetch(this.start,this.end,this.timezone).then(function(t){"cancelled"!==n.status&&(n.status="completed",n.eventDefs=t,e.addEventDefs(t),e.pendingCnt--,e.tryRelease())},function(){"cancelled"!==n.status&&(n.status="failed",e.pendingCnt--,e.tryRelease())})},t.prototype.purgeSource=function(t){var e=this.requestsByUid[t.uid];e&&(delete this.requestsByUid[t.uid],"pending"===e.status?(e.status="cancelled",this.pendingCnt--,this.tryRelease()):"completed"===e.status&&e.eventDefs.forEach(this.removeEventDef.bind(this)))},t.prototype.purgeAllSources=function(){var t,e,n=this.requestsByUid,r=0;for(t in n)e=n[t],"pending"===e.status?e.status="cancelled":"completed"===e.status&&r++;this.requestsByUid={},this.pendingCnt=0,r&&this.removeAllEventDefs()},t.prototype.getEventDefByUid=function(t){return this.eventDefsByUid[t]},t.prototype.getEventDefsById=function(t){var e=this.eventDefsById[t];return e?e.slice():[]},t.prototype.addEventDefs=function(t){for(var e=0;e<t.length;e++)this.addEventDef(t[e])},t.prototype.addEventDef=function(t){var e,n=this.eventDefsById,r=t.id,i=n[r]||(n[r]=[]),o=t.buildInstances(this.unzonedRange);for(i.push(t),this.eventDefsByUid[t.uid]=t,e=0;e<o.length;e++)this.addEventInstance(o[e],r)},t.prototype.removeEventDefsById=function(t){var e=this;this.getEventDefsById(t).forEach(function(t){e.removeEventDef(t)})},t.prototype.removeAllEventDefs=function(){var t=r.isEmptyObject(this.eventDefsByUid);this.eventDefsByUid={},this.eventDefsById={},this.eventInstanceGroupsById={},t||this.tryRelease()},t.prototype.removeEventDef=function(t){var e=this.eventDefsById,n=e[t.id];delete this.eventDefsByUid[t.uid],n&&(i.removeExact(n,t),n.length||delete e[t.id],this.removeEventInstancesForDef(t))},t.prototype.getEventInstances=function(){var t,e=this.eventInstanceGroupsById,n=[];for(t in e)n.push.apply(n,e[t].eventInstances);return n},t.prototype.getEventInstancesWithId=function(t){var e=this.eventInstanceGroupsById[t];return e?e.eventInstances.slice():[]},t.prototype.getEventInstancesWithoutId=function(t){var e,n=this.eventInstanceGroupsById,r=[];for(e in n)e!==t&&r.push.apply(r,n[e].eventInstances);return r},t.prototype.addEventInstance=function(t,e){var n=this.eventInstanceGroupsById;(n[e]||(n[e]=new l.default)).eventInstances.push(t),this.tryRelease()},t.prototype.removeEventInstancesForDef=function(t){var e,n=this.eventInstanceGroupsById,r=n[t.id];r&&(e=i.removeMatching(r.eventInstances,function(e){return e.def===t}),r.eventInstances.length||delete n[t.id],e&&this.tryRelease())},t.prototype.tryRelease=function(){this.pendingCnt||(this.freezeDepth?this.stuntedReleaseCnt++:this.release())},t.prototype.release=function(){this.releaseCnt++,this.trigger("release",this.eventInstanceGroupsById)},t.prototype.whenReleased=function(){var t=this;return this.releaseCnt?o.default.resolve(this.eventInstanceGroupsById):o.default.construct(function(e){t.one("release",e)})},t.prototype.freeze=function(){this.freezeDepth++||(this.stuntedReleaseCnt=0)},t.prototype.thaw=function(){--this.freezeDepth||!this.stuntedReleaseCnt||this.pendingCnt||this.release()},t}();e.default=u,s.default.mixInto(u)},function(t,e,n){function r(t,e){return t.getPrimitive()===e.getPrimitive()}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(4),s=n(219),a=n(56),l=n(6),u=n(38),d=n(9),c=n(20),p=n(13),h=n(7),f=function(){function t(t){this.calendar=t,this.stickySource=new a.default(t),this.otherSources=[]}return t.prototype.requestEvents=function(t,e,n,r){return!r&&this.currentPeriod&&this.currentPeriod.isWithinRange(t,e)&&n===this.currentPeriod.timezone||this.setPeriod(new s.default(t,e,n)),this.currentPeriod.whenReleased()},t.prototype.addSource=function(t){this.otherSources.push(t),this.currentPeriod&&this.currentPeriod.requestSource(t)},t.prototype.removeSource=function(t){o.removeExact(this.otherSources,t),this.currentPeriod&&this.currentPeriod.purgeSource(t)},t.prototype.removeAllSources=function(){this.otherSources=[],this.currentPeriod&&this.currentPeriod.purgeAllSources()},t.prototype.refetchSource=function(t){var e=this.currentPeriod;e&&(e.freeze(),e.purgeSource(t),e.requestSource(t),e.thaw())},t.prototype.refetchAllSources=function(){var t=this.currentPeriod;t&&(t.freeze(),t.purgeAllSources(),t.requestSources(this.getSources()),t.thaw())},t.prototype.getSources=function(){return[this.stickySource].concat(this.otherSources)},t.prototype.multiQuerySources=function(t){t?i.isArray(t)||(t=[t]):t=[];var e,n=[];for(e=0;e<t.length;e++)n.push.apply(n,this.querySources(t[e]));return n},t.prototype.querySources=function(t){var e,n,o=this.otherSources;for(e=0;e<o.length;e++)if((n=o[e])===t)return[n];return(n=this.getSourceById(l.default.normalizeId(t)))?[n]:(t=u.default.parse(t,this.calendar),t?i.grep(o,function(e){return r(t,e)}):void 0)},t.prototype.getSourceById=function(t){return i.grep(this.otherSources,function(e){return e.id&&e.id===t})[0]},t.prototype.setPeriod=function(t){this.currentPeriod&&(this.unbindPeriod(this.currentPeriod),this.currentPeriod=null),this.currentPeriod=t,this.bindPeriod(t),t.requestSources(this.getSources())},t.prototype.bindPeriod=function(t){this.listenTo(t,"release",function(t){this.trigger("release",t)})},t.prototype.unbindPeriod=function(t){this.stopListeningTo(t)},t.prototype.getEventDefByUid=function(t){if(this.currentPeriod)return this.currentPeriod.getEventDefByUid(t)},t.prototype.addEventDef=function(t,e){e&&this.stickySource.addEventDef(t),this.currentPeriod&&this.currentPeriod.addEventDef(t)}
29180,t.prototype.removeEventDefsById=function(t){this.getSources().forEach(function(e){e.removeEventDefsById(t)}),this.currentPeriod&&this.currentPeriod.removeEventDefsById(t)},t.prototype.removeAllEventDefs=function(){this.getSources().forEach(function(t){t.removeAllEventDefs()}),this.currentPeriod&&this.currentPeriod.removeAllEventDefs()},t.prototype.mutateEventsWithId=function(t,e){var n,r=this.currentPeriod,i=[];return r?(r.freeze(),n=r.getEventDefsById(t),n.forEach(function(t){r.removeEventDef(t),i.push(e.mutateSingle(t)),r.addEventDef(t)}),r.thaw(),function(){r.freeze();for(var t=0;t<n.length;t++)r.removeEventDef(n[t]),i[t](),r.addEventDef(n[t]);r.thaw()}):function(){}},t.prototype.buildMutatedEventInstanceGroup=function(t,e){var n,r,i=this.getEventDefsById(t),o=[];for(n=0;n<i.length;n++)(r=i[n].clone())instanceof d.default&&(e.mutateSingle(r),o.push.apply(o,r.buildInstances()));return new c.default(o)},t.prototype.freeze=function(){this.currentPeriod&&this.currentPeriod.freeze()},t.prototype.thaw=function(){this.currentPeriod&&this.currentPeriod.thaw()},t.prototype.getEventDefsById=function(t){return this.currentPeriod.getEventDefsById(t)},t.prototype.getEventInstances=function(){return this.currentPeriod.getEventInstances()},t.prototype.getEventInstancesWithId=function(t){return this.currentPeriod.getEventInstancesWithId(t)},t.prototype.getEventInstancesWithoutId=function(t){return this.currentPeriod.getEventInstancesWithoutId(t)},t
29181}();e.default=f,p.default.mixInto(f),h.default.mixInto(f)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(22),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(i.default);e.default=o,o.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button",cornerLeft:"fc-corner-left",cornerRight:"fc-corner-right",stateDefault:"fc-state-default",stateActive:"fc-state-active",stateDisabled:"fc-state-disabled",stateHover:"fc-state-hover",stateDown:"fc-state-down",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},o.prototype.baseIconClass="fc-icon",o.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-left-single-arrow",next:"fc-icon-right-single-arrow",prevYear:"fc-icon-left-double-arrow",nextYear:"fc-icon-right-double-arrow"},o.prototype.iconOverrideOption="buttonIcons",o.prototype.iconOverrideCustomButtonOption="icon",o.prototype.iconOverridePrefix="fc-icon-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(22),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(i.default);e.default=o,o.prototype.classes={widget:"ui-widget",widgetHeader:"ui-widget-header",widgetContent:"ui-widget-content",buttonGroup:"fc-button-group",button:"ui-button",cornerLeft:"ui-corner-left",cornerRight:"ui-corner-right",stateDefault:"ui-state-default",stateActive:"ui-state-active",stateDisabled:"ui-state-disabled",stateHover:"ui-state-hover",stateDown:"ui-state-down",today:"ui-state-highlight",popoverHeader:"ui-widget-header",popoverContent:"ui-widget-content",headerRow:"ui-widget-header",dayRow:"ui-widget-content",listView:"ui-widget-content"},o.prototype.baseIconClass="ui-icon",o.prototype.iconClasses={close:"ui-icon-closethick",prev:"ui-icon-circle-triangle-w",next:"ui-icon-circle-triangle-e",prevYear:"ui-icon-seek-prev",nextYear:"ui-icon-seek-next"},o.prototype.iconOverrideOption="themeButtonIcons",o.prototype.iconOverrideCustomButtonOption="themeIcon",o.prototype.iconOverridePrefix="ui-icon-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(21),s=n(6),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.parse=function(t,e){var n;return i.isFunction(t.events)?n=t:i.isFunction(t)&&(n={events:t}),!!n&&s.default.parse.call(this,n,e)},e.prototype.fetch=function(t,e,n){var r=this;return this.calendar.pushLoading(),o.default.construct(function(i){r.func.call(r.calendar,t.clone(),e.clone(),n,function(t){r.calendar.popLoading(),i(r.parseEventDefs(t))})})},e.prototype.getPrimitive=function(){return this.func}
29181,e.prototype.applyManualStandardProps=function(e){var n=t.prototype.applyManualStandardProps.call(this,e);return this.func=e.events,n},e}(s.default);e.default=a,a.defineStandardProps({events:!1})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(21),a=n(6),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.parse=function(t,e){var n;return"string"==typeof t.url?n=t:"string"==typeof t&&(n={url:t}),!!n&&a.default.parse.call(this,n,e)},e.prototype.fetch=function(t,n,r){var a=this,l=this.ajaxSettings,u=l.success,d=l.error,c=this.buildRequestParams(t,n,r);return this.calendar.pushLoading(),s.default.construct(function(t,n){i.ajax(i.extend({},e.AJAX_DEFAULTS,l,{url:a.url,data:c,success:function(e,r,s){var l;a.calendar.popLoading(),e?(l=o.applyAll(u,a,[e,r,s]),i.isArray(l)&&(e=l),t(a.parseEventDefs(e))):n()},error:function(t,e,r){a.calendar.popLoading(),o.applyAll(d,a,[t,e,r]),n()}}))})},e.prototype.buildRequestParams=function(t,e,n){var r,o,s,a,l=this.calendar,u=this.ajaxSettings,d={};return r=this.startParam,null==r&&(r=l.opt("startParam")),o=this.endParam,null==o&&(o=l.opt("endParam")),s=this.timezoneParam,null==s&&(s=l.opt("timezoneParam")),a=i.isFunction(u.data)?u.data():u.data||{},i.extend(d,a),d[r]=t.format(),d[o]=e.format(),n&&"local"!==n&&(d[s]=n),d},e.prototype.getPrimitive=function(){return this.url},e.prototype.applyMiscProps=function(t){this.ajaxSettings=t},e.AJAX_DEFAULTS={dataType:"json",cache:!1},e}(a.default);e.default=l,l.defineStandardProps({url:!0,startParam:!0,endParam:!0,timezoneParam:!0})},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.items=t||[]}return t.prototype.proxyCall=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=[];return this.items.forEach(function(n){r.push(n[t].apply(n,e))}),r},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n(7),s=function(){function t(t,e){this.isFollowing=!1,this.isHidden=!1,this.isAnimating=!1,this.options=e=e||{},this.sourceEl=t,this.parentEl=e.parentEl?r(e.parentEl):t.parent()}return t.prototype.start=function(t){this.isFollowing||(this.isFollowing=!0,this.y0=i.getEvY(t),this.x0=i.getEvX(t),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),i.getEvIsTouch(t)?this.listenTo(r(document),"touchmove",this.handleMove):this.listenTo(r(document),"mousemove",this.handleMove))},t.prototype.stop=function(t,e){var n=this,i=this.options.revertDuration,o=function(){n.isAnimating=!1,n.removeElement(),n.top0=n.left0=null,e&&e()};this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(r(document)),t&&i&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:i,complete:o})):o())},t.prototype.getEl=function(){var t=this.el;return t||(t=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),t.addClass("fc-unselectable"),t.appendTo(this.parentEl)),t},t.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},t.prototype.updatePosition=function(){var t,e;this.getEl(),null==this.top0&&(t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},t.prototype.handleMove=function(t){this.topDelta=i.getEvY(t)-this.y0,this.leftDelta=i.getEvX(t)-this.x0,this.isHidden||this.updatePosition()},t.prototype.hide=function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},t.prototype.show=function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())},t}();e.default=s,o.default.mixInto(s)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n(7),s=function(){function t(t){this.isHidden=!0,this.margin=10,this.options=t||{}}return t.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},t.prototype.hide=function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},t.prototype.render=function(){var t=this,e=this.options;this.el=r('<div class="fc-popover"/>').addClass(e.className||"").css({top:0,left:0}).append(e.content).appendTo(e.parentEl),this.el.on("click",".fc-close",function(){t.hide()}),e.autoHide&&this.listenTo(r(document),"mousedown",this.documentMousedown)},t.prototype.documentMousedown=function(t){this.el&&!r(t.target).closest(this.el).length&&this.hide()},t.prototype.removeElement=function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(r(document),"mousedown")},t.prototype.position=function(){var t,e,n,o,s,a=this.options,l=this.el.offsetParent().offset(),u=this.el.outerWidth(),d=this.el.outerHeight(),c=r(window),p=i.get
29181ScrollParent(this.el);o=a.top||0,s=void 0!==a.left?a.left:void 0!==a.right?a.right-u:0,p.is(window)||p.is(document)?(p=c,t=0,e=0):(n=p.offset(),t=n.top,e=n.left),t+=c.scrollTop(),e+=c.scrollLeft(),!1!==a.viewportConstrain&&(o=Math.min(o,t+p.outerHeight()-d-this.margin),o=Math.max(o,t+this.margin),s=Math.min(s,e+p.outerWidth()-u-this.margin),s=Math.max(s,e+this.margin)),this.el.css({top:o-l.top,left:s-l.left})},t.prototype.trigger=function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))},t}();e.default=s,o.default.mixInto(s)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),i=function(){function t(){this.q=[],this.isPaused=!1,this.isRunning=!1}return t.prototype.queue=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.q.push.apply(this.q,t),this.tryStart()},t.prototype.pause=function(){this.isPaused=!0},t.prototype.resume=function(){this.isPaused=!1,this.tryStart()},t.prototype.getIsIdle=function(){return!this.isRunning&&!this.isPaused},t.prototype.tryStart=function(){!this.isRunning&&this.canRunNext()&&(this.isRunning=!0,this.trigger("start"),this.runRemaining())},t.prototype.canRunNext=function(){return!this.isPaused&&this.q.length},t.prototype.runRemaining=function(){var t,e,n=this;do{if(t=this.q.shift(),(e=this.runTask(t))&&e.then)return void e.then(function(){n.canRunNext()&&n.runRemaining()})}while(this.canRunNext());this.trigger("stop"),this.isRunning=!1,this.tryStart()},t.prototype.runTask=function(t){return t()},t}();e.default=i,r.default.mixInto(i)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(228),o=function(t){function e(e){var n=t.call(this)||this;return n.waitsByNamespace=e||{},n}return r.__extends(e,t),e.prototype.queue=function(t,e,n){var r,i={func:t,namespace:e,type:n};e&&(r=this.waitsByNamespace[e]),this.waitNamespace&&(e===this.waitNamespace&&null!=r?this.delayWait(r):(this.clearWait(),this.tryStart())),this.compoundTask(i)&&(this.waitNamespace||null==r?this.tryStart():this.startWait(e,r))},e.prototype.startWait=function(t,e){this.waitNamespace=t,this.spawnWait(e)},e.prototype.delayWait=function(t){clearTimeout(this.waitId),this.spawnWait(t)},e.prototype.spawnWait=function(t){var e=this;this.waitId=setTimeout(function(){e.waitNamespace=null,e.tryStart()},t)},e.prototype.clearWait=function(){this.waitNamespace&&(clearTimeout(this.waitId),this.waitId=null,this.waitNamespace=null)},e.prototype.canRunNext=function(){if(!t.prototype.canRunNext.call(this))return!1;if(this.waitNamespace){for(var e=this.q,n=0;n<e.length;n++)if(e[n].namespace!==this.waitNamespace)return!0;return!1}return!0},e.prototype.runTask=function(t){t.func()},e.prototype.compoundTask=function(t){var e,n,r=this.q,i=!0;if(t.namespace&&"destroy"===t.type)for(e=r.length-1;e>=0;e--)if(n=r[e],n.namespace===t.namespace)switch(n.type){case"init":i=!1;case"add":case"remove":r.splice(e,1)}return i&&r.push(t),i},e}(i.default);e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(51),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.setElement=function(t){this.el=t,this.bindGlobalHandlers(),this.renderSkeleton(),this.set("isInDom",!0)},e.prototype.removeElement=function(){this.unset("isInDom"),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},e.prototype.bindGlobalHandlers=function(){},e.prototype.unbindGlobalHandlers=function(){},e.prototype.renderSkeleton=function(){},e.prototype.unrenderSkeleton=function(){},e}(i.default);e.default=o},function(t,e,n){function r(t){var e,n,r,i=[];for(e in t)for(n=t[e].eventInstances,r=0;r<n.length;r++)i.push(n[r].toLegacy());return i}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(3),s=n(0),a=n(4),l=n(11),u=n(49),d=n(230),c=n(19),p=function(t){function e(n,r){var i=t.call(this)||this;return i.isRTL=!1,i.hitsNeededDepth=0,i.hasAllDayBusinessHours=!1,i.isDatesRendered=!1,n&&(i.view=n),r&&(i.options=r),i.uid=String(e.guid++),i.childrenByUid={},i.nextDayThreshold=s.duration(i.opt("nextDayThreshold")),i.isRTL=i.opt("isRTL"),i.fillRendererClass&&(i.fillRenderer=new i.fillRendererClass(i)),i.eventRendererClass&&(i.eventRenderer=new i.eventRendererClass(i,i.fillRenderer)),i.helperRendererClass&&i.eventRenderer&&(i.helperRenderer=new i.helperRendererClass(i,i.eventRenderer)),i.businessHourRendererClass&&i.fillRenderer&&(i.businessHourRenderer=new i.businessHourRendererClass(i,i.fillRenderer)),i}return i.__extends(e,t),e.prototype.addChild=function(t){return!this.childrenByUid[t.uid]&&(this.childrenByUid[t.uid]=t,!0)},e.prototype.removeChild=function(t){return!!this.childrenByUid[t.uid]&&(delete this.childrenByUid[t.uid],!0)},e.prototype.updateSize=function(t,e,n){this.callChildren("updateSize",arguments)},e.prototype.opt=function(t){return this._getView().opt(t)},e.prototype.publiclyTrigger=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];
29181var n=this._getCalendar();return n.publiclyTrigger.apply(n,t)},e.prototype.hasPublicHandlers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this._getCalendar();return n.hasPublicHandlers.apply(n,t)},e.prototype.executeDateRender=function(t){this.dateProfile=t,this.renderDates(t),this.isDatesRendered=!0,this.callChildren("executeDateRender",arguments)},e.prototype.executeDateUnrender=function(){this.callChildren("executeDateUnrender",arguments),this.dateProfile=null,this.unrenderDates(),this.isDatesRendered=!1},e.prototype.renderDates=function(t){},e.prototype.unrenderDates=function(){},e.prototype.getNowIndicatorUnit=function(){},e.prototype.renderNowIndicator=function(t){this.callChildren("renderNowIndicator",arguments)},e.prototype.unrenderNowIndicator=function(){this.callChildren("unrenderNowIndicator",arguments)},e.prototype.renderBusinessHours=function(t){this.businessHourRenderer&&this.businessHourRenderer.render(t),this.callChildren("renderBusinessHours",arguments)},e.prototype.unrenderBusinessHours=function(){this.callChildren("unrenderBusinessHours",arguments),this.businessHourRenderer&&this.businessHourRenderer.unrender()},e.prototype.executeEventRender=function(t){this.eventRenderer?(this.eventRenderer.rangeUpdated(),this.eventRenderer.render(t)):this.renderEvents&&this.renderEvents(r(t)),this.callChildren("executeEventRender",arguments)},e.prototype.executeEventUnrender=function(){this.callChildren("executeEventUnrender",arguments),this.eventRenderer?this.eventRenderer.unrender():this.destroyEvents&&this.destroyEvents()},e.prototype.getBusinessHourSegs=function(){var t=this.getOwnBusinessHourSegs();return this.iterChildren(function(e){t.push.apply(t,e.getBusinessHourSegs())}),t},e.prototype.getOwnBusinessHourSegs=function(){return this.businessHourRenderer?this.businessHourRenderer.getSegs():[]},e.prototype.getEventSegs=function(){var t=this.getOwnEventSegs();return this.iterChildren(function(e){t.push.apply(t,e.getEventSegs())}),t},e.prototype.getOwnEventSegs=function(){return this.eventRenderer?this.eventRenderer.getSegs():[]},e.prototype.triggerAfterEventsRendered=function(){this.triggerAfterEventSegsRendered(this.getEventSegs()),this.publiclyTrigger("eventAfterAllRender",{context:this,args:[this]})},e.prototype.triggerAfterEventSegsRendered=function(t){var e=this;this.hasPublicHandlers("eventAfterRender")&&t.forEach(function(t){var n;t.el&&(n=t.footprint.getEventLegacy(),e.publiclyTrigger("eventAfterRender",{context:n,args:[n,t.el,e]}))})},e.prototype.triggerBeforeEventsDestroyed=function(){this.triggerBeforeEventSegsDestroyed(this.getEventSegs())},e.prototype.triggerBeforeEventSegsDestroyed=function(t){var e=this;this.hasPublicHandlers("eventDestroy")&&t.forEach(function(t){var n;t.el&&(n=t.footprint.getEventLegacy(),e.publiclyTrigger("eventDestroy",{context:n,args:[n,t.el,e]}))})},e.prototype.showEventsWithId=function(t){this.getEventSegs().forEach(function(e){e.footprint.eventDef.id===t&&e.el&&e.el.css("visibility","")}),this.callChildren("showEventsWithId",arguments)},e.prototype.hideEventsWithId=function(t){this.getEventSegs().forEach(function(e){e.footprint.eventDef.id===t&&e.el&&e.el.css("visibility","hidden")}),this.callChildren("hideEventsWithId",arguments)},e.prototype.renderDrag=function(t,e,n){var r=!1;return this.iterChildren(function(i){i.renderDrag(t,e,n)&&(r=!0)}),r},e.prototype.unrenderDrag=function(){this.callChildren("unrenderDrag",arguments)},e.prototype.renderEventResize=function(t,e,n){this.callChildren("renderEventResize",arguments)},e.prototype.unrenderEventResize=function(){this.callChildren("unrenderEventResize",arguments)},e.prototype.renderSelectionFootprint=function(t){this.renderHighlight(t),this.callChildren("renderSelectionFootprint",arguments)},e.prototype.unrenderSelection=function(){this.unrenderHighlight(),this.callChildren("unrenderSelection",arguments)},e.prototype.renderHighlight=function(t){this.fillRenderer&&this.fillRenderer.renderFootprint("highlight",t,{getClasses:function(){return["fc-highlight"]}}),this.callChildren("renderHighlight",arguments)},e.prototype.unrenderHighlight=function(){this.fillRenderer&&this.fillRenderer.unrender("highlight"),this.callChildren("unrenderHighlight",arguments)},e.prototype.hitsNeeded=function(){this.hitsNeededDepth++||this.prepareHits(),this.callChildren("hitsNeeded",arguments)},e.prototype.hitsNotNeeded=function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits(),this.callChildren("hitsNotNeeded",arguments)},e.prototype.prepareHits=function(){},e.prototype.releaseHits=function(){},e.prototype.queryHit=function(t,e){var n,r,i=this.childrenByUid;for(n in i)if(r=i[n].queryHit(t,e))break;return r},e.prototype.getSafeHitFootprint=function(t){var e=this.getHitFootprint(t);return this.dateProfile.activeUnzonedRange.containsRange(e.unzonedRange)?e:null},e.prototype.getHitFootprint=function(t){},e.prototype.getHitEl=function(t){},e.prototype.eventRangesToEventFootprints=function(t){var e,n=[];for(e=0;e<t.length;e++)n.push.apply(n,this.eventRangeToEventFootprints(t[e]));return n},e.prototype.eventRangeToEventFootprints=function(t){return[c.eventRangeToEventFootprint(t)]},e.prototype.eventFootprintsToSegs=function(t){var e,n=[];for(e=0;e<t.length;e++)n.push.apply(n,this.eventFootprintToSegs(t[e]));return n},e.prototype.eventFootprintToSegs=function(t){var e,n,r,i=t.componentFootprint.unzonedRange;
29181for(e=this.componentFootprintToSegs(t.componentFootprint),n=0;n<e.length;n++)r=e[n],i.isStart||(r.isStart=!1),i.isEnd||(r.isEnd=!1),r.footprint=t;return e},e.prototype.componentFootprintToSegs=function(t){return[]},e.prototype.callChildren=function(t,e){this.iterChildren(function(n){n[t].apply(n,e)})},e.prototype.iterChildren=function(t){var e,n=this.childrenByUid;for(e in n)t(n[e])},e.prototype._getCalendar=function(){var t=this;return t.calendar||t.view.calendar},e.prototype._getView=function(){return this.view},e.prototype._getDateProfile=function(){return this._getView().get("dateProfile")},e.prototype.buildGotoAnchorHtml=function(t,e,n){var r,i,s,u;return o.isPlainObject(t)?(r=t.date,i=t.type,s=t.forceOff):r=t,r=l.default(r),u={date:r.format("YYYY-MM-DD"),type:i||"day"},"string"==typeof e&&(n=e,e=null),e=e?" "+a.attrsToStr(e):"",n=n||"",!s&&this.opt("navLinks")?"<a"+e+' data-goto="'+a.htmlEscape(JSON.stringify(u))+'">'+n+"</a>":"<span"+e+">"+n+"</span>"},e.prototype.getAllDayHtml=function(){return this.opt("allDayHtml")||a.htmlEscape(this.opt("allDayText"))},e.prototype.getDayClasses=function(t,e){var n,r=this._getView(),i=[];return this.dateProfile.activeUnzonedRange.containsDate(t)?(i.push("fc-"+a.dayIDs[t.day()]),r.isDateInOtherMonth(t,this.dateProfile)&&i.push("fc-other-month"),n=r.calendar.getNow(),t.isSame(n,"day")?(i.push("fc-today"),!0!==e&&i.push(r.calendar.theme.getClass("today"))):t<n?i.push("fc-past"):i.push("fc-future")):i.push("fc-disabled-day"),i},e.prototype.formatRange=function(t,e,n,r){var i=t.end;return e&&(i=i.clone().subtract(1)),u.formatRange(t.start,i,n,r,this.isRTL)},e.prototype.currentRangeAs=function(t){return this._getDateProfile().currentUnzonedRange.as(t)},e.prototype.computeDayRange=function(t){var e=this._getCalendar(),n=e.msToUtcMoment(t.startMs,!0),r=e.msToUtcMoment(t.endMs),i=+r.time(),o=r.clone().stripTime();return i&&i>=this.nextDayThreshold&&o.add(1,"days"),o<=n&&(o=n.clone().add(1,"days")),{start:n,end:o}},e.prototype.isMultiDayRange=function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1},e.guid=0,e}(d.default);e.default=p},function(t,e,n){function r(t,e){return null==e?t:i.isFunction(e)?t.filter(e):(e+="",t.filter(function(t){return t.id==e||t._id===e}))}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=n(0),s=n(4),a=n(33),l=n(225),u=n(23),d=n(13),c=n(7),p=n(257),h=n(258),f=n(259),g=n(217),v=n(32),y=n(11),m=n(5),b=n(12),w=n(16),D=n(220),E=n(218),S=n(38),C=n(36),R=n(9),T=n(39),M=n(6),I=n(57),H=function(){function t(t,e){this.loadingLevel=0,this.ignoreUpdateViewSize=0,this.freezeContentHeightDepth=0,u.default.needed(),this.el=t,this.viewsByType={},this.optionsManager=new h.default(this,e),this.viewSpecManager=new f.default(this.optionsManager,this),this.initMomentInternals(),this.initCurrentDate(),this.initEventManager(),this.constraints=new g.default(this.eventManager,this),this.constructed()}return t.prototype.constructed=function(){},t.prototype.getView=function(){return this.view},t.prototype.publiclyTrigger=function(t,e){var n,r,o=this.opt(t);if(i.isPlainObject(e)?(n=e.context,r=e.args):i.isArray(e)&&(r=e),null==n&&(n=this.el[0]),r||(r=[]),this.triggerWith(t,n,r),o)return o.apply(n,r)},t.prototype.hasPublicHandlers=function(t){return this.hasHandlers(t)||this.opt(t)},t.prototype.option=function(t,e){var n;if("string"==typeof t){if(void 0===e)return this.optionsManager.get(t);n={},n[t]=e,this.optionsManager.add(n)}else"object"==typeof t&&this.optionsManager.add(t)},t.prototype.opt=function(t){return this.optionsManager.get(t)},t.prototype.instantiateView=function(t){var e=this.viewSpecManager.getViewSpec(t);if(!e)throw new Error('View type "'+t+'" is not valid');return new e.class(this,e)},t.prototype.isValidViewType=function(t){return Boolean(this.viewSpecManager.getViewSpec(t))},t.prototype.changeView=function(t,e){e&&(e.start&&e.end?this.optionsManager.recordOverrides({visibleRange:e}):this.currentDate=this.moment(e).stripZone()),this.renderView(t)},t.prototype.zoomTo=function(t,e){var n;e=e||"day",n=this.viewSpecManager.getViewSpec(e)||this.viewSpecManager.getUnitViewSpec(e),this.currentDate=t.clone(),this.renderView(n?n.type:null)},t.prototype.initCurrentDate=function(){var t=this.opt("defaultDate");this.currentDate=null!=t?this.moment(t).stripZone():this.getNow()},t.prototype.prev=function(){var t=this.view,e=t.dateProfileGenerator.buildPrev(t.get("dateProfile"));
29181e.isValid&&(this.currentDate=e.date,this.renderView())},t.prototype.next=function(){var t=this.view,e=t.dateProfileGenerator.buildNext(t.get("dateProfile"));e.isValid&&(this.currentDate=e.date,this.renderView())},t.prototype.prevYear=function(){this.currentDate.add(-1,"years"),this.renderView()},t.prototype.nextYear=function(){this.currentDate.add(1,"years"),this.renderView()},t.prototype.today=function(){this.currentDate=this.getNow(),this.renderView()},t.prototype.gotoDate=function(t){this.currentDate=this.moment(t).stripZone(),this.renderView()},t.prototype.incrementDate=function(t){this.currentDate.add(o.duration(t)),this.renderView()},t.prototype.getDate=function(){return this.applyTimezone(this.currentDate)},t.prototype.pushLoading=function(){this.loadingLevel++||this.publiclyTrigger("loading",[!0,this.view])},t.prototype.popLoading=function(){--this.loadingLevel||this.publiclyTrigger("loading",[!1,this.view])},t.prototype.render=function(){this.contentEl?this.elementVisible()&&(this.calcSize(),this.updateViewSize()):this.initialRender()},t.prototype.initialRender=function(){var t=this,e=this.el;e.addClass("fc"),e.on("click.fc","a[data-goto]",function(e){var n=i(e.currentTarget),r=n.data("goto"),o=t.moment(r.date),a=r.type,l=t.view.opt("navLink"+s.capitaliseFirstLetter(a)+"Click");"function"==typeof l?l(o,e):("string"==typeof l&&(a=l),t.zoomTo(o,a))}),this.optionsManager.watch("settingTheme",["?theme","?themeSystem"],function(n){var r=I.getThemeSystemClass(n.themeSystem||n.theme),i=new r(t.optionsManager),o=i.getClass("widget");t.theme=i,o&&e.addClass(o)},function(){var n=t.theme.getClass("widget");t.theme=null,n&&e.removeClass(n)}),this.optionsManager.watch("settingBusinessHourGenerator",["?businessHours"],function(e){t.businessHourGenerator=new E.default(e.businessHours,t),t.view&&t.view.set("businessHourGenerator",t.businessHourGenerator)},function(){t.businessHourGenerator=null}),this.optionsManager.watch("applyingDirClasses",["?isRTL","?locale"],function(t){e.toggleClass("fc-ltr",!t.isRTL),e.toggleClass("fc-rtl",t.isRTL)}),this.contentEl=i("<div class='fc-view-container'/>").prependTo(e),this.initToolbars(),this.renderHeader(),this.renderFooter(),this.renderView(this.opt("defaultView")),this.opt("handleWindowResize")&&i(window).resize(this.windowResizeProxy=s.debounce(this.windowResize.bind(this),this.opt("windowResizeDelay")))},t.prototype.destroy=function(){this.view&&this.clearView(),this.toolbarsManager.proxyCall("removeElement"),this.contentEl.remove(),this.el.removeClass("fc fc-ltr fc-rtl"),this.optionsManager.unwatch("settingTheme"),this.optionsManager.unwatch("settingBusinessHourGenerator"),this.el.off(".fc"),this.windowResizeProxy&&(i(window).unbind("resize",this.windowResizeProxy),this.windowResizeProxy=null),u.default.unneeded()},t.prototype.elementVisible=function(){return this.el.is(":visible")},t.prototype.bindViewHandlers=function(t){var e=this;t.watch("titleForCalendar",["title"],function(n){t===e.view&&e.setToolbarsTitle(n.title)}),t.watch("dateProfileForCalendar",["dateProfile"],function(n){t===e.view&&(e.currentDate=n.dateProfile.date,e.updateToolbarButtons(n.dateProfile))})},t.prototype.unbindViewHandlers=function(t){t.unwatch("titleForCalendar"),t.unwatch("dateProfileForCalendar")},t.prototype.renderView=function(t){var e,n=this.view;this.freezeContentHeight(),n&&t&&n.type!==t&&this.clearView(),!this.view&&t&&(e=this.view=this.viewsByType[t]||(this.viewsByType[t]=this.instantiateView(t)),this.bindViewHandlers(e),e.startBatchRender(),e.setElement(i("<div class='fc-view fc-"+t+"-view' />").appendTo(this.contentEl)),this.toolbarsManager.proxyCall("activateButton",t)),this.view&&(this.view.get("businessHourGenerator")!==this.businessHourGenerator&&this.view.set("businessHourGenerator",this.businessHourGenerator),this.view.setDate(this.currentDate),e&&e.stopBatchRender()),this.thawContentHeight()},t.prototype.clearView=function(){var t=this.view;this.toolbarsManager.proxyCall("deactivateButton",t.type),this.unbindViewHandlers(t),t.removeElement(),t.unsetDate(),this.view=null},t.prototype.reinitView=function(){var t=this.view,e=t.queryScroll();this.freezeContentHeight(),this.clearView(),this.calcSize(),this.renderView(t.type),this.view.applyScroll(e),this.thawContentHeight()},t.prototype.getSuggestedViewHeight=function(){return null==this.suggestedViewHeight&&this.calcSize(),this.suggestedViewHeight},t.prototype.isHeightAuto=function(){return"auto"===this.opt("contentHeight")||"auto"===this.opt("height")},t.prototype.updateViewSize=function(t){void 0===t&&(t=!1);var e,n=this.view;if(!this.ignoreUpdateViewSize&&n)return t&&(this.calcSize(),e=n.queryScroll()),this.ignoreUpdateViewSize++,n.updateSize(this.getSuggestedViewHeight(),this.isHeightAuto(),t),this.ignoreUpdateViewSize--,t&&n.applyScroll(e),!0},t.prototype.calcSize=function(){this.elementVisible()&&this._calcSize()},t.prototype._calcSize=function(){var t=this.opt("contentHeight"),e=this.opt("height");this.suggestedViewHeight="number"==typeof t?t:"function"==typeof t?t():"number"==typeof e?e-this.queryToolbarsHeight():"function"==typeof e?e()-this.queryToolbarsHeight():"parent"===e?this.el.parent().height()-this.queryToolbarsHeight():Math.round(this.contentEl.width()/Math.max(this.opt("aspectRatio"),.5))},t.prototype.windowResize=function(t){t.target===window&&this.view&&this.view.isDatesRendered&&this.updateViewSize(!0)&&this.publiclyTrigger("windowResize",[this.view])},t.prototype.freezeContentHeight=function(){this.freezeContentHeightDepth++||this.forceFreezeContentHeight()},t.prototype.forceFreezeContentHeight=function(){this.contentEl.css({width:"100%",height:this.contentEl.height(),overflow:"hidden"})},t.prototype.thawContentHeight=function(){this.freezeContentHeightDepth--,this.contentEl.css({width:"",height:"",overflow:""}),this.freezeContentHeightDepth&&this.forceFreezeContentHeight()},t.prototype.initToolbars=function(){this.header=new p.default(this,this.computeHeaderOptions()),this.footer=new p.default(this,this.computeFooterOptions()),this.toolbarsManager=new l.default([this.header,this.footer])}
29181,t.prototype.computeHeaderOptions=function(){return{extraClasses:"fc-header-toolbar",layout:this.opt("header")}},t.prototype.computeFooterOptions=function(){return{extraClasses:"fc-footer-toolbar",layout:this.opt("footer")}},t.prototype.renderHeader=function(){var t=this.header;t.setToolbarOptions(this.computeHeaderOptions()),t.render(),t.el&&this.el.prepend(t.el)},t.prototype.renderFooter=function(){var t=this.footer;t.setToolbarOptions(this.computeFooterOptions()),t.render(),t.el&&this.el.append(t.el)},t.prototype.setToolbarsTitle=function(t){this.toolbarsManager.proxyCall("updateTitle",t)},t.prototype.updateToolbarButtons=function(t){var e=this.getNow(),n=this.view,r=n.dateProfileGenerator.build(e),i=n.dateProfileGenerator.buildPrev(n.get("dateProfile")),o=n.dateProfileGenerator.buildNext(n.get("dateProfile"));this.toolbarsManager.proxyCall(r.isValid&&!t.currentUnzonedRange.containsDate(e)?"enableButton":"disableButton","today"),this.toolbarsManager.proxyCall(i.isValid?"enableButton":"disableButton","prev"),this.toolbarsManager.proxyCall(o.isValid?"enableButton":"disableButton","next")},t.prototype.queryToolbarsHeight=function(){return this.toolbarsManager.items.reduce(function(t,e){return t+(e.el?e.el.outerHeight(!0):0)},0)},t.prototype.select=function(t,e){this.view.select(this.buildSelectFootprint.apply(this,arguments))},t.prototype.unselect=function(){this.view&&this.view.unselect()},t.prototype.buildSelectFootprint=function(t,e){var n,r=this.moment(t).stripZone();return n=e?this.moment(e).stripZone():r.hasTime()?r.clone().add(this.defaultTimedEventDuration):r.clone().add(this.defaultAllDayEventDuration),new b.default(new m.default(r,n),!r.hasTime())},t.prototype.initMomentInternals=function(){var t=this;this.defaultAllDayEventDuration=o.duration(this.opt("defaultAllDayEventDuration")),this.defaultTimedEventDuration=o.duration(this.opt("defaultTimedEventDuration")),this.optionsManager.watch("buildingMomentLocale",["?locale","?monthNames","?monthNamesShort","?dayNames","?dayNamesShort","?firstDay","?weekNumberCalculation"],function(e){var n,r=e.weekNumberCalculation,i=e.firstDay;"iso"===r&&(r="ISO");var o=Object.create(v.getMomentLocaleData(e.locale));e.monthNames&&(o._months=e.monthNames),e.monthNamesShort&&(o._monthsShort=e.monthNamesShort),e.dayNames&&(o._weekdays=e.dayNames),e.dayNamesShort&&(o._weekdaysShort=e.dayNamesShort),null==i&&"ISO"===r&&(i=1),null!=i&&(n=Object.create(o._week),n.dow=i,o._week=n),"ISO"!==r&&"local"!==r&&"function"!=typeof r||(o._fullCalendar_weekCalc=r),t.localeData=o,t.currentDate&&t.localizeMoment(t.currentDate)})},t.prototype.moment=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n;return"local"===this.opt("timezone")?(n=y.default.apply(null,t),n.hasTime()&&n.local()):n="UTC"===this.opt("timezone")?y.default.utc.apply(null,t):y.default.parseZone.apply(null,t),this.localizeMoment(n),n},t.prototype.msToMoment=function(t,e){var n=y.default.utc(t);return e?n.stripTime():n=this.applyTimezone(n),this.localizeMoment(n),n},
29182t.prototype.msToUtcMoment=function(t,e){var n=y.default.utc(t);return e&&n.stripTime(),this.localizeMoment(n),n},t.prototype.localizeMoment=function(t){t._locale=this.localeData},t.prototype.getIsAmbigTimezone=function(){return"local"!==this.opt("timezone")&&"UTC"!==this.opt("timezone")},t.prototype.applyTimezone=function(t){if(!t.hasTime())return t.clone();var e,n=this.moment(t.toArray()),r=t.time().asMilliseconds()-n.time().asMilliseconds();return r&&(e=n.clone().add(r),t.time().asMilliseconds()-e.time().asMilliseconds()==0&&(n=e)),n},t.prototype.footprintToDateProfile=function(t,e){void 0===e&&(e=!1);var n,r=y.default.utc(t.unzonedRange.startMs);return e||(n=y.default.utc(t.unzonedRange.endMs)),t.isAllDay?(r.stripTime(),n&&n.stripTime()):(r=this.applyTimezone(r),n&&(n=this.applyTimezone(n))),this.localizeMoment(r),n&&this.localizeMoment(n),new w.default(r,n,this)},t.prototype.getNow=function(){var t=this.opt("now");return"function"==typeof t&&(t=t()),this.moment(t).stripZone()},t.prototype.humanizeDuration=function(t){return t.locale(this.opt("locale")).humanize()},t.prototype.parseUnzonedRange=function(t){var e=null,n=null;return t.start&&(e=this.moment(t.start).stripZone()),t.end&&(n=this.moment(t.end).str
29182ipZone()),e||n?e&&n&&n.isBefore(e)?null:new m.default(e,n):null},t.prototype.initEventManager=function(){var t=this,e=new D.default(this),n=this.opt("eventSources")||[],r=this.opt("events");this.eventManager=e,r&&n.unshift(r),e.on("release",function(e){t.trigger("eventsReset",e)}),e.freeze(),n.forEach(function(n){var r=S.default.parse(n,t);r&&e.addSource(r)}),e.thaw()},t.prototype.requestEvents=function(t,e){return this.eventManager.requestEvents(t,e,this.opt("timezone"),!this.opt("lazyFetching"))},t.prototype.getEventEnd=function(t){return t.end?t.end.clone():this.getDefaultEventEnd(t.allDay,t.start)},t.prototype.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(this.defaultAllDayEventDuration):n.add(this.defaultTimedEventDuration),this.getIsAmbigTimezone()&&n.stripZone(),n},t.prototype.rerenderEvents=function(){this.view.flash("displayingEvents")},t.prototype.refetchEvents=function(){this.eventManager.refetchAllSources()},t.prototype.renderEvents=function(t,e){this.eventManager.freeze();for(var n=0;n<t.length;n++)this.renderEvent(t[n],e);this.eventManager.thaw()},t.prototype.renderEvent=function(t,e){void 0===e&&(e=!1);var n=this.eventManager,r=C.default.parse(t,t.source||n.stickySource);r&&n.addEventDef(r,e)},t.prototype.removeEvents=function(t){var e,n,i=this.eventManager,o=[],s={};if(null==t)i.removeAllEventDefs();else{for(i.getEventInstances().forEach(function(t){o.push(t.toLegacy())}),o=r(o,t),n=0;n<o.length;n++)e=this.eventManager.getEventDefByUid(o[n]._id),s[e.id]=!0;i.freeze();for(n in s)i.removeEventDefsById(n);i.thaw()}},t.prototype.clientEvents=function(t){var e=[];return this.eventManager.getEventInstances().forEach(function(t){e.push(t.toLegacy())}),r(e,t)},t.prototype.updateEvents=function(t){this.eventManager.freeze();for(var e=0;e<t.length;e++)this.updateEvent(t[e]);this.eventManager.thaw()},t.prototype.updateEvent=function(t){var e,n,r=this.eventManager.getEventDefByUid(t._id);r instanceof R.default&&(e=r.buildInstance(),n=T.default.createFromRawProps(e,t,null),this.eventManager.mutateEventsWithId(r.id,n))},t.prototype.getEventSources=function(){return this.eventManager.otherSources.slice()},t.prototype.getEventSourceById=function(t){return this.eventManager.getSourceById(M.default.normalizeId(t))},t.prototype.addEventSource=function(t){var e=S.default.parse(t,this);e&&this.eventManager.addSource(e)},t.prototype.removeEventSources=function(t){var e,n,r=this.eventManager;if(null==t)this.eventManager.removeAllSources();else{for(e=r.multiQuerySources(t),r.freeze(),n=0;n<e.length;n++)r.removeSource(e[n]);r.thaw()}},t.prototype.removeEventSource=function(t){var e,n=this.eventManager,r=n.querySources(t);for(n.freeze(),e=0;e<r.length;e++)n.removeSource(r[e]);n.thaw()},t.prototype.refetchEventSources=function(t){var e,n=this.eventManager,r=n.multiQuerySources(t);for(n.freeze(),e=0;e<r.length;e++)n.refetchSource(r[e]);n.thaw()},t.defaults=a.globalDefaults,t.englishDefaults=a.englishDefaults,t.rtlDefaults=a.rtlDefaults,t}();e.default=H,d.default.mixInto(H),c.default.mixInto(H)},function(t,e,n){function r(t){var e,n,r,i,l=a.dataAttrPrefix;return l&&(l+="-"),e=t.data(l+"event")||null,e&&(e="object"==typeof e?o.extend({},e):{},n=e.start,null==n&&(n=e.time),r=e.duration,i=e.stick,delete e.start,delete e.time,delete e.duration,delete e.stick),null==n&&(n=t.data(l+"start")),null==n&&(n=t.data(l+"time")),null==r&&(r=t.data(l+"duration")),null==i&&(i=t.data(l+"stick")),n=null!=n?s.duration(n):null,r=null!=r?s.duration(r):null,i=Boolean(i),{eventProps:e,startTime:n,duration:r,stick:i}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(3),s=n(0),a=n(18),l=n(4),u=n(11),d=n(7),c=n(17),p=n(9),h=n(20),f=n(6),g=n(14),v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isDragging=!1,e}return i.__extends(e,t),e.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},e.prototype.bindToDocument=function(){this.listenTo(o(document),{dragstart:this.handleDragStart,sortstart:this.handleDragStart})},e.prototype.unbindFromDocument=function(){this.stopListeningTo(o(document))},e.prototype.handleDragStart=function(t,e){var n,r;this.opt("droppable")&&(n=o((e?e.item:null)||t.target),r=this.opt("dropAccept"),(o.isFunction(r)?r.call(n[0],n):n.is(r))&&(this.isDragging||this.listenToExternalDrag(n,t,e)))},e.prototype.listenToExternalDrag=function(t,e,n){var i,o=this,s=this.component,a=this.view,u=r(t);(this.dragListener=new c.default(s,{interactionStart:function(){o.isDragging=!0},hitOver:function(t){var e,n=!0,r=t.component.getSafeHitFootprint(t);r?(i=o.computeExternalDrop(r,u),i?(e=new h.default(i.buildInstances()),n=u.eventProps?s.isEventInstanceGroupAllowed(e):s.isExternalInstanceGroupAllowed(e)):n=!1):n=!1,n||(i=null,l.disableCursor(
29182)),i&&s.renderDrag(s.eventRangesToEventFootprints(e.sliceRenderRanges(s.dateProfile.renderUnzonedRange,a.calendar)))},hitOut:function(){i=null},hitDone:function(){l.enableCursor(),s.unrenderDrag()},interactionEnd:function(e){i&&a.reportExternalDrop(i,Boolean(u.eventProps),Boolean(u.stick),t,e,n),o.isDragging=!1,o.dragListener=null}})).startDrag(e)},e.prototype.computeExternalDrop=function(t,e){var n,r=this.view.calendar,i=u.default.utc(t.unzonedRange.startMs).stripZone();return t.isAllDay&&(e.startTime?i.time(e.startTime):i.stripTime()),e.duration&&(n=i.clone().add(e.duration)),i=r.applyTimezone(i),n&&(n=r.applyTimezone(n)),p.default.parse(o.extend({},e.eventProps,{start:i,end:n}),new f.default(r))},e}(g.default);e.default=v,d.default.mixInto(v),a.dataAttrPrefix=""},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(39),a=n(40),l=n(17),u=n(14),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.isResizing=!1,r.eventPointing=n,r}return r.__extends(e,t),e.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},e.prototype.bindToEl=function(t){var e=this.component;e.bindSegHandlerToEl(t,"mousedown",this.handleMouseDown.bind(this)),e.bindSegHandlerToEl(t,"touchstart",this.handleTouchStart.bind(this))},e.prototype.handleMouseDown=function(t,e){this.component.canStartResize(t,e)&&this.buildDragListener(t,i(e.target).is(".fc-start-resizer")).startInteraction(e,{distance:5})},e.prototype.handleTouchStart=function(t,e){this.component.canStartResize(t,e)&&this.buildDragListener(t,i(e.target).is(".fc-start-resizer")).startInteraction(e)},e.prototype.buildDragListener=function(t,e){var n,r,i=this,s=this.component,a=this.view,u=a.calendar,d=u.eventManager,c=t.el,p=t.footprint.eventDef,h=t.footprint.eventInstance;return this.dragListener=new l.default(s,{scroll:this.opt("dragScroll"),subjectEl:c,interactionStart:function(){n=!1},dragStart:function(e){n=!0,i.eventPointing.handleMouseout(t,e),i.segResizeStart(t,e)},hitOver:function(n,l,c){var h,f=!0,g=s.getSafeHitFootprint(c),v=s.getSafeHitFootprint(n);g&&v?(r=e?i.computeEventStartResizeMutation(g,v,t.footprint):i.computeEventEndResizeMutation(g,v,t.footprint),r?(h=d.buildMutatedEventInstanceGroup(p.id,r),f=s.isEventInstanceGroupAllowed(h)):f=!1):f=!1,f?r.isEmpty()&&(r=null):(r=null,o.disableCursor()),r&&(a.hideEventsWithId(t.footprint.eventDef.id),a.renderEventResize(s.eventRangesToEventFootprints(h.sliceRenderRanges(s.dateProfile.renderUnzonedRange,u)),t))},hitOut:function(){r=null},hitDone:function(){a.unrenderEventResize(t),a.showEventsWithId(t.footprint.eventDef.id),o.enableCursor()},interactionEnd:function(e){n&&i.segResizeStop(t,e),r&&a.reportEventResize(h,r,c,e),i.dragListener=null}})},e.prototype.segResizeStart=function(t,e){this.isResizing=!0,this.component.publiclyTrigger("eventResizeStart",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.segResizeStop=function(t,e){this.isResizing=!1,this.component.publiclyTrigger("eventResizeStop",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.computeEventStartResizeMutation=function(t,e,n){var r,i,o=n.componentFootprint.unzonedRange,l=this.component.diffDates(e.unzonedRange.getStart(),t.unzonedRange.getStart());return o.getStart().add(l)<o.getEnd()&&(r=new a.default,r.setStartDelta(l),i=new s.default,i.setDateMutation(r),i)},e.prototype.computeEventEndResizeMutation=function(t,e,n){var r,i,o=n.componentFootprint.unzonedRange,l=this.component.diffDates(e.unzonedRange.getEnd(),t.unzonedRange.getEnd());return o.getEnd().add(l)>o.getStart()&&(r=new a.default,r.setEndDelta(l),i=new s.default,i.setDateMutation(r),i)},e}(u.default);e.default=d},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(39),s=n(40),a=n(59),l=n(17),u=n(226),d=n(14),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.isDragging=!1,r.eventPointing=n,r}return r.__extends(e,t),e.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},e.prototype.getSelectionDelay=function(){var t=this.opt("eventLongPressDelay");return null==t&&(t=this.opt("longPressDelay")),t},e.prototype.bindToEl=function(t){var e=this.component;e.bindSegHandlerToEl(t,"mousedown",this.handleMousedown.bind(this)),e.bindSegHandlerToEl(t,"touchstart",this.handleTouchStart.bind(this))},e.prototype.handleMousedown=function(t,e){!this.component.shouldIgnoreMouse()&&this.component.canStartDrag(t,e)&&this.buildDragListener(t).startInteraction(e,{distance:5})},e.prototype.handleTouchStart=function(t,e){var n=this.component,r={delay:this.view.isEventDefSelected(t.footprint.eventDef)?0:this.getSelectionDelay()};n.canStartDrag(t,e)?this.buildDragListener(t).startInteraction(e,r):n.canStartSelection(t,e)&&this.buildSelectListener(t).startInteraction(e,r)},e.prototype.buildSelectListener=function(t){var e=this,n=this.view,r=t.footprint.eventDef,i=t.footprint.eventInstance;if(this.dragListener)return this.dragListener;var o=this.dragListener=new a.default({dragStart:function(t){o.isTouch&&!n.isEventDefSelected(r)&&i&&n.selectEventInstance(i)},interactionEnd:function(t){e.dragListener=null}});return o},e.prototype.buildDragListener=function(t){var e,n,r,o=this,s=this.component,a=this.view,d=a.calendar,c=d.eventManager,p=t.el,h=t.footprint.eventDef,f=t.footprint.eventInstance;if(this.dragListener)return this.dragListener;var g=this.dragListener=new l.default(a,{scroll:this.opt("dragScroll"),subjectEl:p,subjectCenter:!0,interactionStart:function(r){t.component=s,e=!1,n=new u.default(t.el,{additionalClass:"fc-dragging",parentEl:a.el,opacity:g.isTouch?null:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2}),n.hide(),n.start(r)},dragStart:function(n){g.isTouch&&!a.isEventDefSelected(h)&&f&&a.selectEventInstance(f),e=!0,o.eventPointing.handleMouseout(t,n),o.segDragStart(t,n),a.hideEventsWithId(t.footprint.eventDef.id)},hitOver:function(e,l,u){var p,f,v,y=!0;t.hit&&(u=t.hit),p=u.component.getSafeHitFootprint(u),f=e.component.getSafeHitFootprint(e),p&&f?(r=o.computeEventDropMutation(p,f,h),r?(v=c.buildMutatedEventInstanceGroup(h.id,r),y=s.isEventInstanceGroupAllowed(v)):y=!1):y=!1,y||(r=null,i.disableCursor(
29182)),r&&a.renderDrag(s.eventRangesToEventFootprints(v.sliceRenderRanges(s.dateProfile.renderUnzonedRange,d)),t,g.isTouch)?n.hide():n.show(),l&&(r=null)},hitOut:function(){a.unrenderDrag(t),n.show(),r=null},hitDone:function(){i.enableCursor()},interactionEnd:function(i){delete t.component,n.stop(!r,function(){e&&(a.unrenderDrag(t),o.segDragStop(t,i)),a.showEventsWithId(t.footprint.eventDef.id),r&&a.reportEventDrop(f,r,p,i)}),o.dragListener=null}});return g},e.prototype.segDragStart=function(t,e){this.isDragging=!0,this.component.publiclyTrigger("eventDragStart",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.segDragStop=function(t,e){this.isDragging=!1,this.component.publiclyTrigger("eventDragStop",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.computeEventDropMutation=function(t,e,n){var r=new o.default;return r.setDateMutation(this.computeEventDateMutation(t,e)),r},e.prototype.computeEventDateMutation=function(t,e){var n,r,i=t.unzonedRange.getStart(),o=e.unzonedRange.getStart(),a=!1,l=!1,u=!1;return t.isAllDay!==e.isAllDay&&(a=!0,e.isAllDay?(u=!0,i.stripTime()):l=!0),n=this.component.diffDates(o,i),r=new s.default,r.clearEnd=a,r.forceTimed=l,r.forceAllDay=u,r.setDateDelta(n),r},e}(d.default);e.default=c},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(17),s=n(12),a=n(5),l=n(14),u=function(t){function e(e){var n=t.call(this,e)||this;return n.dragListener=n.buildDragListener(),n}return r.__extends(e,t),e.prototype.end=function(){this.dragListener.endInteraction()},e.prototype.getDelay=function(){var t=this.opt("selectLongPressDelay");return null==t&&(t=this.opt("longPressDelay")),t},e.prototype.bindToEl=function(t){var e=this,n=this.component,r=this.dragListener;n.bindDateHandlerToEl(t,"mousedown",function(t){e.opt("selectable")&&!n.shouldIgnoreMouse()&&r.startInteraction(t,{distance:e.opt("selectMinDistance")})}),n.bindDateHandlerToEl(t,"touchstart",function(t){e.opt("selectable")&&!n.shouldIgnoreTouch()&&r.startInteraction(t,{delay:e.getDelay()})}),i.preventSelection(t)},e.prototype.buildDragListener=function(){var t,e=this,n=this.component;return new o.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){t=null},dragStart:function(t){e.view.unselect(t)},hitOver:function(r,o,s){var a,l;s&&(a=n.getSafeHitFootprint(s),l=n.getSafeHitFootprint(r),t=a&&l?e.computeSelection(a,l):null,t?n.renderSelectionFootprint(t):!1===t&&i.disableCursor())},hitOut:function(){t=null,n.unrenderSelection()},hitDone:function(){i.enableCursor()},interactionEnd:function(n,r){!r&&t&&e.view.reportSelection(t,n)}})},e.prototype.computeSelection=function(t,e){var n=this.computeSelectionFootprint(t,e);return!(n&&!this.isSelectionFootprintAllowed(n))&&n},e.prototype.computeSelectionFootprint=function(t,e){var n=[t.unzonedRange.startMs,t.unzonedRange.endMs,e.unzonedRange.startMs,e.unzonedRange.endMs];return n.sort(i.compareNumbers),new s.default(new a.default(n[0],n[3]),t.isAllDay)},e.prototype.isSelectionFootprintAllowed=function(t){return this.component.dateProfile.validUnzonedRange.containsRange(t.unzonedRange)&&this.view.calendar.constraints.isSelectionFootprintAllowed(t)},e}(l.default);e.default=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(17),o=n(14),s=function(t){function e(e){var n=t.call(this,e)||this;return n.dragListener=n.buildDragListener(),n}return r.__extends(e,t),e.prototype.end=function(){this.dragListener.endInteraction()},e.prototype.bindToEl=function(t){var e=this.component,n=this.dragListener;e.bindDateHandlerToEl(t,"mousedown",function(t){e.shouldIgnoreMouse()||n.startInteraction(t)}),e.bindDateHandlerToEl(t,"touchstart",function(t){e.shouldIgnoreTouch()||n.startInteraction(t)})},e.prototype.buildDragListener=function(){var t,e=this,n=this.component,r=new i.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){t=r.origHit},hitOver:function(e,n,r){n||(t=null)},hitOut:function(){t=null},interactionEnd:function(r,i){var o;!i&&t&&(o=n.getSafeHitFootprint(t))&&e.view.triggerDayClick(o,n.getHitEl(t),r)}});return r.shouldCancelTouchScroll=!1,r.scrollAlwaysKills=!0,r},e}(o.default);e.default=s},function(t,e,n){function r(t){var e,n=[],r=[];for(e=0;e<t.length;e++)t[e].componentFootprint.isAllDay?n.push(t[e]):r.push(t[e]);return{allDay:n,timed:r}}
29182Object.defineProperty(e,"__esModule",{value:!0});var i,o,s=n(2),a=n(0),l=n(3),u=n(4),d=n(41),c=n(43),p=n(239),h=n(66),f=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.usesMinMaxTime=!0,r.timeGrid=r.instantiateTimeGrid(),r.addChild(r.timeGrid),r.opt("allDaySlot")&&(r.dayGrid=r.instantiateDayGrid(),r.addChild(r.dayGrid)),r.scroller=new d.default({overflowX:"hidden",overflowY:"auto"}),r}return s.__extends(e,t),e.prototype.instantiateTimeGrid=function(){var t=new this.timeGridClass(this);return u.copyOwnProps(i,t),t},e.prototype.instantiateDayGrid=function(){var t=new this.dayGridClass(this);return u.copyOwnProps(o,t),t},e.prototype.renderSkeleton=function(){var t,e;this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.scroller.render(),t=this.scroller.el.addClass("fc-time-grid-container"),e=l('<div class="fc-time-grid" />').appendTo(t),this.el.find(".fc-body > tr > td").append(t),this.timeGrid.headContainerEl=this.el.find(".fc-head-container"),this.timeGrid.setElement(e),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight())},e.prototype.unrenderSkeleton=function(){this.timeGrid.removeElement(),this.dayGrid&&this.dayGrid.removeElement(),this.scroller.destroy()},e.prototype.renderSkeletonHtml=function(){var t=this.calendar.theme;return'<table class="'+t.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+t.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+t.getClass("widgetContent")+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+t.getClass("widgetHeader")+'"/>':"")+"</td></tr></tbody></table>"},e.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},e.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},e.prototype.updateSize=function(e,n,r){var i,o,s;if(t.prototype.updateSize.call(this,e,n,r),this.axisWidth=u.matchCellWidths(this.el.find(".fc-axis")),!this.timeGrid.colEls)return void(n||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o)));var a=this.el.find(".fc-row:not(.fc-scroller *)");this.timeGrid.bottomRuleEl.hide(),this.scroller.clear(),u.uncompensateScroll(a),this.dayGrid&&(this.dayGrid.removeSegPopover(),i=this.opt("eventLimit"),i&&"number"!=typeof i&&(i=5),i&&this.dayGrid.limitRows(i)),n||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(u.compensateScroll(a,s),o=this.computeScrollerHeight(e),this.scroller.setHeight(o)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()<o&&this.timeGrid.bottomRuleEl.show())},e.prototype.computeScrollerHeight=function(t){return t-u.subtractInnerElHeight(this.el,this.scroller.el)},e.prototype.computeInitialDateScroll=function(){var t=a.duration(this.opt("scrollTime")),e=this.timeGrid.computeTimeTop(t);return e=Math.ceil(e),e&&e++,{top:e}},e.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},e.prototype.applyDateScroll=function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},e.prototype.getHitFootprint=function(t){return t.component.getHitFootprint(t)},e.prototype.getHitEl=function(t){return t.component.getHitEl(t)},e.prototype.executeEventRender=function(t){var e,n,r={},i={};for(e in t)n=t[e],n.getEventDef().isAllDay()?r[e]=n:i[e]=n;this.timeGrid.executeEventRender(i),this.dayGrid&&this.dayGrid.executeEventRender(r)},e.prototype.renderDrag=function(t,e,n){var i=r(t),o=!1;return o=this.timeGrid.renderDrag(i.timed,e,n),this.dayGrid&&(o=this.dayGrid.renderDrag(i.allDay,e,n)||o),o},e.prototype.renderEventResize=function(t,e,n){var i=r(t);this.timeGrid.renderEventResize(i.timed,e,n),this.dayGrid&&this.dayGrid.renderEventResize(i.allDay,e,n)},e.prototype.renderSelectionFootprint=function(t){t.isAllDay?this.dayGrid&&this.dayGrid.renderSelectionFootprint(t):this.timeGrid.renderSelectionFootprint(t)},e}(c.default);e.default=f,f.prototype.timeGridClass=p.default,f.prototype.dayGridClass=h.default,i={renderHeadIntroHtml:function(){var t,e=this.view,n=e.calendar,r=n.msToUtcMoment(this.dateProfile.renderUnzonedRange.startMs,!0);return this.opt("weekNumbers")?(t=r.format(this.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+n.theme.getClass("widgetHeader")+'" '+e.axisStyleAttr()+">"+e.buildGotoAnchorHtml({date:r,type:"week",forceOff:this.colCnt>1},u.htmlEscape(t))+"</th>"):'<th class="fc-axis '+n.theme.getClass("widgetHeader")+'" '+e.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.calendar.theme.getClass("widgetContent")+'" '+t.axisStyleAttr()+"></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},o={renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.calendar.theme.getClass("widgetContent")+'" '+t.axisStyleAttr()+"><span>"+t.getAllDayHtml()+"</span></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}}}
29182,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(0),s=n(4),a=n(42),l=n(61),u=n(65),d=n(60),c=n(58),p=n(5),h=n(12),f=n(240),g=n(241),v=n(242),y=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],m=function(t){function e(e){var n=t.call(this,e)||this;return n.processOptions(),n}return r.__extends(e,t),e.prototype.componentFootprintToSegs=function(t){var e,n=this.sliceRangeByTimes(t.unzonedRange);for(e=0;e<n.length;e++)this.isRTL?n[e].col=this.daysPerRow-1-n[e].dayIndex:n[e].col=n[e].dayIndex;return n},e.prototype.sliceRangeByTimes=function(t){var e,n,r=[];for(n=0;n<this.daysPerRow;n++)(e=t.intersect(this.dayRanges[n]))&&r.push({startMs:e.startMs,endMs:e.endMs,isStart:e.isStart,isEnd:e.isEnd,dayIndex:n});return r},e.prototype.processOptions=function(){var t,e=this.opt("slotDuration"),n=this.opt("snapDuration");e=o.duration(e),n=n?o.duration(n):e,this.slotDuration=e,this.snapDuration=n,this.snapsPerSlot=e/n,t=this.opt("slotLabelFormat"),i.isArray(t)&&(t=t[t.length-1]),this.labelFormat=t||this.opt("smallTimeFormat"),t=this.opt("slotLabelInterval"),this.labelInterval=t?o.duration(t):this.computeLabelInterval(e)},e.prototype.computeLabelInterval=function(t){var e,n,r;for(e=y.length-1;e>=0;e--)if(n=o.duration(y[e]),r=s.divideDurationByDuration(n,t),s.isInt(r)&&r>1)return n;return o.duration(t)},e.prototype.renderDates=function(t){this.dateProfile=t,this.updateDayTable(),this.renderSlats(),this.renderColumns()},e.prototype.unrenderDates=function(){this.unrenderColumns()},e.prototype.renderSkeleton=function(){var t=this.view.calendar.theme;this.el.html('<div class="fc-bg"></div><div class="fc-slats"></div><hr class="fc-divider '+t.getClass("widgetHeader")+'" style="display:none" />'),this.bottomRuleEl=this.el.find("hr")},e.prototype.renderSlats=function(){var t=this.view.calendar.theme;this.slatContainerEl=this.el.find("> .fc-slats").html('<table class="'+t.getClass("tableGrid")+'">'+this.renderSlatRowHtml()+"</table>"),this.slatEls=this.slatContainerEl.find("tr"),this.slatCoordCache=new c.default({els:this.slatEls,isVertical:!0})},e.prototype.renderSlatRowHtml=function(){for(var t,e,n,r=this.view,i=r.calendar,a=i.theme,l=this.isRTL,u=this.dateProfile,d="",c=o.duration(+u.minTime),p=o.duration(0);c<u.maxTime;)t=i.msToUtcMoment(u.renderUnzonedRange.startMs).time(c),e=s.isInt(s.divideDurationByDuration(p,this.labelInterval)),n='<td class="fc-axis fc-time '+a.getClass("widgetContent")+'" '+r.axisStyleAttr()+">"+(e?"<span>"+s.htmlEscape(t.format(this.labelFormat))+"</span>":"")+"</td>",d+='<tr data-time="'+t.format("HH:mm:ss")+'"'+(e?"":' class="fc-minor"')+">"+(l?"":n)+'<td class="'+a.getClass("widgetContent")+'"/>'+(l?n:"")+"</tr>",c.add(this.slotDuration),p.add(this.slotDuration);return d},e.prototype.renderColumns=function(){var t=this.dateProfile,e=this.view.calendar.theme;this.dayRanges=this.dayDates.map(function(e){return new p.default(e.clone().add(t.minTime),e.clone().add(t.maxTime))}),this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),this.el.find("> .fc-bg").html('<table class="'+e.getClass("tableGrid")+'">'+this.renderBgTrHtml(0)+"</table>"),this.colEls=this.el.find(".fc-day, .fc-disabled-day"),this.colCoordCache=new c.default({els:this.colEls,isHorizontal:!0}),this.renderContentSkeleton()},e.prototype.unrenderColumns=function(){this.unrenderContentSkeleton()},e.prototype.renderContentSkeleton=function(){var t,e,n="";for(t=0;t<this.colCnt;t++)n+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';e=this.contentSkeletonEl=i('<div class="fc-content-skeleton"><table><tr>'+n+"</tr></table></div>"),this.colContainerEls=e.find(".fc-content-col"),this.helperContainerEls=e.find(".fc-helper-container"),this.fgContainerEls=e.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=e.find(".fc-bgevent-container"),this.highlightContainerEls=e.f
29182ind(".fc-highlight-container"),this.businessContainerEls=e.find(".fc-business-container"),this.bookendCells(e.find("tr")),this.el.append(e)},e.prototype.unrenderContentSkeleton=function(){this.contentSkeletonEl&&(this.contentSkeletonEl.remove(),this.contentSkeletonEl=null,this.colContainerEls=null,this.helperContainerEls=null,this.fgContainerEls=null,this.bgContainerEls=null,this.highlightContainerEls=null,this.businessContainerEls=null)},e.prototype.groupSegsByCol=function(t){var e,n=[];for(e=0;e<this.colCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].col].push(t[e]);return n},e.prototype.attachSegsByCol=function(t,e){var n,r,i;for(n=0;n<this.colCnt;n++)for(r=t[n],i=0;i<r.length;i++)e.eq(n).append(r[i].el)},e.prototype.getNowIndicatorUnit=function(){return"minute"},e.prototype.renderNowIndicator=function(t){if(this.colContainerEls){var e,n=this.componentFootprintToSegs(new h.default(new p.default(t,t.valueOf()+1),!1)),r=this.computeDateTop(t,t),o=[];for(e=0;e<n.length;e++)o.push(i('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",r).appendTo(this.colContainerEls.eq(n[e].col))[0]);n.length>0&&o.push(i('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=i(o)}},e.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},e.prototype.updateSize=function(e,n,r){t.prototype.updateSize.call(this,e,n,r),this.slatCoordCache.build(),r&&this.updateSegVerticals([].concat(this.eventRenderer.getSegs(),this.businessSegs||[]))}
29182,e.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.outerHeight()},e.prototype.computeDateTop=function(t,e){return this.computeTimeTop(o.duration(t-e.clone().stripTime()))},e.prototype.computeTimeTop=function(t){var e,n,r=this.slatEls.length,i=this.dateProfile,o=(t-i.minTime)/this.slotDuration;return o=Math.max(0,o),o=Math.min(r,o),e=Math.floor(o),e=Math.min(e,r-1),n=o-e,this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},e.prototype.updateSegVerticals=function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},e.prototype.computeSegVerticals=function(t){var e,n,r,i=this.opt("agendaEventMinHeight");for(e=0;e<t.length;e++)n=t[e],r=this.dayDates[n.dayIndex],n.top=this.computeDateTop(n.startMs,r),n.bottom=Math.max(n.top+i,this.computeDateTop(n.endMs,r))},e.prototype.assignSegVerticals=function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateSegVerticalCss(n))},e.prototype.generateSegVerticalCss=function(t){return{top:t.top,bottom:-t.bottom}},e.prototype.prepareHits=function(){this.colCoordCache.build(),this.slatCoordCache.build()},e.prototype.releaseHits=function(){this.colCoordCache.clear()},e.prototype.queryHit=function(t,e){var n=this.snapsPerSlot,r=this.colCoordCache,i=this.slatCoordCache;if(r.isLeftInBounds(t)&&i.isTopInBounds(e)){var o=r.getHorizontalIndex(t),s=i.getVerticalIndex(e);if(null!=o&&null!=s){var a=i.getTopOffset(s),l=i.getHeight(s),u=(e-a)/l,d=Math.floor(u*n),c=s*n+d,p=a+d/n*l,h=a+(d+1)/n*l;return{col:o,snap:c,component:this,left:r.getLeftOffset(o),right:r.getRightOffset(o),top:p,bottom:h}}}},e.prototype.getHitFootprint=function(t){var e,n=this.getCellDate(0,t.col),r=this.computeSnapTime(t.snap);return n.time(r),e=n.clone().add(this.snapDuration),new h.default(new p.default(n,e),!1)},e.prototype.computeSnapTime=function(t){return o.duration(this.dateProfile.minTime+this.snapDuration*t)},e.prototype.getHitEl=function(t){return this.colEls.eq(t.col)},e.prototype.renderDrag=function(t,e,n){var r;if(e){if(t.length)return this.helperRenderer.renderEventDraggingFootprints(t,e,n),!0}else for(r=0;r<t.length;r++)this.renderHighlight(t[r].componentFootprint)},e.prototype.unrenderDrag=function(){this.unrenderHighlight(),this.helperRenderer.unrender()},e.prototype.renderEventResize=function(t,e,n){this.helperRenderer.renderEventResizingFootprints(t,e,n)},e.prototype.unrenderEventResize=function(){this.helperRenderer.unrender()},e.prototype.renderSelectionFootprint=function(t){this.opt("selectHelper")?this.helperRenderer.renderComponentFootprint(t):this.renderHighlight(t)},e.prototype.unrenderSelection=function(){this.helperRenderer.unrender(),this.unrenderHighlight()},e}(a.default);e.default=m,m.prototype.eventRendererClass=f.default,m.prototype.businessHourRendererClass=l.default,m.prototype.helperRendererClass=g.default,m.prototype.fillRendererClass=v.default,u.default.mixInto(m),d.default.mixInto(m)},function(t,e,n){function r(t){var e,n,r,i=[];for(e=0;e<t.length;e++){for(n=t[e],r=0;r<i.length&&s(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}function i(t){var e,n,r,i,o;for(e=0;e<t.length;e++)for(n=t[e],r=0;r<n.length;r++)for(i=n[r],i.forwardSegs=[],o=e+1;o<t.length;o++)s(i,t[o],i.forwardSegs)}function o(t){var e,n,r=t.forwardSegs,i=0;if(void 0===t.forwardPressure){for(e=0;e<r.length;e++)n=r[e],o(n),i=Math.max(i,1+n.forwardPressure);t.forwardPressure=i}}function s(t,e,n){void 0===n&&(n=[]);for(var r=0;r<e.length;r++)a(t,e[r])&&n.push(e[r]);return n}function a(t,e){return t.bottom>e.top&&t.top<e.bottom}Object.defineProperty(e,"__esModule",{value:!0});var l=n(2),u=n(4),d=n(44),c=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.timeGrid=e,r}return l.__extends(e,t),e.prototype.renderFgSegs=function(t){this.renderFgSegsIntoContainers(t,this.timeGrid.fgContainerEls)},e.prototype.renderFgSegsIntoContainers=function(t,e){var n,r;for(n=this.timeGrid.groupSegsByCol(t),r=0;r<this.timeGrid.colCnt;r++)this.updateFgSegCoords(n[r]);this.timeGrid.attachSegsByCol(n,e)},e.prototype.unrenderFgSegs=function(){this.fgSegs&&this.fgSegs.forEac
29182h(function(t){t.el.remove()})},e.prototype.computeEventTimeFormat=function(){return this.opt("noMeridiemTimeFormat")},e.prototype.computeDisplayEventEnd=function(){return!0},e.prototype.fgSegHtml=function(t,e){
29183var n,r,i,o=this.view,s=o.calendar,a=t.footprint.componentFootprint,l=a.isAllDay,d=t.footprint.eventDef,c=o.isEventDefDraggable(d),p=!e&&t.isStart&&o.isEventDefResizableFromStart(d),h=!e&&t.isEnd&&o.isEventDefResizableFromEnd(d),f=this.getSegClasses(t,c,p||h),g=u.cssToStr(this.getSkinCss(d));if(f.unshift("fc-time-grid-event","fc-v-event"),o.isMultiDayRange(a.unzonedRange)){if(t.isStart||t.isEnd){var v=s.msToMoment(t.startMs),y=s.msToMoment(t.endMs);n=this._getTimeText(v,y,l),r=this._getTimeText(v,y,l,"LT"),i=this._getTimeText(v,y,l,null,!1)}}else n=this.getTimeText(t.footprint),r=this.getTimeText(t.footprint,"LT"),i=this.getTimeText(t.footprint,null,!1);return'<a class="'+f.join(" ")+'"'+(d.url?' href="'+u.htmlEscape(d.url)+'"':"")+(g?' style="'+g+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+u.htmlEscape(i)+'" data-full="'+u.htmlEscape(r)+'"><span>'+u.htmlEscape(n)+"</span></div>":"")+(d.title?'<div class="fc-title">'+u.htmlEscape(d.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(h?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},e.prototype.updateFgSegCoords=function(t){this.timeGrid.computeSegVerticals(t),this.computeFgSegHorizontals(t),this.timeGrid.assignSegVerticals(t),this.assignFgSegHorizontals(t)},e.prototype.computeFgSegHorizontals=function(t){var e,n,s;if(this.sortEventSegs(t),e=r(t),i(e),n=e[0]){for(s=0;s<n.length;s++)o(n[s]);for(s=0;s<n.length;s++)this.computeFgSegForwardBack(n[s],0,0)}},e.prototype.computeFgSegForwardBack=function(t,e,n){var r,i=t.forwardSegs;if(void 0===t.forwardCoord)for(i.length?(this.sortForwardSegs(i),this.computeFgSegForwardBack(i[0],e+1,n),t.forwardCoord=i[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),r=0;r<i.length;r++)this.computeFgSegForwardBack(i[r],0,t.forwardCoord)},e.prototype.sortForwardSegs=function(t){t.sort(u.proxy(this,"compareForwardSegs"))},e.prototype.compareForwardSegs=function(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||this.compareEventSegs(t,e)},e.prototype.assignFgSegHorizontals=function(t){var e,n;for(e=0;e<t.length;e++)n=t[e],n.el.css(this.generateFgSegHorizontalCss(n)),n.footprint.eventDef.title&&n.bottom-n.top<30&&n.el.addClass("fc-short")},e.prototype.generateFgSegHorizontalCss=function(t){var e,n,r=this.opt("slotEventOverlap"),i=t.backwardCoord,o=t.forwardCoord,s=this.timeGrid.generateSegVerticalCss(t),a=this.timeGrid.isRTL;return r&&(o=Math.min(1,i+2*(o-i))),a?(e=1-o,n=i):(e=i,n=1-o),s.zIndex=t.level+1,s.left=100*e+"%",s.right=100*n+"%",r&&t.forwardPressure&&(s[a?"marginLeft":"marginRight"]=20),s},e}(d.default);e.default=c},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(63),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.renderSegs=function(t,e){var n,r,o,s=[];for(this.eventRenderer.renderFgSegsIntoContainers(t,this.component.helperContainerEls),n=0;n<t.length;n++)r=t[n],e&&e.col===r.col&&(o=e.el,r.el.css({left:o.css("left"),right:o.css("right"),"margin-left":o.css("margin-left"),"margin-right":o.css("margin-right")})),s.push(r.el[0]);return i(s)},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(62),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.attachSegEls=function(t,e){var n,r=this.component;return"bgEvent"===t?n=r.bgContainerEls:"businessHours"===t?n=r.businessContainerEls:"highlight"===t&&(n=r.highlightContainerEls),r.updateSegVerticals(e),r.attachSegsByCol(r.groupSegsByCol(e),n),e.map(function(t){return t.el[0]})},e}(i.default);e.default=o},function(t,e,n){function r(t,e){var n,r;for(n=0;n<e.length;n++)if(r=e[n],r.leftCol<=t.rightCol&&r.rightCol>=t.leftCol)return!0;return!1}function i(t,e){return t.leftCol-e.leftCol}
29183Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),s=n(3),a=n(4),l=n(44),u=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.dayGrid=e,r}return o.__extends(e,t),e.prototype.renderBgRanges=function(e){e=s.grep(e,function(t){return t.eventDef.isAllDay()}),t.prototype.renderBgRanges.call(this,e)},e.prototype.renderFgSegs=function(t){var e=this.rowStructs=this.renderSegRows(t);this.dayGrid.rowEls.each(function(t,n){s(n).find(".fc-content-skeleton > table").append(e[t].tbodyEl)})},e.prototype.unrenderFgSegs=function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},e.prototype.renderSegRows=function(t){var e,n,r=[];for(e=this.groupSegRows(t),n=0;n<e.length;n++)r.push(this.renderSegRow(n,e[n]));return r},e.prototype.renderSegRow=function(t,e){function n(t){for(;o<t;)d=(y[r-1]||[])[o],d?d.attr("rowspan",parseInt(d.attr("rowspan")||1,10)+1):(d=s("<td/>"),a.append(d)),v[r][o]=d,y[r][o]=d,o++}var r,i,o,a,l,u,d,c=this.dayGrid.colCnt,p=this.buildSegLevels(e),h=Math.max(1,p.length),f=s("<tbody/>"),g=[],v=[],y=[];for(r=0;r<h;r++){if(i=p[r],o=0,a=s("<tr/>"),g.push([]),v.push([]),y.push([]),i)for(l=0;l<i.length;l++){for(u=i[l],n(u.leftCol),d=s('<td class="fc-event-container"/>').append(u.el),u.leftCol!==u.rightCol?d.attr("colspan",u.rightCol-u.leftCol+1):y[r][o]=d;o<=u.rightCol;)v[r][o]=d,g[r][o]=u,o++;a.append(d)}n(c),this.dayGrid.bookendCells(a),f.append(a)}return{row:t,tbodyEl:f,cellMatrix:v,segMatrix:g,segLevels:p,segs:e}},e.prototype.buildSegLevels=function(t){var e,n,o,s=[];for(this.sortEventSegs(t),e=0;e<t.length;e++){for(n=t[e],o=0;o<s.length&&r(n,s[o]);o++);n.level=o,(s[o]||(s[o]=[])).push(n)}for(o=0;o<s.length;o++)s[o].sort(i);return s},e.prototype.groupSegRows=function(t){var e,n=[];for(e=0;e<this.dayGrid.rowCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].row].push(t[e]);return n},e.prototype.computeEventTimeFormat=function(){return this.opt("extraSmallTimeFormat")},e.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},e.prototype.fgSegHtml=function(t,e){var n,r,i=this.view,o=t.footprint.eventDef,s=t.footprint.componentFootprint.isAllDay,l=i.isEventDefDraggable(o),u=!e&&s&&t.isStart&&i.isEventDefResizableFromStart(o),d=!e&&s&&t.isEnd&&i.isEventDefResizableFromEnd(o),c=this.getSegClasses(t,l,u||d),p=a.cssToStr(this.getSkinCss(o)),h="";return c.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getTimeText(t.footprint))&&(h='<span class="fc-time">'+a.htmlEscape(n)+"</span>"),r='<span class="fc-title">'+(a.htmlEscape(o.title||"")||"&nbsp;")+"</span>",'<a class="'+c.join(" ")+'"'+(o.url?' href="'+a.htmlEscape(o.url)+'"':"")+(p?' style="'+p+'"':"")+'><div class="fc-content">'+(this.dayGrid.isRTL?r+" "+h:h+" "+r)+"</div>"+(u?'<div class="fc-resizer fc-start-resizer" />':"")+(d?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},e}(l.default);e.default=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(63),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.renderSegs=function(t,e){var n,r=[];return n=this.eventRenderer.renderSegRows(t),this.component.rowEls.each(function(t,o){var s,a,l=i(o),u=i('<div class="fc-helper-skeleton"><table/></div>');e&&e.row===t?a=e.el.position().top:(s=l.find(".fc-content-skeleton tbody"),s.length||(s=l.find(".fc-content-skeleton table")),a=s.position().top),u.css("top",a).find("table").append(n[t].tbodyEl),l.append(u),r.push(u[0])}),i(r)},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(62),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fillSegTag="td",e}return r.__extends(e,t),e.prototype.attachSegEls=function(t,e){var n,r,i,o=[];for(n=0;n<e.length;n++)r=e[n],i=this.renderFillRow(t,r),this.component.rowEls.eq(r.row).append(i),o.push(i[0]);return o},e.prototype.renderFillRow=function(t,e){var n,r,o,s=this.component.colCnt,a=e.leftCol,l=e.rightCol+1;return n="businessHours"===t?"bgevent":t.toLowerCase(),r=i('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>'),o=r.find("tr"),a>0&&o.append(new Array(a+1).join("<td/>
29183")),o.append(e.el.attr("colspan",l-a)),l<s&&o.append(new Array(s-l+1).join("<td/>")),this.component.bookendCells(o),r},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(0),o=n(4),s=n(67),a=n(247),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.setGridHeight=function(t,e){e&&(t*=this.dayGrid.rowCnt/6),o.distributeHeight(this.dayGrid.rowEls,t,!e)},e.prototype.isDateInOtherMonth=function(t,e){return t.month()!==i.utc(e.currentUnzonedRange.startMs).month()},e}(s.default);e.default=l,l.prototype.dateProfileGeneratorClass=a.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(68),o=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.buildRenderRange=function(e,n,r){var i,s=t.prototype.buildRenderRange.call(this,e,n,r),a=this.msToUtcMoment(s.startMs,r),l=this.msToUtcMoment(s.endMs,r);return this.opt("fixedWeekCount")&&(i=Math.ceil(l.diff(a,"weeks",!0)),l.add(6-i,"weeks")),new o.default(a,l)},e}(i.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(5),a=n(43),l=n(41),u=n(249),d=n(250),c=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.segSelector=".fc-list-item",r.scroller=new l.default({overflowX:"hidden",overflowY:"auto"}),r}return r.__extends(e,t),e.prototype.renderSkeleton=function(){this.el.addClass("fc-list-view "+this.calendar.theme.getClass("listView")),this.scroller.render(),this.scroller.el.appendTo(this.el),this.contentEl=this.scroller.scrollEl},e.prototype.unrenderSkeleton=function(){this.scroller.destroy()},e.prototype.updateSize=function(e,n,r){t.prototype.updateSize.call(this,e,n,r),this.scroller.clear(),n||this.scroller.setHeight(this.computeScrollerHeight(e))},e.prototype.computeScrollerHeight=function(t){return t-o.subtractInnerElHeight(this.el,this.scroller.el)},e.prototype.renderDates=function(t){for(var e=this.calendar,n=e.msToUtcMoment(t.renderUnzonedRange.startMs,!0),r=e.msToUtcMoment(t.renderUnzonedRange.endMs,!0),i=[],o=[];n<r;)i.push(n.clone()),o.push(new s.default(n,n.clone().add(1,"day"))),n.add(1,"day");this.dayDates=i,this.dayRanges=o},e.prototype.componentFootprintToSegs=function(t){var e,n,r,i=this.dayRanges,o=[];for(e=0;e<i.length;e++)if((n=t.unzonedRange.intersect(i[e]))&&(r={startMs:n.startMs,endMs:n.endMs,isStart:n.isStart,isEnd:n.isEnd,dayIndex:e},o.push(r),!r.isEnd&&!t.isAllDay&&e+1<i.length&&t.unzonedRange.endMs<i[e+1].startMs+this.nextDayThreshold)){r.endMs=t.unzonedRange.endMs,r.isEnd=!0;break}return o},e.prototype.renderEmptyMessage=function(){this.contentEl.html('<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+o.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>")},e.prototype.renderSegList=function(t){var e,n,r,o=this.groupSegsByDay(t),s=i('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody/></table>'),a=s.find("tbody");for(e=0;e<o.length;e++)if(n=o[e])for(a.append(this.dayHeaderHtml(this.dayDates[e])),this.eventRenderer.sortEventSegs(n),r=0;r<n.length;r++)a.append(n[r].el);this.contentEl.empty().append(s)},e.prototype.groupSegsByDay=function(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t[e],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r},e.prototype.dayHeaderHtml=function(t){var e=this.opt("listDayFormat"),n=this.opt("listDayAltFormat");return'<tr class="fc-list-heading" data-date="'+t.format("YYYY-MM-DD")+'"><td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(e?this.buildGotoAnchorHtml(t,{class:"fc-list-heading-main"},o.htmlEscape(t.format(e))):"")+(n?this.buildGotoAnchorHtml(t,{class:"fc-list-heading-alt"},o.htmlEscape(t.format(n))):"")+"</td></tr>"},e}(a.default);e.default=c,c.prototype.eventRendererClass=u.default,c.prototype.eventPointingClass=d.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(44),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.renderFgSegs=function(t){t.length?this.component.render
29183SegList(t):this.component.renderEmptyMessage()},e.prototype.fgSegHtml=function(t){var e,n=this.view,r=n.calendar,o=r.theme,s=t.footprint,a=s.eventDef,l=s.componentFootprint,u=a.url,d=["fc-list-item"].concat(this.getClasses(a)),c=this.getBgColor(a);return e=l.isAllDay?n.getAllDayHtml():n.isMultiDayRange(l.unzonedRange)?t.isStart||t.isEnd?i.htmlEscape(this._getTimeText(r.msToMoment(t.startMs),r.msToMoment(t.endMs),l.isAllDay)):n.getAllDayHtml():i.htmlEscape(this.getTimeText(s)),u&&d.push("fc-has-url"),'<tr class="'+d.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+o.getClass("widgetContent")+'">'+(e||"")+"</td>":"")+'<td class="fc-list-item-marker '+o.getClass("widgetContent")+'"><span class="fc-event-dot"'+(c?' style="background-color:'+c+'"':"")+'></span></td><td class="fc-list-item-title '+o.getClass("widgetContent")+'"><a'+(u?' href="'+i.htmlEscape(u)+'"':"")+">"+i.htmlEscape(a.title||"")+"</a></td></tr>"},e.prototype.computeEventTimeFormat=function(){return this.opt("mediumTimeFormat")},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(64),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.handleClick=function(e,n){var r;t.prototype.handleClick.call(this,e,n),i(n.target).closest("a[href]").length||(r=e.footprint.eventDef.url)&&!n.isDefaultPrevented()&&(window.location.href=r)},e}(o.default);e.default=s},,,,,,function(t,e,n){var r=n(3),i=n(18),o=n(4),s=n(232);n(11),n(49),n(260),n(261),n(264),n(265),n(266),n(267),r.fullCalendar=i,r.fn.fullCalendar=function(t){var e=Array.prototype.slice.call(arguments,1),n=this;return this.each(function(i,a){var l,u=r(a),d=u.data("fullCalendar");"string"==typeof t?"getCalendar"===t?i||(n=d):"destroy"===t?d&&(d.destroy(),u.removeData("fullCalendar")):d?r.isFunction(d[t])?(l=d[t].apply(d,e),i||(n=l),"destroy"===t&&u.removeData("fullCalendar")):o.warn("'"+t+"' is an unknown FullCalendar method."):o.warn("Attempting to call a FullCalendar method on an element with no calendar."):d||(d=new s.default(u,t),u.data("fullCalendar",d),d.render())}),n},t.exports=i},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=function(){function t(t,e){this.el=null,this.viewsWithButtons=[],this.calendar=t,this.toolbarOptions=e}return t.prototype.setToolbarOptions=function(t){this.toolbarOptions=t},t.prototype.render=function(){var t=this.toolbarOptions.layout,e=this.el;t?(e?e.empty():e=this.el=r("<div class='fc-toolbar "+this.toolbarOptions.extraClasses+"'/>"),e.append(this.renderSection("left")).append(this.renderSection("right")).append(this.renderSection("center")).append('<div class="fc-clear"/>')):this.removeElement()},t.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},t.prototype.renderSection=function(t){var e=this,n=this.calendar,o=n.theme,s=n.optionsManager,a=n.viewSpecManager,l=r('<div class="fc-'+t+'"/>'),u=this.toolbarOptions.layout[t],d=s.get("customButtons")||{},c=s.overrides.buttonText||{},p=s.get("buttonText")||{};return u&&r.each(u.split(" "),function(t,s){var u,h=r(),f=!0;r.each(s.split(","),function(t,s){var l,u,g,v,y,m,b,w,D;"title"===s?(h=h.add(r("<h2>&nbsp;</h2>")),f=!1):((l=d[s])?(g=function(t){l.click&&l.click.call(w[0],t)},(v=o.getCustomButtonIconClass(l))||(v=o.getIconClass(s))||(y=l.text)):(u=a.getViewSpec(s))?(e.viewsWithButtons.push(s),g=function(){n.changeView(s)},(y=u.buttonTextOverride)||(v=o.getIconClass(s))||(y=u.buttonTextDefault)):n[s]&&(g=function(){n[s]()},(y=c[s])||(v=o.getIconClass(s))||(y=p[s])),g&&(b=["fc-"+s+"-button",o.getClass("button"),o.getClass("stateDefault")],y?(m=i.htmlEscape(y),D=""):v&&(m="<span class='"+v+"'></span>",D=' aria-label="'+s+'"'),w=r('<button type="button" class="'+b.join(" ")+'"'+D+">"+m+"</button>").click(function(t){w.hasClass(o.getClass("stateDisabled"))||(g(t),(w.hasClass(o.getClass("stateActive"))||w.hasClass(o.getClass("stateDisabled")))&&w.removeClass(o.getClass("stateHover")))}).mousedown(function(){w.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateDown"))}).mouseup(function(){w.removeClass(o.getClass("stateDown"))}).hover(function(){w.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateHover"))},function(){w.removeClass(o.getClass("stateHover")).removeClass(o.getClass("stateDown"))}),h=h.add(w)))}
29183),f&&h.first().addClass(o.getClass("cornerLeft")).end().last().addClass(o.getClass("cornerRight")).end(),h.length>1?(u=r("<div/>"),f&&u.addClass(o.getClass("buttonGroup")),u.append(h),l.append(u)):l.append(h)}),l},t.prototype.updateTitle=function(t){this.el&&this.el.find("h2").text(t)},t.prototype.activateButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").addClass(this.calendar.theme.getClass("stateActive"))},t.prototype.deactivateButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").removeClass(this.calendar.theme.getClass("stateActive"))},t.prototype.disableButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").prop("disabled",!0).addClass(this.calendar.theme.getClass("stateDisabled"))},t.prototype.enableButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(this.calendar.theme.getClass("stateDisabled"))},t.prototype.getViewsWithButtons=function(){return this.viewsWithButtons},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=n(4),s=n(33),a=n(32),l=n(51),u=function(t){function e(e,n){var r=t.call(this)||this;return r._calendar=e,r.overrides=i.extend({},n),r.dynamicOverrides={},r.compute(),r}return r.__extends(e,t),e.prototype.add=function(t){var e,n=0;this.recordOverrides(t);for(e in t)n++;if(1===n){if("height"===e||"contentHeight"===e||"aspectRatio"===e)return void this._calendar.updateViewSize(!0);if("defaultDate"===e)return;if("businessHours"===e)return;if(/^(event|select)(Overlap|Constraint|Allow)$/.test(e))return;if("timezone"===e)return void this._calendar.view.flash("initialEvents")}this._calendar.renderHeader(),this._calendar.renderFooter(),this._calendar.viewsByType={},this._calendar.reinitView()},e.prototype.compute=function(){var t,e,n,r,i;t=o.firstDefined(this.dynamicOverrides.locale,this.overrides.locale),e=a.localeOptionHash[t],e||(t=s.globalDefaults.locale,e=a.localeOptionHash[t]||{}),n=o.firstDefined(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,s.globalDefaults.isRTL),r=n?s.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=e,i=s.mergeOptions([s.globalDefaults,r,e,this.overrides,this.dynamicOverrides]),a.populateInstanceComputableOptions(i),this.reset(i)},e.prototype.recordOverrides=function(t){var e;for(e in t)this.dynamicOverrides[e]=t[e];this._calendar.viewSpecManager.clearCache(),this.compute()},e}(l.default);e.default=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(3),o=n(24),s=n(4),a=n(33),l=n(32),u=function(){function t(t,e){this.optionsManager=t,this._calendar=e,this.clearCache()}return t.prototype.clearCache=function(){this.viewSpecCache={}},t.prototype.getViewSpec=function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},t.prototype.getUnitViewSpec=function(t){var e,n,r;if(-1!==i.inArray(t,s.unitsDesc))for(e=this._calendar.header.getViewsWithButtons(),i.each(o.viewHash,function(t){e.push(t)}),n=0;n<e.length;n++)if((r=this.getViewSpec(e[n]))&&r.singleUnit===t)return r},t.prototype.buildViewSpec=function(t){for(var e,n,i,l,u,d=this.optionsManager.overrides.views||{},c=[],p=[],h=[],f=t;f;)e=o.viewHash[f],n=d[f],f=null,"function"==typeof e&&(e={class:e}),e&&(c.unshift(e),p.unshift(e.defaults||{}),i=i||e.duration,f=f||e.type),n&&(h.unshift(n),i=i||n.duration,f=f||n.type);return e=s.mergeProps(c),e.type=t,!!e.class&&(i=i||this.optionsManager.dynamicOverrides.duration||this.optionsManager.overrides.duration,i&&(l=r.duration(i),l.valueOf()&&(u=s.computeDurationGreatestUnit(l,i),e.duration=l,e.durationUnit=u,1===l.as(u)&&(e.singleUnit=u,h.unshift(d[u]||{})))),e.defaults=a.mergeOptions(p),e.overrides=a.mergeOptions(h),this.buildViewSpecOptions(e),this.buildViewSpecButtonText(e,t),e)},t.prototype.buildViewSpecOptions=function(t){var e=this.optionsManager;t.options=a.mergeOptions([a.globalDefaults,t.defaults,e.dirDefaults,e.localeDefaults,e.overrides,t.overrides,e.dynamicOverrides]),l.populateInstanceComputableOptions(t.options)},t.prototype.buildViewSpecButtonText=function(t,e){function n(n){var r=n.buttonText||{};return r[e]||(t.buttonTextKey?r[t.buttonTextKey]:null)||(t.singleUnit?r[t.singleUnit]:null)}var r=this.optionsManager;t.buttonTextOverride=n(r.dynamicOverrides)||n(r.overrides)||t.overrides.buttonText,t.buttonTextDefault=n(r.localeDefaults)||n(r.dirDefaults)||t.defaults.buttonText||n(a.globalDefaults)||(t.duration?this._calendar.humanizeDuration(t.duration):null)||e},t}();e.default=u}
29183,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(38),i=n(56),o=n(223),s=n(224);r.default.registerClass(i.default),r.default.registerClass(o.default),r.default.registerClass(s.default)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(57),i=n(221),o=n(222),s=n(262),a=n(263);r.defineThemeSystem("standard",i.default),r.defineThemeSystem("jquery-ui",o.default),r.defineThemeSystem("bootstrap3",s.default),r.defineThemeSystem("bootstrap4",a.default)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(22),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(i.default);e.default=o,o.prototype.classes={widget:"fc-bootstrap3",tableGrid:"table-bordered",tableList:"table",tableListHeading:"active",buttonGroup:"btn-group",button:"btn btn-default",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"panel panel-default",popoverHeader:"panel-heading",popoverContent:"panel-body",headerRow:"panel-default",dayRow:"panel-default",listView:"panel panel-default"},o.prototype.baseIconClass="glyphicon",o.prototype.iconClasses={close:"glyphicon-remove",prev:"glyphicon-chevron-left",next:"glyphicon-chevron-right",prevYear:"glyphicon-backward",nextYear:"glyphicon-forward"},o.prototype.iconOverrideOption="bootstrapGlyphicons",o.prototype.iconOverrideCustomButtonOption="bootstrapGlyphicon",o.prototype.iconOverridePrefix="glyphicon-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(22),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(i.default);e.default=o,o.prototype.classes={widget:"fc-bootstrap4",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},o.prototype.baseIconClass="fa",o.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},o.prototype.iconOverrideOption="bootstrapFontAwesome",o.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",o.prototype.iconOverridePrefix="fa-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(24),i=n(67),o=n(246);r.defineView("basic",{class:i.default}),r.defineView("basicDay",{type:"basic",duration:{days:1}}),r.defineView("basicWeek",{type:"basic",duration:{weeks:1}}),r.defineView("month",{class:o.default,duration:{months:1},defaults:{fixedWeekCount:!0}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(24),i=n(238);r.defineView("agenda",{class:i.default,defaults:{allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0}}),r.defineView("agendaDay",{type:"agenda",duration:{days:1}}),r.defineView("agendaWeek",{type:"agenda",duration:{weeks:1}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var r=n(24),i=n(248);r.defineView("list",{class:i.default,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}}),r.defineView("listDay",{type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}}),r.defineView("listWeek",{type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}}),r.defineView("listMonth",{type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}}),r.defineView("listYear",{type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}})},function(t,e){Object.defineProperty(e,"__esModule",{value:!0})}])});
29184;
vendor: 19,461 bytes, lines 29184-29203
29184/*!
29185 * perfect-scrollbar v1.5.0
29186 * Copyright 2020 Hyunje Jun, MDBootstrap and Contributors
29187 * Licensed under MIT
29188 */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a=a||self,a.PerfectScrollbar=b())})(this,function(){'use strict';var u=Math.abs,v=Math.floor;function a(a){return getComputedStyle(a)}function b(a,b){for(var c in b){var d=b[c];"number"==typeof d&&(d+="px"),a.style[c]=d}return a}function c(a){var b=document.createElement("div");return b.className=a,b}function d(a,b){if(!w)throw new Error("No element matching method supported");return w.call(a,b)}function e(a){a.remove?a.remove():a.parentNode&&a.parentNode.removeChild(a)}function f(a,b){return Array.prototype.filter.call(a.children,function(a){return d(a,b)})}function g(a,b){var c=a.element.classList,d=z.state.scrolling(b);c.contains(d)?clearTimeout(A[b]):c.add(d)}function h(a,b){A[b]=setTimeout(function(){return a.isAlive&&a.element.classList.remove(z.state.scrolling(b))},a.settings.scrollingThreshold)}function j(a,b){g(a,b),h(a,b)}function k(a){if("function"==typeof window.CustomEvent)return new CustomEvent(a);var b=document.createEvent("CustomEvent");return b.initCustomEvent(a,!1,!1,void 0),b}function l(a,b,c,d,e){void 0===d&&(d=!0),void 0===e&&(e=!1);var f;if("top"===b)f=["contentHeight","containerHeight","scrollTop","y","up","down"];else if("left"===b)f=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");m(a,c,f,d,e)}function m(a,b,c,d,e){var f=c[0],g=c[1],h=c[2],i=c[3],l=c[4],m=c[5];void 0===d&&(d=!0),void 0===e&&(e=!1);var n=a.element;// reset reach
29189a.reach[i]=null,1>n[h]&&(a.reach[i]="start"),n[h]>a[f]-a[g]-1&&(a.reach[i]="end"),b&&(n.dispatchEvent(k("ps-scroll-"+i)),0>b?n.dispatchEvent(k("ps-scroll-"+l)):0<b&&n.dispatchEvent(k("ps-scroll-"+m)),d&&j(a,i)),a.reach[i]&&(b||e)&&n.dispatchEvent(k("ps-"+i+"-reach-"+a.reach[i]))}function n(a){return parseInt(a,10)||0}function o(a){return d(a,"input,[contenteditable]")||d(a,"select,[contenteditable]")||d(a,"textarea,[contenteditable]")||d(a,"button,[contenteditable]")}function p(b){var c=a(b);return n(c.width)+n(c.paddingLeft)+n(c.paddingRight)+n(c.borderLeftWidth)+n(c.borderRightWidth)}function q(a){var b=Math.ceil,c=a.element,d=v(c.scrollTop),g=c.getBoundingClientRect();a.containerWidth=b(g.width),a.containerHeight=b(g.height),a.contentWidth=c.scrollWidth,a.contentHeight=c.scrollHeight,c.contains(a.scrollbarXRail)||(f(c,z.element.rail("x")).forEach(function(a){return e(a)}),c.appendChild(a.scrollbarXRail)),c.contains(a.scrollbarYRail)||(f(c,z.element.rail("y")).forEach(function(a){return e(a)}),c.appendChild(a.scrollbarYRail)),!a.settings.suppressScrollX&&a.containerWidth+a.settings.scrollXMarginOffset<a.contentWidth?(a.scrollbarXActive=!0,a.railXWidth=a.containerWidth-a.railXMarginWidth,a.railXRatio=a.containerWidth/a.railXWidth,a.scrollbarXWidth=r(a,n(a.railXWidth*a.containerWidth/a.contentWidth)),a.scrollbarXLeft=n((a.negativeScrollAdjustment+c.scrollLeft)*(a.railXWidth-a.scrollbarXWidth)/(a.contentWidth-a.containerWidth))):a.scrollbarXActive=!1,!a.settings.suppressScrollY&&a.containerHeight+a.settings.scrollYMarginOffset<a.contentHeight?(a.scrollbarYActive=!0,a.railYHeight=a.containerHeight-a.railYMarginHeight,a.railYRatio=a.containerHeight/a.railYHeight,a.scrollbarYHeight=r(a,n(a.railYHeight*a.containerHeight/a.contentHeight)),a.scrollbarYTop=n(d*(a.railYHeight-a.scrollbarYHeight)/(a.contentHeight-a.containerHeight))):a.scrollbarYActive=!1,a.scrollbarXLeft>=a.railXWidth-a.scrollbarXWidth&&(a.scrollbarXLeft=a.railXWidth-a.scrollbarXWidth),a.scrollbarYTop>=a.railYHeight-a.scrollbarYHeight&&(a.scrollbarYTop=a.railYHeight-a.scrollbarYHeight),s(c,a),a.scrollbarXActive?c.classList.add(z.state.active("x")):(c.classList.remove(z.state.active("x")),a.scrollbarXWidth=0,a.scrollbarXLeft=0,c.scrollLeft=!0===a.isRtl?a.contentWidth:0),a.scrollbarYActive?c.classList.add(z.state.active("y")):(c.classList.remove(z.state.active("y")),a.scrollbarYHeight=0,a.scrollbarYTop=0,c.scrollTop=0)}function r(a,b){var c=Math.min,d=Math.max;return a.settings.minScrollbarLength&&(b=d(b,a.settings.minScrollbarLength)),a.settings.maxScrollbarLength&&(b=c(b,a.settings.maxScrollbarLength)),b}function s(a,c){var d={width:c.railXWidth},e=v(a.scrollTop);d.left=c.isRtl?c.negativeScrollAdjustment+a.scrollLeft+c.containerWidth-c.contentWidth:a.scrollLeft,c.isScrollbarXUsingBottom?d.bottom=c.scrollbarXBottom-e:d.top=c.scrollbarXTop+e,b(c.scrollbarXRail,d);var f={top:e,height:c.railYHeight};c.isScrollbarYUsingRight?c.isRtl?f.right=c.contentWidth-(c.negativeScrollAdjustment+a.scrollLeft)-c.scrollbarYRight-c.scrollbarYOuterWidth-9:f.right=c.scrollbarYRight-a.scrollLeft:c.isRtl?f.left=c.negativeScrollAdjustment+a.scrollLeft+2*c.containerWidth-c.contentWidth-c.scrollbarYLeft-c.scrollbarYOuterWidth:f.left=c.scrollbarYLeft+a.scrollLeft,b(c.scrollbarYRail,f),b(c.scrollbarX,{left:c.scrollbarXLeft,width:c.scrollbarXWidth-c.railBorderXWidth}),b(c.scrollbarY,{top:c.scrollbarYTop,height:c.scrollbarYHeight-c.railBorderYWidth})}function t(a,b){function c(b){b.touches&&b.touches[0]&&(b[k]=b.touches[0].pageY),s[o]=t+v*(b[k]-u),g(a,p),q(a),b.stopPropagation(),b.preventDefault()}function d(){h(a,p),a[r].classList.remove(z.state.clicking),a.event.unbind(a.ownerDocument,"mousemove",c)}function f(b,e){t=s[o],e&&b.touches&&(b[k]=b.touches[0].pageY),u=b[k],v=(a[j]-a[i])/(a[l]-a[n]),e?a.event.bind(a.ownerDocument,"touchmove",c):(a.event.bind(a.ownerDocument,"mousemove",c),a.event.once(a.ownerDocument,"mouseup",d),b.preventDefault()),a[r].classList.add(z.state.clicking),b.stopPropagation()}var i=b[0],j=b[1],k=b[2],l=b[3],m=b[4],n=b[5],o=b[6],p=b[7],r=b[8],s=a.element,t=null,u=null,v=null;a.event.bind(a[m],"mousedown",function(a){f(a)}),a.event.bind(a[m],"touchstart",function(a){f(a,!0)})}var w="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),z={main:"ps",rtl:"ps__rtl",element:{thumb:function(a){return"ps__thumb-"+a},rail:function(a){return"ps__rail-"+a},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(a){return"ps--active-"+a},scrolling:function(a){return"ps--scrolling-"+a}}},A={x:null,y:null},B=function(a){this.element=a,this.handlers={}},C={isEmpty:{configurable:!0}};B.prototype.bind=function(a,b){"undefined"==typeof this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b),this.element.addEventListener(a,b,!1)},B.prototype.unbind=function(a,b){var c=this;this.handlers[a]=this.handlers[a].filter(function(d){return!!(b&&d!==b)||(c.element.removeEventListener(a,d,!1),!1)})},B.prototype.unbindAll=function(){for(var a in this.handlers)this.unbind(a)},C.isEmpty.get=function(){var a=this;return Object.keys(this.handlers).every(function(b){return 0===a.handlers[b].length})},Object.defineProperties(B.prototype,C);var D=function(){this.eventElements=[]};D.prototype.eventElement=function(a){var b=this.eventElements.filter(function(b){return b.element===a})[0];return b||(b=new B(a),this.eventElements.push(b)),b},D.prototype.bind=function(a,b,c){this.eventElement(a).bind(b,c)},D.prototype.unbind=function(a,b,c){var d=this.eventElement(a);d.unbind(b,c),d.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(d),1)},D.prototype.unbindAll=function(){this.eventElements.forEach(function(a){return a.unbindAll()}),this.eventElements=[]},D.prototype.once=function(a,b,c){var d=this.eventElement(a),e=function(a){d.unbind(b,e),c(a)};d.bind(b,e)};var E={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&0<window.navigator.maxTouchPoints||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},F=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},G={"click-rail":function(a){a.element;a.event.bind(a.scrollbarY,"mousedown",function(a){return a.stopPropagation()}),a.event.bind(a.scrollbarYRail,"mousedown",function(b){var c=b.pageY-window.pageYOffset-a.scrollbarYRail.getBoundingClientRect().top,d=c>a.scrollbarYTop?1:-1;a.element.scrollTop+=d*a.containerHeight,q(a),b.stopPropagation()}),a.event.bind(a.scrollbarX,"mousedown",function(a){return a.stopPropagation()}),a.event.bind(a.scrollbarXRail,"mousedown",function(b){var c=b.pageX-window.pageXOffset-a.scrollbarXRail.getBoundingClientRect().left,d=c>a.scrollbarXLeft?1:-1;a.element.scrollLeft+=d*a.containerWidth,q(a),b.stopPropagation()})},"drag-thumb":function(a){t(a,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),t(a,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(a){function b(b,d){var e=v(c.scrollTop);if(0===b){if(!a.scrollbarYActive)return!1;if(0===e&&0<d||e>=a.contentHeight-a.containerHeight&&0>d)return!a.settings.wheelPropagation}var f=c.scrollLeft;if(0===d){if(!a.scrollbarXActive)return!1;if(0===f&&0>b||f>=a.contentWidth-a.containerWidth&&0<b)return!a.settings.wheelPropagation}return!0}var c=a.element,f=function(){return d(c,":hover")},g=function(){return d(a.scrollbarX,":focus")||d(a.scrollbarY,":focus")};a.event.bind(a.ownerDocument,"keydown",function(d){if(!(d.isDefaultPrevented&&d.isDefaultPrevented()||d.defaultPrevented)&&(f()||g())){var e=document.activeElement?document.activeElement:a.ownerDocument.activeElement;if(e){if("IFRAME"===e.tagName)e=e.contentDocument.activeElement;else// go deeper if element is a webcomponent
29190for(;e.shadowRoot;)e=e.shadowRoot.activeElement;if(o(e))return}var h=0,i=0;switch(d.which){case 37:h=d.metaKey?-a.contentWidth:d.altKey?-a.containerWidth:-30;break;case 38:i=d.metaKey?a.contentHeight:d.altKey?a.containerHeight:30;break;case 39:h=d.metaKey?a.contentWidth:d.altKey?a.containerWidth:30;break;case 40:i=d.metaKey?-a.contentHeight:d.altKey?-a.containerHeight:-30;break;case 32:i=d.shiftKey?a.containerHeight:-a.containerHeight;break;case 33:i=a.containerHeight;break;case 34:i=-a.containerHeight;break;case 36:i=a.contentHeight;break;case 35:i=-a.contentHeight;break;default:return;}a.settings.suppressScrollX&&0!==h||a.settings.suppressScrollY&&0!==i||(c.scrollTop-=i,c.scrollLeft+=h,q(a),b(h,i)&&d.preventDefault())}})},wheel:function(b){function c(a,c){var d,e=v(h.scrollTop),f=0===h.scrollTop,g=e+h.offsetHeight===h.scrollHeight,i=0===h.scrollLeft,j=h.scrollLeft+h.offsetWidth===h.scrollWidth;return d=u(c)>u(a)?f||g:i||j,!d||!b.settings.wheelPropagation}function d(a){var b=a.deltaX,c=-1*a.deltaY;return("undefined"==typeof b||"undefined"==typeof c)&&(b=-1*a.wheelDeltaX/6,c=a.wheelDeltaY/6),a.deltaMode&&1===a.deltaMode&&(b*=10,c*=10),b!==b&&c!==c/* NaN checks */&&(b=0,c=a.wheelDelta),a.shiftKey?[-c,-b]:[b,c]}function f(b,c,d){// FIXME: this is a workaround for <select> issue in FF and IE #571
29191if(!E.isWebKit&&h.querySelector("select:focus"))return!0;if(!h.contains(b))return!1;for(var e=b;e&&e!==h;){if(e.classList.contains(z.element.consuming))return!0;var f=a(e);// if deltaY && vertical scrollable
29192if(d&&f.overflowY.match(/(scroll|auto)/)){var g=e.scrollHeight-e.clientHeight;if(0<g&&(0<e.scrollTop&&0>d||e.scrollTop<g&&0<d))return!0}// if deltaX && horizontal scrollable
29193if(c&&f.overflowX.match(/(scroll|auto)/)){var i=e.scrollWidth-e.clientWidth;if(0<i&&(0<e.scrollLeft&&0>c||e.scrollLeft<i&&0<c))return!0}e=e.parentNode}return!1}function g(a){var e=d(a),g=e[0],i=e[1];if(!f(a.target,g,i)){var j=!1;b.settings.useBothWheelAxes?b.scrollbarYActive&&!b.scrollbarXActive?(i?h.scrollTop-=i*b.settings.wheelSpeed:h.scrollTop+=g*b.settings.wheelSpeed,j=!0):b.scrollbarXActive&&!b.scrollbarYActive&&(g?h.scrollLeft+=g*b.settings.wheelSpeed:h.scrollLeft-=i*b.settings.wheelSpeed,j=!0):(h.scrollTop-=i*b.settings.wheelSpeed,h.scrollLeft+=g*b.settings.wheelSpeed),q(b),j=j||c(g,i),j&&!a.ctrlKey&&(a.stopPropagation(),a.preventDefault())}}var h=b.element;"undefined"==typeof window.onwheel?"undefined"!=typeof window.onmousewheel&&b.event.bind(h,"mousewheel",g):b.event.bind(h,"wheel",g)},touch:function(b){function c(a,c){var d=v(l.scrollTop),e=l.scrollLeft,f=u(a),g=u(c);if(g>f){// user is perhaps trying to swipe up/down the page
29194if(0>c&&d===b.contentHeight-b.containerHeight||0<c&&0===d)// set prevent for mobile Chrome refresh
29195return 0===window.scrollY&&0<c&&E.isChrome;}else if(f>g&&(0>a&&e===b.contentWidth-b.containerWidth||0<a&&0===e))// user is perhaps trying to swipe left/right across the page
29196return!0;return!0}function d(a,c){l.scrollTop-=c,l.scrollLeft-=a,q(b)}function f(a){return a.targetTouches?a.targetTouches[0]:a}function g(a){return!(a.pointerType&&"pen"===a.pointerType&&0===a.buttons)&&(!!(a.targetTouches&&1===a.targetTouches.length)||!!(a.pointerType&&"mouse"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_MOUSE))}function h(a){if(g(a)){var b=f(a);m.pageX=b.pageX,m.pageY=b.pageY,n=new Date().getTime(),null!==p&&clearInterval(p)}}function i(b,c,d){if(!l.contains(b))return!1;for(var e=b;e&&e!==l;){if(e.classList.contains(z.element.consuming))return!0;var f=a(e);// if deltaY && vertical scrollable
29197if(d&&f.overflowY.match(/(scroll|auto)/)){var g=e.scrollHeight-e.clientHeight;if(0<g&&(0<e.scrollTop&&0>d||e.scrollTop<g&&0<d))return!0}// if deltaX && horizontal scrollable
29198if(c&&f.overflowX.match(/(scroll|auto)/)){var h=e.scrollWidth-e.clientWidth;if(0<h&&(0<e.scrollLeft&&0>c||e.scrollLeft<h&&0<c))return!0}e=e.parentNode}return!1}function j(a){if(g(a)){var b=f(a),e={pageX:b.pageX,pageY:b.pageY},h=e.pageX-m.pageX,j=e.pageY-m.pageY;if(i(a.target,h,j))return;d(h,j),m=e;var k=new Date().getTime(),l=k-n;0<l&&(o.x=h/l,o.y=j/l,n=k),c(h,j)&&a.preventDefault()}}function k(){b.settings.swipeEasing&&(clearInterval(p),p=setInterval(function(){return b.isInitialized?void clearInterval(p):o.x||o.y?.01>u(o.x)&&.01>u(o.y)?void clearInterval(p):void(d(30*o.x,30*o.y),o.x*=.8,o.y*=.8):void clearInterval(p)},10))}if(E.supportsTouch||E.supportsIePointer){var l=b.element,m={},n=0,o={},p=null;E.supportsTouch?(b.event.bind(l,"touchstart",h),b.event.bind(l,"touchmove",j),b.event.bind(l,"touchend",k)):E.supportsIePointer&&(window.PointerEvent?(b.event.bind(l,"pointerdown",h),b.event.bind(l,"pointermove",j),b.event.bind(l,"pointerup",k)):window.MSPointerEvent&&(b.event.bind(l,"MSPointerDown",h),b.event.bind(l,"MSPointerMove",j),b.event.bind(l,"MSPointerUp",k)))}}},H=function(d,e){var f=this;if(void 0===e&&(e={}),"string"==typeof d&&(d=document.querySelector(d)),!d||!d.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var g in this.element=d,d.classList.add(z.main),this.settings=F(),e)this.settings[g]=e[g];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var h=function(){return d.classList.add(z.state.focus)},i=function(){return d.classList.remove(z.state.focus)};this.isRtl="rtl"===a(d).direction,!0===this.isRtl&&d.classList.add(z.rtl),this.isNegativeScroll=function(){var a=d.scrollLeft,b=null;return d.scrollLeft=-1,b=0>d.scrollLeft,d.scrollLeft=a,b}(),this.negativeScrollAdjustment=this.isNegativeScroll?d.scrollWidth-d.clientWidth:0,this.event=new D,this.ownerDocument=d.ownerDocument||document,this.scrollbarXRail=c(z.element.rail("x")),d.appendChild(this.scrollbarXRail),this.scrollbarX=c(z.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",h),this.event.bind(this.scrollbarX,"blur",i),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var j=a(this.scrollbarXRail);this.scrollbarXBottom=parseInt(j.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=n(j.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=n(j.borderLeftWidth)+n(j.borderRightWidth),b(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=n(j.marginLeft)+n(j.marginRight),b(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=c(z.element.rail("y")),d.appendChild(this.scrollbarYRail),this.scrollbarY=c(z.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",h),this.event.bind(this.scrollbarY,"blur",i),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var k=a(this.scrollbarYRail);this.scrollbarYRight=parseInt(k.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=n(k.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?p(this.scrollbarY):null,this.railBorderYWidth=n(k.borderTopWidth)+n(k.borderBottomWidth),b(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=n(k.marginTop)+n(k.marginBottom),b(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:0>=d.scrollLeft?"start":d.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:0>=d.scrollTop?"start":d.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(a){return G[a](f)}),this.lastScrollTop=v(d.scrollTop),this.lastScrollLeft=d.scrollLeft,this.event.bind(this.element,"scroll",function(a){return f.onScroll(a)}),q(this)};return H.prototype.update=function(){this.isAlive&&(// Recalcuate negative scrollLeft adjustment
29199// Recalculate rail margins
29200// Hide scrollbars not to affect scrollWidth and scrollHeight
29201this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,b(this.scrollbarXRail,{display:"block"}),b(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=n(a(this.scrollbarXRail).marginLeft)+n(a(this.scrollbarXRail).marginRight),this.railYMarginHeight=n(a(this.scrollbarYRail).marginTop)+n(a(this.scrollbarYRail).marginBottom),b(this.scrollbarXRail,{display:"none"}),b(this.scrollbarYRail,{display:"none"}),q(this),l(this,"top",0,!1,!0),l(this,"left",0,!1,!0),b(this.scrollbarXRail,{display:""}),b(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(){this.isAlive&&(q(this),l(this,"top",this.element.scrollTop-this.lastScrollTop),l(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=v(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(// unset elements
29202this.event.unbindAll(),e(this.scrollbarX),e(this.scrollbarY),e(this.scrollbarXRail),e(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(a){return!a.match(/^ps([-_].+|)$/)}).join(" ")},H});
29203//# sourceMappingURL=perfect-scrollbar.min.js.map
29204
29205;
vendor: 57,116 bytes, lines 29205-29206
29205!function($){var apiParams={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};$.fn.vectorMap=function(options){var map,methodName,map=this.children(".jvectormap-container").data("mapObject");if("addMap"===options)jvm.Map.maps[arguments[1]]=arguments[2];else{if(("set"===options||"get"===options)&&apiParams[options][arguments[1]])return methodName=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),map[options+methodName].apply(map,Array.prototype.slice.call(arguments,2));options=options||{},options.container=this,map=new jvm.Map(options)}return this}}(jQuery),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof exports?module.exports=factory:factory(jQuery)}(function($){function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0;if(event=$.event.fix(orgEvent),event.type="mousewheel","detail"in orgEvent&&(deltaY=-1*orgEvent.detail),"wheelDelta"in orgEvent&&(deltaY=orgEvent.wheelDelta),"wheelDeltaY"in orgEvent&&(deltaY=orgEvent.wheelDeltaY),"wheelDeltaX"in orgEvent&&(deltaX=-1*orgEvent.wheelDeltaX),"axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS&&(deltaX=-1*deltaY,deltaY=0),delta=0===deltaY?deltaX:deltaY,"deltaY"in orgEvent&&(deltaY=-1*orgEvent.deltaY,delta=deltaY),"deltaX"in orgEvent&&(deltaX=orgEvent.deltaX,0===deltaY&&(delta=-1*deltaX)),0!==deltaY||0!==deltaX){if(1===orgEvent.deltaMode){var lineHeight=$.data(this,"mousewheel-line-height");delta*=lineHeight,deltaY*=lineHeight,deltaX*=lineHeight}else if(2===orgEvent.deltaMode){var pageHeight=$.data(this,"mousewheel-page-height");delta*=pageHeight,deltaY*=pageHeight,deltaX*=pageHeight}return absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX)),(!lowestDelta||lowestDelta>absDelta)&&(lowestDelta=absDelta,shouldAdjustOldDeltas(orgEvent,absDelta)&&(lowestDelta/=40)),shouldAdjustOldDeltas(orgEvent,absDelta)&&(delta/=40,deltaX/=40,deltaY/=40),delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta),deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta),deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta),event.deltaX=deltaX,event.deltaY=deltaY,event.deltaFactor=lowestDelta,event.deltaMode=0,args.unshift(event,delta,deltaX,deltaY),nullLowestDeltaTimeout&&clearTimeout(nullLowestDeltaTimeout),nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200),($.event.dispatch||$.event.handle).apply(this,args)}}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&"mousewheel"===orgEvent.type&&absDelta%120===0}var nullLowestDeltaTimeout,lowestDelta,toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;var special=$.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var i=toBind.length;i;)this.addEventListener(toBind[--i],handler,!1);else this.onmousewheel=handler;$.data(this,"mousewheel-line-height",special.getLineHeight(this)),$.data(this,"mousewheel-page-height",special.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=toBind.length;i;)this.removeEventListener(toBind[--i],handler,!1);else this.onmousewheel=null},getLineHeight:function(elem){return parseInt($(elem)["offsetParent"in $.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:!0}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}})});var jvm={inherits:function(child,parent){function temp(){}temp.prototype=parent.prototype,child.prototype=new temp,child.prototype.constructor=child,child.parentClass=parent},mixin:function(target,source){var prop;for(prop in source.prototype)source.prototype.hasOwnProperty(prop)&&(target.prototype[prop]=source.prototype[prop])},min:function(values){var i,min=Number.MAX_VALUE;if(values instanceof Array)for(i=0;i<values.length;i++)values[i]<min&&(min=values[i]);else for(i in values)values[i]<min&&(min=values[i]);return min},max:function(values){var i,max=Number.MIN_VALUE;if(values instanceof Array)for(i=0;i<values.length;i++)values[i]>max&&(max=values[i]);else for(i in values)values[i]>max&&(max=values[i]);return max},keys:function(object){var key,keys=[];for(key in object)keys.push(key);return keys},values:function(object){var key,i,values=[];for(i=0;i<arguments.length;i++){object=arguments[i];for(key in object)values.push(object[key])}return values},whenImageLoaded:function(url){var deferred=new jvm.$.Deferred,img=jvm.$("<img/>");return img.error(function(){deferred.reject()}).load(function(){deferred.resolve(img)}),img.attr("src",url),deferred},isImageUrl:function(s){return/\.\w{3,4}$/.test(s)}};jvm.$=jQuery,Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(null==this)throw new TypeError('"this" is null or not defined');var O=Object(this),len=O.length>>>0;if(0===len)return-1;var n=+fromIndex||0;if(Math.abs(n)===1/0&&(n=0),n>=len)return-1;for(k=Math.max(n>=0?n:len-Math.abs(n),0);len>k;){if(k in O&&O[k]===searchElement)return k;k++}return-1}),jvm.AbstractElement=function(name,config){this.node=this.createElement(name),this.name=name,this.properties={},config&&this.set(config)},jvm.AbstractElement.prototype.set=function(property,value){var key;if("object"==typeof property)for(key in property)this.properties[key]=property[key],this.applyAttr(key,property[key]);else this.properties[property]=value,this.applyAttr(property,value)},jvm.AbstractElement.prototype.get=function(property){return this.properties[property]},jvm.AbstractElement.prototype.applyAttr=function(property,value){this.node.setAttribute(property,value)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(container,width,height){this.container=container,this.setSize(width,height),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(element,group){group=group||this.rootElement,group.add(element),element.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(config,style,group){var el=new jvm[this.classPrefix+"PathElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addCircle=function(config,style,group){var el=new jvm[this.classPrefix+"CircleElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addImage=function(config,style,group){var el=new jvm[this.classPrefix+"ImageElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addText=function(config,style,group){var el=new jvm[this.classPrefix+"TextElement"](config,style);return this.add(el,group),el},jvm.AbstractCanvasElement.prototype.addGroup=function(parentGroup){var el=new jvm[this.classPrefix+"GroupElement"];return parentGroup?parentGroup.node.appendChild(el.node):this.node.appendChild(el.node),el.canvas=this,el},jvm.AbstractShapeElement=function(name,config,style){this.style=style||{},this.style.current=this.style.current||{},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setStyle=function(property,value){var styles={};"object"==typeof property?styles=property:styles[property]=value,jvm.$.extend(this.style.current,styles),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var attrs={};jvm.AbstractShapeElement.mergeStyles(attrs,this.style.initial),jvm.AbstractShapeElement.mergeStyles(attrs,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(attrs,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(attrs,this.style.selectedHover)),this.set(attrs)},jvm.AbstractShapeElement.mergeStyles=function(styles,newStyles){var key;newStyles=newStyles||{};for(key in newStyles)null===newStyles[key]?delete styles[key]:styles[key]=newStyles[key]},jvm.SVGElement=function(){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(tagName){return document.createElementNS(jvm.SVGElement.svgns,tagName)},jvm.SVGElement.prototype.addClass=function(className){this.node.setAttribute("class",className)},jvm.SVGElement.prototype.getElementCtr=function(ctr){return jvm["SVG"+ctr]},jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()},jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")},jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement),jvm.SVGGroupElement.prototype.add=function(element){this.node.appendChild(element.node)},jvm.SVGCanvasElement=function(){this.classPrefix="SVG",jvm.SVGCanvasElement.parentClass.call(this,"svg"),this.defsElement=new jvm.SVGElement("defs"),this.node.appendChild(this.defsElement.node),jvm.AbstractCanvasElement.apply(this,arguments)},jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement),jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement),jvm.SVGCanvasElement.prototype.setSize=function(width,height){this.width=width,this.height=height,this.node.setAttribute("width",width),this.node.setAttribute("height",height)},jvm.SVGCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale,this.transX=transX,this.transY=transY,this.rootElement.node.setAttribute("transform","scale("+scale+") translate("+transX+", "+transY+")")},jvm.SVGShapeElement=function(name,config){jvm.SVGShapeElement.parentClass.call(this,name,config),jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement),jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement),jvm.SVGShapeElement.prototype.applyAttr=function(attr,value){var patternEl,imageEl,that=this;"fill"===attr&&jvm.isImageUrl(value)?jvm.SVGShapeElement.images[value]?this.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")"):jvm.whenImageLoaded(value).then(function(img){imageEl=new jvm.SVGElement("image"),imageEl.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value),imageEl.applyAttr("x","0"),imageEl.applyAttr("y","0"),imageEl.applyAttr("width",img[0].width),imageEl.applyAttr("height",img[0].height),patternEl=new jvm.SVGElement("pattern"),patternEl.applyAttr("id","image"+jvm.SVGShapeElement.imageCounter),patternEl.applyAttr("x",0),patternEl.applyAttr("y",0),patternEl.applyAttr("width",img[0].width/2),patternEl.applyAttr("height",img[0].height/2),patternEl.applyAttr("viewBox","0 0 "+img[0].width+" "+img[0].height),patternEl.applyAttr("patternUnits","userSpaceOnUse"),patternEl.node.appendChild(imageEl.node),that.canvas.defsElement.node.appendChild(patternEl.node),jvm.SVGShapeElement.images[value]=jvm.SVGShapeElement.imageCounter++,that.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[value]+")")}):jvm.SVGShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.SVGShapeElement.imageCounter=1,jvm.SVGShapeElement.images={},jvm.SVGPathElement=function(config,style){jvm.SVGPathElement.parentClass.call(this,"path",config,style),this.node.setAttribute("fill-rule","evenodd")},jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement),jvm.SVGCircleElement=function(config,style){jvm.SVGCircleElement.parentClass.call(this,"circle",config,style)},jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement),jvm.SVGImageElement=function(config,style){jvm.SVGImageElement.parentClass.call(this,"image",config,style)},jvm.inherits(jvm.SVGImageElement,jvm.SVGShapeElement),jvm.SVGImageElement.prototype.applyAttr=function(attr,value){var that=this;"image"==attr?jvm.whenImageLoaded(value).then(function(img){that.node.setAttributeNS("http://www.w3.org/1999/xlink","href",value),that.width=img[0].width,that.height=img[0].height,that.applyAttr("width",that.width),that.applyAttr("height",that.height),that.applyAttr("x",that.cx-that.width/2),that.applyAttr("y",that.cy-that.height/2),jvm.$(that.node).trigger("imageloaded",[img])}):"cx"==attr?(this.cx=value,this.width&&this.applyAttr("x",value-this.width/2)):"cy"==attr?(this.cy=value,this.height&&this.applyAttr("y",value-this.height/2)):jvm.SVGImageElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.SVGTextElement=function(config,style){jvm.SVGTextElement.parentClass.call(this,"text",config,style)},jvm.inherits(jvm.SVGTextElement,jvm.SVGShapeElement),jvm.SVGTextElement.prototype.applyAttr=function(attr,value){"text"===attr?this.node.textContent=value:jvm.SVGTextElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.VMLElement=function(){jvm.VMLElement.VMLInitialized||jvm.VMLElement.initializeVML(),jvm.VMLElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.VMLElement,jvm.AbstractElement),jvm.VMLElement.VMLInitialized=!1,jvm.VMLElement.initializeVML=function(){try{document.namespaces.rvml||document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("<rvml:"+tagName+' class="rvml">')}}catch(e){jvm.VMLElement.prototype.createElement=function(tagName){return document.createElement("<"+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"),jvm.VMLElement.VMLInitialized=!0},jvm.VMLElement.prototype.getElementCtr=function(ctr){return jvm["VML"+ctr]},jvm.VMLElement.prototype.addClass=function(className){jvm.$(this.node).addClass(className)},jvm.VMLElement.prototype.applyAttr=function(attr,value){this.node[attr]=value},jvm.VMLElement.prototype.getBBox=function(){var node=jvm.$(this.node);return{x:node.position().left/this.canvas.scale,y:node.position().top/this.canvas.scale,width:node.width()/this.canvas.scale,height:node.height()/this.canvas.scale}},jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group"),this.node.style.left="0px",this.node.style.top="0px",this.node.coordorigin="0 0"},jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement),jvm.VMLGroupElement.prototype.add=function(element){this.node.appendChild(element.node)},jvm.VMLCanvasElement=function(){this.classPrefix="VML",jvm.VMLCanvasElement.parentClass.call(this,"group"),jvm.AbstractCanvasElement.apply(this,arguments),this.node.style.position="absolute"},jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement),jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement),jvm.VMLCanvasElement.prototype.setSize=function(width,height){var paths,groups,i,l;if(this.width=width,this.height=height,this.node.style.width=width+"px",this.node.style.height=height+"px",this.node.coordsize=width+" "+height,this.node.coordorigin="0 0",this.rootElement){for(paths=this.rootElement.node.getElementsByTagName("shape"),i=0,l=paths.length;l>i;i++)paths[i].coordsize=width+" "+height,paths[i].style.width=width+"px",paths[i].style.height=height+"px";for(groups=this.node.getElementsByTagName("group"),i=0,l=groups.length;l>i;i++)groups[i].coordsize=width+" "+height,groups[i].style.width=width+"px",groups[i].style.height=height+"px"}},jvm.VMLCanvasElement.prototype.applyTransformParams=function(scale,transX,transY){this.scale=scale,this.transX=transX,this.transY=transY,this.rootElement.node.coordorigin=this.width-transX-this.width/100+","+(this.height-transY-this.height/100),this.rootElement.node.coordsize=this.width/scale+","+this.height/scale},jvm.VMLShapeElement=function(name,config){jvm.VMLShapeElement.parentClass.call(this,name,config),this.fillElement=new jvm.VMLElement("fill"),this.strokeElement=new jvm.VMLElement("stroke"),this.node.appendChild(this.fillElement.node),this.node.appendChild(this.strokeElement.node),this.node.stroked=!1,jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement),jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement),jvm.VMLShapeElement.prototype.applyAttr=function(attr,value){switch(attr){case"fill":this.node.fillcolor=value;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(100*value)+"%";break;case"stroke":this.node.stroked="none"===value?!1:!0,this.node.strokecolor=value;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(100*value)+"%";break;case"stroke-width":this.node.stroked=0===parseInt(value,10)?!1:!0,this.node.strokeweight=value;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(value);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}},jvm.VMLPathElement=function(config,style){var scale=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",config,style),this.node.coordorigin="0 0",scale.node.on=!0,scale.node.matrix="0.01,0,0,0.01,0,0",scale.node.offset="0,0",this.node.appendChild(scale.node)},jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement),jvm.VMLPathElement.prototype.applyAttr=function(attr,value){"d"===attr?this.node.path=jvm.VMLPathElement.pathSvgToVml(value):jvm.VMLShapeElement.prototype.applyAttr.call(this,attr,value)},jvm.VMLPathElement.pathSvgToVml=function(path){var ctrlx,ctrly,cx=0,cy=0;return path=path.replace(/(-?\d+)e(-?\d+)/g,"0"),path.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(segment,letter,coords){coords=coords.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(","),coords[0]||coords.shift();for(var i=0,l=coords.length;l>i;i++)coords[i]=Math.round(100*coords[i]);switch(letter){case"m":return cx+=coords[0],cy+=coords[1],"t"+coords.join(",");case"M":return cx=coords[0],cy=coords[1],"m"+coords.join(",");case"l":return cx+=coords[0],cy+=coords[1],"r"+coords.join(",");case"L":return cx=coords[0],cy=coords[1],"l"+coords.join(",");case"h":return cx+=coords[0],"r"+coords[0]+",0";case"H":return cx=coords[0],"l"+cx+","+cy;case"v":return cy+=coords[0],"r0,"+coords[0];case"V":return cy=coords[0],"l"+cx+","+cy;case"c":return ctrlx=cx+coords[coords.length-4],ctrly=cy+coords[coords.length-3],cx+=coords[coords.length-2],cy+=coords[coords.length-1],"v"+coords.join(",");case"C":return ctrlx=coords[coords.length-4],ctrly=coords[coords.length-3],cx=coords[coords.length-2],cy=coords[coords.length-1],"c"+coords.join(",");case"s":return coords.unshift(cy-ctrly),coords.unshift(cx-ctrlx),ctrlx=cx+coords[coords.length-4],ctrly=cy+coords[coords.length-3],cx+=coords[coords.length-2],cy+=coords[coords.length-1],"v"+coords.join(",");case"S":return coords.unshift(cy+cy-ctrly),coords.unshift(cx+cx-ctrlx),ctrlx=coords[coords.length-4],ctrly=coords[coords.length-3],cx=coords[coords.length-2],cy=coords[coords.length-1],"c"+coords.join(",")}return""}).replace(/z/g,"e")},jvm.VMLCircleElement=function(config,style){jvm.VMLCircleElement.parentClass.call(this,"oval",config,style)},jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement),jvm.VMLCircleElement.prototype.applyAttr=function(attr,value){switch(attr){case"r":this.node.style.width=2*value+"px",this.node.style.height=2*value+"px",this.applyAttr("cx",this.get("cx")||0),this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!value)return;this.node.style.left=value-(this.get("r")||0)+"px";break;case"cy":if(!value)return;this.node.style.top=value-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,attr,value)}},jvm.VectorCanvas=function(container,width,height){return this.mode=window.SVGAngle?"svg":"vml",this.impl="svg"==this.mode?new jvm.SVGCanvasElement(container,width,height):new jvm.VMLCanvasElement(container,width,height),this.impl.mode=this.mode,this.impl},jvm.SimpleScale=function(scale){this.scale=scale},jvm.SimpleScale.prototype.getValue=function(value){return value},jvm.OrdinalScale=function(scale){this.scale=scale},jvm.OrdinalScale.prototype.getValue=function(value){return this.scale[value]},jvm.OrdinalScale.prototype.getTicks=function(){var key,ticks=[];for(key in this.scale)ticks.push({label:key,value:this.scale[key]});return ticks},jvm.NumericScale=function(scale,normalizeFunction,minValue,maxValue){this.scale=[],normalizeFunction=normalizeFunction||"linear",scale&&this.setScale(scale),normalizeFunction&&this.setNormalizeFunction(normalizeFunction),"undefined"!=typeof minValue&&this.setMin(minValue),"undefined"!=typeof maxValue&&this.setMax(maxValue)},jvm.NumericScale.prototype={setMin:function(min){this.clearMinValue=min,this.minValue="function"==typeof this.normalize?this.normalize(min):min},setMax:function(max){this.clearMaxValue=max,this.maxValue="function"==typeof this.normalize?this.normalize(max):max},setScale:function(scale){var i;for(this.scale=[],i=0;i<scale.length;i++)this.scale[i]=[scale[i]]},setNormalizeFunction:function(f){"polynomial"===f?this.normalize=function(value){return Math.pow(value,.2)}:"linear"===f?delete this.normalize:this.normalize=f,this.setMin(this.clearMinValue),this.setMax(this.clearMaxValue)},getValue:function(value){var l,c,lengthes=[],fullLength=0,i=0;for("function"==typeof this.normalize&&(value=this.normalize(value)),i=0;i<this.scale.length-1;i++)l=this.vectorLength(this.vectorSubtract(this.scale[i+1],this.scale[i])),lengthes.push(l),fullLength+=l;for(c=(this.maxValue-this.minValue)/fullLength,i=0;i<lengthes.length;i++)lengthes[i]*=c;for(i=0,value-=this.minValue;value-lengthes[i]>=0;)value-=lengthes[i],i++;return value=this.vectorToNum(i==this.scale.length-1?this.scale[i]:this.vectorAdd(this.scale[i],this.vectorMult(this.vectorSubtract(this.scale[i+1],this.scale[i]),value/lengthes[i])))},vectorToNum:function(vector){var i,num=0;for(i=0;i<vector.length;i++)num+=Math.round(vector[i])*Math.pow(256,vector.length-i-1);return num},vectorSubtract:function(vector1,vector2){var i,vector=[];for(i=0;i<vector1.length;i++)vector[i]=vector1[i]-vector2[i];return vector},vectorAdd:function(vector1,vector2){var i,vector=[];for(i=0;i<vector1.length;i++)vector[i]=vector1[i]+vector2[i];return vector},vectorMult:function(vector,num){var i,result=[];for(i=0;i<vector.length;i++)result[i]=vector[i]*num;return result},vectorLength:function(vector){var i,result=0;for(i=0;i<vector.length;i++)result+=vector[i]*vector[i];return Math.sqrt(result)},getTicks:function(){var tick,v,m=5,extent=[this.clearMinValue,this.clearMaxValue],span=extent[1]-extent[0],step=Math.pow(10,Math.floor(Math.log(span/m)/Math.LN10)),err=m/span*step,ticks=[];for(.15>=err?step*=10:.35>=err?step*=5:.75>=err&&(step*=2),extent[0]=Math.floor(extent[0]/step)*step,extent[1]=Math.ceil(extent[1]/step)*step,tick=extent[0];tick<=extent[1];)v=tick==extent[0]?this.clearMinValue:tick==extent[1]?this.clearMaxValue:tick,ticks.push({label:tick,value:this.getValue(v)}),tick+=step;return ticks}},jvm.ColorScale=function(){jvm.ColorScale.parentClass.apply(this,arguments)},jvm.inherits(jvm.ColorScale,jvm.NumericScale),jvm.ColorScale.prototype.setScale=function(scale){var i;for(i=0;i<scale.length;i++)this.scale[i]=jvm.ColorScale.rgbToArray(scale[i])},jvm.ColorScale.prototype.getValue=function(value){return jvm.ColorScale.numToRgb(jvm.ColorScale.parentClass.prototype.getValue.call(this,value))},jvm.ColorScale.arrayToRgb=function(ar){var d,i,rgb="#";for(i=0;i<ar.length;i++)d=ar[i].toString(16),rgb+=1==d.length?"0"+d:d;return rgb},jvm.ColorScale.numToRgb=function(num){for(num=num.toString(16);num.length<6;)num="0"+num;return"#"+num},jvm.ColorScale.rgbToArray=function(rgb){return rgb=rgb.substr(1),[parseInt(rgb.substr(0,2),16),parseInt(rgb.substr(2,2),16),parseInt(rgb.substr(4,2),16)]},jvm.Legend=function(params){this.params=params||{},this.map=this.params.map,this.series=this.params.series,this.body=jvm.$("<div/>"),this.body.addClass("jvectormap-legend"),this.params.cssClass&&this.body.addClass(this.params.cssClass),params.vertical?this.map.legendCntVertical.append(this.body):this.map.legendCntHorizontal.append(this.body),this.render()},jvm.Legend.prototype.render=function(){var i,tick,sample,label,ticks=this.series.scale.getTicks(),inner=jvm.$("<div/>").addClass("jvectormap-legend-inner");for(this.body.html(""),this.params.title&&this.body.append(jvm.$("<div/>").addClass("jvectormap-legend-title").html(this.params.title)),this.body.append(inner),i=0;i<ticks.length;i++){switch(tick=jvm.$("<div/>").addClass("jvectormap-legend-tick"),sample=jvm.$("<div/>").addClass("jvectormap-legend-tick-sample"),this.series.params.attribute){case"fill":jvm.isImageUrl(ticks[i].value)?sample.css("background","url("+ticks[i].value+")"):sample.css("background",ticks[i].value);break;case"stroke":sample.css("background",ticks[i].value);break;case"image":sample.css("background","url("+ticks[i].value+") no-repeat center center");break;case"r":jvm.$("<div/>").css({"border-radius":ticks[i].value,border:this.map.params.markerStyle.initial["stroke-width"]+"px "+this.map.params.markerStyle.initial.stroke+" solid",width:2*ticks[i].value+"px",height:2*ticks[i].value+"px",background:this.map.params.markerStyle.initial.fill}).appendTo(sample)}tick.append(sample),label=ticks[i].label,this.params.labelRender&&(label=this.params.labelRender(label)),tick.append(jvm.$("<div>"+label+" </div>").addClass("jvectormap-legend-tick-text")),inner.append(tick)}inner.append(jvm.$("<div/>").css("clear","both"))},jvm.DataSeries=function(params,elements,map){var scaleConstructor;params=params||{},params.attribute=params.attribute||"fill",this.elements=elements,this.params=params,this.map=map,params.attributes&&this.setAttributes(params.attributes),jvm.$.isArray(params.scale)?(scaleConstructor="fill"===params.attribute||"stroke"===params.attribute?jvm.ColorScale:jvm.NumericScale,this.scale=new scaleConstructor(params.scale,params.normalizeFunction,params.min,params.max)):this.scale=params.scale?new jvm.OrdinalScale(params.scale):new jvm.SimpleScale(params.scale),this.values=params.values||{},this.setValues(this.values),this.params.legend&&(this.legend=new jvm.Legend($.extend({map:this.map,series:this},this.params.legend)))},jvm.DataSeries.prototype={setAttributes:function(key,attr){var code,attrs=key;if("string"==typeof key)this.elements[key]&&this.elements[key].setStyle(this.params.attribute,attr);else for(code in attrs)this.elements[code]&&this.elements[code].element.setStyle(this.params.attribute,attrs[code])},setValues:function(values){var val,cc,max=-Number.MAX_VALUE,min=Number.MAX_VALUE,attrs={};if(this.scale instanceof jvm.OrdinalScale||this.scale instanceof jvm.SimpleScale)for(cc in values)attrs[cc]=values[cc]?this.scale.getValue(values[cc]):this.elements[cc].element.style.initial[this.params.attribute];else{if("undefined"==typeof this.params.min||"undefined"==typeof this.params.max)for(cc in values)val=parseFloat(values[cc]),val>max&&(max=val),min>val&&(min=val);"undefined"==typeof this.params.min?(this.scale.setMin(min),this.params.min=min):this.scale.setMin(this.params.min),"undefined"==typeof this.params.max?(this.scale.setMax(max),this.params.max=max):this.scale.setMax(this.params.max);for(cc in values)"indexOf"!=cc&&(val=parseFloat(values[cc]),attrs[cc]=isNaN(val)?this.elements[cc].element.style.initial[this.params.attribute]:this.scale.getValue(val))}this.setAttributes(attrs),jvm.$.extend(this.values,values)},clear:function(){var key,attrs={};for(key in this.values)this.elements[key]&&(attrs[key]=this.elements[key].element.shape.style.initial[this.params.attribute]);this.setAttributes(attrs),this.values={}},setScale:function(scale){this.scale.setScale(scale),this.values&&this.setValues(this.values)},setNormalizeFunction:function(f){this.scale.setNormalizeFunction(f),this.values&&this.setValues(this.values)}},jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(n){return n>0?1:0>n?-1:n},mill:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*lat)*this.radDeg))/.8}},mill_inv:function(x,y,c){return{lat:(2.5*Math.atan(Math.exp(.8*y/this.radius))-5*Math.PI/8)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},merc:function(lat,lng,c){return{x:this.radius*(lng-c)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+lat*Math.PI/360))}},merc_inv:function(x,y,c){return{lat:(2*Math.atan(Math.exp(y/this.radius))-Math.PI/2)*this.degRad,lng:(c*this.radDeg+x/this.radius)*this.degRad}},aea:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,fi=lat*this.radDeg,lambda=lng*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),theta=n*(lambda-lambda0),ro=Math.sqrt(C-2*n*Math.sin(fi))/n,ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n;return{x:ro*Math.sin(theta)*this.radius,y:-(ro0-ro*Math.cos(theta))*this.radius}},aea_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=29.5*this.radDeg,fi2=45.5*this.radDeg,n=(Math.sin(fi1)+Math.sin(fi2))/2,C=Math.cos(fi1)*Math.cos(fi1)+2*n*Math.sin(fi1),ro0=Math.sqrt(C-2*n*Math.sin(fi0))/n,ro=Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:Math.asin((C-ro*ro*n*n)/(2*n))*this.degRad,lng:(lambda0+theta/n)*this.degRad}},lcc:function(lat,lng,c){var fi0=0,lambda0=c*this.radDeg,lambda=lng*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,fi=lat*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro=F*Math.pow(1/Math.tan(Math.PI/4+fi/2),n),ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n);return{x:ro*Math.sin(n*(lambda-lambda0))*this.radius,y:-(ro0-ro*Math.cos(n*(lambda-lambda0)))*this.radius}},lcc_inv:function(xCoord,yCoord,c){var x=xCoord/this.radius,y=yCoord/this.radius,fi0=0,lambda0=c*this.radDeg,fi1=33*this.radDeg,fi2=45*this.radDeg,n=Math.log(Math.cos(fi1)*(1/Math.cos(fi2)))/Math.log(Math.tan(Math.PI/4+fi2/2)*(1/Math.tan(Math.PI/4+fi1/2))),F=Math.cos(fi1)*Math.pow(Math.tan(Math.PI/4+fi1/2),n)/n,ro0=F*Math.pow(1/Math.tan(Math.PI/4+fi0/2),n),ro=this.sgn(n)*Math.sqrt(x*x+(ro0-y)*(ro0-y)),theta=Math.atan(x/(ro0-y));return{lat:(2*Math.atan(Math.pow(F/ro,1/n))-Math.PI/2)*this.degRad,lng:(lambda0+theta/n)*this.degRad}}},jvm.MapObject=function(){},jvm.MapObject.prototype.getLabelText=function(key){var text;return text=this.config.label?"function"==typeof this.config.label.render?this.config.label.render(key):key:null},jvm.MapObject.prototype.getLabelOffsets=function(key){var offsets;return this.config.label&&("function"==typeof this.config.label.offsets?offsets=this.config.label.offsets(key):"object"==typeof this.config.label.offsets&&(offsets=this.config.label.offsets[key])),offsets||[0,0]},jvm.MapObject.prototype.setHovered=function(isHovered){this.isHovered!==isHovered&&(this.isHovered=isHovered,this.shape.isHovered=isHovered,this.shape.updateStyle(),this.label&&(this.label.isHovered=isHovered,this.label.updateStyle()))},jvm.MapObject.prototype.setSelected=function(isSelected){this.isSelected!==isSelected&&(this.isSelected=isSelected,this.shape.isSelected=isSelected,this.shape.updateStyle(),this.label&&(this.label.isSelected=isSelected,this.label.updateStyle()),jvm.$(this.shape).trigger("selected",[isSelected]))},jvm.MapObject.prototype.setStyle=function(){this.shape.setStyle.apply(this.shape,arguments)},jvm.MapObject.prototype.remove=function(){this.shape.remove(),this.label&&this.label.remove()},jvm.Region=function(config){var bbox,text,offsets;this.config=config,this.map=this.config.map,this.shape=config.canvas.addPath({d:config.path,"data-code":config.code},config.style,config.canvas.rootElement),this.shape.addClass("jvectormap-region jvectormap-element"),bbox=this.shape.getBBox(),text=this.getLabelText(config.code),
29206this.config.label&&text&&(offsets=this.getLabelOffsets(config.code),this.labelX=bbox.x+bbox.width/2+offsets[0],this.labelY=bbox.y+bbox.height/2+offsets[1],this.label=config.canvas.addText({text:text,"text-anchor":"middle","alignment-baseline":"central",x:this.labelX,y:this.labelY,"data-code":config.code},config.labelStyle,config.labelsGroup),this.label.addClass("jvectormap-region jvectormap-element"))},jvm.inherits(jvm.Region,jvm.MapObject),jvm.Region.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.map.transX*this.map.scale,y:this.labelY*this.map.scale+this.map.transY*this.map.scale})},jvm.Marker=function(config){var text;this.config=config,this.map=this.config.map,this.isImage=!!this.config.style.initial.image,this.createShape(),text=this.getLabelText(config.index),this.config.label&&text&&(this.offsets=this.getLabelOffsets(config.index),this.labelX=config.cx/this.map.scale-this.map.transX,this.labelY=config.cy/this.map.scale-this.map.transY,this.label=config.canvas.addText({text:text,"data-index":config.index,dy:"0.6ex",x:this.labelX,y:this.labelY},config.labelStyle,config.labelsGroup),this.label.addClass("jvectormap-marker jvectormap-element"))},jvm.inherits(jvm.Marker,jvm.MapObject),jvm.Marker.prototype.createShape=function(){var that=this;this.shape&&this.shape.remove(),this.shape=this.config.canvas[this.isImage?"addImage":"addCircle"]({"data-index":this.config.index,cx:this.config.cx,cy:this.config.cy},this.config.style,this.config.group),this.shape.addClass("jvectormap-marker jvectormap-element"),this.isImage&&jvm.$(this.shape.node).on("imageloaded",function(){that.updateLabelPosition()})},jvm.Marker.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.offsets[0]+this.map.transX*this.map.scale+5+(this.isImage?(this.shape.width||0)/2:this.shape.properties.r),y:this.labelY*this.map.scale+this.map.transY*this.map.scale+this.offsets[1]})},jvm.Marker.prototype.setStyle=function(property){var isImage;jvm.Marker.parentClass.prototype.setStyle.apply(this,arguments),"r"===property&&this.updateLabelPosition(),isImage=!!this.shape.get("image"),isImage!=this.isImage&&(this.isImage=isImage,this.config.style=jvm.$.extend(!0,{},this.shape.style),this.createShape())},jvm.Map=function(params){var e,map=this;if(this.params=jvm.$.extend(!0,{},jvm.Map.defaultParams,params),!jvm.Map.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+this.params.map);this.mapData=jvm.Map.maps[this.params.map],this.markers={},this.regions={},this.regionsColors={},this.regionsData={},this.container=jvm.$("<div>").addClass("jvectormap-container"),this.params.container&&this.params.container.append(this.container),this.container.data("mapObject",this),this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.setBackgroundColor(this.params.backgroundColor),this.onResize=function(){map.updateSize()},jvm.$(window).resize(this.onResize);for(e in jvm.Map.apiEvents)this.params[e]&&this.container.bind(jvm.Map.apiEvents[e]+".jvectormap",this.params[e]);this.canvas=new jvm.VectorCanvas(this.container[0],this.width,this.height),this.params.bindTouchEvents&&("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch?this.bindContainerTouchEvents():window.MSGesture&&this.bindContainerPointerEvents()),this.bindContainerEvents(),this.bindElementEvents(),this.createTip(),this.params.zoomButtons&&this.bindZoomButtons(),this.createRegions(),this.createMarkers(this.params.markers||{}),this.updateSize(),this.params.focusOn&&("string"==typeof this.params.focusOn?this.params.focusOn={region:this.params.focusOn}:jvm.$.isArray(this.params.focusOn)&&(this.params.focusOn={regions:this.params.focusOn}),this.setFocus(this.params.focusOn)),this.params.selectedRegions&&this.setSelectedRegions(this.params.selectedRegions),this.params.selectedMarkers&&this.setSelectedMarkers(this.params.selectedMarkers),this.legendCntHorizontal=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-h"),this.legendCntVertical=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-v"),this.container.append(this.legendCntHorizontal),this.container.append(this.legendCntVertical),this.params.series&&this.createSeries()},jvm.Map.prototype={transX:0,transY:0,scale:1,baseTransX:0,baseTransY:0,baseScale:1,width:0,height:0,setBackgroundColor:function(backgroundColor){this.container.css("background-color",backgroundColor)},resize:function(){var curBaseScale=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/curBaseScale,this.transX*=this.baseScale/curBaseScale,this.transY*=this.baseScale/curBaseScale},updateSize:function(){this.width=this.container.width(),this.height=this.container.height(),this.resize(),this.canvas.setSize(this.width,this.height),this.applyTransform()},reset:function(){var key,i;for(key in this.series)for(i=0;i<this.series[key].length;i++)this.series[key][i].clear();this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this.applyTransform()},applyTransform:function(){var maxTransX,maxTransY,minTransX,minTransY;this.defaultWidth*this.scale<=this.width?(maxTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale),minTransX=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(maxTransX=0,minTransX=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(maxTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale),minTransY=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(maxTransY=0,minTransY=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>maxTransY?this.transY=maxTransY:this.transY<minTransY&&(this.transY=minTransY),this.transX>maxTransX?this.transX=maxTransX:this.transX<minTransX&&(this.transX=minTransX),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this.repositionMarkers(),this.repositionLabels(),this.container.trigger("viewportChange",[this.scale/this.baseScale,this.transX,this.transY])},bindContainerEvents:function(){var oldPageX,oldPageY,mouseDown=!1,map=this;this.params.panOnDrag&&(this.container.mousemove(function(e){return mouseDown&&(map.transX-=(oldPageX-e.pageX)/map.scale,map.transY-=(oldPageY-e.pageY)/map.scale,map.applyTransform(),oldPageX=e.pageX,oldPageY=e.pageY),!1}).mousedown(function(e){return mouseDown=!0,oldPageX=e.pageX,oldPageY=e.pageY,!1}),this.onContainerMouseUp=function(){mouseDown=!1},jvm.$("body").mouseup(this.onContainerMouseUp)),this.params.zoomOnScroll&&this.container.mousewheel(function(event){var offset=jvm.$(map.container).offset(),centerX=event.pageX-offset.left,centerY=event.pageY-offset.top,zoomStep=Math.pow(1+map.params.zoomOnScrollSpeed/1e3,event.deltaFactor*event.deltaY);map.tip.hide(),map.setScale(map.scale*zoomStep,centerX,centerY),event.preventDefault()})},bindContainerTouchEvents:function(){var touchStartScale,touchStartDistance,touchX,touchY,centerTouchX,centerTouchY,lastTouchesLength,map=this,handleTouchEvent=function(e){var offset,scale,transXOld,transYOld,touches=e.originalEvent.touches;"touchstart"==e.type&&(lastTouchesLength=0),1==touches.length?(1==lastTouchesLength&&(transXOld=map.transX,transYOld=map.transY,map.transX-=(touchX-touches[0].pageX)/map.scale,map.transY-=(touchY-touches[0].pageY)/map.scale,map.applyTransform(),map.tip.hide(),(transXOld!=map.transX||transYOld!=map.transY)&&e.preventDefault()),touchX=touches[0].pageX,touchY=touches[0].pageY):2==touches.length&&(2==lastTouchesLength?(scale=Math.sqrt(Math.pow(touches[0].pageX-touches[1].pageX,2)+Math.pow(touches[0].pageY-touches[1].pageY,2))/touchStartDistance,map.setScale(touchStartScale*scale,centerTouchX,centerTouchY),map.tip.hide(),e.preventDefault()):(offset=jvm.$(map.container).offset(),centerTouchX=touches[0].pageX>touches[1].pageX?touches[1].pageX+(touches[0].pageX-touches[1].pageX)/2:touches[0].pageX+(touches[1].pageX-touches[0].pageX)/2,centerTouchY=touches[0].pageY>touches[1].pageY?touches[1].pageY+(touches[0].pageY-touches[1].pageY)/2:touches[0].pageY+(touches[1].pageY-touches[0].pageY)/2,centerTouchX-=offset.left,centerTouchY-=offset.top,touchStartScale=map.scale,touchStartDistance=Math.sqrt(Math.pow(touches[0].pageX-touches[1].pageX,2)+Math.pow(touches[0].pageY-touches[1].pageY,2)))),lastTouchesLength=touches.length};jvm.$(this.container).bind("touchstart",handleTouchEvent),jvm.$(this.container).bind("touchmove",handleTouchEvent)},bindContainerPointerEvents:function(){var map=this,gesture=new MSGesture,element=this.container[0],handlePointerDownEvent=function(e){gesture.addPointer(e.pointerId)},handleGestureEvent=function(e){var transXOld,transYOld;(0!=e.translationX||0!=e.translationY)&&(transXOld=map.transX,transYOld=map.transY,map.transX+=e.translationX/map.scale,map.transY+=e.translationY/map.scale,map.applyTransform(),map.tip.hide(),(transXOld!=map.transX||transYOld!=map.transY)&&e.preventDefault()),1!=e.scale&&(map.setScale(map.scale*e.scale,e.offsetX,e.offsetY),map.tip.hide(),e.preventDefault())};gesture.target=element,element.addEventListener("MSGestureChange",handleGestureEvent,!1),element.addEventListener("pointerdown",handlePointerDownEvent,!1)},bindElementEvents:function(){var pageX,pageY,mouseMoved,map=this;this.container.mousemove(function(e){Math.abs(pageX-e.pageX)+Math.abs(pageY-e.pageY)>2&&(mouseMoved=!0)}),this.container.delegate("[class~='jvectormap-element']","mouseover mouseout",function(e){var baseVal=jvm.$(this).attr("class").baseVal||jvm.$(this).attr("class"),type=-1===baseVal.indexOf("jvectormap-region")?"marker":"region",code=jvm.$(this).attr("region"==type?"data-code":"data-index"),element="region"==type?map.regions[code].element:map.markers[code].element,tipText="region"==type?map.mapData.paths[code].name:map.markers[code].config.name||"",tipShowEvent=jvm.$.Event(type+"TipShow.jvectormap"),overEvent=jvm.$.Event(type+"Over.jvectormap");"mouseover"==e.type?(map.container.trigger(overEvent,[code]),overEvent.isDefaultPrevented()||element.setHovered(!0),map.tip.text(tipText),map.container.trigger(tipShowEvent,[map.tip,code]),tipShowEvent.isDefaultPrevented()||(map.tip.show(),map.tipWidth=map.tip.width(),map.tipHeight=map.tip.height())):(element.setHovered(!1),map.tip.hide(),map.container.trigger(type+"Out.jvectormap",[code]))}),this.container.delegate("[class~='jvectormap-element']","mousedown",function(e){pageX=e.pageX,pageY=e.pageY,mouseMoved=!1}),this.container.delegate("[class~='jvectormap-element']","mouseup",function(){var baseVal=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),type=-1===baseVal.indexOf("jvectormap-region")?"marker":"region",code=jvm.$(this).attr("region"==type?"data-code":"data-index"),clickEvent=jvm.$.Event(type+"Click.jvectormap"),element="region"==type?map.regions[code].element:map.markers[code].element;mouseMoved||(map.container.trigger(clickEvent,[code]),("region"===type&&map.params.regionsSelectable||"marker"===type&&map.params.markersSelectable)&&(clickEvent.isDefaultPrevented()||(map.params[type+"sSelectableOne"]&&map.clearSelected(type+"s"),element.setSelected(!element.isSelected))))})},bindZoomButtons:function(){var map=this;jvm.$("<div/>").addClass("jvectormap-zoomin").text("+").appendTo(this.container),jvm.$("<div/>").addClass("jvectormap-zoomout").html("&#x2212;").appendTo(this.container),this.container.find(".jvectormap-zoomin").click(function(){map.setScale(map.scale*map.params.zoomStep,map.width/2,map.height/2,!1,map.params.zoomAnimate)}),this.container.find(".jvectormap-zoomout").click(function(){map.setScale(map.scale/map.params.zoomStep,map.width/2,map.height/2,!1,map.params.zoomAnimate)})},createTip:function(){var map=this;this.tip=jvm.$("<div/>").addClass("jvectormap-tip").appendTo(jvm.$("body")),this.container.mousemove(function(e){var left=e.pageX-15-map.tipWidth,top=e.pageY-15-map.tipHeight;5>left&&(left=e.pageX+15),5>top&&(top=e.pageY+15),map.tip.css({left:left,top:top})})},setScale:function(scale,anchorX,anchorY,isCentered,animate){var interval,scaleStart,scaleDiff,transXStart,transXDiff,transYStart,transYDiff,transX,transY,viewportChangeEvent=jvm.$.Event("zoom.jvectormap"),that=this,i=0,count=Math.abs(Math.round(60*(scale-this.scale)/Math.max(scale,this.scale))),deferred=new jvm.$.Deferred;return scale>this.params.zoomMax*this.baseScale?scale=this.params.zoomMax*this.baseScale:scale<this.params.zoomMin*this.baseScale&&(scale=this.params.zoomMin*this.baseScale),"undefined"!=typeof anchorX&&"undefined"!=typeof anchorY&&(zoomStep=scale/this.scale,isCentered?(transX=anchorX+this.defaultWidth*(this.width/(this.defaultWidth*scale))/2,transY=anchorY+this.defaultHeight*(this.height/(this.defaultHeight*scale))/2):(transX=this.transX-(zoomStep-1)/scale*anchorX,transY=this.transY-(zoomStep-1)/scale*anchorY)),animate&&count>0?(scaleStart=this.scale,scaleDiff=(scale-scaleStart)/count,transXStart=this.transX*this.scale,transYStart=this.transY*this.scale,transXDiff=(transX*scale-transXStart)/count,transYDiff=(transY*scale-transYStart)/count,interval=setInterval(function(){i+=1,that.scale=scaleStart+scaleDiff*i,that.transX=(transXStart+transXDiff*i)/that.scale,that.transY=(transYStart+transYDiff*i)/that.scale,that.applyTransform(),i==count&&(clearInterval(interval),that.container.trigger(viewportChangeEvent,[scale/that.baseScale]),deferred.resolve())},10)):(this.transX=transX,this.transY=transY,this.scale=scale,this.applyTransform(),this.container.trigger(viewportChangeEvent,[scale/this.baseScale]),deferred.resolve()),deferred},setFocus:function(config){var bbox,itemBbox,newBbox,codes,i,point;if(config=config||{},config.region?codes=[config.region]:config.regions&&(codes=config.regions),codes){for(i=0;i<codes.length;i++)this.regions[codes[i]]&&(itemBbox=this.regions[codes[i]].element.shape.getBBox(),itemBbox&&("undefined"==typeof bbox?bbox=itemBbox:(newBbox={x:Math.min(bbox.x,itemBbox.x),y:Math.min(bbox.y,itemBbox.y),width:Math.max(bbox.x+bbox.width,itemBbox.x+itemBbox.width)-Math.min(bbox.x,itemBbox.x),height:Math.max(bbox.y+bbox.height,itemBbox.y+itemBbox.height)-Math.min(bbox.y,itemBbox.y)},bbox=newBbox)));return this.setScale(Math.min(this.width/bbox.width,this.height/bbox.height),-(bbox.x+bbox.width/2),-(bbox.y+bbox.height/2),!0,config.animate)}return config.lat&&config.lng?(point=this.latLngToPoint(config.lat,config.lng),config.x=this.transX-point.x/this.scale,config.y=this.transY-point.y/this.scale):config.x&&config.y&&(config.x*=-this.defaultWidth,config.y*=-this.defaultHeight),this.setScale(config.scale*this.baseScale,config.x,config.y,!0,config.animate)},getSelected:function(type){var key,selected=[];for(key in this[type])this[type][key].element.isSelected&&selected.push(key);return selected},getSelectedRegions:function(){return this.getSelected("regions")},getSelectedMarkers:function(){return this.getSelected("markers")},setSelected:function(type,keys){var i;if("object"!=typeof keys&&(keys=[keys]),jvm.$.isArray(keys))for(i=0;i<keys.length;i++)this[type][keys[i]].element.setSelected(!0);else for(i in keys)this[type][i].element.setSelected(!!keys[i])},setSelectedRegions:function(keys){this.setSelected("regions",keys)},setSelectedMarkers:function(keys){this.setSelected("markers",keys)},clearSelected:function(type){var i,select={},selected=this.getSelected(type);for(i=0;i<selected.length;i++)select[selected[i]]=!1;this.setSelected(type,select)},clearSelectedRegions:function(){this.clearSelected("regions")},clearSelectedMarkers:function(){this.clearSelected("markers")},getMapObject:function(){return this},getRegionName:function(code){return this.mapData.paths[code].name},createRegions:function(){var key,region,map=this;this.regionLabelsGroup=this.regionLabelsGroup||this.canvas.addGroup();for(key in this.mapData.paths)region=new jvm.Region({map:this,path:this.mapData.paths[key].path,code:key,style:jvm.$.extend(!0,{},this.params.regionStyle),labelStyle:jvm.$.extend(!0,{},this.params.regionLabelStyle),canvas:this.canvas,labelsGroup:this.regionLabelsGroup,label:"vml"!=this.canvas.mode?this.params.labels&&this.params.labels.regions:null}),jvm.$(region.shape).bind("selected",function(e,isSelected){map.container.trigger("regionSelected.jvectormap",[jvm.$(this.node).attr("data-code"),isSelected,map.getSelectedRegions()])}),this.regions[key]={element:region,config:this.mapData.paths[key]}},createMarkers:function(markers){var i,marker,point,markerConfig,markersArray,map=this;if(this.markersGroup=this.markersGroup||this.canvas.addGroup(),this.markerLabelsGroup=this.markerLabelsGroup||this.canvas.addGroup(),jvm.$.isArray(markers))for(markersArray=markers.slice(),markers={},i=0;i<markersArray.length;i++)markers[i]=markersArray[i];for(i in markers)markerConfig=markers[i]instanceof Array?{latLng:markers[i]}:markers[i],point=this.getMarkerPosition(markerConfig),point!==!1&&(marker=new jvm.Marker({map:this,style:jvm.$.extend(!0,{},this.params.markerStyle,{initial:markerConfig.style||{}}),labelStyle:jvm.$.extend(!0,{},this.params.markerLabelStyle),index:i,cx:point.x,cy:point.y,group:this.markersGroup,canvas:this.canvas,labelsGroup:this.markerLabelsGroup,label:"vml"!=this.canvas.mode?this.params.labels&&this.params.labels.markers:null}),jvm.$(marker.shape).bind("selected",function(e,isSelected){map.container.trigger("markerSelected.jvectormap",[jvm.$(this.node).attr("data-index"),isSelected,map.getSelectedMarkers()])}),this.markers[i]&&this.removeMarkers([i]),this.markers[i]={element:marker,config:markerConfig})},repositionMarkers:function(){var i,point;for(i in this.markers)point=this.getMarkerPosition(this.markers[i].config),point!==!1&&this.markers[i].element.setStyle({cx:point.x,cy:point.y})},repositionLabels:function(){var key;for(key in this.regions)this.regions[key].element.updateLabelPosition();for(key in this.markers)this.markers[key].element.updateLabelPosition()},getMarkerPosition:function(markerConfig){return jvm.Map.maps[this.params.map].projection?this.latLngToPoint.apply(this,markerConfig.latLng||[0,0]):{x:markerConfig.coords[0]*this.scale+this.transX*this.scale,y:markerConfig.coords[1]*this.scale+this.transY*this.scale}},addMarker:function(key,marker,seriesData){var values,i,markers={},data=[],seriesData=seriesData||[];for(markers[key]=marker,i=0;i<seriesData.length;i++)values={},"undefined"!=typeof seriesData[i]&&(values[key]=seriesData[i]),data.push(values);this.addMarkers(markers,data)},addMarkers:function(markers,seriesData){var i;for(seriesData=seriesData||[],this.createMarkers(markers),i=0;i<seriesData.length;i++)this.series.markers[i].setValues(seriesData[i]||{})},removeMarkers:function(markers){var i;for(i=0;i<markers.length;i++)this.markers[markers[i]].element.remove(),delete this.markers[markers[i]]},removeAllMarkers:function(){var i,markers=[];for(i in this.markers)markers.push(i);this.removeMarkers(markers)},latLngToPoint:function(lat,lng){var point,inset,bbox,proj=jvm.Map.maps[this.params.map].projection,centralMeridian=proj.centralMeridian;return-180+centralMeridian>lng&&(lng+=360),point=jvm.Proj[proj.type](lat,lng,centralMeridian),inset=this.getInsetForPoint(point.x,point.y),inset?(bbox=inset.bbox,point.x=(point.x-bbox[0].x)/(bbox[1].x-bbox[0].x)*inset.width*this.scale,point.y=(point.y-bbox[0].y)/(bbox[1].y-bbox[0].y)*inset.height*this.scale,{x:point.x+this.transX*this.scale+inset.left*this.scale,y:point.y+this.transY*this.scale+inset.top*this.scale}):!1},pointToLatLng:function(x,y){var i,inset,bbox,nx,ny,proj=jvm.Map.maps[this.params.map].projection,centralMeridian=proj.centralMeridian,insets=jvm.Map.maps[this.params.map].insets;for(i=0;i<insets.length;i++)if(inset=insets[i],bbox=inset.bbox,nx=x-(this.transX*this.scale+inset.left*this.scale),ny=y-(this.transY*this.scale+inset.top*this.scale),nx=nx/(inset.width*this.scale)*(bbox[1].x-bbox[0].x)+bbox[0].x,ny=ny/(inset.height*this.scale)*(bbox[1].y-bbox[0].y)+bbox[0].y,nx>bbox[0].x&&nx<bbox[1].x&&ny>bbox[0].y&&ny<bbox[1].y)return jvm.Proj[proj.type+"_inv"](nx,-ny,centralMeridian);return!1},getInsetForPoint:function(x,y){var i,bbox,insets=jvm.Map.maps[this.params.map].insets;for(i=0;i<insets.length;i++)if(bbox=insets[i].bbox,x>bbox[0].x&&x<bbox[1].x&&y>bbox[0].y&&y<bbox[1].y)return insets[i]},createSeries:function(){var i,key;this.series={markers:[],regions:[]};for(key in this.params.series)for(i=0;i<this.params.series[key].length;i++)this.series[key][i]=new jvm.DataSeries(this.params.series[key][i],this[key],this)},remove:function(){this.tip.remove(),this.container.remove(),jvm.$(window).unbind("resize",this.onResize),jvm.$("body").unbind("mouseup",this.onContainerMouseUp)}},jvm.Map.maps={},jvm.Map.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,zoomOnScrollSpeed:3,panOnDrag:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,zoomAnimate:!0,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8,cursor:"pointer"},selected:{fill:"yellow"},selectedHover:{}},regionLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2,cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}}},jvm.Map.apiEvents={onRegionTipShow:"regionTipShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerTipShow:"markerTipShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"},jvm.MultiMap=function(params){var that=this;this.maps={},this.params=jvm.$.extend(!0,{},jvm.MultiMap.defaultParams,params),this.params.maxLevel=this.params.maxLevel||Number.MAX_VALUE,this.params.main=this.params.main||{},this.params.main.multiMapLevel=0,this.history=[this.addMap(this.params.main.map,this.params.main)],this.defaultProjection=this.history[0].mapData.projection.type,this.mapsLoaded={},this.params.container.css({position:"relative"}),this.backButton=jvm.$("<div/>").addClass("jvectormap-goback").text("Back").appendTo(this.params.container),this.backButton.hide(),this.backButton.click(function(){that.goBack()}),this.spinner=jvm.$("<div/>").addClass("jvectormap-spinner").appendTo(this.params.container),this.spinner.hide()},jvm.MultiMap.prototype={addMap:function(name,config){var cnt=jvm.$("<div/>").css({width:"100%",height:"100%"});return this.params.container.append(cnt),this.maps[name]=new jvm.Map(jvm.$.extend(config,{container:cnt})),this.params.maxLevel>config.multiMapLevel&&this.maps[name].container.on("regionClick.jvectormap",{scope:this},function(e,code){var multimap=e.data.scope,mapName=multimap.params.mapNameByCode(code,multimap);multimap.drillDownPromise&&"pending"===multimap.drillDownPromise.state()||multimap.drillDown(mapName,code)}),this.maps[name]},downloadMap:function(code){var that=this,deferred=jvm.$.Deferred();return this.mapsLoaded[code]?deferred.resolve():jvm.$.get(this.params.mapUrlByCode(code,this)).then(function(){that.mapsLoaded[code]=!0,deferred.resolve()},function(){deferred.reject()}),deferred},drillDown:function(name,code){var currentMap=this.history[this.history.length-1],that=this,focusPromise=currentMap.setFocus({region:code,animate:!0}),downloadPromise=this.downloadMap(code);focusPromise.then(function(){"pending"===downloadPromise.state()&&that.spinner.show()}),downloadPromise.always(function(){that.spinner.hide()}),this.drillDownPromise=jvm.$.when(downloadPromise,focusPromise),this.drillDownPromise.then(function(){currentMap.params.container.hide(),that.maps[name]?that.maps[name].params.container.show():that.addMap(name,{map:name,multiMapLevel:currentMap.params.multiMapLevel+1}),that.history.push(that.maps[name]),that.backButton.show()})},goBack:function(){var currentMap=this.history.pop(),prevMap=this.history[this.history.length-1],that=this;currentMap.setFocus({scale:1,x:.5,y:.5,animate:!0}).then(function(){currentMap.params.container.hide(),prevMap.params.container.show(),prevMap.updateSize(),1===that.history.length&&that.backButton.hide(),prevMap.setFocus({scale:1,x:.5,y:.5,animate:!0})})}},jvm.MultiMap.defaultParams={mapNameByCode:function(code,multiMap){return code.toLowerCase()+"_"+multiMap.defaultProjection+"_en"},mapUrlByCode:function(code,multiMap){return"jquery-jvectormap-data-"+code.toLowerCase()+"-"+multiMap.defaultProjection+"-en.js"}};
vendor: 6,358 bytes, lines 29206-29385
29206
29207;/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
29208 * Licensed under the MIT License (LICENSE.txt).
29209 *
29210 * Version: 3.1.9
29211 *
29212 * Requires: jQuery 1.2.2+
29213 */
29214
29215(function (factory) {
29216    if ( typeof define === 'function' && define.amd ) {
29217        // AMD. Register as an anonymous module.
29218        define(['jquery'], factory);
29219    } else if (typeof exports === 'object') {
29220        // Node/CommonJS style for Browserify
29221        module.exports = factory;
29222    } else {
29223        // Browser globals
29224        factory(jQuery);
29225    }
29226}(function ($) {
29227
29228    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
29229        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
29230                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
29231        slice  = Array.prototype.slice,
29232        nullLowestDeltaTimeout, lowestDelta;
29233
29234    if ( $.event.fixHooks ) {
29235        for ( var i = toFix.length; i; ) {
29236            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
29237        }
29238    }
29239
29240    var special = $.event.special.mousewheel = {
29241        version: '3.1.9',
29242
29243        setup: function() {
29244            if ( this.addEventListener ) {
29245                for ( var i = toBind.length; i; ) {
29246                    this.addEventListener( toBind[--i], handler, false );
29247                }
29248            } else {
29249                this.onmousewheel = handler;
29250            }
29251            // Store the line height and page height for this particular element
29252            $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
29253            $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
29254        },
29255
29256        teardown: function() {
29257            if ( this.removeEventListener ) {
29258                for ( var i = toBind.length; i; ) {
29259                    this.removeEventListener( toBind[--i], handler, false );
29260                }
29261            } else {
29262                this.onmousewheel = null;
29263            }
29264        },
29265
29266        getLineHeight: function(elem) {
29267            return parseInt($(elem)['offsetParent' in $.fn ? 'offsetParent' : 'parent']().css('fontSize'), 10);
29268        },
29269
29270        getPageHeight: function(elem) {
29271            return $(elem).height();
29272        },
29273
29274        settings: {
29275            adjustOldDeltas: true
29276        }
29277    };
29278
29279    $.fn.extend({
29280        mousewheel: function(fn) {
29281            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
29282        },
29283
29284        unmousewheel: function(fn) {
29285            return this.unbind('mousewheel', fn);
29286        }
29287    });
29288
29289
29290    function handler(event) {
29291        var orgEvent   = event || window.event,
29292            args       = slice.call(arguments, 1),
29293            delta      = 0,
29294            deltaX     = 0,
29295            deltaY     = 0,
29296            absDelta   = 0;
29297        event = $.event.fix(orgEvent);
29298        event.type = 'mousewheel';
29299
29300        // Old school scrollwheel delta
29301        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      }
29302        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       }
29303        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      }
29304        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
29305
29306        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
29307        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
29308            deltaX = deltaY * -1;
29309            deltaY = 0;
29310        }
29311
29312        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
29313        delta = deltaY === 0 ? deltaX : deltaY;
29314
29315        // New school wheel delta (wheel event)
29316        if ( 'deltaY' in orgEvent ) {
29317            deltaY = orgEvent.deltaY * -1;
29318            delta  = deltaY;
29319        }
29320        if ( 'deltaX' in orgEvent ) {
29321            deltaX = orgEvent.deltaX;
29322            if ( deltaY === 0 ) { delta  = deltaX * -1; }
29323        }
29324
29325        // No change actually happened, no reason to go any further
29326        if ( deltaY === 0 && deltaX === 0 ) { return; }
29327
29328        // Need to convert lines and pages to pixels if we aren't already in pixels
29329        // There are three delta modes:
29330        //   * deltaMode 0 is by pixels, nothing to do
29331        //   * deltaMode 1 is by lines
29332        //   * deltaMode 2 is by pages
29333        if ( orgEvent.deltaMode === 1 ) {
29334            var lineHeight = $.data(this, 'mousewheel-line-height');
29335            delta  *= lineHeight;
29336            deltaY *= lineHeight;
29337            deltaX *= lineHeight;
29338        } else if ( orgEvent.deltaMode === 2 ) {
29339            var pageHeight = $.data(this, 'mousewheel-page-height');
29340            delta  *= pageHeight;
29341            deltaY *= pageHeight;
29342            deltaX *= pageHeight;
29343        }
29344
29345        // Store lowest absolute delta to normalize the delta values
29346        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
29347
29348        if ( !lowestDelta || absDelta < lowestDelta ) {
29349            lowestDelta = absDelta;
29350
29351            // Adjust older deltas if necessary
29352            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
29353                lowestDelta /= 40;
29354            }
29355        }
29356
29357        // Adjust older deltas if necessary
29358        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
29359            // Divide all the things by 40!
29360            delta  /= 40;
29361            deltaX /= 40;
29362            deltaY /= 40;
29363        }
29364
29365        // Get a whole, normalized value for the deltas
29366        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta);
29367        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
29368        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
29369
29370        // Add information to the event object
29371        event.deltaX = deltaX;
29372        event.deltaY = deltaY;
29373        event.deltaFactor = lowestDelta;
29374        // Go ahead and set deltaMode to 0 since we converted to pixels
29375        // Although this is a little odd since we overwrite the deltaX/Y
29376        // properties with normalized deltas.
29377        event.deltaMode = 0;
29378
29379        // Add event and delta to the front of the arguments
29380        args.unshift(event, delta, deltaX, deltaY);
29381
29382        // Clearout lowestDelta after sometime to better
29383        // handle multiple device types that give different
29384        // a different lowestDelta
29385        // Ex: trackpad = 3 and mouse wheel = 120
29386        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
29387        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
29388
29389        return ($.event.dispatch || $.event.handle).apply(this, args);
29390    }
29391
29392    function nullLowestDelta() {
29393        lowestDelta = null;
29394    }
29395
29396    function shouldAdjustOldDeltas(orgEvent, absDelta) {
29397        // If this is an older event and the delta is divisable by 120,
29398        // then we are assuming that the browser is treating this as an
29399        // older mouse wheel event and that we should divide the deltas
29400        // by 40 to try and get a more usable deltaFactor.
29401        // Side note, this actually impacts the reported scroll distance
29402        // in older browsers and can cause scrolling to be slower than native.
29403        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
29404        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
29405    }
29406
29407}));
29408;jQuery.fn.vectorMap('addMap', 'map', {"width":565.5,"height":466.812,"paths":{"id1":{"name":"name0","path":"M489.70 447.28c18.39 -10.17 34.06 -23.43 47.17 -39.63c13.34 -16.73 22.91 -35.49 28.63 -56.29l-73.99 -20.12c-2.56 9.04 -6.55 17.33 -11.90 24.86c-0.83 1.21 -1.81 2.34 -2.71 3.54c-1.05 1.36 -2.19 2.64 -3.31 3.84l-5.65 5.20l-1.13 0.45l-0.38 -0.60c-1.13 0.98 -2.34 1.96 -3.47 2.94c-3.47 2.64 -7.08 5.05 -10.93 7.23c-3.84 2.03 -7.76 3.84 -11.68 5.20c-1.36 0.53 -2.56 0.90 -3.84 1.28c-0.53 0.15 -0.98 0.30 -1.43 0.45l-24.11 -43.78l1.58 3.09l22.45 41.14c-0.45 0.07 -0.90 0.23 -1.36 0.30c-14.77 3.09 -29.09 3.24 -42.95 0.30l-22.53 73.31c20.65 6.25 41.59 8.21 62.84 5.80C451.72 463.55 471.31 457.30 489.70 447.28z"},"id2":{"name":"name1","path":"M400.71 94.34l-3.99 -4.52c0.00 -0.08 0.00 -0.08 -0.07 -0.15l-3.84 -4.45c-0.07 0.00 -0.15 0.00 -0.23 0.00c-0.15 0.00 -0.38 -0.07 -0.53 -0.23l-5.28 -5.42l-0.07 0.07c-0.15 0.23 -0.23 0.30 -0.45 0.30c0.00 0.15 -0.08 0.30 -0.15 0.38l-10.63 11.60l-11.45 15.37c-0.15 0.15 -0.23 0.38 -0.38 0.53c-0.15 0.23 -0.23 0.38 -0.38 0.53l-9.95 17.86c-0.07 0.07 -0.07 0.07 -0.07 0.07c-0.07 0.00 -0.07 0.08 -0.15 0.23c0.00 0.15 -0.15 0.30 -0.15 0.45l-0.08 0.08c-0.07 0.15 -0.15 0.30 -0.23 0.45c-0.07 0.30 -0.23 0.53 -0.30 0.83c-0.07 0.08 -0.07 0.08 -0.15 0.08c0.00 0.15 -0.07 0.30 -0.15 0.38l-0.07 0.08c-0.75 1.66 -1.51 3.39 -2.19 5.12c-0.45 0.98 -0.83 1.96 -1.21 2.94v0.00 0.07c-0.90 2.11 -1.66 4.07 -2.26 6.10v0.00 -0.23l0.00 0.00c0.00 0.07 0.00 0.23 0.00 0.30l-0.90 2.49c-0.08 0.23 -0.15 0.53 -0.23 0.83l0.00 0.00c-0.90 2.64 -1.66 5.27 -2.26 7.91c-0.75 2.64 -1.36 5.27 -1.88 7.91c-0.75 3.54 -1.36 7.16 -1.73 10.78c-0.07 0.15 -0.15 0.23 -0.15 0.30c-0.08 0.15 -0.15 0.23 -0.23 0.30l-2.94 1.58c-0.07 0.07 -0.23 0.07 -0.38 0.07c-0.08 0.00 -0.23 0.00 -0.38 -0.07c-4.90 -2.64 -10.47 -4.97 -16.65 -7.16c-5.27 -1.81 -10.62 -3.31 -16.13 -4.52c-3.17 -0.68 -6.41 -1.28 -9.64 -1.88l-3.17 -0.38v0.00 -0.08c-9.64 -1.36 -20.34 -1.58 -32.10 -0.90c-6.63 0.30 -12.66 0.98 -18.16 1.81c-0.45 0.15 -0.98 0.15 -1.43 0.30h0.07 0.00c-13.79 2.41 -27.35 6.48 -40.76 12.28l-0.15 -0.38c-8.52 3.54 -16.80 7.84 -25.09 12.81l0.00 0.00c-0.38 0.15 -0.60 0.30 -0.83 0.53h-0.07 0.00l-0.60 0.38l-0.30 0.15c-0.07 0.00 -0.07 0.00 -0.07 0.07l-2.79 1.05l-38.43 124.63l20.04 6.33l0.75 -2.41l-0.83 2.79l0.15 0.08l36.09 -116.87c0.07 -0.23 0.15 -0.38 0.38 -0.53c15.75 -8.06 33.23 -13.94 52.29 -17.71c17.71 -3.54 34.51 -4.52 50.48 -2.94c0.08 0.08 0.23 0.08 0.30 0.08h0.07 0.00c2.34 0.23 4.75 0.53 7.01 0.83l5.80 1.05c0.38 0.07 0.90 0.15 1.36 0.23c0.30 0.07 0.68 0.15 1.05 0.23l1.73 0.38c0.75 0.15 1.51 0.38 2.34 0.53l1.73 0.45c0.30 0.08 0.68 0.15 1.05 0.30c5.95 1.51 11.83 3.54 17.56 5.88c0.07 0.07 0.07 0.07 0.15 0.15c0.07 0.00 0.15 0.15 0.23 0.23l83.86 151.91l-1.58 -3.09l0.00 0.00l0.00 0.00c0.00 0.00 0.00 0.00 0.08 0.00h-0.08 0.00l24.11 43.78c0.45 -0.15 0.90 -0.30 1.43 -0.45c1.28 -0.38 2.49 -0.75 3.84 -1.28c3.92 -1.36 7.84 -3.17 11.68 -5.20c3.84 -2.19 7.46 -4.60 10.93 -7.23c1.13 -0.98 2.34 -1.96 3.47 -2.94c0.07 -0.07 0.15 -0.15 0.23 -0.15c0.00 -0.07 0.07 -0.07 0.07 -0.15l-24.04 -43.48v0.00 0.08h-0.07 0.00l-0.15 0.07c0.00 -0.07 0.00 -0.15 0.07 -0.23l-83.56 -151.53c-0.15 -0.15 -0.15 -0.38 -0.08 -0.53c2.71 -10.47 6.18 -20.50 10.25 -30.06l0.00 0.00c0.90 -2.04 1.73 -4.07 2.64 -6.10c6.03 -13.19 12.66 -24.11 19.89 -32.78l0.53 0.60c0.15 -0.15 0.38 -0.23 0.53 -0.23c0.23 0.00 0.38 0.08 0.53 0.30l5.50 6.10l7.01 -7.54l-5.35 -6.18c-0.23 -0.23 -0.30 -0.38 -0.23 -0.60c0.00 -0.15 0.15 -0.38 0.30 -0.53l-0.53 -0.60C400.18 94.86 400.48 94.64 400.71 94.34zM205.33 193.95l0.15 0.38c-7.01 2.56 -13.71 5.50 -20.19 8.82l0.00 0.00h-0.08 
294080.00l-0.15 0.23c0.00 0.00 0.00 0.07 -0.07 0.15v0.00 -0.07c0.07 -0.23 0.23 -0.30 0.38 -0.45c6.48 -3.24 13.11 -6.18 20.04 -8.74L205.33 193.95z"},"id3":{"name":"name2","path":"M126.89 143.69c0.23 0.07 0.38 0.15 0.53 0.38l22.83 39.48l-8.59 29.39h-0.08 0.00l-0.83 -0.30l-25.92 84.02l4.14 1.28l-3.92 12.88l-7.61 -2.49l-16.13 -4.22l-29.16 94.79c22.83 9.87 46.49 17.18 70.75 21.85l29.31 -94.86l-7.54 -2.34c-0.15 0.00 -0.75 -0.23 -1.58 -0.68c-0.98 -0.45 -1.81 -0.83 -2.71 -1.13h-0.08 0.00c-0.07 -0.08 -0.15 -0.08 -0.15 -0.08s0.08 0.00 0.15 0.00c0.08 0.00 0.15 0.00 0.15 0.08l0.38 -0.08c0.00 0.00 0.00 0.00 0.07 0.00c0.15 0.00 0.00 -0.07 -0.53 -0.15c-0.30 -0.07 -0.68 -0.23 -1.13 -0.30l-0.53 -0.07l0.15 -0.45l0.83 -2.79l-0.75 2.41l-20.04 -6.33l38.43 -124.63l2.79 -1.05c0.00 -0.07 0.00 -0.07 0.07 -0.07l0.30 -0.15l11.15 -28.63l-6.63 -2.04c-0.15 -0.07 -0.38 -0.23 -0.38 -0.38c-0.15 -0.23 -0.15 -0.38 -0.07 -0.60l2.03 -6.78l-7.61 -2.41l-3.47 10.55c0.00 0.23 -0.15 0.38 -0.30 0.53c-0.23 0.00 -0.38 0.00 -0.60 0.00l-14.24 -4.29c-0.15 0.00 -0.23 -0.07 -0.38 -0.23l-14.92 -17.86c-0.07 -0.15 -0.15 -0.23 -0.15 -0.38c0.00 -0.08 0.00 -0.23 0.00 -0.30l2.79 -9.64l-56.74 -16.65l-2.49 7.91c-0.08 0.23 -0.15 0.38 -0.38 0.45c-0.07 0.07 -0.15 0.07 -0.30 0.15c-0.07 0.00 -0.15 0.00 -0.30 -0.08L0.83 93.73L0.00 96.45l34.66 10.70l-2.34 7.38l57.34 17.71l0.08 0.08h0.07 0.00l0.53 0.15h0.08 0.00L126.89 143.69zM165.69 161.17c0.23 0.08 0.30 0.23 0.45 0.38c0.07 0.23 0.07 0.38 0.07 0.60l-4.07 13.71c0.00 0.15 -0.15 0.38 -0.30 0.45c-0.23 0.07 -0.38 0.07 -0.60 0.07c-0.15 -0.07 -0.30 -0.15 -0.45 -0.38l-9.79 -17.71c-0.08 -0.15 -0.08 -0.38 -0.08 -0.53c0.08 -0.23 0.23 -0.38 0.38 -0.53c0.23 -0.07 0.38 -0.07 0.60 -0.07L165.69 161.17z"},"id4":{"name":"name3","path":"M353.09 0.00c-3.92 5.12 -7.91 9.87 -12.06 14.32l0.68 0.53c-3.69 3.69 -7.76 7.38 -12.28 10.93l-11.90 -12.96l-9.87 6.56l11.08 14.17c-4.67 3.09 -9.72 6.18 -14.99 9.19c-24.11 11.83 -51.01 13.94 -80.78 6.63l-0.23 -0.07l3.62 -13.34L211.81 32.40l-3.62 12.96l-4.67 -1.28l0.38 -0.68c-10.10 -3.69 -20.50 -8.44 -31.20 -14.24L151.98 57.34l0.60 -0.75l-17.03 24.94l1.21 0.75l-13.34 19.44l13.56 8.36l11.30 -15.37l1.43 -0.53c99.99 52.82 186.04 33.30 258.15 -58.40L353.09 0.00z"}}});
29409;jQuery.fn.vectorMap('addMap', 'world_mill_en',{"insets": [{"width": 900, "top": 0, "height": 440.70631074413296, "bbox": [{"y": -12671671.123330014, "x": -20004297.151525836}, {"y": 6930392.025135122, "x": 20026572.39474939}], "left": 0}], "paths": {"BD": {"path": "M651.84,230.21l-0.6,-2.0l-1.36,-1.71l-2.31,-0.11l-0.41,0.48l0.2,0.94l-0.53,0.99l-0.72,-0.36l-0.68,0.35l-1.2,-0.36l-0.37,-2.0l-0.81,-1.86l0.39,-1.46l-0.22,-0.47l-1.14,-0.53l0.29,-0.5l1.48,-0.94l0.03,-0.65l-1.55,-1.22l0.55,-1.14l1.61,0.94l1.04,0.15l0.18,1.54l0.34,0.35l5.64,0.63l-0.84,1.64l-1.22,0.34l-0.77,1.51l0.07,0.47l1.37,1.37l0.67,-0.19l0.42,-1.39l1.21,3.84l-0.03,1.21l-0.33,-0.15l-0.4,0.28Z", "name": "Bangladesh"}, "BE": {"path": "M429.29,144.05l1.91,0.24l2.1,-0.63l2.63,1.99l-0.21,1.66l-0.69,0.4l-0.18,1.2l-1.66,-1.13l-1.39,0.15l-2.73,-2.7l-1.17,-0.18l-0.16,-0.52l1.54,-0.5Z", "name": "Belgium"}, "BF": {"path": "M421.42,247.64l-0.11,0.95l0.34,1.16l1.4,1.71l0.07,1.1l0.32,0.37l2.55,0.51l-0.04,1.28l-0.38,0.53l-1.07,0.21l-0.72,1.18l-0.63,0.21l-3.22,-0.25l-0.94,0.39l-5.4,-0.05l-0.39,0.38l0.16,2.73l-1.23,-0.43l-1.17,0.1l-0.89,0.57l-2.27,-1.72l-0.13,-1.11l0.61,-0.96l0.02,-0.93l1.87,-1.98l0.44,-1.81l0.43,-0.39l1.28,0.26l1.05,-0.52l0.47,-0.73l1.84,-1.09l0.55,-0.83l2.2,-1.0l1.15,-0.3l0.72,0.45l1.13,-0.01Z", "name": "Burkina Faso"}, "BG": {"path": "M491.65,168.18l-0.86,0.88l-0.91,2.17l0.48,1.34l-1.6,-0.24l-2.55,0.95l-0.28,1.51l-1.8,0.22l-2.0,-1.0l-1.92,0.79l-1.42,-0.07l-0.15,-1.63l-1.05,-0.97l0.0,-0.8l1.2,-1.57l0.01,-0.56l-1.14,-1.23l-0.05,-0.94l0.88,0.97l0.88,-0.2l1.91,0.47l3.68,0.16l1.42,-0.81l2.72,-0.66l2.55,1.24Z", "name": "Bulgaria"}, "BA": {"path": "M463.49,163.65l2.1,0.5l1.72,-0.03l1.52,0.68l-0.36,0.78l0.08,0.45l1.04,1.02l-0.25,0.98l-1.81,1.15l-0.38,1.38l-1.67,-0.87l-0.89,-1.2l-2.11,-1.83l-1.63,-2.22l0.23,-0.57l0.48,0.38l0.55,-0.06l0.43,-0.51l0.94,-0.06Z", "name": "Bosnia and Herz."}, "BN": {"path": "M707.48,273.58l0.68,-0.65l1.41,-0.91l-0.15,1.63l-0.81,-0.05l-0.61,0.58l-0.53,-0.6Z", "name": "Brunei"}, "BO": {"path": "M263.83,340.69l-3.09,-0.23l-0.38,0.23l-0.7,1.52l-1.31,-1.53l-3.28,-0.64l-2.37,2.4l-1.31,0.26l-0.88,-3.26l-1.3,-2.86l0.74,-2.37l-0.13,-0.43l-1.2,-1.01l-0.37,-1.89l-1.08,-1.55l1.45,-2.56l-0.96,-2.33l0.47,-1.06l-0.34,-0.73l0.91,-1.32l0.16,-3.84l0.5,-1.18l-1.81,-3.41l2.46,0.07l0.8,-0.85l3.4,-1.91l2.66,-0.35l-0.19,1.38l0.3,1.07l-0.05,1.97l2.72,2.27l2.88,0.49l0.89,0.86l1.79,0.58l0.98,0.7l1.71,0.05l1.17,0.61l0.6,2.7l-0.7,0.54l0.96,2.99l0.37,0.28l4.3,0.1l-0.25,1.2l0.27,1.02l1.43,0.9l0.5,1.35l-0.41,1.86l-0.65,1.08l0.12,1.35l-2.69,-1.65l-2.4,-0.03l-4.3
294096,0.76l-1.49,2.5l-0.11,1.52l-0.75,2.37Z", "name": "Bolivia"}, "JP": {"path": "M781.12,166.87l1.81,0.68l1.62,-0.97l0.39,2.42l-3.35,0.75l-2.23,2.88l-3.63,-1.9l-0.56,0.2l-1.26,3.05l-2.16,0.03l-0.29,-2.51l1.08,-2.03l2.45,-0.16l0.37,-0.33l1.25,-5.94l2.47,2.71l2.03,1.12ZM773.56,187.34l-0.91,2.22l0.37,1.52l-1.14,1.75l-3.02,1.26l-4.58,0.27l-3.34,3.01l-1.25,-0.8l-0.09,-1.9l-0.46,-0.38l-4.35,0.62l-3.0,1.32l-2.85,0.05l-0.37,0.27l0.13,0.44l2.32,1.89l-1.54,4.34l-1.26,0.9l-0.79,-0.7l0.56,-2.27l-0.21,-0.45l-1.47,-0.75l-0.74,-1.4l2.12,-0.84l1.26,-1.7l2.45,-1.42l1.83,-1.91l4.78,-0.81l2.6,0.57l0.44,-0.21l2.39,-4.66l1.29,1.06l0.5,0.01l5.1,-4.02l1.69,-3.73l-0.38,-3.4l0.9,-1.61l2.14,-0.44l1.23,3.72l-0.07,2.18l-2.23,2.84l-0.04,3.16ZM757.78,196.26l0.19,0.56l-1.01,1.21l-1.16,-0.68l-1.28,0.65l-0.69,1.45l-1.02,-0.5l0.01,-0.93l1.14,-1.38l1.57,0.14l0.85,-0.98l1.4,0.46Z", "name": "Japan"}, "BI": {"path": "M495.45,295.49l-1.08,-2.99l1.14,-0.11l0.64,-1.19l0.76,0.09l0.65,1.83l-2.1,2.36Z", "name": "Burundi"}, "BJ": {"path": "M429.57,255.75l-0.05,0.8l0.5,1.34l-0.42,0.86l0.17,0.79l-1.81,2.12l-0.57,1.76l-0.08,5.42l-1.41,0.2l-0.48,-1.36l0.11,-5.71l-0.52,-0.7l-0.2,-1.35l-1.48,-1.48l0.21,-0.9l0.89,-0.43l0.42,-0.92l1.27,-0.36l1.22,-1.34l0.61,-0.0l1.62,1.24Z", "name": "Benin"}, "BT": {"path": "M650.32,213.86l0.84,0.71l-0.12,1.1l-3.76,-0.11l-1.5
294097,0.4l-1.93,-0.87l1.48,-1.96l1.13,-0.57l1.63,0.57l1.33,0.08l0.99,0.65Z", "name": "Bhutan"}, "JM": {"path": "M228.38,239.28l-0.8,0.4l-2.26,-1.06l0.84,-0.23l2.14,0.3l1.17,0.56l-1.08,0.03Z", "name": "Jamaica"}, "BW": {"path": "M483.92,330.07l2.27,4.01l2.83,2.86l0.96,0.31l0.78,2.43l2.13,0.61l1.02,0.76l-3.0,1.64l-2.32,2.02l-1.54,2.69l-1.52,0.45l-0.64,1.94l-1.34,0.52l-1.85,-0.12l-1.21,-0.74l-1.35,-0.3l-1.22,0.62l-0.75,1.37l-2.31,1.9l-1.4,0.21l-0.35,-0.59l0.16,-1.75l-1.48,-2.54l-0.62,-0.43l-0.0,-7.1l2.08,-0.08l0.39,-0.4l0.07,-8.9l5.19,-0.93l0.8,0.89l0.51,0.07l1.5,-0.95l2.21,-0.49Z", "name": "Botswana"}, "BR": {"path": "M259.98,275.05l3.24,0.7l0.65,-0.53l4.55,-1.32l1.08,-1.06l-0.02,-0.63l0.55,-0.05l0.28,0.28l-0.26,0.87l0.22,0.48l0.73,0.32l0.4,0.81l-0.62,0.86l-0.4,2.13l0.82,2.56l1.69,1.43l1.43,0.2l3.17,-1.68l3.18,0.3l0.65,-0.75l-0.27,-0.92l1.9,-0.09l2.39,0.99l1.06,-0.61l0.84,0.78l1.2,-0.18l1.18,-1.06l0.84,-1.94l1.36,-2.11l0.37,-0.05l1.89,5.45l1.33,0.59l0.05,1.28l-1.77,1.94l0.02,0.56l1.02,0.87l4.07,0.36l0.08,2.16l0.66,0.29l1.74,-1.5l6.97,2.32l1.02,1.22l-0.35,1.18l0.49,0.5l2.81,-0.74l4.77,1.3l3.75,-0.08l3.57,2.0l3.29,2.86l1.93,0.72l2.12,0.12l0.71,0.62l1.21,4.51l-0.95,3.98l-4.72,5.06l-1.64,2.92l-1.72,2.05l-0.8,0.3l-0.72,2.03l0.18,4.75l-0.94,5.53l-0.81,1.13l-0.43,3.36l-2.55,3.5l-0.4,2.51l-1.86,1.04l-0.67,1.53l-2.54,0.01l-3.94,1.01l-1.83,1.2l-2.87,0.82l-3.03,2.19l-2.2,2.83l-0.36,2.0l0.4,1.58l-0.44,2.6l-0.51,1.2l-1.77,1.54l-2.75,4.78l-3.83,3.42l-1.24,2.74l-1.18,1.15l-0.36,-0.83l0.95,-1.14l0.01,-0.5l-1.52,-1.97l-4.56,-3.32l-1.03,-0.0l-2.38,-2.02l-0.81,-0.0l5.34,-5.45l3.77,-2.58l0.22,-2.46l-1.35,-1.81l-0.91,0.07l0.58,-2.33l0.01,-1.54l-1.11,-0.83l-1.75,0.3l-0.44,-3.11l-0.52,-0.95l-1.88,-0.88l-1.24,0.47l-2.17,-0.41l0.15,-3.21l-0.62,-1.34l0.66,-0.73l-0.22,-1.34l0.66,-1.13l0.44,-2.04l-0.61,-1.83l-1.4,-0.86l-0.2,-0.75l0.34,-1.39l-0.38,-0.5l-4.52,-0.1l-0.72,-2.22l0.59,-0.42l-0.03,-1.1l-0.5,-0.87l-0.32,-1.7l-1.45,-0.76l-1.63,-0.02l-1.05,-0.72l-1.6,-0.48l-1.13,-0.99l-2.69,-0.4l-2.47,-2.06l0.13,-4.35l-0.45,-0.45l-3.46,0.5l-3.44,1.94l-0.6,0.74l-2.9,-0.17l-1.47,0.42l-0.72,-0.18l0.15,-3.52l-0.63,-0.34l-1.94,1.41l-1.87,-0.06l-0.83,-1.18l-1.37,-0.26l0.21,-1.01l-1.35,-1.49l-0.88,-1.91l0.56,-0.6l-0.0,-0.81l1.29,-0.62l0.22,-0.43l-0.22,-1.19l0.61,-0.91l0.15,-0.99l2.65,-1.58l1.99,-0.47l0.42,-0.36l2.06,0.11l0.42,-0.33l1.19,-8.0l-0.41,-1.56l-1.1,-1.0l0.01,-1.33l1.91,-0.42l0.08,-0.96l-0.33,-0.43l-1.14,-0.2l-0.02,-0.83l4.47,0.05l0.82,-0.67l0.82,1.81l0.8,0.07l1.15,1.1l2.26,-0.05l0.71,-0.83l2.78,-0.96l0.48,-1.13l1.6,-0.64l0.24,-0.47l-0.48,-0.82l-1.83,-0.19l-0.36,-3.22Z", "name": "Brazil"}, "BS": {"path": "M226.4,223.87l-0.48,-1.15l-0.84,-0.75l0.36,-1.11l0.95,1.95l0.01,1.06ZM225.56,216.43l-1.87,0.29l-0.04,-0.22l0.74,-0.14l1.17,0.06Z", "name": "Bahamas"}, "BY": {"path": "M493.84,128.32l0.29,0.7l0.49,0.23l1.19,-0.38l2.09,0.72l0.19,1.26l-0.45,1.24l1.57,2.26l0.89,0.59l0.17,0.81l1.58,0.56l0.4,0.5l-0.53,0.41l-1.87,-0.11l-0.73,0.38l-0.13,0.52l1.04,2.74l-1.91,0.26l-0.89,0.99l-0.11,1.18l-2.73,-0.04l-0.53,-0.62l-0.52,-0.08l-0.75,0.46l-0.91,-0.42l-1.92,-0.07l-2.75,-0.79l-2.6,-0.28l-2.0,0.07l-1.5,0.92l-0.67,0.07l-0.08,-1.22l-0.59,-1.19l1.36,-0.88l0.01,-1.35l-0.7,-1.41l-0.07,-1.0l2.16,-0.02l2.72,-1.3l0.75,-2.04l1.91,-1.04l0.2,-0.41l-0.19,-1.25l3.8,-1.78l2.3,0.77Z", "name": "Belarus"}, "BZ": {"path": "M198.03,244.38l0.1,-4.49l0.69,-0.06l0.74,-1.3l0.34,0.28l-0.4,1.3l0.17,0.58l-0.34,2.25l-1.3,1.42Z", "name": "Belize"}, "RU": {"path": 
vendor: 7,075 bytes, line 29409
29409"M491.55,115.25l2.55,-1.85l-0.01,-0.65l-2.2,-1.5l7.32,-6.76l1.03,-2.11l-0.13,-0.49l-3.46,-2.52l0.86,-2.7l-2.11,-2.81l1.56,-3.67l-2.77,-4.52l2.15,-2.99l-0.08,-0.55l-3.65,-2.73l0.3,-2.54l1.81,-0.37l4.26,-1.77l2.42,-1.45l4.06,2.61l6.79,1.04l9.34,4.85l1.78,1.88l0.14,2.46l-2.55,2.02l-3.9,1.06l-11.07,-3.14l-2.06,0.53l-0.13,0.7l3.94,2.94l0.31,5.86l0.26,0.36l5.14,2.24l0.58,-0.29l0.32,-1.94l-1.35,-1.78l1.13,-1.09l6.13,2.42l2.11,-0.98l0.18,-0.56l-1.51,-2.67l5.41,-3.76l2.07,0.22l2.26,1.41l0.57,-0.16l1.46,-2.87l-0.05,-0.44l-1.92,-2.32l1.12,-2.32l-1.32,-2.27l5.87,1.16l1.04,1.75l-2.59,0.43l-0.33,0.4l0.02,2.36l2.46,1.83l3.87,-0.91l0.86,-2.8l13.69,-5.65l0.99,0.11l-1.92,2.06l0.23,0.67l3.11,0.45l2.0,-1.48l4.56,-0.12l3.64,-1.73l2.65,2.44l0.56,-0.01l2.85,-2.88l-0.01,-0.57l-2.35,-2.29l0.9,-1.01l7.14,1.3l3.41,1.36l9.05,4.97l0.51,-0.11l1.67,-2.27l-0.05,-0.53l-2.43,-2.21l-0.06,-0.78l-0.34,-0.36l-2.52,-0.36l0.64,-1.93l-1.32,-3.46l-0.06,-1.21l4.48,-4.06l1.69,-4.29l1.6,-0.81l6.23,1.18l0.44,2.21l-2.29,3.64l0.06,0.5l1.47,1.39l0.76,3.0l-0.56,6.03l2.69,2.82l-0.96,2.57l-4.86,5.95l0.23,0.64l2.86,0.61l0.42,-0.17l0.93,-1.4l2.64,-1.03l0.87,-2.24l2.09,-1.96l0.07,-0.5l-1.36,-2.28l1.09,-2.69l-0.32,-0.55l-2.47,-0.33l-0.5,-2.06l1.94,-4.38l-0.06,-0.42l-2.96,-3.4l4.12,-2.88l0.16,-0.4l-0.51,-2.93l0.54,-0.05l1.13,2.25l-0.96,4.35l0.27,0.47l2.68,0.84l0.5,-0.51l-1.02,-2.99l3.79,-1.66l5.01,-0.24l4.53,2.61l0.48,-0.06l0.07,-0.48l-2.18,-3.82l-0.23,-4.67l3.98,-0.9l5.97,0.21l5.49,-0.64l0.27,-0.65l-1.83,-2.31l2.56,-2.9l2.87,-0.17l4.8,-2.47l6.54,-0.67l1.03,-1.42l6.25,-0.45l2.32,1.11l5.53,-2.7l4.5,0.08l0.39,-0.28l0.66,-2.15l2.26,-2.12l5.69,-2.11l3.21,1.29l-2.46,0.94l-0.25,0.42l0.34,0.35l5.41,0.77l0.61,2.33l0.58,0.25l2.2,-1.22l7.13,0.07l5.51,2.47l1.79,1.72l-0.53,2.24l-9.16,4.15l-1.97,1.52l0.16,0.71l6.77,1.91l2.16,-0.78l1.13,2.74l0.67,0.11l1.01,-1.15l3.81,-0.73l7.7,0.77l0.54,1.99l0.36,0.29l10.47,0.71l0.43,-0.38l0.13,-3.23l4.87,0.78l3.95,-0.02l3.83,2.4l1.03,2.71l-1.35,1.79l0.02,0.5l3.15,3.64l4.07,1.96l0.53,-0.18l2.23,-4.47l3.95,1.93l4.16,-1.21l4.73,1.39l2.05,-1.26l3.94,0.62l0.43,-0.55l-1.68,-4.02l2.89,-1.8l22.31,3.03l2.16,2.75l6.55,3.51l10.29,-0.81l4.82,0.73l1.85,1.66l-0.29,3.08l0.25,0.41l3.08,1.26l3.56,-0.88l4.35,-0.11l4.8,0.87l4.57,-0.47l4.23,3.79l0.43,0.07l3.1,-1.4l0.16,-0.6l-1.88,-2.62l0.85,-1.52l7.71,1.21l5.22,-0.26l7.09,2.09l9.59,5.22l6.35,4.11l-0.2,2.38l1.88,1.41l0.6,-0.42l-0.48,-2.53l6.15,0.57l4.4,3.51l-1.97,1.43l-4.0,0.41l-0.36,0.39l-0.06,3.79l-0.74,0.62l-2.07,-0.11l-1.91,-1.39l-3.14,-1.11l-0.78,-1.85l-2.72,-0.68l-2.63,0.49l-1.04,-1.1l0.46,-1.31l-0.5,-0.51l-3.0,0.98l-0.22,0.58l0.99,1.7l-1.21,1.48l-3.04,1.68l-3.12,-0.28l-0.4,0.23l0.09,0.46l2.2,2.09l1.46,3.2l1.15,1.1l0.24,1.33l-0.42,0.67l-4.63,-0.77l-6.96,2.9l-2.19,0.44l-7.6,5.06l-0.84,1.45l-3.61,-2.37l-6.24,2.82l-0.94,-1.15l-0.53,-0.08l-2.28,1.52l-3.2,-0.49l-0.44,0.27l-0.78,2.37l-3.05,3.78l0.09,1.47l0.29,0.36l2.54,0.72l-0.29,4.53l-1.97,0.11l-0.35,0.26l-1.07,2.94l0.8,1.45l-3.91,1.58l-1.05,3.95l-3.48,0.77l-0.3,0.3l-0.72,3.29l-3.09,2.65l-0.7,-1.74l-2.44,-12.44l1.16,-4.71l2.04,-2.06l0.22,-1.64l3.8,-0.86l4.46,-4.61l4.28,-3.81l4.48,-3.01l2.17,-5.63l-0.42,-0.54l-3.04,0.33l-1.77,3.31l-5.86,3.86l-1.86,-4.25l-0.45,-0.23l-6.46,1.3l-6.47,6.44l-0.01,0.55l1.58,1.74l-8.24,1.17l0.15,-2.2l-0.34,-0.42l-3.89,-0.56l-3.25,1.81l-7.62,-0.62l-8.45,1.19l-17.71,15.41l0.22,0.7l3.74,0.41l1.36,2.17l2.43,0.76l1.88,-1.68l2.4,0.2l3.4,3.54l0.08,2.6l-1.95,3.42l-0.21,3.9l-1.1,5.06l-3.71,4.54l-0.87,2.21l-8.29,8.89l-3.19,1.7l-1.32,0.03l-1.45,-1.36l-0.49,-0.04l-2.27,1.5l0.41,-3.65l-0.59,-2.47l1.75,-0.89l2.91,0.53l0.42,-0.2l1.68,-3.03l0.87,-3.46l0.97,-1.18l1.32,-2.88l-0.45,-0.56l-4.14,0.95l-2.19,1.25l-3.41,-0.0l-1.06,-2.93l-2.97,-2.3l-4.28,-1.06l-1.75,-5.07l-2.66,-5.01l-2.29,-1.29l-3.75,-1.01l-3.44,0.08l-3.18,0.62l-2.24,1.77l0.05,0.66l1.18,0.69l0.02,1.43l-1.33,1.05l-2.26,3.51l-0.04,1.43l-3.16,1.84l-2.82,-1.16l-3.01,0.23l-1.35,-1.07l-1.5,-0.35l-3.9,2.31l-3.22,0.52l-2.27,0.79l-3.05,-0.51l-2.21,0.03l-1.48,-1.6l-2.6,-1.63l-2.63,-0.43l-5.46,1.01l-3.23,-1.25l-0.72,-2.57l-5.2,-1.24l-2.75,-1.36l-0.5,0.12l-2.59,3.45l0.84,2.1l-2.06,1.93l-3.41,-0.77l-2.42,-0.12l-1.83,-1.54l-2.53,-0.05l-2.42,-0.98l-3.86,1.57l-4.72,2.78l-3.3,0.75l-1.55,-1.92l-3.0,0.41l-1.11,-1.33l-1.62,-0.59l-1.31,-1.94l-1.38,-0.6l-3.7,0.79l-3.31,-1.83l-0.51,0.11l-0.99,1.29l-5.29,-8.05l-2.96,-2.48l0.65,-0.77l0.01,-0.51l-0.5,-0.11l-6.2,3.21l-1.84,0.15l0.15,-1.39l-0.26,-0.42l-3.22,-1.17l-2.46,0.7l-0.69,-3.16l-0.32,-0.31l-4.5,-0.75l-2.47,1.47l-6.19,1.27l-1.29,0.86l-9.51,1.3l-1.15,1.17l-0.03,0.53l1.47,1.9l-1.89,0.69l-0.22,0.56l0.31,0.6l-2.11,1.44l0.03,0.68l3.75,2.12l-0.39,0.98l-3.23,-0.13l-0.86,0.86l-3.09,-1.59l-3.97,0.07l-2.66,1.35l-8.32,-3.56l-4.07,0.06l-5.39,3.68l-0.39,2.0l-2.03,-1.5l-0.59,0.13l-2.0,3.59l0.57,0.93l-1.28,2.16l0.06,0.48l2.13,2.17l1.95,0.04l1.37,1.82l-0.23,1.46l0.25,0.43l0.83,0.33l-0.8,1.31l-2.49,0.62l-2.49,3.2l0.0,0.49l2.17,2.78l-0.15,2.18l2.5,3.24l-1.58,1.59l-0.7,-0.13l-1.63,-1.72l-2.29,-0.84l-0.94,-1.31l-2.34,-0.63l-1.48,0.4l-0.43,-0.47l-3.51,-1.48l-5.76,-1.01l-0.45,0.19l-2.89,-2.34l-2.9,-1.2l-1.53,-1.29l1.29,-0.43l2.08,-2.61l-0.05,-0.55l-0.89,-0.79l3.05,-1.06l0.27,-0.42l-0.07,-0.69l-0.49,-0.35l-1.73,0.39l0.04,-0.68l1.04,-0.72l2.66,-0.48l0.4,-1.32l-0.5,-1.6l0.92,-1.54l0.03,-1.17l-0.29,-0.37l-3.69,-1.06l-1.41,0.02l-1.42,-1.41l-2.19,0.38l-2.77,-1.01l-0.03,-0.59l-0.89,-1.43l-2.0,-0.32l-0.11,-0.54l0.49,-0.53l0.01,-0.53l-1.6,-1.9l-3.58,0.02l-0.88,0.73l-0.46,-0.07l-1.0,-2.79l2.22,-0.02l0.97,-0.74l0.07,-0.57l-0.9,-1.04l-1.35,-0.48l-0.11,-0.7l-0.95,-0.58l-1.38,-1.99l0.46,-0.98l-0.51,-1.96l-2.45,-0.84l-1.21,0.3l-0.46,-0.76l-2.46,-0.83l-0.72,-1.87l-0.21,-1.69l-0.99,-0.85l0.85,-1.17l-0.7,-3.21l1.66,-1.97l-0.16,-0.79ZM749.2,170.72l-0.6,0.4l-0.13,0.16l-0.01,-0.51l0.74,-0.05ZM874.85,67.94l-5.63,0.48l-0.26,-0.84l3.15,-1.89l1.94,0.01l3.19,1.16l-2.39,1.09ZM797.39,48.49l-2.0,1.36l-3.8,-0.42l-4.25,-1.8l0.35,-0.97l9.69,1.83ZM783.67,46.12l-1.63,3.09l-8.98,-0.13l-4.09,1.14l-4.54,-2.97l1.16,-3.01l3.05,-0.89l6.5,0.22l8.54,2.56ZM778.2,134.98l-0.56,-0.9l0.27,-0.12l0.29,1.01ZM778.34,135.48l0.94,3.53l-0.05,3.38l1.05,3.39l2.18,5.0l-2.89,-0.83l-0.49,0.26l-1.54,4.65l2.42,3.5l-0.04,1.13l-1.24,-1.24l-0.61,0.06l-1.09,1.61l-0.28,-1.61l0.27,-3.1l-0.28,-3.4l0.58,-2.47l0.11,-4.39l-1.46,-3.36l0.21,-4.32l2.15,-1.46l0.07,-0.34ZM771.95,56.61l1.76,-1.42l2.89,-0.42l3.28,1.71l0.14,0.6l-3.27,0.03l-4.81,-0.5ZM683.76,31.09l-13.01,1.93l4.03,-6.35l1.82,-0.56l1.73,0.34l5.99,2.98l-0.56,1.66ZM670.85,27.93l-5.08,0.64l-6.86,-1.57l-3.99,-2.05l-2.1,-4.16l-2.6,-0.87l5.72,-3.5l5.2,-1.28l4.69,2.85l5.59,5.4l-0.56,4.53ZM564.15,68.94l-0.64,0.17l-7.85,-0.57l-0.86,-2.04l-4.28,-1.17l-0.28,-1.94l2.27,-0.89l0.25,-0.39l-0.08,-2.38l4.81,-3.97l-0.15,-0.7l-1.47,-0.38l5.3,-3.81l0.15,-0.44l-0.58,-1.94l5.28,-2.51l8.21,-3.27l8.28,-0.96l4.35,-1.94l4.6,-0.64l1.36,1.61l-1.34,1.28l-16.43,4.94l-7.97,4.88l-7.74,9.63l0.66,4.14l4.16,3.27ZM548.81,18.48l-5.5,1.18l-0.58,1.02l-2.59,0.84l-2.13,-1.07l1.12,-1.42l-0.3,-0.65l-2.33,-0.07l1.68,-0.36l3.47,-0.06l0.42,1.29l0.66,0.16l1.38,-1.34l2.15,-0.88l2.94,1.01l-0.39,0.36ZM477.37,133.15l-4.08,0.05l-2.56,-0.32l0.33,-0.87l3.17,-1.03l3.24,0.96l-0.09,1.23Z",
29409 "name": "Russia"}, "RW": {"path": "M497.0,288.25l0.71,1.01l-0.11,1.09l-1.63,0.03l-1.04,1.39l-0.83,-0.11l0.51,-1.2l0.08,-1.34l0.42,-0.41l0.7,0.14l1.19,-0.61Z", "name": "Rwanda"}, "RS": {"path": "M469.4,163.99l0.42,-0.5l-0.01,-0.52l-1.15,-1.63l1.43,-0.62l1.33,0.12l1.17,1.06l0.46,1.13l1.34,0.64l0.35,1.35l1.46,0.9l0.76,-0.29l0.2,0.69l-0.48,0.78l0.22,1.12l1.05,1.22l-0.77,0.8l-0.37,1.52l-1.21,0.08l0.24,-0.64l-0.39,-0.54l-2.08,-1.64l-0.9,0.05l-0.48,0.94l-2.12,-1.37l0.53,-1.6l-1.11,-1.37l0.51,-1.1l-0.41,-0.57Z", "name": "Serbia"}, "LT": {"path": "M486.93,129.3l0.17,1.12l-1.81,0.98l-0.72,2.02l-2.47,1.18l-2.1,-0.02l-0.73,-1.05l-1.06,-0.3l-0.09,-1.87l-3.56,-1.13l-0.43,-2.36l2.48,-0.94l4.12,0.22l2.25,-0.31l0.52,0.69l1.24,0.21l2.19,1.56Z", "name": "Lithuania"}, "LU": {"path": "M436.08,149.45l-0.48,-0.07l0.3,-1.28l0.27,0.4l-0.09,0.96Z", "name": "Luxembourg"}, "LR": {"path": "M399.36,265.97l0.18,1.54l-0.48,0.99l0.08,0.47l2.47,1.8l-0.33,2.8l-2.65,-1.13l-5.78,-4.61l0.58,-1.32l2.1,-2.33l0.86,-0.22l0.77,1.14l-0.14,0.85l0.59,0.87l1.0,0.14l0.76,-0.99Z", "name": "Liberia"}, "RO": {"path": "M487.53,154.23l0.6,0.24l2.87,3.98l-0.17,2.69l0.45,1.42l1.32,0.81l1.35,-0.42l0.76,0.36l0.02,0.31l-0.83,0.45l-0.59,-0.22l-0.54,0.3l-0.62,3.3l-1.0,-0.22l-2.07,-1.13l-2.95,0.71l-1.25,0.76l-3.51,-0.15l-1.89,-0.47l-0.87,0.16l-0.82,-1.3l0.29,-0.26l-0.06,-0.64l-1.09,-0.34l-0.56,0.5l-1.05,-0.64l-0.39,-1.39l-1.36,-0.65l-0.35,-1.0l-0.83,-0.75l1.54,-0.54l2.66,-4.21l2.4,-1.24l2.96,0.34l1.48,0.73l0.79,-0.45l1.78,-0.3l0.75,-0.74l0.79,0.0Z", "name": "Romania"}, "GW": {"path": "M386.23,253.6l-0.29,0.84l0.15,0.6l-2.21,0.59l-0.86,0.96l-1.04,-0.83l-1.09,-0.23l-0.54,-1.06l-0.66,-0.49l2.41,-0.48l4.13,0.1Z", "name": "Guinea-Bissau"}, "GT": {"path": "M195.08,249.77l-2.48,-0.37l-1.03,-0.45l-1.14,-0.89l0.3,-0.99l-0.24,-0.68l0.96,-1.66l2.98,-0.01l0.4,-0.37l-0.19,-1.28l-1.67,-1.4l0.51,-0.4l0.0,-1.05l3.85,0.02l-0.21,4.53l0.4,0.43l1.46,0.38l-1.48,0.98l-0.35,0.7l0.12,0.57l-2.2,1.96Z", "name": "Guatemala"}, "GR": {"path": "M487.07,174.59l-0.59,1.43l-0.37,0.21l-2.84,-0.35l-3.03,0.77l-0.18,0.68l1.28,1.23l-0.61,0.23l-1.
2940914,0.0l-1.2,-1.39l-0.63,0.03l-0.53,1.01l0.56,1.76l1.03,1.19l-0.56,0.38l-0.05,0.62l2.52,2.12l0.02,0.87l-1.78,-0.59l-0.48,0.56l0.5,1.0l-1.07,0.2l-0.3,0.53l0.75,2.01l-0.98,0.02l-1.84,-1.12l-1.37,-4.2l-2.21,-2.95l-0.11,-0.56l1.04,-1.28l0.2,-0.95l0.85,-0.66l0.03,-0.46l1.32,-0.21l1.01,-0.64l1.22,0.05l0.65,-0.56l2.26,-0.0l1.82,-0.75l1.85,1.0l2.28,-0.28l0.35,-0.39l0.01,-0.77l0.34,0.22ZM480.49,192.16l0.58,0.4l-0.68,-0.12l0.11,-0.28ZM482.52,192.82l2.51,0.06l0.24,0.32l-1.99,0.13l-0.77,-0.51Z", "name": "Greece"}, "GQ": {"path": "M448.79,279.62l0.02,2.22l-4.09,0.0l0.69,-2.27l3.38,0.05Z", "name": "Eq. Guinea"}, "GY": {"path": "M277.42,270.07l-0.32,1.83l-1.32,0.57l-0.23,0.46l-0.28,2.0l1.11,1.82l0.83,0.19l0.32,1.25l1.13,1.62l-1.21,-0.19l-1.08,0.71l-1.77,0.5l-0.44,0.46l-0.86,-0.09l-1.32,-1.01l-0.77,-2.27l0.36,-1.9l0.68,-1.23l-0.57,-1.17l-0.74,-0.43l0.12,-1.16l-0.9,-0.69l-1.1,0.09l-1.31,-1.48l0.53,-0.72l-0.04,-0.84l1.99,-0.86l0.05,-0.59l-0.71,-0.78l0.14,-0.57l1.66,-1.24l1.36,0.77l1.41,1.49l0.06,1.15l0.37,0.38l0.8,0.05l2.06,1.86Z", "name": "Guyana"}, "GE": {"path": "M521.71,168.93l5.29,0.89l4.07,2.01l1.41,-0.44l2.07,0.56l0.68,1.1l1.07,0.55l-0.12,0.59l0.98,1.29l-1.01,-0.13l-1.81,-0.83l-0.94,0.47l-3.23,0.43l-2.29,-1.39l-2.33,0.05l0.21,-0.97l-0.76,-2.26l-1.45,-1.12l-1.43,-0.39l-0.41,-0.42Z", "name": "Georgia"}, "GB": {"path": "M412.61,118.72l-2.19,3.22l-0.0,0.45l5.13,-0.3l-0.53,2.37l-2.2,3.12l0.29,0.63l2.37,0.21l2.33,4.3l1.76,0.69l2.2,5.12l2.94,0.77l-0.23,1.62l-1.15,0.88l-0.1,0.52l0.82,1.42l-1.86,1.43l-3.3,-0.02l-4.12,0.87l-1.04,-0.58l-0.47,0.06l-1.51,1.41l-2.12,-0.34l-1.86,1.18l-0.6,-0.29l3.19,-3.0l2.16,-0.69l0.28,-0.41l-0.34,-0.36l-3.73,-0.53l-0.4,-0.76l2.2,-0.87l0.17,-0.61l-1.26,-1.67l0.36,-1.7l3.38,0.28l0.43,-0.33l0.37,-1.99l-1.79,-2.49l-3.11,-0.72l-0.38,-0.59l0.79,-1.35l-0.04,-0.46l-0.82,-0.97l-0.61,0.01l-0.68,0.84l-0.1,-2.34l-1.23,-1.88l0.85,-3.47l1.77,-2.68l1.85,0.26l2.17,-0.22ZM406.26,132.86l-1.01,1.77l-1.57,-0.59l-1.16,0.01l0.37,-1.54l-0.39,-1.39l1.45,-0.1l2.3,1.84Z", "name": "United Kingdom"}, "GA": {"path": "M453.24,279.52l-0.08,0.98l0.7,1.29l2.36,0.24l-0.98,2.63l1.18,1.79l0.25,1.78l-0.29,1.52l-0.6,0.93l-1.84,-0.09l-1.23,-1.11l-0.66,0.23l-0.15,0.84l-1.42,0.26l-1.02,0.7l-0.11,0.52l0.77,1.35l-1.34,0.97l-3.94,-4.3l-1.44,-2.45l0.06,-0.6l0.54,-0.81l1.05,-3.46l4.17,-0.07l0.4,-0.4l-0.02,-2.66l2.39,0.21l1.25,-0.27Z", "name": "Gabon"}
29409, "GN": {"path": "M391.8,254.11l0.47,0.8l1.11,-0.32l0.98,0.7l1.07,0.2l2.26,-1.22l0.64,0.44l1.13,1.56l-0.48,1.4l0.8,0.3l-0.08,0.48l0.46,0.68l-0.35,1.36l1.05,2.61l-1.0,0.69l0.03,1.41l-0.72,-0.06l-1.08,1.0l-0.24,-0.27l0.07,-1.11l-1.05,-1.54l-1.79,0.21l-0.35,-2.01l-1.6,-2.18l-2.0,-0.0l-1.31,0.54l-1.95,2.18l-1.86,-2.19l-1.2,-0.78l-0.3,-1.11l-0.8,-0.85l0.65,-0.72l0.81,-0.03l1.64,-0.8l0.23,-1.87l2.67,0.64l0.89,-0.3l1.21,0.15Z", "name": "Guinea"}, "GM": {"path": "M379.31,251.39l0.1,-0.35l2.43,-0.07l0.74,-0.61l0.51,-0.03l0.77,0.49l-1.03,-0.3l-1.87,0.9l-1.65,-0.04ZM384.03,250.91l0.91,0.05l0.75,-0.24l-0.59,0.31l-1.08,-0.13Z", "name": "Gambia"}, "GL": {"path": "M353.02,1.2l14.69,4.67l-3.68,1.89l-22.97,0.86l-0.36,0.27l0.12,0.43l1.55,1.18l8.79,-0.66l7.48,2.07l4.86,-1.77l1.66,1.73l-2.53,3.19l-0.01,0.48l0.46,0.15l6.35,-2.2l12.06,-2.31l7.24,1.13l1.09,1.99l-9.79,4.01l-1.44,1.32l-7.87,0.98l-0.35,0.41l0.38,0.38l5.07,0.24l-2.53,3.58l-2.07,3.81l0.08,6.05l2.57,3.11l-3.22,0.2l-4.12,1.66l-0.05,0.72l4.45,2.65l0.51,3.75l-2.3,0.4l-0.25,0.64l2.79,3.69l-4.82,0.31l-0.36,0.29l0.16,0.44l2.62,1.8l-0.59,1.22l-3.3,0.7l-3.45,0.01l-0.29,0.68l3.03,3.12l0.02,1.34l-4.4,-1.73l-1.72,1.35l0.15,0.66l3.31,1.15l3.13,2.71l0.81,3.16l-3.85,0.75l-4.89,-4.26l-0.47,-0.03l-0.17,0.44l0.79,2.86l-2.71,2.21l-0.13,0.44l0.37,0.27l8.73,0.34l-12.32,6.64l-7.24,1.48l-2.94,0.08l-2.69,1.75l-3.43,4.41l-5.24,2.84l-1.73,0.18l-7.12,2.1l-2.15,2.52l-0.13,2.99l-1.19,2.45l-4.01,3.09l-0.14,0.44l0.97,2.9l-2.28,6.48l-3.1,0.2l-3.83,-3.07l-4.86,-0.02l-2.25,-1.93l-1.7,-3.79l-4.3,-4.84l-1.21,-2.49l-0.44,-3.8l-3.32,-3.63l0.84,-2.86l-1.56,-1.7l2.28,-4.6l3.83,-1.74l1.03,-1.96l0.52,-3.47l-0.59,-0.41l-4.17,2.21l-2.07,0.58l-2.72,-1.28l-0.15,-2.71l0.85,-2.09l2.01,-0.06l5.06,1.2l0.46,-0.23l-0.14,-0.49l-6.54,-4.47l-2.67,0.55l-1.58,-0.86l2.56,-4.01l-0.03,-0.48l-1.5,-1.74l-4.98,-8.5l-3.13,-1.96l0.03,-1.88l-0.24,-0.37l-6.85,-3.02l-5.36,-0.38l-12.7,0.58l-2.78,-1.57l-3.66,-2.77l5.73,-1.45l5.0,-0.28l0.38,-0.38l-0.35,-0.41l-10.67,-1.38l-5.3,-2.06l0.25,-1.54l18.41,-5.26l1.22,-2.27l-0.25,-0.55l-6.14,-1.86l1.68,-1.77l8.55,-4.03l3.59,-0.63l0.3,-0.54l-0.88,-2.27l5.47,-1.47l7.65,-0.95l7.55,-0.05l3.04,1.85l6.48,-3.27l5.81,2.22l3.56,0.5l5.16,1.94l0.5,-0.21l-0.17,-0.52l-5.71,-3.13l0.28,-2.13l8.12,-3.6l8.7,0.28l3.35,-2.34l8.71,-0.6l19.93,0.8Z", "name": "Greenland"}, "KW": {"path": "M540.81,207.91l0.37,0.86l-0.17,0.76l0.6,1.53l-0.95,0.04l-0.82,-1.28l-1.57,-0.18l1.31,-1.88l1.22,0.17Z", "name": "Kuwait"}, "GH": {"path": "M420.53,257.51l-0.01,0.72l0.96,1.2l0.24,3.73l0.59,0.95l-0.51,2.1l0.19,1.41l1.02,2.21l-6.97,2.84l-1.8,-0.57l0.04,-0.89l-1.02,-2.04l0.61,-2.65l1.07,-2.32l-0.96,-6.47l5.01,0.07l0.94,-0.39l0.61,0.11Z", "name": "Ghana"}, "OM": {"path": "M568.09,230.93l-0.91,1.67l-1.22,0.04l-0.6,0.76l-0.41,1.51l0.27,1.58l-1.16,0.05l-1.56,0.97l-0.76,1.74l-1.62,0.05l-0.98,0.65l-0.17,1.15l-0.89,0.52l-1.49,-0.18l-2.4,0.94l-2.47,-5.4l7.35,-2.71l1.67,-5.23l-1.12,-2.09l0.05,-0.83l0.67,-1.0l0.07,-1.05l0.9,-0.42l-0.05,-2.07l0.7,-0.01l1.0,1.62l1.51,1.08l3.3,0.84l1.73,2.29l0.81,0.37l-1.23,2.35l-0.99,0.79Z", "name": "Oman"}, "_2": {"path": "M531.15,258.94l1.51,0.12l5.13,-0.95l5.3,-1.48l-0.01,4.4l-2.67,3.39l-1.85,0.01l-8.04,-2.94l-2.55,-3.17l1.12,-1.71l2.04,2.34Z", "name": "Somaliland"}, "_1": {"path": "M472.77,172.64l-1.08,-1.29l0.96,-0.77l0.29,-0.83l1.98,1.64l-0.36,0.67l-1.79,0.58Z", "name": "Kosovo"}, "_0": {"path": "M504.91,192.87l0.34,0.01l0.27,-0.07l-0.29,0.26l-0.31,-0.2Z", "name": "N. Cyprus"}, "JO": {"path": "M518.64,201.38l-5.14,1.56l-0.19,0.65l2.16,2.39l-0.89,1.14l-1.71,0.34l-1.71,1.8l-2.34,-0.37l1.21,-4.32l0.56,-4.07l2.8,0.94l4.46,-2.71l0.79,2.66Z", "name": "Jordan"}, "HR": {"path": "M455.59,162.84l1.09,0.07l-0.82,0.94l-0.27,-1.01ZM456.96,162.92l0.62,-0.41l1.73,0.45l0.42,-0.4l-0.01,-0.59l0.86,-0.52l0.2,-1.05l1.63,-0.68l2.57,1.68l2.07,0.6l0.87,-0.31l1.05,1.57l-0.52,0.63l-1.05,-0.56l-1.68,0.04l-2.1,-0.5l-1.29,0.06l-0.57,0.49l-0.59,-0.47l-0.62,0.16l-0.46,1.7l1.79,2.42l2.79,2.75l-1.18,-0.87l-2.21,-0.87l-1.67,-1.78l0.13,-0.63l-1.05,-1.19l-0.32,-1.27l-1.42,-0.43Z", "name": "Croatia"}, "HT": {"path": "M237.05,238.38l-1.16,0.43l-0.91,-0.55l0.05,-0.2l2.02,0.31ZM237.53,238.43l1.06,0.12l-0.05,0.01l-1.
2940901,-0.12ZM239.25,238.45l0.79,-0.51l0.06,-0.62l-1.02,-1.0l0.02,-0.82l-0.3,-0.4l-0.93,-0.32l3.16,0.45l0.02,1.84l-0.48,0.34l-0.08,0.58l0.54,0.72l-1.78,-0.26Z", "name": "Haiti"}, "HU": {"path": "M462.08,157.89l0.65,-1.59l-0.09,-0.44l0.64,-0.0l0.39,-0.34l0.1,-0.69l1.75,0.87l2.32,-0.37l0.43,-0.66l3.49,-0.78l0.69,-0.78l0.57,-0.14l2.57,0.93l0.67,-0.23l1.03,0.65l0.08,0.37l-1.42,0.71l-2.59,4.14l-1.8,0.53l-1.68,-0.1l-2.74,1.23l-1.85,-0.54l-2.54,-1.66l-0.66,-1.1Z", "name": "Hungary"}, "HN": {"path": "M199.6,249.52l-1.7,-1.21l0.06,-0.94l3.04,-2.14l2.37,0.28l1.27,-0.09l1.1,-0.52l1.3,0.28l1.14,-0.25l1.38,0.37l2.23,1.37l-2.36,0.93l-1.23,-0.39l-0.88,1.3l-1.28,0.99l-0.98,-0.22l-0.42,0.52l-0.96,0.05l-0.36,0.41l0.04,0.88l-0.52,0.6l-0.3,0.04l-0.3,-0.55l-0.66,-0.31l0.11,-0.67l-0.48,-0.65l-0.87,-0.26l-0.73,0.2Z", "name": "Honduras"}, "PR": {"path": "M256.17,238.73l-0.26,0.27l-2.83,0.05l-0.07,-0.55l1.95,-0.1l1.22,0.33Z", "name": "Puerto Rico"}, "PS": {"path": "M509.21,203.07l0.1,-0.06l-0.02,0.03l-0.09,0.03ZM509.36,202.91l-0.02,-0.63l-0.33,-0.16l0.31,-1.09l0.24,0.1l-0.2,1.78Z", "name": "Palestine"}, "PT": {"path": "M401.84,187.38l-0.64,0.47l-1.13,-0.35l-0.91,0.17l0.28,-1.78l-0.24,-1.78l-1.25,-0.56l-0.45,-0.84l0.17,-1.66l1.01,-1.18l0.69,-2.92l-0.04,-1.39l-0.59,-1.9l1.3,-0.85l0.84,1.35l3.1,-0.3l0.46,0.99l-1.05,0.94l-0.03,2.16l-0.41,0.57l-0.08,1.1l-0.79,0.18l-0.26,0.59l0.91,1.6l-0.63,1.75l0.76,1.09l-1.1,1.52l0.07,1.05Z", "name": "Portugal"}, "PY": {"path": "M274.9,336.12l0.74,1.52l-0.16,3.45l0.32,0.41l2.64,0.5l1.11,-0.47l1.4,0.59l0.36,0.6l0.53,3.42l1.27,0.4l0.98,-0.38l0.51,0.27l-0.0,1.18l-1.21,5.32l-2.09,1.9l-1.8,0.4l-4.71,-0.98l2.2,-3.63l-0.32,-1.5l-2.78,-1.28l-3.03,-1.94l-2.07,-0.44l-4.34,-4.06l0.91,-2.9l0.08,-1.42l1.07,-2.04l4.13,-0.72l2.18,0.03l2.05,1.17l0.03,0.59Z", "name": "Paraguay"}, "PA": {"path": "M213.8,263.68l0.26,-1.52l-0.36,-0.26l-0.01,-0.49l0.44,-0.1l0.93,1.4l1.26,0.03l0.77,0.49l1.38,-0.23l2.51,-1.11l0.86,-0.72l3.45,0.85l1.4,1.18l0.41,1.74l-0.21,0.34l-0.53,-0.12l-0.47,0.29l-0.16,0.6l-0.68,-1.28l0.45,-0.49l-0.19,-0.66l-0.47,-0.13l-0.54,-0.84l-1.5,-0.75l-1.1,0.16l-0.75,0.99l-1.62,0.84l-0.18,0.96l0.85,0.97l-0.58,0.45l-0.69,0.08l-0.34,-1.18l-1.27,0.03l-0.71,-1.05l-2.59,-0.46Z", "name": "Panama"}, "PG": {"path": "M808.58,298.86l2.54,2.56l-0.13,0.26l-0.33,0.12l-0.87,-0.78l-1.22,-2.16ZM801.41,293.04l0.5,0.29l0.26,0.27l-0.49,-0.35l-0.27,-0.21ZM803.17,294.58l0.59,0.5l0.08,1.06l-0.29,-0.91l-0.38,-0.65ZM796.68,298.41l0.52,0.75l1.43,-0.19l2.27,-1.81l-0.01,-1.43l1.12,0.16l-0.04,1.1l-0.7,1.28l-1.12,0.18l-0.62,0.79l-2.46,1.11l-1.17,-0.0l-3.08,-1.25l3.41,0.0l0.45,-0.68ZM789.15,303.55l2.31,1.8l1.59,2.61l1.34,0.13l-0.06,0.66l0.31,0.43l1.06,0.24l0.06,0.65l2.25,1.05l-1.22,0.13l-0.72,-0.63l-4.56,-0.65l-3.22,-2.87l-1.49,-2.34l-3.27,-1.1l-2.38,0.72l-1.59,0.86l-0.2,0.42l0.27,1.55l-1.55,0.68l-1.36,-0.4l-2.21,-0.09l-0.08,-15.41l8.39,2.93l2.95,2.4l0.6,1.64l4.02,1.49l0.31,0.68l-1.76,0.21l-0.33,0.52l0.55,1.68Z", "name": "Papua New Guinea"}, "PE": {"path": "M244.96,295.21l-1.26,-0.07l-0.57,0.42l-1.93,0.45l-2.98,1.75l-0.36,1.36l-0.58,0.8l0.12,1.37l-1.24,0.59l-0.22,1.22l-0.62,0.84l1.04,2.27l1.28,1.44l-0.41,0.84l0.32,0.57l1.48,0.13l1.16,1.37l2.21,0.07l1.63,-1.08l-0.13,3.02l0.3,0.4l1.14,0.29l1.31,-0.34l1.9,3.59l-0.48,0.85l-0.17,3.85l-0.94,1.59l0.35,0.75l-0.47,1.07l0.98,1.97l-2.1,3.82l-0.98,0.5l-2.17,-1.28l-0.39,-1.16l-4.95,-2.58l-4.46,-2.79l-1.84,-1.51l-0.91,-1.84l0.3,-0.96l-2.11,-3.33l-4.82,-9.68l-1.04,-1.2l-0.87,-1.94l-3.4,-2.48l0.58,-1.18l-1.13,-2.23l0.66,-1.49l1.45,-1.15l-0.6,0.98l0.07,0.92l0.47,0.36l1.74,0.03l0.97,1.17l0.54,0.07l1.42,-1.03l0.6,-1.84l1.42,-2.02l3.04,-1.04l2.73,-2.62l0.86,-1.74l-0.1,-1.87l1.44,1.02l0.9,1.25l1.06,0.59l1.7,2.73l1.86,0.31l1.45,-0.61l0.96,0.39l1.36,-0.19l1.45,0.89l-1.4,2.21l0.31,0.61l0.59,0.05l0.47,0.5Z", "name": "Peru"}, "PK": {"path": "M615.09,192.34l-1.83,1.81l-2.6,0.39l-3.73,-0.68l-1.58,1.33l-0.09,0.42l1.77,4.39l1.7,1.23l-1.69,1.27l-0.12,2.14l-2.33,2.64l-1.6,2.8l-2.46,2.67l-3.03,-0.07l-2.76,2.83l0.05,0.6l1.5,1.11l0.26,1.9l1.44,1.5l0.37,1.68l-5.01,-0.01l-1.78,1.7l-1.42,-0.52l-0.76,-1.87l-2.27,-2.15l-11.61,0.86l0.71,-2.34l3.43,-1.32l0.25,-0.44l-0.21,-1.24l-1.2,-0.65l-0.28,-2.46l-2.29,-1.14l-1.28,-1.94l2.82,0.94l2.62,-0.38l1.42,0.33l0.76,-0.56l1.71,0.19l3.25,-1.14l0.27,-0.36l0.08,-2.19l1.18,-1.32l1.68,0.0l0.58,-0.82l
294091.6,-0.3l1.19,0.16l0.98,-0.78l0.02,-1.88l0.93,-1.47l1.48,-0.66l0.19,-0.55l-0.66,-1.25l2.04,-0.11l0.69,-1.01l-0.02,-1.16l1.11,-1.06l-0.17,-1.78l-0.49,-1.03l1.15,-0.98l5.42,-0.91l2.6,-0.82l1.6,1.16l0.97,2.34l3.45,0.97Z", "name": "Pakistan"}, "PH": {"path": "M737.01,263.84l0.39,2.97l-0.44,1.18l-0.55,-1.53l-0.67,-0.14l-1.17,1.28l0.65,2.09l-0.42,0.69l-2.48,-1.23l-0.57,-1.49l0.65,-1.03l-0.1,-0.54l-1.59,-1.19l-0.56,0.08l-0.65,0.87l-1.23,0.0l-1.58,0.97l0.83,-1.8l2.56,-1.42l0.65,0.84l0.45,0.13l1.9,-0.69l0.56,-1.11l1.5,-0.06l0.38,-0.43l-0.09,-1.19l1.21,0.71l0.36,2.02ZM733.59,256.58l0.05,0.75l0.08,0.26l-0.8,-0.42l-0.18,-0.71l0.85,0.12ZM734.08,256.1l-0.12,-1.12l-1.0,-1.27l1.36,0.03l0.53,0.73l0.51,2.04l-1.27,-0.4ZM733.76,257.68l0.38,0.98l-0.32,0.15l-0.07,-1.13ZM724.65,238.43l1.46,0.7l0.72,-0.31l-0.32,1.17l0.79,1.71l-0.57,1.84l-1.53,1.04l-0.39,2.25l0.56,2.04l1.63,0.57l1.16,-0.27l2.71,1.23l-0.19,1.08l0.76,0.84l-0.08,0.36l-1.4,-0.9l-0.88,-1.27l-0.66,0.0l-0.38,0.55l-1.6,-1.31l-2.15,0.36l-0.87,-0.39l0.07,-0.61l0.66,-0.55l-0.01,-0.62l-0.75,-0.59l-0.72,0.44l-0.74,-0.87l-0.39,-2.49l0.32,0.27l0.66,-0.28l0.26,-3.97l0.7,-2.02l1.14,0.0ZM731.03,258.87l-0.88,0.85l-1.19,1.94l-1.05,-1.19l0.93,-1.1l0.32,-1.47l0.52,-0.06l-0.27,1.15l0.22,0.45l0.49,-0.12l1.0,-1.32l-0.08,0.85ZM726.83,255.78l0.83,0.38l1.17,-0.0l-0.02,0.48l-2.0,1.4l0.03,-2.26ZM724.81,252.09l-0.38,1.27l-1.42,-1.95l1.2,0.05l0.6,0.63ZM716.55,261.82l1.1,-0.95l0.03,-0.03l-0.28,0.36l-0.85,0.61ZM719.22,259.06l0.04,-0.06l0.8,-1.53l0.16,0.75l-1.0,0.84Z", "name": "Philippines"}, "PL": {"path": "M468.44,149.42l-1.11,-1.54l-1.86,-0.33l-0.48,-1.05l-1.72,-0.37l-0.65,0.69l-0.72,-0.36l0.11,-0.61l-0.33,-0.46l-1.75,-0.27l-1.04,-0.93l-0.94,-1.94l0.16,-1.22l-0.62,-1.8l-0.78,-1.07l0.57,-1.04l-0.48,-1.43l1.41,-0.83l6.91,-2.71l2.14,0.5l0.52,0.91l5.51,0.44l4.55,-0.05l1.07,0.31l0.48,0.84l0.15,1.58l0.65,1.2l-0.01,0.99l-1.27,0.58l-0.19,0.54l0.73,1.48l0.08,1.55l1.2,2.76l-0.17,0.58l-1.23,0.44l-2.27,2.72l0.18,0.95l-1.97,-1.03l-1.98,0.4l-1.36,-0.28l-1.24,0.58l-1.07,-0.97l-1.16,0.24Z", "name": "Poland"}, "ZM": {"path": "M481.47,313.3l0.39,0.31l2.52,0.14l0.99,1.17l2.01,0.35l1.4,-0.64l0.69,1.17l1.78,0.33l1.84,2.35l2.23,0.18l0.4,-0.43l-0.21,-2.74l-0.62,-0.3l-0.48,0.32l-1.98,-1.17l0.72,-5.29l-0.51,-1.18l0.57,-1.3l3.68,-0.62l0.26,0.63l1.21,0.63l0.9,-0.22l2.16,0.67l1.33,0.71l1.07,1.02l0.56,1.87l-0.88,2.7l0.43,2.09l-0.73,0.87l-0.76,2.37l0.59,0.68l-6.6,1.83l-0.29,0.44l0.19,1.45l-1.68,0.35l-1.43,1.02l-0.38,0.87l-0.87,0.26l-3.48,3.69l-4.16,-0.53l-1.52,-1.0l-1.77,-0.13l-1.83,0.52l-3.04,-3.4l0.11,-7.59l4.82,0.03l0.39,-0.49l-0.18,-0.76l0.33,-0.83l-0.4,-1.36l0.24,-1.05Z", "name": "Zambia"}, "EH": {"path": "M384.42,230.28l0.25,-0.79l1.06,-1.29l0.8,-3.51l3.38,-2.78l0.7,-1.81l0.06,4.84l-1.98,0.2l-0.94,1.59l0.39,3.56l-3.7,-0.01ZM392.01,218.1l0.7,-1.8l1.77,-0.24l2.09,0.34l0.95,-0.62l1.28,-0.07l-0.0,2.51l-6.79,-0.12Z", "name": "W. Sahara"}, "EE": {"path": "M485.71,115.04l2.64,0.6l2.56,0.11l-1.6,1.91l0.61,3.54l-0.81,0.87l-1.78,-0.01l-3.22,-1.76l-1.8,0.45l0.21,-1.53l-0.58,-0.41l-0.69,0.34l-1.26,-1.03l-0.17,-1.63l2.83,-0.92l3.05,-0.52Z", "name": "Estonia"}, "EG": {"path": "M492.06,205.03l1.46,0.42l2.95,-1.64l2.04,-0.21l1.53,0.3l0.59,1.19l0.69,0.04l0.41,-0.64l1.81,0.58l1.95,0.16l1.04,-0.51l1.42,4.08l-2.03,4.54l-1.66,-1.77l-1.76,-3.85l-0.64,-0.12l-0.36,0.67l1.04,2.88l3.44,6.95l1.78,3.04l2.03,2.65l-0.36,0.53l0.23,2.01l2.7,2.19l-28.41,0.0l0.0,-18.96l-0.73,-2.2l0.59,-1.56l-0.32,-1.26l0.68,-0.99l3.06,-0.04l4.82,1.52Z", "name": "Egypt"}, "ZA": {"path": "M467.14,373.21l-0.13,-1.96l-0.68,-1.56l0.7,-0.68l-0.13,-2.33l-4.56,-8.19l0.77,-0.86l0.6,0.45l0.69,1.31l2.83,0.72l1.5,-0.26l2.24,-1.39l0.19,-9.55l1.35,2.3l-0.21,1.5l0.61,1.2l0.4,0.19l1.79,-0.27l2.6,-2.07l0.69,-1.32l0.96,-0.48l2.19,1.04l2.04,0.13l1.77,-0.65l0.85,-2.12l1.38,-0.33l1.59,-2.76l2.15,-1.89l3.41,-1.87l2.0,0.45l1.02,-0.28l0.99,0.2l1.75,5.29l-0.38,3.25l-0.81,-0.23l-1.0,0.46l-0.87,1.68l-0.05,1.16l1.97,1.84l1.47,-0.29l0.69,-1.18l1.09,0.01l-0.76,3.69l-0.58,1.09l-2.2,1.79l-3.17,4.76l-2.8,2.83l-3.57,2.88l-2.53,1.05l-1.22,0.14l-0.51,0.7l-1.18,-0.32l-1.39,0.5l-2.59,-0.52l-1.61,0.33l-1.18,-0.11l-2.55,1.1l-2.1,0.44l-1.6,1.07l-0.85,0.05l-0.93,-0.89l-0.93,-0.15l-0.97,-1.13l-0.25,0.05ZM491.45,364.19l0.62,-0.93l1.48,-0.59l1.18,-2.19l-0.07,-0.49l-1.99,-1.69l-1.66,0.56l-1.43,1.14l-1.34,1.73l0.02,0.51l1.88,2.11l1.31,-0.16Z", "name": "South Africa"}, "EC": {"path": "M231.86,285.53l0.29,1.59l-0.69,1.45l-2.61,2.51l-3.13,1.11l-1.53,2.18l-0.49,1.68l-1.0,0.73l-1.02,-1.11l-1.78,-0.16l0.67,-1.15l-0.24,-0.86l1.25,-2.13l-0.54,-1.09l-0.67,-0.08l-0.72,0.87l-0.87,-0.64l0.35,-0.69l-0.36,-1.96l0.81,-0.51l0.45,-1.51l0.92,-1.57l-0.07,-0.97l2.65,-1.33l2.75,1.35l0.77,1.05l2.12,0.35l0.76,-0.32l1.96,1.21Z", "name": "Ecuador"}, "AL": {"path": "M470.32,171.8l0.74,0.03l0.92,0.89l-0.17,1.95l0.36,1.28l1.01,0.82l-1.82,2.83l-0.19,-0.61l-1.25,-0.89l-0.18,-1.2l0.53,-2.82l-0.54,-1.47l0.6,-0.83Z", "name": "Albania"}
29409, "AO": {"path": "M461.55,300.03l1.26,3.15l1.94,2.36l2.47,-0.53l1.25,0.32l0.44,-0.18l0.93,-1.92l1.31,-0.08l0.41,-0.44l0.47,-0.0l-0.1,0.41l0.39,0.49l2.65,-0.02l0.03,1.19l0.48,1.01l-0.34,1.52l0.18,1.55l0.83,1.04l-0.13,2.85l0.54,0.39l3.96,-0.41l-0.1,1.79l0.39,1.05l-0.24,1.43l-4.7,-0.03l-0.4,0.39l-0.12,8.13l2.92,3.49l-3.83,0.88l-5.89,-0.36l-1.88,-1.24l-10.47,0.22l-1.3,-1.01l-1.85,-0.16l-2.4,0.77l-0.15,-1.06l0.33,-2.16l1.0,-3.45l1.35,-3.2l2.24,-2.8l0.33,-2.06l-0.13,-1.53l-0.8,-1.08l-1.21,-2.87l0.87,-1.62l-1.27,-4.12l-1.17,-1.53l2.47,-0.63l7.03,0.03ZM451.71,298.87l-0.47,-1.25l1.25,-1.11l0.32,0.3l-0.99,1.03l-0.12,1.03Z", "name": "Angola"}, "KZ": {"path": "M552.8,172.89l0.46,-1.27l-0.48,-1.05l-2.96,-1.19l-1.06,-2.58l-1.37,-0.87l-0.03,-0.3l1.95,0.23l0.45,-0.38l0.08,-1.96l1.75,-0.41l2.1,0.45l0.48,-0.33l0.45,-3.04l-0.45,-2.09l-0.41,-0.31l-2.42,0.15l-2.36,-0.73l-2.87,1.37l-2.17,0.61l-0.85,-0.34l0.13,-1.61l-1.6,-2.12l-2.02,-0.08l-1.78,-1.82l1.29,-2.18l-0.57,-0.95l1.62,-2.91l2.21,1.63l0.63,-0.27l0.29,-2.22l4.92,-3.43l3.71,-0.08l8.4,3.6l2.92,-1.36l3.77,-0.06l3.11,1.66l0.51,-0.11l0.6,-0.81l3.31,0.13l0.39,-0.25l0.63,-1.57l-0.17,-0.5l-3.5,-1.98l1.87,-1.27l-0.13,-1.03l1.98,-0.72l0.18,-0.62l-1.59,-2.06l0.81,-0.82l9.23,-1.18l1.33,-0.88l6.18,-1.26l2.26,-1.42l4.08,0.68l0.73,3.33l0.51,0.3l2.48,-0.8l2.79,1.02l-0.17,1.56l0.43,0.44l2.55,-0.24l4.89,-2.53l0.03,0.32l3.15,2.61l5.56,8.47l0.65,0.02l1.12,-1.46l3.15,1.74l3.76,-0.78l1.15,0.49l1.14,1.8l1.84,0.76l0.99,1.29l3.35,-0.25l1.02,1.52l-1.6,1.81l-1.93,0.28l-0.34,0.38l-0.11,3.05l-1.13,1.16l-4.75,-1.0l-0.46,0.27l-1.76,5.47l-1.1,0.59l-4.91,1.23l-0.27,0.54l2.1,4.97l-1.37,0.63l-0.23,0.41l0.13,1.13l-0.88,-0.25l-1.42,-1.13l-7.89,-0.4l-0.92,0.31l-3.73,-1.22l-1.42,0.63l-0.53,1.66l-3.72,-0.94l-1.85,0.43l-0.76,1.4l-4.65,2.62l-1.13,2.08l-0.44,0.01l-0.92,-1.4l-2.87,-0.09l-0.45,-2.14l-0.38,-0.32l-0.8,-0.01l0.0,-2.96l-3.0,-2.22l-7.31,0.58l-2.35,-2.68l-6.71,-3.69l-6.45,1.83l-0.29,0.39l0.1,10.85l-0.7,0.08l-1.62,-2.17l-1.83,-0.96l-3.11,0.59l-0.64,0.51Z", "name": "Kazakhstan"}, "ET": {"path": "M516.04,247.79l1.1,0.84l1.63,-0.45l0.68,0.47l1.63,0.03l2.01,0.94l1.73,1.66l1.64,2.07l-1.52,2.04l0.16,1.72l0.39,0.38l2.05,0.0l-0.36,1.03l2.86,3.58l8.32,3.08l1.31,0.02l-6.32,6.75l-3.1,0.11l-2.36,1.77l-1.47,0.04l-0.86,0.79l-1.38,-0.0l-1.32,-0.81l-2.29,1.05l-0.76,0.98l-3.29,-0.41l-3.07,-2.07l-1.8,-0.07l-0.62,-0.6l0.0,-1.24l-0.28,-0.38l-1.15,-0.37l-1.4,-2.59l-1.19,-0.68l-0.47,-1.0l-1.27,-1.23l-1.16,-0.22l0.43,-0.72l1.45,-0.28l0.41,-0.95l-0.03,-2.21l0.68,-2.44l1.05,-0.63l1.43,-3.06l1.57,-1.37l1.02,-2.51l0.35,-1.88l2.52,0.46l0.44,-0.24l0.58,-1.43Z", "name": "Ethiopia"}, "ZW": {"path": "M498.91,341.09l-1.11,-0.22l-0.92,0.28l-2.09,-0.44l-1.5,-1.11l-1.89,-0.43l-0.62,-1.4l-0.01,-0.84l-0.3,-0.38l-0.97,-0.25l-2.71,-2.74l-1.92,-3.32l3.83,0.45l3.73,-3.82l1.08,-0.44l0.26,-0.77l1.25,-0.9l1.41,-0.26l0.5,0.89l1.99,-0.05l1.72,1.17l1.11,0.17l1.05,0.66l0.01,2.99l-0.59,3.76l0.38,0.86l-0.23,1.23l-0.39,0.35l-0.63,1.81l-2.43,2.75Z", "name": "Zimbabwe"}, "ES": {"path": "M416.0,169.21l1.07,1.17l4.61,1.38l1.06,-0.57l2.6,1.26l2.71,-0.3l0.09,1.12l-2.14,1.8l-3.11,0.61l-0.31,0.31l-0.2,0.89l-1.54,1.69l-0.97,2.4l0.84,1.74l-1.32,1.27l-0.48,1.68l-1.88,0.65l-1.66,2.07l-5.36,-0.01l-1.79,1.08l-0.89,0.98l-0.88,-0.17l-0.79,-0.82l-0.68,-1.59l-2.37,-0.63l-0.11,-0.5l1.21,-1.82l-0.77,-1.13l0.61,-1.68l-0.76,-1.62l0.87,-0.49l0.09,-1.25l0.42,-0.6l0.03,-2.11l0.99,-0.69l0.13,-0.5l-1.03,-1.73l-1.46,-0.11l-0.61,0.38l-1.06,0.0l-0.52,-1.23l-0.53,-0.21l-1.32,0.67l-0.01,-1.49l-0.75,-0.96l3.03,-1.88l2.99,0.53l3.32,-0.02l2.63,0.51l6.01,-0.06Z", "name": "Spain"}, "ER": {"path": "M520.38,246.23l3.42,2.43l3.5,3.77l0.84,0.54l-0.95,-0.01l-3.51,-3.89l-2.33,-1.15l-1.73,-0.07l-0.91,-0.51l-1.26,0.51l-1.34,-1.02l-0.61,0.17l-0.66,1.61l-2.35,-0.43l-0.17,-0.67l1.29,-5.29l0.61,-0.61l1.95,-0.53l0.87,-1.01l1.17,2.41l0.68,2.33l1.49,1.43Z", "name": "Eritrea"}, "ME": {"path": "M468.91,172.53l-1.22,-1.02l0.47,-1.81l0.89,-0.72l2.26,1.51l-0.5,0.57l-0.75,-0.27l-1.14,1.73Z", "name": "Montenegro"}, "MD": {"path": "M488.41,153.73l1.4,-0.27l1.72,0.93l1.07,0.15l0.85,0.65l-0.14,0.84l0.96,0.85l1.12,2.47l-1.15,-0.07l-0.66,-0.41l-0.52,0.25l-0.
2940909,0.86l-1.08,1.89l-0.27,-0.86l0.25,-1.34l-0.16,-1.6l-3.29,-4.34Z", "name": "Moldova"}, "MG": {"path": "M545.91,319.14l0.4,3.03l0.62,1.21l-0.21,1.02l-0.57,-0.8l-0.69,-0.01l-0.47,0.76l0.41,2.12l-0.18,0.87l-0.73,0.78l-0.15,2.14l-4.71,15.2l-1.06,2.88l-3.92,1.64l-3.12,-1.49l-0.6,-1.21l-0.19,-2.4l-0.86,-2.05l-0.21,-1.77l0.38,-1.62l1.21,-0.75l0.01,-0.76l1.19,-2.04l0.23,-1.66l-1.06,-2.99l-0.19,-2.21l0.81,-1.33l0.32,-1.46l4.63,-1.22l3.44,-3.0l0.85,-1.4l-0.08,-0.7l0.78,-0.04l1.38,-1.77l0.13,-1.64l0.45,-0.61l1.16,1.69l0.59,1.6Z", "name": "Madagascar"}, "MA": {"path": "M378.78,230.02l0.06,-0.59l0.92,-0.73l0.82,-1.37l-0.09,-1.04l0.79,-1.7l1.31,-1.58l0.96,-0.59l0.66,-1.55l0.09,-1.47l0.81,-1.48l1.72,-1.07l1.55,-2.69l1.16,-0.96l2.44,-0.39l1.94,-1.82l1.31,-0.78l2.09,-2.28l-0.51,-3.65l1.24,-3.7l1.5,-1.75l4.46,-2.57l2.37,-4.47l1.44,0.01l1.68,1.21l2.32,-0.19l3.47,0.65l0.8,1.54l0.16,1.71l0.86,2.96l0.56,0.59l-0.26,0.61l-3.05,0.44l-1.26,1.05l-1.33,0.22l-0.33,0.37l-0.09,1.78l-2.68,1.0l-1.07,1.42l-4.47,1.13l-4.04,2.01l-0.54,4.64l-1.15,0.06l-0.92,0.61l-1.96,-0.35l-2.42,0.54l-0.74,1.9l-0.86,0.4l-1.14,3.26l-3.53,3.01l-0.8,3.55l-0.96,1.1l-0.29,0.82l-4.95,0.18Z", "name": "Morocco"}, "UZ": {"path": "M598.64,172.75l-1.63,1.52l0.06,0.64l1.85,1.12l1.97,-0.64l2.21,1.17l-2.52,1.68l-2.59,-0.22l-0.18,-0.41l0.46,-1.23l-0.45,-0.53l-3.35,0.69l-2.1,3.51l-1.87,-0.12l-1.03,1.51l0.22,0.55l1.64,0.62l0.46,1.83l-1.19,2.49l-2.66,-0.53l0.05,-1.36l-0.26,-0.39l-3.3,-1.23l-2.56,-1.4l-4.4,-3.34l-1.34,-3.14l-1.08,-0.6l-2.58,0.13l-0.69,-0.44l-0.47,-2.52l-3.37,-1.6l-0.43,0.05l-2.07,1.72l-2.1,1.01l-0.21,0.47l0.28,1.01l-1.91,0.03l-0.09,-10.5l5.99,-1.7l6.19,3.54l2.71,2.84l7.05,-0.67l2.71,2.01l-0.17,2.81l0.39,0.42l0.9,0.02l0.44,2.14l0.38,0.32l2.94,0.09l0.95,1.42l1.28,-0.24l1.05,-2.04l4.43,-2.5Z", "name": "Uzbekistan"}, "MM": {"path": "M673.9,230.21l-1.97,1.57l-0.57,0.96l-1.4,0.6l-1.36,1.05l-1.99,0.36l-1.08,2.66l-0.91,0.4l-0.19,0.55l1.21,2.27l2.52,3.43l-0.79,1.91l-0.74,0.41l-0.17,0.52l0.65,1.37l1.61,1.95l0.25,2.58l0.9,2.13l-1.92,3.57l0.68,-2.25l-0.81,-1.74l0.19,-2.65l-1.05,-1.53l-1.24,-6.17l-1.12,-2.26l-0.6,-0.13l-4.34,3.02l-2.39,-0.65l0.77,-2.84l-0.52,-2.61l-1.91,-2.96l0.25,-0.75l-0.29,-0.51l-1.33,-0.3l-1.61,-1.93l-0.1,-1.3l0.82,-0.24l0.04,-1.64l1.02,-0.52l0.21,-0.45l-0.23,-0.95l0.54,-0.96l0.08,-2.22l1.46,0.45l0.47,-0.2l1.12,-2.19l0.16,-1.35l1.33,-2.16l-0.0,-1.52l2.89,-1.66l1.63,0.44l0.5,-0.44l-0.17,-1.4l0.64,-0.36l0.08,-1.04l0.77,-0.11l0.71,1.35l1.06,0.69l-0.03,3.86l-2.38,2.37l-0.3,3.15l0.46,0.43l2.28,-0.38l0.51,2.08l1.47,0.67l-0.6,1.8l0.19,0.48l2.97,1.48l1.64,-0.55l0.02,0.32Z", "name": "Myanmar"}, "ML": {"path": "M392.61,254.08l-0.19,-2.37l-0.99,-0.87l-0.44,-1.3l-0.09,-1.28l0.81,-0.58l0.35,-1.24l2.37,0.65l1.31,-0.47l0.86,0.15l0.66,-0.56l9.83,-0.04l0.38,-0.28l0.56,-1.8l-0.44,-0.65l-2.35,-21.95l3.27,-0.04l16.7,11.38l0.74,1.31l2.5,1.09l0.02,1.38l0.44,0.39l2.34,-0.21l0.01,5.38l-1.28,1.61l-0.26,1.49l-5.31,0.57l-1.07,0.92l-2.9,0.1l-0.86,-0.48l-1.38,0.36l-2.4,1.08l-0.6,0.87l-1.85,1.09l-0.43,0.7l-0.79,0.39l-1.44,-0.21l-0.81,0.84l-0.34,1.64l-1.91,2.02l-0.06,1.03l-0.67,1.22l0.13,1.16l-0.97,0.39l-0.23,-0.64l-0.52,-0.24l-1.35,0.4l-0.34,0.55l-2.69,-0.28l-0.37,-0.35l-0.02,-0.9l-0.65,-0.35l0.45,-0.64l-0.03,-0.53l-2.12,-2.44l-0.76,-0.01l-2.0,1.16l-0.78,-0.15l-0.8,-0.67l-1.21,0.23Z", "name": "Mali"}, "MN": {"path": "M676.61,146.48l3.81,1.68l5.67,-1.0l2.37,0.41l2.34,1.5l1.79,1.75l2.29,-0.03l3.12,0.52l2.47,-0.81l3.41,-0.59l3.53,-2.21l1.25,0.29l1.53,1.13l2.27,-0.21l-2.66,5.01l0.64,1.68l0.47,0.21l1.32,-0.38l2.38,0.48l2.02,-1.11l1.76,0.89l2.06,2.02l-0.13,0.53l-1.72,-0.29l-3.77,0.46l-1.88,0.99l-1.76,1.99l-3.71,1.17l-2.45,1.6l-3.83,-0.87l-0.41,0.17l-1.31,1.99l1.04,2.24l-1.52,0.9l-1.74,1.57l-2.79,1.02l-3.78,0.13l-4.05,1.05l-2.77,1.52l-1.16,-0.85l-2.94,0.0l-3.62,-1.79l-2.58,-0.49l-3.4,0.41l-5.12,-0.67l-2.63,0.06l-1.31,-1.6l-1.4,-3.0l-1.48,-0.33l-3.13,-1.94l-6.16,-0.93l-0.71,-1.06l0.86,-3.82l-1.93,-2.71l-3.5,-1.18l-1.95,-1.58l-0.5,-1.72l2.34,-0.52l4.75,-2.8l3.62,-1.47l2.18,0.97l2.46,0.05l1.81,1.53l2.46,0.12l3.95,0.71l2.43,-2.28l0.08,-0.48l-0.9,-1.72l2.24,-2.98l2.62,1.27l4.94,1.17l0.43,2.24Z", "name": "Mongolia"}, "MK": {"path": "M472.8,173.98l0.49,-0.71l3.57,-0.71l1.0,0.77l0.13,1.45l-0.65,0.53l-1.15,-0.05l-1.12,0.67l-1.39,0.22l-0.79,-0.55l-0.29,-1.03l0.19,-0.6Z", "name": "Macedonia"}, "MW": {"path": "M505.5,309.31l0.85,1.95l0.15,2.86l-0.69,1.65l0.71,1.8l0.06,1.28l0.49,0.64l0.07,1.06l0.4,0.55l0.8,-0.23l0.55,0.61l0.69,-0.21l0.34,0.6l0.19,2.94l-1.04,0.62l-0.54,1.25l-1.11,-1.08l-0.16,-1.56l0.51,-1.31l-0.32,-1.3l-0.99,-0.65l-0.82,0.12l-2.36,-1.64l0.63,-1.96l0.82,-1.18l-0.46,-2.01l0.9,-2.86l-0.94,-2.51l0.96,0.18l0.29,0.4Z", "name": "Malawi"}, "MR": {"path": "M407.36,220.66l-2.58,0.03l-0.39,0.44l2.42,22.56l0.36,0.43l-0.39,1.24l-9.75,0.04l-0.56,0.53l-0.91,-0.11l-1.27,0.45l-1.61,-0.66l-0.97,0.03l-0.36,0.29l-0.38,1.35l-0.42,0.23l-2.93,-3.4l-2.96,-1.52l-1.62,-0.03l-1.27,0.54l-1.12,-0.2l-0.65,0.4l-0.08,-0.49l0.68,-1.29l0.31,-2.43l-0.57,-3.91l0.23,-1.21l-0.69,-1.5l-1.15,-1.02l0.25,-0.39l9.58,0.02l0.4,-0.45l-0.46,-3.68l0.47,-1.04l2.12,-0.21l0.36,-0.4l-0.08,-6.4l7.81,0.13l0.41,-0.4l0.01,-3.31l7.76,5.35Z", "name": "Mauritania"}, "UG": {"path": "M498.55,276.32l0.7,-0.46l1.65,0.5l1.96,-0.57l1.7,0.01l1.45,-0.98l0.91,1.33l1.33,3.95l-2.57,4.03l-1.46,-0.4l-2.54,0.91l-1.37,1.61l-0.01,0.81l-2.42,-0.01l-2.26,1.01l-0.17,-1.59l0.58,-1.04l0.14,-1.94l1.37,-2.28l1.78,-1.58l-0.17,-0.65l-0.72,-0.24l0.13,-2.43Z", "name": "Uganda"}, "MY": {"path": "M717.47,273.46l-1.39,0.65l-2.12,-0.41l-2.88,-0.0l-0.38,0.28l-0.84,2.75l-0.99,0.96l-1.21,3.29l-1.73,0.45l-2.45,-0.68l-1.39,0.31l-1.33,1.15l-1.59,-0.14l-1.41,0.44l-1.44,-1.19l-0.18,-0.73l1.34,0.53l1.93,-0.47l0.75,-2.22l4.02,-1.03l2.75,-3.21l0.82,0.94l0.64,-0.05l0.4,-0.65l0.96,0.06l0.42,-0.36l0.24,-2.68l1.81,-1.64l1.21,-1.86l0.63,-0.01l1.07,1.05l0.34,1.28l3.44,1.35l-0.06,0.35l-1.37,0.1l-0.35,0.54l0.32,0.88ZM673.68,269.59l0.17,1.09l0.47,0.33l1.65,-0.3l0.87,-0.94l1.61,1.52l0.98,1.56l-0.12,2.81l0.41,2.29l0.95,0.9l0.88,2.44l-1.27,0.12l-5.1,-3.67l-0.34,-1.29l-1.37,-1.59l-0.33,-1.97l-0.88,-1.4l0.25,-1.68l-0.46,-1.05l1.63,0.84Z", "name": "Malaysia"}, "MX": {"path": "M133.12,200.41l0.2,0.47l9.63,3.33l6.96,-0.02l0.4,-0.4l0.0,-0.74l3.77,0.0l3.55,2.93l1.39,2.83l1.52,1.04l2.08,0.82l0.47,-0.14l1.46,-2.0l1.73,-0.04l1.59,0.98l2.05,3.35l1.47,1.56l1.26,3.14l2.18,1.02l2.26,0.58l-1.18,3.72l-0.42,5.04l1.79,4.89l1.62,1.89l0.61,1.52l1.2,1.42l2.55,0.66l1.37,1.1l7.54,-1.89l1.86,-1.3l1.14,-4.3l4.1,-1.21l3.57,-0.11l0.32,0.3l-0.06,0.94l-1.26,1.45l-0.67,1.71l0.38,0.7l-0.72,2.27l-0.49,-0.3l-1.0,0.08l-1.0,1.39l-0.47,-0.11l-0.53,0.47l-4.26,-0.02l-0.4,0.4l-0.0,1.06l-1.1,0.26l0.1,0.44l1.82,1.44l0.56,0.91l-3.19,0.21l-1.21,2.09l0.24,0.72l-0.2,0.44l-2.24,-2.18l-1.45,-0.93l-2.22,-0.69l-1.52,0.22l-3.07,1.16l-10.55,-3.85l-2.86,-1.96l-3.78,-0.92l-1.08,-1.19l-2.62,-1.43l-1.18,-1.54l-0.38,-0.81l0.66,-0.63l-0.18,-0.53l0.52,-0.76l0.01,-0.91l-2.0,-3.82l-2.21,-2.63l-2.53,-2.09l-1.19,-1.62l-2.2,-1.17l-0.3,-0.43l0.34,-1.48l-0.21,-0.45l-1.23,-0.6l-1.36,-1.2l-0.59,-1.78l-1.54,-0.47l-2.44,-2.55l-0.16,-0.9l-1.33,-2.03l-0.84,-1.99l-0.16,-1.33l-1.81,-1.1l-0.97,0.05l-1.31,-0.7l-0.57,0.22l-0.4,1.12l0.72,3.77l3.51,3.89l0.28,0.78l0.53,0.26l0.41,1.43l1.33,1.73l1.58,1.41l0.8,2.39l1.43,2.41l0.13,1.32l0.37,0.36l1.04,0.08l1.67,2.28l-0.85,0.76l-0.66,-1.51l-1.68,-1.54l-2.91,-1.87l0.06,-1.82l-0.54,-1.68l-2.91,-2.03l-0.55,0.09l-1.95,-1.1l-0.88,-0.94l0.68,-0.08l0.93,-1.01l0.08,-1.78l-1.93,-1.94l-1.46,-0.77l-3.75,-7.56l4.88,-0.42Z", "name": "Mexico"}, "VU": {"path": "M839.04,322.8l0.22,1.14l-0.44,0.03l-0.2,-1.45l0.42,0.27Z", "name": "Vanuatu"}, "FR": {"path": "M444.48,172.62l-0.64,1.78l-0.58,-0.31l-0.49,-1.72l0.4,-0.89l1.0,-0.72l0.3,1.85ZM429.64,147.1l1.78,1.58l1.46,-0.13l2.1,1.42l1.35,0.27l1.23,0.83l3.04,0.5l-1.03,1.85l-0.3,2.12l-0.41,0.32l-0.95,-0.24l-0.5,0.43l0.06,0.61l-1.81,1.92l-0.04,1.42l0.55,0.38l0.88,-0.36l0.61,0.97l-0.03,1.0l0.57,0.91l-0.75,1.09l0.65,2.39l1.27,0.57l-0.18,0.82l-2.01,1.53l-4.77,-0.8l-3.82,1.0l-0.53,1.85l-2.49,0.34l-2.71,-1.31l-1.16,0.57l-4.31,-1.29l-0.72,-0.86l1.19,-1.78l0.39,-6.45l-2.58,-3.3l-1.9,-1.66l-3.72,-1.23l-0.19,-1.72l2.81,-0.61l4.12,0.81l0.47,-0.48l-0.6,-2.77l1.94,0.95l5.83,-2.54l0.92,-2.74l1.6,-0.49l0.24,0.78l1.36,0.33l1.05,1.19ZM289.01,278.39l-0.81,0.8l-0.78,0.12l-0.5,-0.66l-0.56,-0.1l-0.91,0.6l-0.46,-0.22l1.09,-2.96l-0.96,-1.77l-0.17,-1.49l1.07,-1.77l2.32,0.75l2.51,2.01l0.3,0.74l-2.14,3.96Z", "name": "France"}, "FI": {"path": "M492.17,76.39l-0.23,3.5l3.52,2.63l-2.08,2.88l-0.02,0.44l2.8,4.56l-1.59,3.31l2.16,3.24l-0.94,2.39l0.14,0.47l3.44,2.51l-0.77,1.62l-7.52,6.95l-4.5,0.31l-4.38,1.37l-3.8,0.74l-1.44,-1.96l-2.17,-1.11l0.5,-3.66l-1.16,-3.33l1.09,-2.08l2.21,-2.42l5.67,-4.32l1.64,-0.83l0.21,-0.42l-0.46,-2.02l-3.38,-1.89l-0.75,-1.43l-0.22,-6.74l-6.79,-4.8l0.8,-0.62l2.54,2.12l3.46,-0.
2940912l3.0,0.96l2.51,-2.11l1.17,-3.08l3.55,-1.38l2.76,1.53l-0.95,2.79Z", "name": "Finland"}, "FJ": {"path": "M871.53,326.34l-2.8,1.05l-0.08,-0.23l2.97,-1.21l-0.1,0.39ZM867.58,329.25l0.43,0.37l-0.27,0.88l-1.24,0.28l-1.04,-0.24l-0.14,-0.66l0.63,-0.58l0.92,0.26l0.7,-0.31Z", "name": "Fiji"}, "FK": {"path": "M274.36,425.85l1.44,1.08l-0.47,0.73l-3.0,0.89l-0.96,-1.0l-0.52,-0.05l-1.83,1.29l-0.73,-0.88l2.46,-1.64l1.93,0.76l1.67,-1.19Z", "name": "Falkland Is."}, "NI": {"path": "M202.33,252.67l0.81,-0.18l1.03,-1.02l-0.04,-0.88l0.68,-0.0l0.63,-0.54l0.97,0.22l1.53,-1.26l0.58,-0.99l1.17,0.34l2.41,-0.94l0.13,1.32l-0.81,1.94l0.1,2.74l-0.36,0.37l-0.11,1.75l-0.47,0.81l0.18,1.14l-1.73,-0.85l-0.71,0.27l-1.47,-0.6l-0.52,0.16l-4.01,-3.81Z", "name": "Nicaragua"}, "NL": {"path": "M430.31,143.39l0.6,-0.5l2.13,-4.8l3.2,-1.33l1.74,0.08l0.33,0.8l-0.59,2.92l-0.5,0.99l-1.26,0.0l-0.4,0.45l0.33,2.7l-2.2,-1.78l-2.62,0.58l-0.75,-0.11Z", "name": "Netherlands"}, "NO": {"path": "M491.44,67.41l6.8,2.89l-2.29,0.86l-0.15,0.65l2.33,2.38l-4.98,1.79l0.84,-2.45l-0.18,-0.48l-3.55,-1.8l-3.89,1.52l-1.42,3.38l-2.12,1.72l-2.64,-1.0l-3.11,0.21l-2.66,-2.22l-0.5,-0.01l-1.41,1.1l-1.44,0.17l-0.35,0.35l-0.32,2.47l-4.32,-0.64l-0.44,0.29l-0.58,2.11l-2.45,0.2l-4.15,7.68l-3.88,5.76l0.78,1.62l-0.64,1.16l-2.24,-0.06l-0.38,0.24l-1.66,3.89l0.15,5.17l1.57,2.04l-0.78,4.16l-2.02,2.48l-0.85,1.63l-1.3,-1.75l-0.58,-0.07l-4.87,4.19l-3.1,0.79l-3.16,-1.7l-0.85,-3.77l-0.77,-8.55l2.14,-2.31l6.55,-3.27l5.02,-4.17l10.63,-13.84l10.98,-8.7l5.35,-1.91l4.34,0.12l3.69,-3.64l4.49,0.19l4.37,-0.89ZM484.55,20.04l4.26,1.75l-3.1,2.55l-7.1,0.65l-7.08,-0.9l-0.37,-1.31l-0.37,-0.29l-3.44,-0.1l-2.08,-2.0l6.87,-1.44l3.9,1.31l2.39,-1.64l6.13,1.4ZM481.69,33.93l-4.45,1.74l-3.54,-0.99l1.12,-0.9l0.05,-0.58l-1.06,-1.22l4.22,-0.89l1.09,1.97l2.57,0.87ZM466.44,24.04l7.43,3.77l-5.41,1.86l-1.58,4.08l-2.26,1.2l-1.12,4.11l-2.61,0.18l-4.79,-2.86l1.84,-1.54l-0.1,-0.68l-3.69,-1.53l-4.77,-4.51l-1.73,-3.89l6.11,-1.82l1.54,1.92l3.57,-0.08l1.2,-1.96l3.32,-0.18l3.05,1.92Z", "name": "Norway"}, "NA": {"path": "M474.26,330.66l-0.97,0.04l-0.38,0.4l-0.07,8.9l-2.09,0.08l-0.39,0.4l-0.0,17.42l-1.98,1.23l-1.17,0.17l-2.44,-0.66l-0.48,-1.13l-0.99,-0.74l-0.54,0.05l-0.9,1.01l-1.53,-1.68l-0.93,-1.88l-1.99,-8.56l-0.06,-3.12l-0.33,-1.52l-2.3,-3.34l-1.91,-4.83l-1.96,-2.43l-0.12,-1.57l2.33,-0.79l1.43,0.07l1.81,1.13l10.23,-0.25l1.84,1.23l5.87,0.35ZM474.66,330.64l6.51,-1.6l1.9,0.39l-1.69,0.4l-1.31,0.83l-1.12,-0.94l-4.29,0.92Z", "name": "Namibia"}, "NC": {"path": "M838.78,341.24l-0.33,0.22l-2.9,-1.75l-3.26,-3.37l1.65,0.83l4.85,4.07Z", "name": "New Caledonia"}, "NE": {"path": "M454.75,226.53l1.33,1.37l0.48,0.07l1.27,-0.7l0.53,3.52l0.94,0.83l0.17,0.92l0.81,0.69l-0.44,0.95l-0.96,5.26l-0.13,3.22l-3.04,2.31l-1.22,3.57l1.02,1.24l-0.0,1.46l0.39,0.4l1.13,0.04l-0.9,1.25l-1.47,-2.42l-0.86,-0.29l-2.09,1.37l-1.74,-0.67l-1.45,-0.17l-0.85,0.35l-1.36,-0.07l-1.64,1.09l-1.06,0.05l-2.94,-1.28l-1.44,0.59l-1.01,-0.03l-0.97,-0.94l-2.7,-0.98l-2.69,0.3l-0.87,0.64l-0.47,1.6l-0.75,1.16l-0.12,1.53l-1.57,-1.1l-1.31,0.24l0.03,-0.81l-0.32,-0.41l-2.59,-0.52l-0.15,-1.16l-1.35,-1.6l-0.29,-1.0l0.13,-0.84l1.29,-0.08l1.08,-0.92l3.31,-0.22l2.22,-0.41l0.32,-0.34l0.2,-1.47l1.39,-1.88l-0.01,-5.66l3.36,-1.12l7.24,-5.12l8.42,-4.92l3.69,1.06Z", "name": "Niger"}, "NG": {"path": "M456.32,253.89l0.64,0.65l-0.28,1.04l-2.11,2.01l-2.03,5.18l-1.37,1.16l-1.15,3.18l-1.33,0.66l-1.46,-0.97l-1.21,0.16l-1.38,1.36l-0.91,0.24l-1.79,4.06l-2.33,0.81l-1.11,-0.07l-0.86,0.5l-1.71,-0.05l-1.19,-1.39l-0.89,-1.89l-1.77,-1.66l-3.95,-0.08l0.07,-5.21l0.42,-1.43l1.95,-2.3l-0.14,-0.91l0.43,-1.18l-0.53,-1.41l0.25,-2.92l0.72,-1.07l0.32,-1.34l0.46,-0.39l2.47,-0.28l2.34,0.89l1.15,1.02l1.28,0.04l1.22,-0.58l3.03,1.27l1.49,-0.14l1.36,-1.0l1.33,0.07l0.82,-0.35l3.45,0.8l1.82,-1.32l1.84,2.67l0.66,0.16Z", "name": "Nigeria"}, "NZ": {"path": "M857.8,379.65l1.86,3.12l0.44,0.18l0.3,-0.38l0.03,-1.23l0.38,0.27l0.57,2.31l2.02,0.94l1.81,0.27l1.57,-1.06l0.7,0.18l-1.15,3.59l-1.98,0.11l-0.74,1.2l0.2,1.11l-2.42,3.98l-1.49,0.92l-1.04,-0.85l1.21,-2.05l-0.81,-2.01l-2.63,-1.25l0.04,-0.57l1.82,-1.19l0.43,-2.34l-0.16,-2.03l-0.95,-1.82l-0.06,-0.72l-3.11,-3.64l-0.79,-1.52l1.56,1.45l1.76,0.66l0.65,2.34ZM853.83,393.59l0.57,1.24l0.59,0.16l1.42,-0.97l0.46,0.79l0.0,1.03l-2.47,3.48l-1.26,1.2l-0.06,0.5l0.55,0.87l-1.41,0.07l-2.33,1.38l-2.03,5.02l-3.02,2.16l-2.06,-0.06l-1.71,-1.04l-2.47,-0.2l-0.27,-0.73l1.22,-2.1l3.05,-2.94l1.62,-0.59l4.02,-2.82l1.57,-1.67l1.07,-2.16l0.88,-0.7l0.48,-1.75l1.24,-0.97l0.35,0.79Z", "name": "New Zealand"}, "NP": {"path": "M641.14,213.62l0.01,3.19l-1.74,0.04l-4.8,-0.86l-1.58,-1.39l-3.37,-0.34l-7.65,-3.7l0.8,-2.09l2.33,-1.7l1.77,0.75l2.49,1.76l1.38,0.41l0.99,1.35l1.9,0.52l1.99,1.17l5.49,0.9Z", "name": "Nepal"}, "CI": {"path": "M407.4,259.27l0.86,0.42l0.56,0.9l1.13,0.53l1.19,-0.61l0.97,-0.08l1.42,0.54l0.6,3.24l-1.03,2.08l-0.65,2.84l1.06,2.33l-0.06,0.53l-2.54,-0.47l-1.66,0.03l-3.06,0.46l-4.11,1.6l0.32,-3.06l-1.18,-1.31l-1.32,-0.66l0.42,-0.85l-0.2,-1.4l0.5,-0.67l0.01,-1.59l0.84,-0.32l0.26,-0.5l-1.15,-3.01l0.12,-0.5l0.51,-0.25l0.66,0.31l1.93,0.02l0.67,-0.71l0.71,-0.14l0.25,0.69l0.57,0.22l1.4,-0.61Z", "name": "C\u00c3\u00b4te d'Ivoire"}, "CH": {"path": "M444.62,156.35l-0.29,0.87l0.18,0.53l1.13,0.58l1.0,0.1l-0.1,0.65l-0.79,0.38l-1.72,-0.37l-0.45,0.23l-0.45,1.04l-0.75,0.06l-0.84,-0.4l-1.32,1.0l-0.96,0.12l-0.88,-0.55l-0.81,-1.3l-0.49,-0.16l-0.63,0.26l0.02,-0.65l1.71,-1.66l0.1,-0.56l0.93,0.08l0.58,-0.46l1.99,0.02l0.66,-0.61l2.19,0.79Z", "name": "Switzerland"}, "CO": {"path": "M242.07,254.93l-1.7,0.59l-0.59,1.18l-1.7,1.69l-0.38,1.93l-0.67,1.43l0.31,0.57l1.03,0.13l0.25,0.9l0.57,0.64l-0.04,2.34l1.64,1.42l3.16,-0.24l1.26,0.28l1.67,2.06l0.41,0.13l4.09,
29409-0.39l0.45,0.22l-0.92,1.95l-0.2,1.8l0.52,1.83l0.75,1.05l-1.12,1.1l0.07,0.63l0.84,0.51l0.74,1.29l-0.39,-0.45l-0.59,-0.01l-0.71,0.74l-4.71,-0.05l-0.4,0.41l0.03,1.57l0.33,0.39l1.11,0.2l-1.68,0.4l-0.29,0.38l-0.01,1.82l1.16,1.14l0.34,1.25l-1.05,7.05l-1.04,-0.87l1.26,-1.99l-0.13,-0.56l-2.18,-1.23l-1.38,0.2l-1.14,-0.38l-1.27,0.61l-1.55,-0.26l-1.38,-2.46l-1.23,-0.75l-0.85,-1.2l-1.67,-1.19l-0.86,0.13l-2.11,-1.32l-1.01,0.31l-1.8,-0.29l-0.52,-0.91l-3.09,-1.68l0.77,-0.52l-0.1,-1.12l0.41,-0.64l1.34,-0.32l2.0,-2.88l-0.11,-0.57l-0.66,-0.43l0.39,-1.38l-0.52,-2.1l0.49,-0.83l-0.4,-2.13l-0.97,-1.35l0.17,-0.66l0.86,-0.08l0.47,-0.75l-0.46,-1.63l1.41,-0.07l1.8,-1.69l0.93,-0.24l0.3,-0.38l0.45,-2.76l1.22,-1.0l1.44,-0.04l0.45,-0.5l1.91,0.12l2.93,-1.84l1.15,-1.14l0.91,0.46l-0.25,0.45Z", "name": "Colombia"}, "CN": {"path": "M740.23,148.97l4.57,1.3l2.8,2.17l0.98,2.9l0.38,0.27l3.8,0.0l2.32,-1.28l3.29,-0.75l-0.96,2.09l-1.02,1.28l-0.85,3.4l-1.52,2.73l-2.76,-0.5l-2.4,1.13l-0.21,0.45l0.64,2.57l-0.32,3.2l-0.94,0.06l-0.37,0.89l-0.91,-1.01l-0.64,0.07l-0.92,1.57l-3.73,1.25l-0.26,0.48l0.26,1.06l-1.5,-0.08l-1.09,-0.86l-0.56,0.06l-1.67,2.06l-2.7,1.56l-2.03,1.88l-3.4,0.83l-1.93,1.4l-1.15,0.34l0.33,-0.7l-0.41,-0.89l1.79,-1.79l0.02,-0.54l-1.32,-1.56l-0.48,-0.1l-2.24,1.09l-2.83,2.06l-1.51,1.83l-2.28,0.13l-1.55,1.49l-0.04,0.5l1.32,1.97l2.0,0.58l0.31,1.35l1.98,0.84l3.0,-1.96l2.0,1.02l1.49,0.11l0.22,0.83l-3.37,0.86l-1.12,1.48l-2.5,1.52l-1.29,1.99l0.14,0.56l2.57,1.48l0.97,2.7l3.17,4.63l-0.03,1.66l-1.35,0.65l-0.2,0.51l0.6,1.47l1.4,0.91l-0.89,3.82l-1.43,0.38l-3.85,6.44l-2.27,3.11l-6.78,4.57l-2.73,0.29l-1.45,1.04l-0.62,-0.61l-0.55,-0.01l-1.36,1.25l-3.39,1.27l-2.61,0.4l-1.1,2.79l-0.81,0.09l-0.49,-1.42l0.5,-0.85l-0.25,-0.59l-3.36,-0.84l-1.3,0.4l-2.31,-0.62l-0.94,-0.84l0.33,-1.28l-0.3,-0.49l-2.19,-0.46l-1.13,-0.93l-0.47,-0.02l-2.06,1.36l-4.29,0.28l-2.76,1.05l-0.28,0.43l0.32,2.53l-0.59,-0.03l-0.19,-1.34l-0.55,-0.34l-1.68,0.7l-2.46,-1.23l0.62,-1.87l-0.26,-0.51l-1.37,-0.44l-0.54,-2.22l-0.45,-0.3l-2.13,0.35l0.24,-2.48l2.39,-2.4l0.03,-4.31l-1.19,-0.92l-0.78,-1.49l-0.41,-0.21l-1.41,0.19l-1.98,-0.3l0.46,-1.07l-1.17,-1.7l-0.55,-0.11l-1.63,1.05l-2.25,-0.57l-2.89,1.73l-2.25,1.98l-1.75,0.29l-1.17,-0.71l-3.31,-0.65l-1.48,0.79l-1.04,1.27l-0.12,-1.17l-0.54,-0.34l-1.44,0.54l-5.55,-0.86l-1.98,-1.16l-1.89,-0.54l-0.99,-1.35l-1.34,-0.37l-2.55,-1.79l-2.01,-0.84l-1.21,0.56l-5.57,-3.45l-0.53,-2.31l1.19,0.25l0.48,-0.37l0.08,-1.42l-0.98,-1.56l0.15,-2.44l-2.69,-3.32l-4.12,-1.23l-0.67,-2.0l-1.92,-1.48l-0.38,-0.7l-0.51,-3.01l-1.52,-0.66l-0.7,0.13l-0.48,-2.05l0.55,-0.51l-0.09,-0.82l2.03,-1.19l1.6,-0.54l2.56,0.38l0.42,-0.22l0.85,-1.7l3.0,-0.33l1.1,-1.26l4.05,-1.77l0.39,-0.91l-0.17,-1.44l1.45,-0.67l0.2,-0.52l-2.07,-4.9l4.51,-1.12l1.37,-0.73l1.89,-5.51l4.98,0.86l1.51,-1.7l0.11,-2.87l1.99,-0.38l1.83,-2.06l0.49,-0.13l0.68,2.08l2.23,1.77l3.44,1.16l1.55,2.29l-0.92,3.49l0.96,1.67l6.54,1.13l2.95,1.87l1.47,0.35l1.06,2.62l1.53,1.91l3.05,0.08l5.14,0.67l3.37,-0.41l2.36,0.43l3.65,1.8l3.06,0.04l1.45,0.88l2.87,-1.59l3.95,-1.02l3.83,-0.14l3.06,-1.14l1.77,-1.6l1.72,-1.01l0.17,-0.49l-1.1,-2.05l1.02,-1.54l4.02,0.8l2.45,-1.61l3.76,-1.19l1.96,-2.13l1.63,-0.83l3.51,-0.4l1.92,0.34l0.46,-0.3l0.17,-1.5l-2.27,-2.22l-2.11,-1.09l-2.18,1.11l-2.32,-0.47l-1.29,0.32l-0.4,-0.82l2.73,-5.16l3.02,1.06l3.53,-2.06l0.18,-1.68l2.16,-3.35l1.49,-1.35l-0.03,-1.85l-1.07,-0.85l1.54,-1.26l2.98,-0.59l3.23,-0.09l3.64,0.99l2.04,1.16l3.29,6.71l0.92,3.19ZM696.92,237.31l-1.87,1.08l-1.63,-0.64l-0.06,-1.79l1.03,-0.98l2.58,-0.69l1.16,0.05l0.3,0.54l-0.98,1.06l-0.53,1.37Z", "name": "China"}, "CM": {"path": "M457.92,257.49l1.05,1.91l-1.4,0.16l-1.05,-0.23l-0.45,0.22l-0.54,1.19l0.08,0.45l1.48,1.47l1.05,0.45l1.01,2.46l-1.52,2.99l-0.68,0.68l-0.13,3.69l2.38,3.84l1.09,0.8l0.24,2.48l-3.67,-1.14l-11.27,-0.13l0.23,-1.79l-0.98,-1.66l-1.19,-0.54l-0.44,-0.97l-0.6,-0.42l1.71,-4.27l0.75,-0.13l1.38,-1.36l0.65,-0.03l1.71,0.99l1.93,-1.12l1.14,-3.18l1.38,-1.17l2.0,-5.14l2.17,-2.13l0.3,-1.64l-0.86,-0.88l0.03,-0.33l0.94,1.28l0.07,3.22Z", "name": "Cameroon"}, "CL": {"path": "M246.5,429.18l-3.14,1.83l-0.57,3.16l-0.64,0.05l-2.68,-1.06l-2.82,-2.33l-3.04,-1.89l-0.69,-1.85l0.63,-2.14l-1.21,-2.11l-0.31,-5.37l1.01,-2.91l2.57,-2.38l-0.
2940918,-0.68l-3.16,-0.77l2.05,-2.47l0.77,-4.65l2.32,0.9l0.54,-0.29l1.31,-6.31l-0.22,-0.44l-1.68,-0.8l-0.56,0.28l-0.7,3.36l-0.81,-0.22l1.56,-9.41l1.15,-2.24l-0.71,-2.82l-0.18,-2.84l1.01,-0.33l3.26,-9.14l1.07,-4.22l-0.56,-4.21l0.74,-2.34l-0.29,-3.27l1.46,-3.34l2.04,-16.59l-0.66,-7.76l1.03,-0.53l0.54,-0.9l0.79,1.14l0.32,1.78l1.25,1.16l-0.69,2.55l1.33,2.9l0.97,3.59l0.46,0.29l1.5,-0.3l0.11,0.23l-0.76,2.44l-2.57,1.23l-0.23,0.37l0.08,4.33l-0.46,0.77l0.56,1.21l-1.58,1.51l-1.68,2.62l-0.89,2.47l0.2,2.7l-1.48,2.73l1.12,5.09l0.64,0.61l-0.01,2.29l-1.38,2.68l0.01,2.4l-1.89,2.04l0.02,2.75l0.69,2.57l-1.43,1.13l-1.26,5.68l0.39,3.51l-0.97,0.89l0.58,3.5l1.02,1.14l-0.65,1.02l0.15,0.57l1.0,0.53l0.16,0.69l-1.03,0.85l0.26,1.75l-0.89,4.03l-1.31,2.66l0.24,1.75l-0.71,1.83l-1.99,1.7l0.3,3.67l0.88,1.19l1.58,0.01l0.01,2.21l1.04,1.95l5.98,0.63ZM248.69,430.79l0.0,7.33l0.4,0.4l3.52,0.05l-0.44,0.75l-1.94,0.98l-2.49,-0.37l-1.88,-1.06l-2.55,-0.49l-5.59,-3.71l-2.38,-2.63l4.1,2.48l3.32,1.23l0.45,-0.12l1.29,-1.57l0.83,-2.32l2.05,-1.24l1.31,0.29Z", "name": "Chile"}, "CA": {"path": 
vendor: 8,887 bytes, line 29409
29409"M280.06,145.6l-1.67,2.88l0.07,0.49l0.5,0.04l1.46,-0.98l1.0,0.42l-0.56,0.72l0.17,0.62l2.22,0.89l1.35,-0.71l1.95,0.78l-0.66,2.01l0.5,0.51l1.32,-0.42l0.98,3.17l-0.91,2.41l-0.8,0.08l-1.23,-0.45l0.47,-2.25l-0.89,-0.83l-0.48,0.06l-2.78,2.63l-0.34,-0.02l1.02,-0.85l-0.14,-0.69l-2.4,-0.77l-7.4,0.08l-0.17,-0.41l1.3,-0.94l0.02,-0.64l-0.73,-0.58l1.85,-1.74l2.57,-5.16l1.47,-1.79l1.99,-1.05l0.46,0.06l-1.53,2.45ZM68.32,74.16l4.13,0.95l4.02,2.14l2.61,0.4l2.47,-1.89l2.88,-1.31l3.85,0.48l3.71,-1.94l3.82,-1.04l1.56,1.68l0.49,0.08l1.87,-1.04l0.65,-1.98l1.24,0.35l4.16,3.94l0.54,0.01l2.75,-2.49l0.26,2.59l0.49,0.35l3.08,-0.73l1.04,-1.27l2.73,0.23l3.83,1.86l5.86,1.61l3.47,0.75l2.44,-0.26l2.73,1.78l-2.98,1.81l-0.19,0.41l0.31,0.32l4.53,0.92l6.87,-0.5l2.0,-0.69l2.49,2.39l0.53,0.02l2.72,-2.16l-0.02,-0.64l-2.16,-1.54l1.15,-1.06l4.83,-0.61l1.84,0.95l2.48,2.31l3.01,-0.23l4.55,1.92l3.85,-0.67l3.61,0.1l0.41,-0.44l-0.25,-2.36l1.79,-0.61l3.49,1.32l-0.01,3.77l0.31,0.39l0.45,-0.22l1.48,-3.16l1.74,0.1l0.41,-0.3l1.13,-4.37l-2.78,-3.11l-2.8,-1.74l0.19,-4.64l2.71,-3.07l2.98,0.67l2.41,1.95l3.19,4.8l-1.99,1.97l0.21,0.68l4.33,0.84l-0.01,4.15l0.25,0.37l0.44,-0.09l3.07,-3.15l2.54,2.39l-0.61,3.33l2.42,2.88l0.61,0.0l2.61,-3.08l1.88,-3.82l0.17,-4.58l6.72,0.94l3.13,2.04l0.13,1.82l-1.76,2.19l-0.01,0.49l1.66,2.16l-0.26,1.71l-4.68,2.8l-3.28,0.61l-2.47,-1.2l-0.55,0.23l-0.73,2.04l-2.38,3.43l-0.74,1.77l-2.74,2.57l-3.44,0.25l-2.21,1.78l-0.28,2.53l-2.82,0.55l-3.12,3.22l-2.72,4.31l-1.03,3.17l-0.14,4.31l0.33,0.41l3.44,0.57l2.24,5.95l0.45,0.23l3.4,-0.69l4.52,1.51l2.43,1.31l1.91,1.73l3.1,0.96l2.62,1.46l6.6,0.54l-0.35,2.74l0.81,3.53l1.81,3.78l3.83,3.3l0.45,0.04l2.1,-1.28l1.37,-3.69l-1.31,-5.38l-1.45,-1.58l3.57,-1.47l2.84,-2.46l1.52,-2.8l-0.25,-2.55l-1.7,-3.07l-2.85,-2.61l2.8,-3.95l-1.08,-3.37l-0.79,-5.67l1.36,-0.7l6.76,1.41l2.12,-0.96l5.12,3.36l1.05,1.61l4.08,0.26l-0.06,2.87l0.83,4.7l0.3,0.32l2.16,0.54l1.73,2.06l0.5,0.09l3.63,-2.03l2.52,-4.19l1.26,-1.32l7.6,11.72l-0.92,2.04l0.16,0.51l3.3,1.97l2.22,1.98l4.1,0.98l1.43,0.99l0.95,2.79l2.1,0.68l0.84,1.08l0.17,3.45l-3.37,2.26l-4.22,1.24l-3.06,2.63l-4.06,0.51l-5.35,-0.69l-6.39,0.2l-2.3,2.41l-3.26,1.51l-6.47,7.15l-0.06,0.48l0.44,0.19l2.13,-0.52l4.17,-4.24l5.12,-2.62l3.52,-0.3l1.69,1.21l-2.12,2.21l0.81,3.47l1.02,2.61l3.47,1.6l4.14,-0.45l2.15,-2.8l0.26,1.48l1.14,0.8l-2.56,1.69l-5.5,1.82l-2.54,1.27l-2.74,2.15l-1.4,-0.16l-0.07,-2.01l4.14,-2.44l0.18,-0.45l-0.39,-0.29l-6.63,0.45l-1.39,-1.49l-0.14,-4.43l-1.11,-0.91l-1.82,0.39l-0.66,-0.66l-0.6,0.03l-1.91,2.39l-0.82,2.52l-0.8,1.27l-1.67,0.56l-0.46,0.76l-8.31,0.07l-1.21,0.62l-2.35,1.97l-0.71,-0.14l-1.37,0.96l-1.12,-0.48l-4.74,1.26l-0.9,1.17l0.21,0.62l1.73,0.3l-1.81,0.31l-1.85,0.81l-2.11,-0.13l-2.95,1.78l-0.69,-0.09l1.39,-2.1l1.73,-1.21l0.1,-2.29l1.16,-1.99l0.49,0.53l2.03,0.42l1.2,-1.16l0.02,-0.47l-2.66,-3.51l-2.28,-0.61l-5.64,-0.71l-0.4,-0.57l-0.79,0.13l0.2,-0.41l-0.22,-0.55l-0.68,-0.26l0.19,-1.26l-0.78,-0.73l0.31,-0.64l-0.29,-0.57l-2.6,-0.44l-0.75,-1.63l-0.94,-0.66l-4.31,-0.65l-1.13,1.19l-1.48,0.59l-0.85,1.06l-2.83,-0.76l-2.09,0.39l-2.39,-0.97l-4.24,-0.7l-0.57,-0.4l-0.41,-1.63l-0.4,-0.3l-0.85,0.02l-0.39,0.4l-0.01,0.85l-69.13,-0.01l-6.51,-4.52l-4.5,-1.38l-1.26,-2.66l0.33,-1.93l-0.23,-0.43l-3.01,-1.35l-0.55,-2.77l-2.89,-2.38l-0.04,-1.45l1.39,-1.83l-0.28,-2.55l-4.16,-2.2l-4.07,-6.6l-4.02,-3.22l-1.3,-1.88l-0.5,-0.13l-2.51,1.21l-2.23,1.87l-3.85,-3.88l-2.44,-1.04l-2.22,-0.13l0.03,-37.49ZM260.37,148.65l3.04,0.76l2.26,1.2l-3.78,-0.95l-1.53,-1.01ZM249.4,3.81l6.68,0.49l5.32,0.79l4.26,1.57l-0.07,1.1l-5.85,2.53l-6.02,1.21l-2.39,1.39l-0.18,0.45l0.39,0.29l4.01,-0.02l-4.65,2.82l-4.2,1.74l-4.19,4.59l-5.03,0.92l-1.67,1.15l-7.47,0.59l-0.37,0.37l0.32,0.42l2.41,0.49l-0.81,0.47l-0.12,0.59l1.83,2.41l-2.02,1.59l-3.81,1.51l-1.32,2.16l-3.38,1.53l-0.22,0.48l0.35,1.19l0.4,0.29l3.88,-0.18l0.03,0.61l-6.33,2.95l-6.41,-1.4l-7.43,0.79l-3.72,-0.62l-4.4,-0.25l-0.23,-1.83l4.29,-1.11l0.28,-0.51l-1.1,-3.45l1.0,-0.25l6.58,2.28l0.47,-0.16l-0.05,-0.49l-3.41,-3.45l-3.58,-0.98l1.48,-1.55l4.34,-1.29l0.97,-2.19l-0.16,-0.48l-3.42,-2.13l-0.81,-2.26l6.2,0.22l2.24,0.58l3.91,-2.1l0.2,-0.43l-0.35,-0.32l-5.64,-0.67l-8.73,0.36l-4.26,-1.9l-2.12,-2.4l-2.78,-1.66l-0.41,-1.52l3.31,-1.03l2.93,-0.2l4.91,-0.99l3.7,-2.27l2.87,0.3l2.62,1.67l0.56,-0.14l1.82,-3.2l3.13,-0.94l4.44,-0.69l7.53,-0.26l1.48,0.67l7.19,-1.06l10.8,0.79ZM203.85,57.54l0.01,0.42l1.97,2.97l0.68,-0.02l2.24,-3.72l5.95,-1.86l4.01,4.64l-0.35,2.91l0.5,0.43l4.95,-1.36l2.32,-1.8l5.31,2.28l3.27,2.11l0.3,1.84l0.48,0.33l4.42,-0.99l2.64,2.87l5.97,1.77l2.06,1.72l2.11,3.71l-4.19,1.86l-0.01,0.73l5.9,2.83l3.94,0.94l3.78,3.95l3.46,0.25l-0.63,2.37l-4.11,4.47l-2.76,-1.56l-3.9,-3.94l-3.59,0.41l-0.33,0.34l-0.19,2.72l2.63,2.38l3.42,1.89l0.94,0.97l1.55,3.75l-0.7,2.29l-2.74,-0.92l-6.25,-3.15l-0.51,0.13l0.05,0.52l6.07,5.69l0.18,0.59l-6.09,-1.39l-5.31,-2.24l-2.63,-1.66l0.6,-0.77l-0.12,-0.6l-7.39,-4.01l-0.59,0.37l0.03,0.79l-6.73,0.6l-1.69,-1.1l1.36,-2.46l4.51,-0.07l5.15,-0.52l0.31,-0.6l-0.74,-1.3l0.78,-1.84l3.21,-4.05l-0.67,-2.35l-1.11,-1.6l-3.84,-2.1l-4.35,-1.28l0.91,-0.63l0.06,-0.61l-2.65,-2.75l-2.34,-0.36l-1.89,-1.46l-0.53,0.03l-1.24,1.23l-4.36,0.55l-9.04,-0.99l-9.26,-1.98l-1.6,-1.22l2.22,-1.77l0.13,-0.44l-0.38,-0.27l-3.22,-0.02l-0.72,-4.25l1.83,-4.04l2.42,-1.85l5.5,-1.1l-1.39,2.35ZM261.19,159.33l2.07,0.61l1.44,-0.04l-1.15,0.63l-2.94,-1.23l-0.4,-0.68l0.36,-0.37l0.61,1.07ZM230.83,84.39l-2.37,0.18l-0.49,-1.63l0.93,-2.09l1.94,-0.51l1.62,0.99l0.02,1.52l-1.66,1.54ZM229.43,58.25l0.11,0.65l-4.87,-0.21l-2.72,0.62l-3.1,-2.57l0.08,-1.26l0.86,-0.23l5.57,0.51l4.08,2.5ZM222.0,105.02l-0.72,1.49l-0.63,-0.19l-0.48,-0.84l0.81,-0.99l0.65,0.05l0.37,0.46ZM183.74,38.32l2.9,1.7l4.79,-0.01l1.84,1.46l-0.49,1.68l0.23,0.48l2.82,1.14l1.76,1.26l7.01,0.65l4.1,-1.1l5.03,-0.43l3.93,0.35l2.48,1.77l0.46,1.7l-1.3,1.1l-3.56,1.01l-3.23,-0.59l-7.17,0.76l-5.09,0.09l-3.99,-0.6l-6.42,-1.54l-0.79,-2.51l-0.3,-2.49l-2.64,-2.5l-5.32,-0.72l-2.52,-1.4l0.68,-1.57l4.78,0.31ZM207.38,91.35l0.4,1.56l0.56,0.26l1.06,-0.52l1.32,0.96l5.42,2.57l0.2,1.68l0.46,0.35l1.68,-0.28l1.15,0.85l-1.55,0.87l-3.61,-0.88l-1.32,-1.69l-0.57,-0.06l-2.45,2.1l-3.12,1.79l-0.7,-1.87l-0.42,-0.26l-2.16,0.24l1.39,-1.39l0.32,-3.14l0.76,-3.35l1.18,0.22ZM215.49,102.6l-2.67,1.95l-1.4,-0.07l-0.3,-0.58l1.53,-1.48l2.84,0.18ZM202.7,24.12l2.53,1.59l-2.87,1.4l-4.53,4.05l-4.25,0.38l-5.03,-0.68l-2.45,-2.04l0.03,-1.62l1.82,-1.37l0.14,-0.45l-0.38,-0.27l-4.45,0.04l-2.59,-1.76l-1.41,-2.29l1.57,-2.32l1.62,-1.66l2.44,-0.39l0.25,-0.65l-0.6,-0.74l4.86,-0.25l3.24,3.11l8.16,2.3l1.9,3.61ZM187.47,59.2l-2.76,3.49l-2.38,-0.15l-1.44,-3.84l0.04,-2.2l1.19,-1.88l2.3,-1.23l5.07,0.17l4.11,1.02l-3.24,3.72l-2.88,0.89ZM186.07,48.79l-1.08,1.53l-3.34,-0.34l-2.56,-1.1l1.03,-1.75l3.25,-1.23l1.95,1.58l0.75,1.3ZM185.71,35.32l-5.3,-0.2l-0.32,-0.71l4.31,0.07l1.3,0.84ZM180.68,32.48l-3.34,1.0l-1.79,-1.1l-0.98,-1.87l-0.15,-1.73l4.1,0.53l2.67,1.7l-0.51,1.47ZM180.9,76.31l-1.1,1.08l-3.13,-1.23l-2.12,0.43l-2.71,-1.57l1.72,-1.09l1.55,-1.72l3.81,1.9l1.98,2.2ZM169.74,54.87l2.96,0.97l4.17,-0.57l0.41,0.88l-2.14,2.11l0.09,0.64l3.55,1.92l-0.4,3.72l-3.79,1.65l-2.17,-0.35l-1.72,-1.74l-6.02,-3.5l0.03,-0.85l4.68,0.54l0.4,-0.21l-0.05,-0.45l-2.48,-2.81l2.46,-1.95ZM174.45,40.74l1.37,1.73l0.07,2.44l-1.05,3.45l-3.79,0.47l-2.32,-0.69l0.05,-2.64l-0.44,-0.41l-3.68,0.35l-0.12,-3.1l2.45,0.1l3.67,-1.73l3.41,0.29l0.37,-0.26ZM170.05,31.55l0.67,1.56l-3.33,-0.49l-4.22,-1.77l-4.35,-0.16l1.4,-0.94l-0.06,-0.7l-2.81,-1.23l-0.12,-1.39l4.39,0.68l6.62,1.98l1.81,2.47ZM134.5,58.13l-1.02,1.82l0.45,0.58l5.4,-1.39l3.33,2.29l0.49,-0.03l2.6,-2.23l1.94,1.32l2.0,4.5l0.7,0.06l1.3,-2.29l-1.63,-4.46l1.69,-0.54l2.31,0.71l2.65,1.81l2.49,7.92l8.48,4.27l-0.19,1.35l-3.79,0.33l-0.26,0.67l1.4,1.49l-0.58,1.1l-4.23,-0.64l-4.43,-1.19l-3.0,0.28l-4.66,1.47l-10.52,1.04l-1.43,-2.02l-3.42,-1.2l-2.21,0.43l-2.51,-2.86l4.84,-1.05l3.6,0.19l3.27,-0.78l0.31,-0.39l-0.31,-0.39l-4.84,-1.06l-8.79,0.27l-0.85,-1.07l5.26,-1.66l0.27,-0.45l-0.4,-0.34l-3.8,0.06l-3.81,-1.06l1.81,-3.01l1.66,-1.79l6.48,-2.81l1.97,0.71ZM158.7,56.61l-1.7,2.44l-3.2,-2.75l0.37,-0.3l3.11,-0.18l1.42,0.79ZM149.61,42.73l1.01,1.89l0.5,0.18l2.14,-0.82l2.23,0.19l0.36,2.04l-1.33,2.09l-8.28,0.76l-6.35,2.15l-3.41,0.1l-0.19,-0.96l4.9,-2.08l0.23,-0.46l-0.41,-0.31l-11.25,0.59l-2.89,-0.74l3.04,-4.44l2.14,-1.32l6.81,1.69l4.58,3.06l4.37,0.39l0.36,-0.63l-3.36,-4.6l1.85,-1.53l2.18,0.51l0.77,2.26ZM144.76,34.41l-4.36,1.44l-3.0,-1.4l1.46,-1.24l3.47,-0.52l2.96,0.71l-0.52,1.01ZM145.13,29.83l-1.9,0.66l-3.67,-0.0l2.27,-1.61l3.3,0.95ZM118.92,65.79l-6.03,2.02l-1.33,-1.9l-5.38,-2.28l2.59,-5.05l2.16,-3.14l-0.02,-0.48l-1.97,-2.41l7.64,-0.7l3.6,1.02l6.3,0.27l4.42,2.95l-2.53,0.98l-6.24,3.43l-3.1,3.28l-0.11,2.01ZM129.54,35.53l-0.28,3.37l-1.72,1.62l-2.33,0.28l-4.61,2.19l-3.86,0.76l-2.64,-0.87l3.72,-3.4l5.01,-3.34l3.72,0.07l3.0,-0.67ZM111.09,152.69l-0.67,0.24l-3.85,-1.37l-0.83,-1.17l-2.12,-1.07l-0.66,-1.02l-2.4,-0.55l-0.74,-1.71l6.02,1.45l2.0,2.55l2.52,1.39l0.73,1.27ZM87.8,134.64l0.89,0.29l1.86,-0.21l-0.65,3.34l1.69,2.33l-1.31,-1.33l-0.99,-1.62l-1.17,-0.98l-0.33,-1.82Z",
29409 "name": "Canada"}, "CG": {"path": "M466.72,276.48l-0.1,1.03l-1.25,2.97l-0.19,3.62l-0.46,1.78l-0.23,0.63l-1.61,1.19l-1.21,1.39l-1.09,2.43l0.04,2.09l-3.25,3.24l-0.5,-0.24l-0.5,-0.83l-1.36,-0.02l-0.98,0.89l-1.68,-0.99l-1.54,1.24l-1.52,-1.96l1.57,-1.14l0.11,-0.52l-0.77,-1.35l2.1,-0.66l0.39,-0.73l1.05,0.82l2.21,0.11l1.12,-1.37l0.37,-1.81l-0.27,-2.09l-1.13,-1.5l1.0,-2.69l-0.13,-0.45l-0.92,-0.58l-1.6,0.17l-0.51,-0.94l0.1,-0.61l2.75,0.09l3.97,1.24l0.51,-0.33l0.17,-1.28l1.24,-2.21l1.28,-1.14l2.76,0.49Z", "name": "Congo"}, "CF": {"path": "M461.16,278.2l-0.26,-1.19l-1.09,-0.77l-0.84,-1.17l-0.29,-1.0l-1.04,-1.15l0.08,-3.43l0.58,-0.49l1.16,-2.35l1.85,-0.17l0.61,-0.62l0.97,0.58l3.15,-0.96l2.48,-1.92l0.02,-0.96l2.81,0.02l2.36,-1.17l1.93,-2.85l1.16,-0.93l1.11,-0.3l0.27,0.86l1.34,1.47l-0.39,2.01l0.3,1.01l4.01,2.75l0.17,0.93l2.63,2.31l0.6,1.44l2.08,1.4l-3.84,-0.21l-1.94,0.88l-1.23,-0.49l-2.67,1.2l-1.29,-0.18l-0.51,0.36l-0.6,1.22l-3.35,-0.65l-1.57,-0.91l-2.42,-0.83l-1.45,0.91l-0.97,1.27l-0.26,1.56l-3.22,-0.43l-1.49,1.33l-0.94,1.62Z", "name": "Central African Rep."}, "CD": {"path": "M487.01,272.38l2.34,-0.14l1.35,1.84l1.34,0.45l0.86,-0.39l1.21,0.12l1.07,-0.41l0.54,0.89l2.04,1.54l-0.14,2.72l0.7,0.54l-1.38,1.13l-1.53,2.54l-0.17,2.05l-0.59,1.08l-0.02,1.72l-0.72,0.84l-0.66,3.01l0.63,1.32l-0.44,4.26l0.64,1.47l-0.37,1.22l0.86,1.8l1.53,1.41l0.3,1.26l0.44,0.5l-4.08,0.75l-0.92,1.81l0.51,1.34l-0.74,5.43l0.17,0.38l2.45,1.46l0.54,-0.1l0.12,1.62l-1.28,-0.01l-1.85,-2.35l-1.94,-0.45l-0.48,-1.13l-0.55,-0.2l-1.41,0.74l-1.71,-0.3l-1.01,-1.18l-2.49,-0.19l-0.44,-0.77l-1.98,-0.21l-2.88,0.36l0.11,-2.41l-0.85,-1.13l-0.16,-1.36l0.32,-1.73l-0.46,-0.89l-0.04,-1.49l-0.4,-0.39l-2.53,0.02l0.1,-0.41l-0.39,-0.49l-1.28,0.01l-0.43,0.45l-1.62,0.32l-0.83,1.79l-1.09,-0.28l-2.4,0.52l-1.37,-1.91l-1.3,-3.3l-0.38,-0.27l-7.39,-0.03l-2.46,0.42l0.5,-0.45l0.37,-1.47l0.66,-0.38l0.92,0.08l0.73,-0.82l0.87,0.02l0.31,0.68l1.4,0.36l3.59,-3.63l0.01,-2.23l1.02,-2.29l2.69,-2.39l0.43,-0.99l0.49,-1.96l0.17,-3.51l1.25,-2.95l0.36,-3.14l0.86,-1.13l1.1,-0.66l3.57,1.73l3.65,0.73l0.46,-0.21l0.8,-1.46l1.24,0.19l2.61,-1.17l0.81,0.44l1.04,-0.03l0.59,-0.66l0.7,-0.16l1.81,0.25Z", "name": "Dem. Rep. Congo"}
29409, "CZ": {"path": "M458.46,144.88l1.22,1.01l1.47,0.23l0.13,0.93l1.36,0.68l0.54,-0.2l0.24,-0.55l1.15,0.25l0.53,1.09l1.68,0.18l0.6,0.84l-1.04,0.73l-0.96,1.28l-1.6,0.17l-0.55,0.56l-1.04,-0.46l-1.05,0.15l-2.12,-0.96l-1.05,0.34l-1.2,1.12l-1.56,-0.87l-2.57,-2.1l-0.53,-1.88l4.7,-2.52l0.71,0.26l0.9,-0.28Z", "name": "Czech Rep."}, "CY": {"path": "M504.36,193.47l0.43,0.28l-1.28,0.57l-0.92,-0.28l-0.24,-0.46l2.01,-0.13Z", "name": "Cyprus"}, "CR": {"path": "M211.34,258.05l0.48,0.99l1.6,1.6l-0.54,0.45l0.29,1.42l-0.25,1.19l-1.09,-0.59l-0.05,-1.25l-2.46,-1.42l-0.28,-0.77l-0.66,-0.45l-0.45,-0.0l-0.11,1.04l-1.32,-0.95l0.31,-1.3l-0.36,-0.6l0.31,-0.27l1.42,0.58l1.29,-0.14l0.56,0.56l0.74,0.17l0.55,-0.27Z", "name": "Costa Rica"}, "CU": {"path": "M221.21,227.25l1.27,1.02l2.19,-0.28l4.43,3.33l2.08,0.43l-0.1,0.38l0.36,0.5l1.75,0.1l1.48,0.84l-3.11,0.51l-4.15,-0.03l0.77,-0.67l-0.04,-0.64l-1.2,-0.74l-1.49,-0.16l-0.7,-0.61l-0.56,-1.4l-0.4,-0.25l-1.34,0.1l-2.2,-0.66l-0.88,-0.58l-3.18,-0.4l-0.27,-0.16l0.58,-0.74l-0.36,-0.29l-2.72,-0.05l-1.7,1.29l-0.91,0.03l-0.61,0.69l-1.01,0.22l1.11,-1.29l1.01,-0.52l3.69,-1.01l3.98,0.21l2.21,0.84Z", "name": "Cuba"}, "SZ": {"path": "M500.35,351.36l0.5,2.04l-0.38,0.89l-1.05,0.21l-1.23,-1.2l-0.02,-0.64l0.83,-1.57l1.34,0.27Z", "name": "Swaziland"}, "SY": {"path": "M511.0,199.79l0.05,-1.33l0.54,-1.36l1.28,-0.99l0.13,-0.45l-0.41,-1.11l-1.14,-0.36l-0.19,-1.74l0.52,-1.0l1.29,-1.21l0.2,-1.18l0.59,0.23l2.62,-0.76l1.36,0.52l2.06,-0.01l2.95,-1.08l3.25,-0.26l-0.67,0.94l-1.28,0.66l-0.21,0.4l0.23,2.01l-0.88,3.19l-10.15,5.73l-2.15,-0.85Z", "name": "Syria"}, "KG": {"path": "M621.35,172.32l-3.87,1.69l-0.96,1.18l-3.04,0.34l-1.13,1.86l-2.36,-0.35l-1.99,0.63l-2.39,1.4l0.06,0.95l-0.4,0.37l-4.52,0.43l-3.02,-0.93l-2.37,0.17l0.11,-0.79l2.32,0.42l1.13,-0.88l1.99,0.2l3.21,-2.14l-0.03,-0.69l-2.97,-1.57l-1.94,0.65l-1.22,-0.74l1.71,-1.58l-0.12,-0.67l-0.36,-0.15l0.32,-0.77l1.36,-0.35l4.02,1.02l0.49,-0.3l0.35,-1.59l1.09,-0.48l3.42,1.22l1.11,-0.31l7.64,0.39l1.16,1.0l1.23,0.39Z", "name": "Kyrgyzstan"}, "KE": {"path": "M506.26,284.69l1.87,-2.56l0.93,-2.15l-1.38,-4.08l-1.06,-1.6l2.82,-2.75l0.79,0.26l0.12,1.41l0.86,0.83l1.9,0.11l3.28,2.13l3.57,0.44l1.05,-1.12l1.96,-0.9l0.82,0.68l1.16,0.09l-1.78,2.45l0.03,9.12l1.3,1.94l-1.37,0.78l-0.67,1.03l-1.08,0.46l-0.34,1.67l-0.81,1.07l-0.45,1.55l-0.68,0.56l-3.2,-2.23l-0.35,-1.58l-8.86,-4.98l0.14,-1.6l-0.57,-1.04Z", "name": "Kenya"}, "SS": {"path": "M481.71,263.34l1.07,-0.72l1.2,-3.18l1.36,-0.26l1.61,1.99l0.87,0.34l1.1,-0.41l1.5,0.07l0.57,0.53l2.49,0.0l0.44,-0.63l1.07,-0.4l0.45,-0.84l0.59,-0.33l1.9,1.33l1.6,-0.2l2.83,-3.33l-0.32,-2.21l1.59,-0.52l-0.24,1.6l0.3,1.83l1.35,1.18l0.2,1.87l0.35,0.41l0.02,1.53l-0.23,0.47l-1.42,0.25l-0.85,1.44l0.3,0.6l1.4,0.16l1.11,1.08l0.59,1.13l1.03,0.53l1.28,2.36l-4.41,3.98l-1.74,0.01l-1.89,0.55l-1.47,-0.52l-1.15,0.57l-2.96,-2.62l-1.3,0.49l-1.06,-0.15l-0.79,0.39l-0.82,-0.22l-1.8,-2.7l-1.91,-1.1l-0.66,-1.5l-2.62,-2.32l-0.18,-0.94l-2.37,-1.6Z", "name": "S. Sudan"}, "SR": {"path": "M283.12,270.19l2.1,0.53l-1.08,1.95l0.2,1.72l0.93,1.49l-0.59,2.03l-0.43,0.71l-1.12,-0.42l-1.32,0.22l-0.93,-0.2l-0.46,0.26l-0.25,0.73l0.33,0.7l-0.89,-0.13l-1.39,-1.97l-0.31,-1.34l-0.97,-0.31l-0.89,-1.47l0.35,-1.61l1.45,-0.82l0.33,-1.87l2.61,0.44l0.57,-0.47l1.75,-0.16Z", "name": "Suriname"}, "KH": {"path": "M689.52,249.39l0.49,1.45l-0.28,2.74l-4.0,1.86l-0.16,0.6l0.68,0.95l-2.06,0.17l-2.05,0.97l-1.82,-0.32l-2.12,-3.7l-0.55,-2.85l1.4,-1.85l3.02,-0.45l2.23,0.35l2.01,0.98l0.51,-0.14l0.95,-1.48l1.74,0.74Z", "name": "Cambodia"}, "SV": {"path": "M195.8,250.13l1.4,-1.19l2.24,1.45l0.98,-0.27l0.44,0.2l-0.27,1.05l-1.14,-0.03l-3.64,-1.21Z", "name": "El Salvador"}, "SK": {"path": "M476.82,151.17l-1.14,1.9l-2.73,-0.92l-0.82,0.2l-0.74,0.8l-3.46,0.73l-0.47,0.69l-1.76,0.33l-1.88,-1.0l-0.18,-0.81l0.38,-0.75l1.87,-0.32l1.74,-1.89l0.83,0.16l0.79,-0.34l1.51,1.04l1.34,-0.63l1.25,0.3l1.65,-0.42l1.81,0.95Z", "name": "Slovakia"}, "KR": {"path": "M737.51,185.84l0.98,-0.1l0.87,-1.17l2.69,-0.32l0.33,-0.29l1.76,2.79l0.58,1.76l0.02,3.12l-0.8,1.32l-2.21,0.55l-1.93,1.13l-1.8,0.19l-0.2,-1.1l0.43,-2.28l-0.95,-2.56l1.43,-0.37l0.23,-0.62l-1.43,-2.06Z", "name": "Korea"}, "SI": {"path": "M456.18,162.07l-0.51,-1.32l0.18,-1.05l1.69,0.2l1.42,-0.71l2.09,-0.07l0.62,-0.51l0.21,0.47l-1.61,0.67l-0.44,1.34l-0.66,0.24l-0.26,0.82l-1.22,-0.49l-0.84,0.46l-0.69,-0.04Z", "name": "Slovenia"}, "KP": {"path": "M736.77,185.16l-0.92,-0.42l-0.88,0.62l-1.21,-0.88l0.96,-1.
2940915l0.59,-2.59l-0.46,-0.74l-2.09,-0.77l1.64,-1.52l2.72,-1.58l1.58,-1.91l1.11,0.78l2.17,0.11l0.41,-0.5l-0.3,-1.22l3.52,-1.18l0.94,-1.4l0.98,1.08l-2.19,2.18l0.01,2.14l-1.06,0.54l-1.41,1.4l-1.7,0.52l-1.25,1.09l-0.14,1.98l0.94,0.45l1.15,1.04l-0.13,0.26l-2.6,0.29l-1.13,1.29l-1.22,0.08Z", "name": "Dem. Rep. Korea"}, "SO": {"path": "M525.13,288.48l-1.13,-1.57l-0.03,-8.86l2.66,-3.38l1.67,-0.13l2.13,-1.69l3.41,-0.23l7.08,-7.55l2.91,-3.69l0.08,-4.82l2.98,-0.67l1.24,-0.86l0.45,-0.0l-0.2,3.0l-1.21,3.62l-2.73,5.97l-2.13,3.65l-5.03,6.16l-8.56,6.4l-2.78,3.08l-0.8,1.56Z", "name": "Somalia"}, "SN": {"path": "M390.09,248.21l0.12,1.55l0.49,1.46l0.96,0.82l0.05,1.28l-1.26,-0.19l-0.75,0.33l-1.84,-0.61l-5.84,-0.13l-2.54,0.51l-0.22,-1.03l1.77,0.04l2.01,-0.91l1.03,0.48l1.09,0.04l1.29,-0.62l0.14,-0.58l-0.51,-0.74l-1.81,0.25l-1.13,-0.63l-0.79,0.04l-0.72,0.61l-2.31,0.06l-0.92,-1.77l-0.81,-0.64l0.64,-0.35l2.46,-3.74l1.04,0.19l1.38,-0.56l1.19,-0.02l2.72,1.37l3.03,3.48Z", "name": "Senegal"}, "SL": {"path": "M394.46,264.11l-1.73,1.98l-0.58,1.33l-2.07,-1.06l-1.22,-1.26l-0.65,-2.39l1.16,-0.96l0.67,-1.17l1.21,-0.52l1.66,0.0l1.03,1.64l0.52,2.41Z", "name": "Sierra Leone"}, "SB": {"path": "M826.69,311.6l-0.61,0.09l-0.2,-0.33l0.37,0.15l0.44,0.09ZM824.18,307.38l-0.26,-0.3l-0.31,-0.91l0.03,0.0l0.54,1.21ZM823.04,309.33l-1.66,-0.22l-0.2,-0.52l1.16,0.28l0.69,0.46ZM819.28,304.68l1.14,0.65l0.02,0.03l-0.81,-0.44l-0.35,-0.23Z", "name": "Solomon Is."}, "SA": {"path": "M537.53,210.34l2.0,0.24l0.9,1.32l1.49,-0.06l0.87,2.08l1.29,0.76l0.51,0.99l1.56,1.03l-0.1,1.9l0.32,0.9l1.58,2.47l0.76,0.53l0.7,-0.04l1.68,4.23l7.53,1.33l0.51,-0.29l0.77,1.25l-1.55,4.87l-7.29,2.52l-7.3,1.03l-2.34,1.17l-1.88,2.74l-0.76,0.28l-0.82,-0.78l-0.91,0.12l-2.88,-0.51l-3.51,0.25l-0.86,-0.56l-0.57,0.15l-0.66,1.27l0.16,1.11l-0.43,0.32l-0.93,-1.4l-0.33,-1.16l-1.23,-0.88l-1.27,-2.06l-0.78,-2.22l-1.73,-1.79l-1.14,-0.48l-1.54,-2.31l-0.21,-3.41l-1.44,-2.93l-1.27,-1.16l-1.33,-0.57l-1.31,-3.37l-0.77,-0.67l-0.97,-1.97l-2.8,-4.03l-1.06,-0.17l0.37,-1.96l0.2,-0.72l2.74,0.3l1.08,-0.84l0.6,-0.94l1.74,-0.35l0.65,-1.03l0.71,-0.4l0.1,-0.62l-2.06,-2.28l4.39,-1.22l0.48,-0.37l2.77,0.69l3.66,1.9l7.03,5.5l4.87,0.3Z", "name": "Saudi Arabia"}, "SE": {"path": "M480.22,89.3l-4.03,1.17l-2.43,2.86l0.26,2.57l-8.77,6.64l-1.78,5.79l1.78,2.68l2.22,1.96l-2.07,3.77l-2.72,1.13l-0.95,6.04l-1.29,3.01l-2.74,-0.31l-0.4,0.22l-1.31,2.59l-2.34,0.13l-0.75,-3.09l-2.08,-4.03l-1.83,-4.96l1.0,-1.93l2.14,-2.7l0.83,-4.45l-1.6,-2.17l-0.15,-4.94l1.48,-3.39l2.58,-0.15l0.87,-1.59l-0.78,-1.57l3.76,-5.59l4.04,-7.48l2.17,0.01l0.39,-0.29l0.57,-2.07l4.37,0.64l0.46,-0.34l0.33,-2.56l1.1,-0.13l6.94,4.87l0.06,6.32l0.66,1.36Z", "name": "Sweden"}, "SD": {"path": "M505.98,259.4l-0.34,-0.77l-1.17,-0.9l-0.26,-1.61l0.29,-1.81l-0.34,-0.46l-1.16,-0.17l-0.54,0.59l-1.23,0.11l-0.28,0.65l0.53,0.65l0.17,1.22l-2.44,3.0l-0.96,0.19l-2.39,-1.4l-0.95,0.52l-0.38,0.78l-1.11,0.41l-0.29,0.5l-1.94,0.0l-0.54,-0.52l-1.81,-0.09l-0.95,0.4l-2.45,-2.35l-2.07,0.54l-0.73,1.26l-0.6,2.1l-1.25,0.58l-0.75,-0.62l0.27,-2.65l-1.48,-1.78l-0.22,-1.48l-0.92,-0.96l-0.02,-1.29l-0.57,-1.16l-0.68,-0.16l0.69,-1.29l-0.18,-1.14l0.65,-0.62l0.03,-0.55l-0.36,-0.41l1.55,-2.97l1.91,0.16l0.43,-0.4l-0.1,-10.94l2.49,-0.01l0.4,-0.4l-0.0,-4.82l29.02,0.0l0.64,2.04l-0.49,0.66l0.36,2.69l0.93,3.16l2.12,1.55l-0.89,1.04l-1.72,0.39l-0.98,0.9l-1.43,5.65l0.24,1.15l-0.38,2.06l-0.96,2.38l-1.53,1.31l-1.32,2.91l-1.22,0.86l-0.37,1.34Z", "name": "Sudan"}, "DO": {"path": "M241.8,239.2l0.05,-0.65l-0.46,-0.73l0.42,-0.44l0.19,-1.0l-0.09,-1.53l1.66,0.01l1.99,0.63l0.33,0.67l1.28,0.19l0.33,0.76l1.0,0.08l0.8,0.62l-0.45,0.51l-1.13,-0.47l-1.88,-0.01l-1.27,0.59l-0.75,-0.55l-1.01,0.54l-0.79,1.4l-0.23,-0.61Z", "name": "Dominican Rep."}, "DJ": {"path": "M528.43,256.18l-0.45,0.66l-0.58,-0.25l-1.51,0.13l-0.18,-1.01l1.45,-1.95l0.83,0.17l0.77,-0.44l0.2,1.0l-1.2,0.51l-0.06,0.7l0.73,0.47Z", "name": "Djibouti"}, "DK": {"path": "M452.28,129.07l-1.19,2.24l-2.13,-1.6l-0.23,-0.95l2.98,-0.95l0.57,1.26ZM447.74,126.31l-0.26,0.57l-0.88,-0.07l-1.8,2.53l0.48,1.69l-1.09,0.36l-1.61,-0.39l-0.89,-1.69l-0.07,-3.43l0.96,-1.73l2.02,-0.2l1.09,-1.07l1.33,-0.67l-0.05,1.06l-0.73,1.41l0.3,1.0l1.2,0.64Z", "name": "Denmark"}, "DE": {"path": "M453.14,155.55l-0.55,-0.36l-1.2,-0.1l-1.87,0.57l-2.13,-0.13l-0.56,0.63l-0.86,-0.6l-0.96,0.09l-2.57,-0.93l-0.85,0.67l-1.47,-0.02l0.24,-1.75l1.23,-2.14l-0.28,-0.59l-3.52,-0.58l-0.92,-0.66l0.12,-1.2l-0.48,-0.88l0.27,-2.17l-0.37,-3.03l1.41,-0.22l0.63,-1.26l0.66,-3.19l-0.41,-1.18l0.26,-0.39l1.66,-0.15l0.33,0.54l0.62,0.07l1.7,-1.69l-0.54,-3.02l1.37,0.33l1.31,-0.37l0.31,1.18l2.25,0.71l-0.02,0.92l0.5,0.4l2.55,-0.65l1.34,-0.87l2.57,1.24l1.06,0.98l0.48,1.44l-0.57,0.74l-0.0,0.48l0.87,1.15l0.57,1.64l-0.
2940914,1.29l0.82,1.7l-1.5,-0.07l-0.56,0.57l-4.47,2.15l-0.22,0.54l0.68,2.26l2.58,2.16l-0.66,1.11l-0.79,0.36l-0.23,0.43l0.32,1.87Z", "name": "Germany"}, "YE": {"path": "M528.27,246.72l0.26,-0.42l-0.22,-1.01l0.19,-1.5l0.92,-0.69l-0.07,-1.35l0.39,-0.75l1.01,0.47l3.34,-0.27l3.76,0.41l0.95,0.81l1.36,-0.58l1.74,-2.62l2.18,-1.09l6.86,-0.94l2.48,5.41l-1.64,0.76l-0.56,1.9l-6.23,2.16l-2.29,1.8l-1.93,0.05l-1.41,1.02l-4.24,0.74l-1.72,1.49l-3.28,0.19l-0.52,-1.18l0.02,-1.51l-1.34,-3.29Z", "name": "Yemen"}, "AT": {"path": "M462.89,152.8l0.04,2.25l-1.07,0.0l-0.33,0.63l0.36,0.51l-1.04,2.13l-2.02,0.07l-1.33,0.7l-5.29,-0.99l-0.47,-0.93l-0.44,-0.21l-2.47,0.55l-0.42,0.51l-3.18,-0.81l0.43,-0.91l1.12,0.78l0.6,-0.17l0.25,-0.58l1.93,0.12l1.86,-0.56l1.0,0.08l0.68,0.57l0.62,-0.15l0.26,-0.77l-0.3,-1.78l0.8,-0.44l0.68,-1.15l1.52,0.85l0.47,-0.06l1.34,-1.25l0.64,-0.17l1.81,0.92l1.28,-0.11l0.7,0.37Z", "name": "Austria"}, "DZ": {"path": "M441.46,188.44l-0.32,1.07l0.39,2.64l-0.54,2.16l-1.58,1.82l0.37,2.39l1.91,1.55l0.18,0.8l1.42,1.03l1.84,7.23l0.12,1.16l-0.57,5.0l0.2,1.51l-0.87,0.99l-0.02,0.51l1.41,1.86l0.14,1.2l0.89,1.48l0.5,0.16l0.98,-0.41l1.73,1.08l0.82,1.23l-8.22,4.81l-7.23,5.11l-3.43,1.13l-2.3,0.21l-0.28,-1.59l-2.56,-1.09l-0.67,-1.25l-26.12,-17.86l0.01,-3.47l3.77,-1.88l2.44,-0.41l2.12,-0.75l1.08,-1.42l2.81,-1.05l0.35,-2.08l1.33,-0.29l1.04,-0.94l3.47,-0.69l0.46,-1.08l-0.1,-0.45l-0.58,-0.52l-0.82,-2.81l-0.19,-1.83l-0.78,-1.49l2.03,-1.31l2.63,-0.48l1.7,-1.22l2.31,-0.84l8.24,-0.73l1.49,0.38l2.28,-1.1l2.46,-0.02l0.92,0.6l1.35,-0.05Z", "name": "Algeria"}, "US": {"path": "M892.72,99.2l1.31,0.53l1.41,-0.37l1.89,0.98l1.89,0.42l-1.32,0.58l-2.9,-1.53l-2.08,0.22l-0.26,-0.15l0.07,-0.67ZM183.22,150.47l0.37,1.47l1.12,0.85l4.23,0.7l2.39,0.98l2.17,-0.38l1.85,0.5l-1.55,0.65l-3.49,2.61l-0.16,0.77l0.5,0.39l2.33,-0.61l1.77,1.02l5.15,-2.4l-0.31,0.65l0.25,0.56l1.36,0.38l1.71,1.16l4.7,-0.88l0.67,0.85l1.31,0.21l0.58,0.58l-1.34,0.17l-2.18,-0.32l-3.6,0.89l-2.71,3.25l0.35,0.9l0.59,-0.0l0.55,-0.6l-1.36,4.65l0.29,3.09l0.67,1.58l0.61,0.45l1.77,-0.44l1.6,-1.96l0.14,-2.21l-0.82,-1.96l0.11,-1.13l1.19,-2.37l0.44,-0.33l0.48,0.75l0.4,-0.29l0.4,-1.37l0.6,-0.47l0.24,-0.8l1.69,0.49l1.65,1.08l-0.03,2.37l-1.27,1.13l-0.0,1.13l0.87,0.36l1.66,-1.29l0.5,0.17l0.5,2.6l-2.49,3.75l0.17,0.61l1.54,0.62l1.48,0.17l1.92,-0.44l4.72,-2.15l2.16,-1.8l-0.05,-1.24l0.75,-0.22l3.92,0.36l2.12,-1.05l0.21,-0.4l-0.28,-1.48l3.27,-2.4l8.32,-0.02l0.56,-0.82l1.9,-0.77l0.93,-1.51l0.74,-2.37l1.58,-1.98l0.92,0.62l1.47,-0.47l0.8,0.66l-0.0,4.09l1.96,2.6l-2.34,1.31l-5.37,2.09l-1.83,2.72l0.02,1.79l0.83,1.59l0.54,0.23l-6.19,0.94l-2.2,0.89l-0.23,0.48l0.45,0.29l2.99,-0.46l-2.19,0.56l-1.13,0.0l-0.15,-0.32l-0.48,0.08l-0.76,0.82l0.22,0.67l0.32,0.06l-0.41,1.62l-1.27,1.58l-1.48,-1.07l-0.49,-0.04l-0.16,0.46l0.52,1.58l0.61,0.59l0.03,0.79l-0.95,1.38l-1.21,-1.22l-0.27,-2.27l-0.35,-0.35l-0.42,0.25l-0.48,1.27l0.33,1.41l-0.97,-0.27l-0.48,0.24l0.18,0.5l1.52,0.83l0.1,2.52l0.79,0.51l0.52,3.42l-1.42,1.88l-2.47,0.8l-1.71,1.66l-1.31,0.25l-1.27,1.03l-0.43,0.99l-2.69,1.78l-2.64,3.03l-0.45,2.12l0.45,2.08l0.85,2.38l1.09,1.9l0.04,1.2l1.16,3.06l-0.18,2.69l-0.55,1.43l-0.47,0.21l-0.89,-0.23l-0.49,-1.18l-0.87,-0.56l-2.75,-5.16l0.48,-1.68l-0.72,-1.78l-2.01,-2.38l-1.12,-0.53l-2.72,1.18l-1.47,-1.35l-1.57,-0.68l-2.99,0.31l-2.17,-0.3l-2.0,0.19l-1.15,0.46l-0.19,0.58l0.39,0.63l0.14,1.34l-0.84,-0.2l-0.84,0.46l-1.58,-0.07l-2.08,-1.44l-2.09,0.33l-1.91,-0.62l-3.73,0.84l-2.39,2.07l-2.54,1.22l-1.45,1.41l-0.61,1.38l0.34,3.71l-0.29,0.02l-3.5,-1.33l-1.25,-3.11l-1.44,-1.5l-2.24,-3.56l-1.76,-1.09l-2.27,-0.01l-1.71,2.07l-1.76,-0.69l-1.16,-0.74l-1.52,-2.98l-3.93,-3.16l-4.34,-0.0l-0.4,0.4l-0.0,0.74l-6.5,0.02l-9.02,-3.14l-0.34,-0.71l-5.7,0.49l-0.43,-1.29l-1.62,-1.61l-1.14,-0.38l-0.55,-0.88l-1.28,-0.13l-1.01,-0.77l-2.22,-0.27l-0.43,-0.3l-0.36,-1.58l-2.4,-2.83l-2.01,-3.85l-0.06,-0.9l-2.92,-3.26l-0.33,-2.29l-1.3,-1.66l0.52,-2.37l-0.09,-2.57l-0.78,-2.3l0.95,-2.82l0.61,-5.68l-0.47,-4.27l-1.46,-4.08l3.19,0.79l1.26,2.83l0.69,0.08l0.69,-1.14l-1.1,-4.79l68.76,-0.0l0.4,-0.4l0.14,-0.86ZM32.44,67.52l1.73,1.97l0.55,0.05l0.99,-0.79l3.65,0.24l-0.09,0.62l0.32,0.45l3.83,0.77l2.61,-0.43l5.19,1.4l4.84,0.43l1.89,0.57l3.42,-0.7l6.14,1.87l-0.03,38.06l0.38,0.4l2.39,0.11l2.31,0.98l3.9,3.99l0.55,0.04l2.4,-2.03l2.16,-1.04l1.2,1.71l3.95,3.14l4.09,6.63l4.2,2.29l0.06,1.83l-1.02,1.23l-1.
2940916,-1.08l-2.04,-1.03l-0.67,-2.89l-3.28,-3.03l-1.65,-3.57l-6.35,-0.32l-2.82,-1.01l-5.26,-3.85l-6.77,-2.04l-3.53,0.3l-4.81,-1.69l-3.25,-1.63l-2.78,0.8l-0.28,0.46l0.44,2.21l-3.91,0.96l-2.26,1.27l-2.3,0.65l-0.27,-1.65l1.05,-3.42l2.49,-1.09l0.16,-0.6l-0.69,-0.96l-0.55,-0.1l-3.19,2.12l-1.78,2.56l-3.55,2.61l-0.04,0.61l1.56,1.52l-2.07,2.29l-5.11,2.57l-0.77,1.66l-3.76,1.77l-0.92,1.73l-2.69,1.38l-1.81,-0.22l-6.95,3.32l-3.97,0.91l4.85,-2.5l2.59,-1.86l3.26,-0.52l1.19,-1.4l3.42,-2.1l2.59,-2.27l0.42,-2.68l1.23,-2.1l-0.04,-0.46l-0.45,-0.11l-2.68,1.03l-0.63,-0.49l-0.53,0.03l-1.05,1.04l-1.36,-1.54l-0.66,0.08l-0.32,0.62l-0.58,-1.14l-0.56,-0.16l-2.41,1.42l-1.07,-0.0l-0.17,-1.75l0.3,-1.71l-1.61,-1.33l-3.41,0.59l-1.96,-1.63l-1.57,-0.84l-0.15,-2.21l-1.7,-1.43l0.82,-1.88l1.99,-2.12l0.88,-1.92l1.71,-0.24l2.04,0.51l1.87,-1.77l1.91,0.25l1.91,-1.23l0.17,-0.43l-0.47,-1.82l-1.07,-0.7l1.39,-1.17l0.12,-0.45l-0.39,-0.26l-1.65,0.07l-2.66,0.88l-0.75,0.78l-1.92,-0.8l-3.46,0.44l-3.44,-0.91l-1.06,-1.61l-2.65,-1.99l2.91,-1.43l5.5,-2.0l1.52,0.0l-0.26,1.62l0.41,0.46l5.29,-0.16l0.3,-0.65l-2.03,-2.59l-3.14,-1.68l-1.79,-2.12l-2.4,-1.83l-3.09,-1.24l1.04,-1.69l4.23,-0.14l3.36,-2.07l0.73,-2.27l2.39,-1.99l2.42,-0.52l4.65,-1.97l2.46,0.23l3.71,-2.35l3.5,0.89ZM37.6,123.41l-2.25,1.23l-0.95,-0.69l-0.29,-1.24l3.21,-1.63l1.42,0.21l0.67,0.7l-1.8,1.42ZM31.06,234.03l0.98,0.47l0.74,0.87l-1.77,1.07l-0.44,-1.53l0.49,-0.89ZM29.34,232.07l0.18,0.05l0.08,0.05l-0.16,0.03l-0.11,-0.14ZM25.16,230.17l0.05,-0.03l0.18,0.22l-0.13,-0.01l-0.1,-0.18ZM5.89,113.26l-1.08,0.41l-2.21,-1.12l1.53,-0.4l1.62,0.28l0.14,0.83Z", "name": "United States"}, "LV": {"path": "M489.16,122.85l0.96,0.66l0.22,1.65l0.68,1.76l-3.65,1.7l-2.23,-1.58l-1.29,-0.26l-0.68,-0.77l-2.42,0.34l-4.16,-0.23l-2.47,0.9l0.06,-1.98l1.13,-2.06l1.95,-1.02l2.12,2.58l2.01,-0.07l0.38,-0.33l0.44,-2.52l1.76,-0.53l3.06,1.7l2.15,0.07Z", "name": "Latvia"}, "UY": {"path": "M286.85,372.74l-0.92,1.5l-2.59,1.44l-1.69,-0.52l-1.42,0.26l-2.39,-1.19l-1.52,0.08l-1.27,-1.3l0.16,-1.5l0.56,-0.79l-0.02,-2.73l1.21,-4.74l1.19,-0.21l2.37,2.0l1.08,0.03l4.36,3.17l1.22,1.6l-0.96,1.5l0.61,1.4Z", "name": "Uruguay"}, "LB": {"path": "M510.37,198.01l-0.88,0.51l1.82,-3.54l0.62,0.08l0.22,0.61l-1.13,0.88l-0.65,1.47Z", "name": "Lebanon"}, "LA": {"path": "M689.54,248.53l-1.76,-0.74l-0.49,0.15l-0.94,1.46l-1.32,-0.64l0.62,-0.98l0.11,-2.17l-2.04,-2.42l-0.25,-2.65l-1.9,-2.1l-2.15,-0.31l-0.78,0.91l-1.12,0.06l-1.05,-0.4l-2.06,1.2l-0.04,-1.59l0.61,-2.68l-0.36,-0.49l-1.35,-0.1l-0.11,-1.23l-0.96,-0.88l1.96,-1.89l0.39,0.36l1.33,0.07l0.42,-0.45l-0.34,-2.66l0.7,-0.21l1.28,1.81l1.11,2.35l0.36,0.23l2.82,0.02l0.71,1.67l-1.39,0.65l-0.72,0.93l0.13,0.6l2.91,1.51l3.6,5.25l1.88,1.78l0.56,1.62l-0.35,1.96Z", "name": "Lao PDR"}, "TW": {"path": "M724.01,226.68l-0.74,1.48l-0.9,-1.52l-0.25,-1.74l1.38,-2.44l1.73,-1.74l0.64,0.44l-1.85,5.52Z", "name": "Taiwan"}, "TT": {"path": "M266.64,259.32l0.28,-1.16l1.13,-0.22l-0.06,1.2l-1.35,0.18Z", "name": "Trinidad and Tobago"}, "TR": {"path": "M513.21,175.47l3.64,1.17l3.05,-0.44l2.1,0.26l3.11,-1.56l2.46,-0.13l2.19,1.33l0.33,0.82l-0.22,1.33l0.25,0.44l2.28,1.13l-1.17,0.57l-0.21,0.45l0.75,3.2l-0.41,1.16l1.13,1.92l-0.55,0.22l-0.9,-0.67l-2.91,-0.37l-1.24,0.46l-4.23,0.41l-2.81,1.05l-1.91,0.01l-1.52,-0.53l-2.58,0.75l-0.66,-0.45l-0.62,0.3l-0.12,1.45l-0.89,0.84l-0.47,-0.67l0.79,-1.3l-0.41,-0.2l-1.43,0.23l-2.0,-0.63l-2.02,1.65l-3.51,0.3l-2.13,-1.53l-2.7,-0.1l-0.86,1.24l-1.38,0.27l-2.29,-1.44l-2.71,-0.01l-1.37,-2.65l-1.68,-1.52l1.07,-1.99l-0.09,-0.49l-1.27,-1.12l2.37,-2.41l3.7,-0.11l1.28,-2.24l4.49,0.37l3.21,-1.97l2.81,-0.82l3.99,-0.06l4.29,2.07ZM488.79,176.72l-1.72,1.31l-0.5,-0.88l1.37,-2.57l-0.7,-0.85l1.7,-0.63l1.8,0.34l0.46,1.17l1.76,0.78l-2.87,0.32l-1.3,1.01Z", "name": "Turkey"}, "LK": {"path": "M624.16,268.99l-1.82,0.48l-0.99,-1.67l-0.42,-3.46l0.95,-3.43l1.21,0.98l2.26,4.19l-0.34,2.33l-0.85,0.58Z", "name": "Sri Lanka"}, "TN": {"path": "M448.1,188.24l-1.0,1.27l-0.02,1.32l0.84,0.88l-0.28,2.09l-1.53,1.32l-0.12,0.42l0.48,1.54l1.42,0.32l0.53,1.11l0.9,0.52l-0.11,1.67l-3.54,2.64l-0.1,2.38l-0.58,0.3l-0.96,-4.45l-1.54,-1.25l-0.16,-0.78l-1.92,-1.56l-0.18,-1.76l1.51,-1.62l0.59,-2.34l-0.38,-2.78l0.42,-1.21l2.45,-1.05l1.29,0.26l-0.06,1.11l0.58,0.38l1.47,-0.73Z", "name": "Tunisia"}
29409, "TL": {"path": "M734.55,307.93l-0.1,-0.97l4.5,-0.86l-2.82,1.28l-1.59,0.55Z", "name": "Timor-Leste"}, "TM": {"path": "M553.03,173.76l-0.04,0.34l-0.09,-0.22l0.13,-0.12ZM555.87,172.66l0.45,-0.1l1.48,0.74l2.06,2.43l4.07,-0.18l0.38,-0.51l-0.32,-1.19l1.92,-0.94l1.91,-1.59l2.94,1.39l0.43,2.47l1.19,0.67l2.58,-0.13l0.62,0.4l1.32,3.12l4.54,3.44l2.67,1.45l3.06,1.14l-0.04,1.05l-1.33,-0.75l-0.59,0.19l-0.32,0.84l-2.2,0.81l-0.46,2.13l-1.21,0.74l-1.91,0.42l-0.73,1.33l-1.56,0.31l-2.22,-0.94l-0.2,-2.17l-0.38,-0.36l-1.73,-0.09l-2.76,-2.46l-2.14,-0.4l-2.84,-1.48l-1.78,-0.27l-1.24,0.53l-1.57,-0.08l-2.0,1.69l-1.7,0.43l-0.36,-1.58l0.36,-2.98l-0.22,-0.4l-1.65,-0.84l0.54,-1.69l-0.34,-0.52l-1.22,-0.13l0.36,-1.64l2.22,0.59l2.2,-0.95l0.12,-0.65l-1.77,-1.74l-0.66,-1.57Z", "name": "Turkmenistan"}, "TJ": {"path": "M597.75,178.82l-2.54,-0.44l-0.47,0.34l-0.24,1.7l0.43,0.45l2.64,-0.22l3.18,0.95l4.39,-0.41l0.56,2.37l0.52,0.29l0.67,-0.24l1.11,0.49l0.21,2.13l-3.76,-0.21l-1.8,1.32l-1.76,0.74l-0.61,-0.58l0.21,-2.23l-0.64,-0.49l-0.07,-0.93l-1.36,-0.66l-0.45,0.07l-1.08,1.01l-0.55,1.48l-1.31,-0.05l-0.95,1.16l-0.9,-0.35l-1.86,0.74l1.26,-2.83l-0.54,-2.17l-1.67,-0.82l0.33,-0.66l2.18,-0.04l1.19,-1.63l0.76,-1.79l2.43,-0.5l-0.26,1.0l0.73,1.05Z", "name": "Tajikistan"}, "LS": {"path": "M491.06,363.48l-0.49,0.15l-1.49,-1.67l1.1,-1.43l2.19,-1.44l1.51,1.27l-0.98,1.82l-1.23,0.38l-0.62,0.93Z", "name": "Lesotho"}, "TH": {"path": "M670.27,255.86l-1.41,3.87l0.15,2.0l0.38,0.36l1.38,0.07l0.9,2.04l0.55,2.34l1.4,1.44l1.61,0.38l0.96,0.97l-0.5,0.64l-1.1,0.2l-0.34,-1.18l-2.04,-1.1l-0.63,0.23l-0.63,-0.62l-0.48,-1.3l-2.56,-2.63l-0.73,0.41l0.95,-3.89l2.16,-4.22ZM670.67,254.77l-0.92,-2.18l-0.26,-2.61l-2.14,-3.06l0.71,-0.49l0.89,-2.59l-3.61,-5.45l0.87,-0.51l1.05,-2.58l1.74,-0.18l2.6,-1.59l0.76,0.56l0.13,1.39l0.37,0.36l1.23,0.09l-0.51,2.28l0.05,2.42l0.6,0.34l2.43,-1.42l0.77,0.39l1.47,-0.07l0.71,-0.88l1.48,0.14l1.71,1.88l0.25,2.65l1.92,2.11l-0.1,1.89l-0.61,0.86l-2.22,-0.33l-3.5,0.64l-1.6,2.12l0.36,2.58l-1.51,-0.79l-1.84,-0.01l0.28,-1.52l-0.4,-0.47l-2.21,0.01l-0.4,0.37l-0.19,2.74l-0.34,0.93Z", "name": "Thailand"}, "TF": {"path": "M596.68,420.38l-3.2,0.18l-0.05,-1.26l0.39,-1.41l1.3,0.78l2.08,0.35l-0.52,1.36Z", "name": "Fr. S. Antarctic Lands"}, "TG": {"path": "M422.7,257.63l-0.09,1.23l1.53,1.52l0.08,1.09l0.5,0.65l-0.11,5.62l0.49,1.47l-1.31,0.35l-1.02,-2.13l-0.18,-1.12l0.53,-2.19l-0.63,-1.16l-0.22,-3.68l-1.01,-1.4l0.07,-0.28l1.37,0.03Z", "name": "Togo"}, "TD": {"path": "M480.25,235.49l0.12,9.57l-2.1,0.05l-1.14,1.89l-0.69,1.63l0.34,0.73l-0.66,0.91l0.24,0.89l-0.86,1.95l0.45,0.5l0.6,-0.1l0.34,0.64l0.03,1.38l0.9,1.04l-1.45,0.43l-1.27,1.03l-1.83,2.76l-2.16,1.07l-2.31,-0.15l-0.86,0.25l-0.26,0.49l0.17,0.61l-2.11,1.68l-2.85,0.87l-1.09,-0.57l-0.73,0.66l-1.12,0.1l-1.1,-3.12l-1.25,-0.64l-1.22,-1.22l0.29,-0.64l3.01,0.04l0.35,-0.6l-1.3,-2.2l-0.08,-3.31l-0.97,-1.66l0.22,-1.04l-0.38,-0.48l-1.22,-0.04l0.0,-1.25l-0.98,-1.07l0.96,-3.01l3.25,-2.65l0.13,-3.33l0.95,-5.18l0.52,-1.07l-0.1,-0.48l-0.91,-0.78l-0.2,-0.96l-0.8,-0.58l-0.55,-3.65l2.1,-1.2l19.57,9.83Z", "name": "Chad"}, "LY": {"path": "M483.48,203.15l-0.75,1.1l0.29,1.39l-0.6,1.83l0.73,2.14l0.0,24.12l-2.48,0.01l-0.41,0.85l-19.41,-9.76l-4.41,2.28l-1.37,-1.33l-3.82,-1.1l-1.14,-1.65l-1.98,-1.23l-1.22,0.32l-0.66,-1.11l-0.17,-1.26l-1.28,-1.69l0.87,-1.19l-0.07,-4.34l0.43,-2.27l-0.86,-3.45l1.13,-0.76l0.22,-1.16l-0.2,-1.03l3.48,-2.61l0.29,-1.94l2.45,0.8l1.18,-0.21l1.98,0.44l3.15,1.18l1.37,2.54l5.72,1.67l2.64,1.35l1.61,-0.72l1.29,-1.34l-0.44,-2.34l0.66,-1.13l1.67,-1.21l1.57,-0.35l3.14,0.53l1.08,1.28l3.99,0.78l0.36,0.54Z", "name": "Libya"}, "AE": {"path": "M550.76,223.97l1.88,-0.4l3.84,0.02l4.78,-4.75l0.19,0.36l0.26,1.58l-0.81,0.01l-0.39,0.35l-0.08,2.04l-0.81,0.63l-0.01,0.96l-0.66,0.99l-0.39,1.41l-7.08,-1.25l-0.7,-1.96Z", "name": "United Arab Emirates"}, "VE": {"path": "M240.68,256.69l0.53,0.75l-0.02,1.06l-1.07,1.78l0.95,2.0l0.42,0.22l1.4,-0.44l0.56,-1.83l-0.77,-1.17l-0.1,-1.47l2.82,-0.93l0.26,-0.49l-0.28,-0.96l0.3,-0.28l0.66,1.31l1.96,0.26l1.4,1.22l0.08,0.68l0.39,0.35l4.81,-0.22l1.49,1.11l1.92,0.31l1.67,-0.84l0.22,-0.6l3.44,-0.14l-0.17,0.55l0.86,1.19l2.19,0.35l1.67,1.1l0.37,1.86l0.41,0.32l1.55,0.17l-1.66,1.35l-0.22,0.92l0.65,0.97l-1.67,0.54l-0.3,0.4l0.04,0.99l-0.56,0.57l-0.01,0.55l1.85,2.27l-0.66,0.69l-4.47,1.29l-0.72,0.54l-3.69,-0.9l-0.71,0.27l-0.02,0.7l0.91,0.53l-0.08,1.54l0.35,1.58l0.35,0.31l1.66,0.17l-1.3,0.52l-0.48,1.13l-2.68,0.91l-0.6,0.77l-1.57,0.13l-1.17,-1.13l-0.8,-2.52l-1.25,-1.26l1.02,-1.23l-1.29,-2.95l0.18,-1.62l1.0,-2.21l-0.2,-0.49l-1.14,-0.46l-4.02,0.36l-1.82,-2.1l-1.57,-0.33l-2.99,0.22l-1.06,-0.97l0.25,-1.23l-0.2,-1.01l-0.59,-0.69l-0.29,-1.06l-1.
2940908,-0.39l0.78,-2.79l1.9,-2.11Z", "name": "Venezuela"}, "AF": {"path": "M600.7,188.88l-1.57,1.3l-0.1,0.48l0.8,2.31l-1.09,1.04l-0.03,1.27l-0.48,0.71l-2.16,-0.08l-0.37,0.59l0.78,1.48l-1.38,0.69l-1.06,1.69l0.06,1.7l-0.65,0.52l-0.91,-0.21l-1.91,0.36l-0.48,0.77l-1.88,0.13l-1.4,1.56l-0.18,2.32l-2.91,1.02l-1.65,-0.23l-0.71,0.55l-1.41,-0.3l-2.41,0.39l-3.52,-1.17l1.96,-2.35l-0.21,-1.78l-0.3,-0.34l-1.63,-0.4l-0.19,-1.58l-0.75,-2.03l0.95,-1.36l-0.19,-0.6l-0.73,-0.28l1.47,-4.8l2.14,0.9l2.12,-0.36l0.74,-1.34l1.77,-0.39l1.54,-0.92l0.63,-2.31l1.87,-0.5l0.49,-0.81l0.94,0.56l2.13,0.11l2.55,0.92l1.95,-0.83l0.65,0.43l0.56,-0.13l0.69,-1.12l1.57,-0.08l0.72,-1.66l0.79,-0.74l0.8,0.39l-0.17,0.56l0.71,0.58l-0.08,2.39l1.11,0.95ZM601.37,188.71l1.73,-0.71l1.43,-1.18l4.03,0.35l-2.23,0.74l-4.95,0.8Z", "name": "Afghanistan"}, "IQ": {"path": "M530.82,187.47l0.79,0.66l1.26,-0.28l1.46,3.08l1.63,0.94l0.14,1.23l-1.22,1.05l-0.53,2.52l1.73,2.67l3.12,1.62l1.15,1.88l-0.38,1.85l0.39,0.48l0.41,-0.0l0.02,1.07l0.76,0.94l-2.47,-0.1l-1.71,2.44l-4.31,-0.2l-7.02,-5.48l-3.73,-1.94l-2.88,-0.73l-0.85,-2.87l5.45,-3.02l0.95,-3.43l-0.19,-1.96l1.27,-0.7l1.22,-1.7l0.87,-0.36l2.69,0.34Z", "name": "Iraq"}, "IS": {"path": "M384.14,88.06l-0.37,2.61l2.54,2.51l-2.9,2.75l-9.19,3.4l-9.25,-1.66l1.7,-1.22l-0.1,-0.7l-4.05,-1.47l2.96,-0.53l0.33,-0.43l-0.11,-1.2l-0.33,-0.36l-4.67,-0.85l1.28,-2.04l3.45,-0.56l3.77,2.72l0.44,0.02l3.64,-2.16l3.3,1.08l3.98,-2.16l3.58,0.26Z", "name": "Iceland"}, "IR": {"path": "M533.43,187.16l-1.27,-2.15l0.42,-0.98l-0.71,-3.04l1.03,-0.5l0.33,0.83l1.26,1.35l2.05,0.51l1.11,-0.16l2.89,-2.11l0.62,-0.14l0.39,0.46l-0.72,1.2l0.06,0.49l1.56,1.53l0.65,0.04l0.67,1.81l2.56,0.83l1.87,1.48l3.69,0.49l3.91,-0.76l0.47,-0.73l2.17,-0.6l1.66,-1.54l1.51,0.08l1.18,-0.53l1.59,0.24l2.83,1.48l1.88,0.3l2.77,2.47l1.77,0.18l0.18,1.99l-1.68,5.49l0.24,0.5l0.61,0.23l-0.82,1.48l0.8,2.18l0.19,1.71l0.3,0.34l1.63,0.4l0.15,1.32l-2.15,2.35l-0.01,0.53l2.21,3.03l2.34,1.24l0.06,2.14l1.24,0.72l0.11,0.69l-3.31,1.27l-1.08,3.03l-9.68,-1.68l-0.99,-3.05l-1.43,-0.73l-2.17,0.46l-2.47,1.26l-2.83,-0.82l-2.46,-2.02l-2.41,-0.8l-3.42,-6.06l-0.48,-0.2l-1.18,0.39l-1.44,-0.82l-0.5,0.08l-0.65,0.74l-0.97,-1.01l-0.02,-1.31l-0.71,-0.39l0.26,-1.81l-1.29,-2.11l-3.13,-1.63l-1.58,-2.43l0.5,-1.9l1.31,-1.26l-0.19,-1.66l-1.74,-1.1l-1.57,-3.3Z", "name": "Iran"}, "AM": {"path": "M536.99,182.33l-0.28,0.03l-1.23,-2.13l-0.93,0.01l-0.62,-0.66l-0.69,-0.07l-0.96,-0.81l-1.56,-0.62l0.19,-1.12l-0.26,-0.79l2.72,-0.36l1.09,1.01l-0.17,0.92l1.02,0.78l-0.47,0.62l0.08,0.56l2.04,1.23l0.04,1.4Z", "name": "Armenia"}, "IT": {"path": "M451.59,158.63l3.48,0.94l-0.21,1.17l0.3,0.83l-1.49,-0.24l-2.04,1.1l-0.21,0.39l0.13,1.45l-0.25,1.12l0.82,1.57l2.39,1.63l1.31,2.54l2.79,2.43l2.05,0.08l0.21,0.23l-0.39,0.33l0.09,0.67l4.05,1.97l2.17,1.76l-0.16,0.36l-1.17,-1.08l-2.18,-0.49l-0.44,0.2l-1.05,1.91l0.14,0.54l1.57,0.95l-0.19,0.98l-1.06,0.33l-1.25,2.34l-0.37,0.08l0.0,-0.33l1.0,-2.45l-1.73,-3.17l-1.12,-0.51l-0.88,-1.33l-1.51,-0.51l-1.27,-1.25l-1.75,-0.18l-4.12,-3.21l-1.62,-1.65l-1.03,-3.19l-3.53,-1.36l-1.3,0.51l-1.69,1.41l0.16,-0.72l-0.28,-0.47l-1.14,-0.33l-0.53,-1.96l0.72,-0.78l0.04,-0.48l-0.65,-1.17l0.8,0.39l1.4,-0.23l1.11,-0.84l0.52,0.35l1.19,-0.1l0.75,-1.2l1.53,0.33l1.36,-0.56l0.35,-1.14l1.08,0.32l0.68,-0.64l1.98,-0.44l0.42,0.82ZM459.19,184.75l-0.65,1.65l0.32,1.05l-0.31,0.89l-1.5,-0.85l-4.5,-1.67l0.19,-0.82l2.67,0.23l3.78,-0.48ZM443.93,176.05l1.18,1.66l-0.3,3.32l-1.06,-0.01l-0.77,0.73l-0.53,-0.44l-0.1,-3.37l-0.39,-1.22l1.04,0.01l0.92,-0.68Z", "name": "Italy"}, "VN": {"path": "M690.56,230.25l-2.7,1.82l-2.09,2.46l-0.63,1.95l4.31,6.45l2.32,1.65l1.43,1.94l1.11,4.59l-0.32,4.24l-1.93,1.54l-2.84,1.61l-2.11,2.15l-2.73,2.06l-0.59,-1.05l0.63,-1.53l-0.13,-0.47l-1.34,-1.04l1.51,-0.71l2.55,-0.18l0.3,-0.63l-0.82,-1.14l4.0,-2.07l0.31,-3.05l-0.57,-1.77l0.42,-2.66l-0.73,-1.97l-1.86,-1.76l-3.63,-5.29l-2.72,-1.46l0.36,-0.47l1.5,-0.64l0.21,-0.52l-0.97,-2.27l-0.37,-0.24l-2.83,-0.02l-2.24,-3.9l0.83,-0.4l4.39,-0.29l2.06,-1.31l1.15,0.89l1.88,0.4l-0.17,1.51l1.35,1.16l1.67,0.45Z", "name": "Vietnam"}, "AR": {"path": "M249.29,428.93l-2.33,-0.52l-5.83,-0.43l-0.89,-1.66l0.05,-2.37l-0.45,-0.4l-1.43,0.18l-0.67,-0.91l-0.2,-3.13l1.88,-1.47l0.79,-2.04l-0.25,-1.7l1.3,-2.68l0.91,-4.15l-0.22,-1.69l0.85,-0.45l0.2,-0.44l-0.27,-1.16l-0.98,-0.68l0.59,-0.92l-0.05,-0.5l-1.
2940904,-1.07l-0.52,-3.1l0.97,-0.86l-0.42,-3.58l1.2,-5.43l1.38,-0.98l0.16,-0.43l-0.75,-2.79l-0.01,-2.43l1.78,-1.75l0.06,-2.57l1.43,-2.85l0.01,-2.58l-0.69,-0.74l-1.09,-4.52l1.47,-2.7l-0.18,-2.79l0.85,-2.35l1.59,-2.46l1.73,-1.64l0.05,-0.52l-0.6,-0.84l0.44,-0.85l-0.07,-4.19l2.7,-1.44l0.86,-2.75l-0.21,-0.71l1.76,-2.01l2.9,0.57l1.38,1.78l0.68,-0.08l0.87,-1.87l2.39,0.09l4.95,4.77l2.17,0.49l3.0,1.92l2.47,1.0l0.25,0.82l-2.37,3.93l0.23,0.59l5.39,1.16l2.12,-0.44l2.45,-2.16l0.5,-2.38l0.76,-0.31l0.98,1.2l-0.04,1.8l-3.67,2.51l-2.85,2.66l-3.43,3.88l-1.3,5.07l0.01,2.72l-0.54,0.73l-0.36,3.28l3.14,2.64l-0.16,2.11l1.4,1.11l-0.1,1.09l-2.29,3.52l-3.55,1.49l-4.92,0.6l-2.71,-0.29l-0.43,0.51l0.5,1.65l-0.49,2.1l0.38,1.42l-1.19,0.83l-2.36,0.38l-2.3,-1.04l-1.38,0.83l0.41,3.64l1.69,0.91l1.4,-0.71l0.36,0.76l-2.04,0.86l-2.01,1.89l-0.97,4.63l-2.34,0.1l-2.09,1.78l-0.61,2.75l2.46,2.31l2.17,0.63l-0.7,2.32l-2.83,1.73l-1.73,3.86l-2.17,1.22l-1.16,1.67l0.75,3.76l1.04,1.28ZM256.71,438.88l-2.0,0.15l-1.4,-1.22l-3.82,-0.1l-0.0,-5.83l1.6,3.05l3.26,2.07l3.08,0.78l-0.71,1.1Z", "name": "Argentina"}, "AU": {"path": "M705.8,353.26l0.26,0.04l0.17,-0.47l-0.48,-1.42l0.92,1.11l0.45,0.15l0.27,-0.39l-0.1,-1.56l-1.98,-3.63l1.09,-3.31l-0.24,-1.57l0.34,-0.62l0.38,1.06l0.43,-0.19l0.99,-1.7l1.91,-0.83l1.29,-1.15l1.81,-0.91l0.96,-0.17l0.92,0.26l1.92,-0.95l1.47,-0.28l1.03,-0.8l1.43,0.04l2.78,-0.84l1.36,-1.15l0.71,-1.45l1.41,-1.26l0.3,-2.58l1.27,-1.59l0.78,1.65l0.54,0.19l1.07,-0.51l0.15,-0.6l-0.73,-1.0l0.45,-0.71l0.78,0.39l0.58,-0.3l0.28,-1.82l1.87,-2.14l1.12,-0.39l0.28,-0.58l0.62,0.17l0.53,-0.73l1.87,-0.57l1.65,1.05l1.35,1.48l3.39,0.38l0.43,-0.54l-0.46,-1.23l1.05,-1.79l1.04,-0.61l0.14,-0.55l-0.25,-0.41l0.88,-1.17l1.31,-0.77l1.3,0.27l2.1,-0.48l0.31,-0.4l-0.05,-1.3l-0.92,-0.77l1.48,0.56l1.41,1.07l2.11,0.65l0.81,-0.2l1.4,0.7l1.69,-0.66l0.8,0.19l0.64,-0.33l0.71,0.77l-1.33,1.94l-0.71,0.07l-0.35,0.51l0.24,0.86l-1.52,2.35l0.12,1.05l2.15,1.65l1.97,0.85l3.04,2.36l1.97,0.65l0.55,0.88l2.72,0.85l1.84,-1.1l2.07,-5.97l-0.42,-3.59l0.3,-1.73l0.47,-0.87l-0.31,-0.68l1.09,-3.28l0.46,-0.47l0.4,0.71l0.16,1.51l0.65,0.52l0.16,1.04l0.85,1.21l0.12,2.38l0.9,2.0l0.57,0.18l1.3,-0.78l1.69,1.7l-0.2,1.08l0.53,2.2l0.39,1.3l0.68,0.48l0.6,1.95l-0.19,1.48l0.81,1.76l6.01,3.69l-0.11,0.76l1.38,1.58l0.95,2.77l0.58,0.22l0.72,-0.41l0.8,0.9l0.61,0.01l0.46,2.41l4.81,4.71l0.66,2.02l-0.07,3.31l1.14,2.2l-0.13,2.24l-1.1,3.68l0.03,1.64l-0.47,1.89l-1.05,2.4l-1.9,1.47l-1.72,3.51l-2.38,6.09l-0.24,2.82l-1.14,0.8l-2.85,0.15l-2.31,1.19l-2.51,2.25l-3.09,-1.57l0.3,-1.15l-0.54,-0.47l-1.5,0.63l-2.01,1.94l-7.12,-2.18l-1.48,-1.63l-1.14,-3.74l-1.45,-1.26l-1.81,-0.26l0.56,-1.18l-0.61,-2.1l-0.72,-0.1l-1.14,1.82l-0.9,0.21l0.63,-0.82l0.36,-1.55l0.92,-1.31l-0.13,-2.34l-0.7,-0.22l-2.0,2.34l-1.51,0.93l-0.94,2.01l-1.35,-0.81l-0.02,-1.52l-1.57,-2.04l-1.09,-0.88l0.24,-0.33l-0.14,-0.59l-3.21,-1.69l-1.83,-0.12l-2.54,-1.35l-4.58,0.28l-6.02,1.9l-2.53,-0.13l-2.62,1.41l-2.13,0.63l-1.49,2.6l-3.49,0.31l-2.29,-0.5l-3.48,0.43l-1.6,1.47l-0.81,-0.04l-2.37,1.63l-3.26,-0.1l-3.72,-2.21l0.04,-1.05l1.19,-0.46l0.49,-0.89l0.21,-2.97l-0.28,-1.64l-1.34,-2.86l-0.38,-1.47l0.05,-1.72l-0.95,-1.7l-0.18,-0.97l-1.01,-0.99l-0.29,-1.98l-1.13,-1.75ZM784.92,393.44l2.65,1.02l3.23,-0.96l1.09,0.14l0.15,3.06l-0.85,1.13l-0.17,1.63l-0.87,-0.24l-1.57,1.91l-1.68,-0.18l-1.4,-2.36l-0.37,-2.04l-1.39,-2.51l0.04,-0.8l1.15,0.18Z", "name": "Australia"}, "IL": {"path": "M507.76,203.05l0.4,-0.78l0.18,0.4l-0.33,1.03l0.52,0.44l0.68,-0.22l-0.86,3.6l-1.16,-3.32l0.59,-0.74l-0.03,-0.41ZM508.73,200.34l0.37,-1.02l0.64,0.0l0.52,-0.51l-0.49,1.53l-0.56,-0.24l-0.48,0.23Z", "name": "Israel"}, "IN": {"path": "M623.34,207.03l-1.24,1.04l-0.97,2.55l0.22,0.51l8.04,3.87l3.42,0.37l1.57,1.38l4.92,0.88l2.18,-0.04l0.38,-0.3l0.29,-1.24l-0.32,-1.64l0.14,-0.87l0.82,-0.31l0.45,2.48l2.28,1.02l1.77,-0.38l4.14,0.1l0.38,-0.36l0.18,-1.66l-0.5,-0.65l1.37,-0.29l2.25,-1.99l2.7,-1.62l1.93,0.62l1.8,-0.98l0.79,1.14l-0.68,0.91l0.26,0.63l2.42,0.36l0.09,0.47l-0.83,0.75l0.13,1.07l-1.52,-0.29l-3.24,1.86l-0.13,1.78l-1.32,2.14l-0.18,1.39l-0.93,1.82l-1.64,-0.5l-0.52,0.37l-0.09,2.63l-0.56,1.11l0.19,0.81l-0.53,0.27l-1.18,-3.73l-1.08,-0.27l-0.38,0.31l-0.24,1.0l-0.66,-0.66l0.54,-1.06l1.22,-0.34l1.15,-2.25l-0.24,-0.56l-1.57,-0.47l-4.34,-0.28l-0.18,-1.56l-0.35,-0.35l-1.11,-0.12l-1.91,-1.
2940912l-0.56,0.17l-0.88,1.82l0.11,0.49l1.36,1.07l-1.09,0.69l-0.69,1.11l0.18,0.56l1.24,0.57l-0.32,1.54l0.85,1.94l0.36,2.01l-0.22,0.59l-4.58,0.52l-0.33,0.42l0.13,1.8l-1.17,1.36l-3.65,1.81l-2.79,3.03l-4.32,3.28l-0.18,1.27l-4.65,1.79l-0.77,2.16l0.64,5.3l-1.06,2.49l-0.01,3.94l-1.24,0.28l-1.14,1.93l0.39,0.84l-1.68,0.53l-1.04,1.83l-0.65,0.47l-2.06,-2.05l-2.1,-6.02l-2.2,-3.64l-1.05,-4.75l-2.29,-3.57l-1.76,-8.2l0.01,-3.11l-0.49,-2.53l-0.55,-0.29l-3.53,1.52l-1.53,-0.27l-2.86,-2.77l0.85,-0.67l0.08,-0.55l-0.74,-1.03l-2.67,-2.06l1.24,-1.32l5.34,0.01l0.39,-0.49l-0.5,-2.29l-1.42,-1.46l-0.27,-1.93l-1.43,-1.2l2.31,-2.37l3.05,0.06l2.62,-2.85l1.6,-2.81l2.4,-2.73l0.07,-2.04l1.97,-1.48l-0.02,-0.65l-1.93,-1.31l-0.82,-1.78l-0.8,-2.21l0.9,-0.89l3.59,0.65l2.92,-0.42l2.33,-2.19l2.31,2.85l-0.24,2.13l0.99,1.59l-0.05,0.82l-1.34,-0.28l-0.47,0.48l0.7,3.06l2.62,1.99l2.99,1.65Z", "name": "India"}, "TZ": {"path": "M495.56,296.42l2.8,-3.12l-0.02,-0.81l-0.64,-1.3l0.68,-0.52l0.14,-1.47l-0.76,-1.25l0.31,-0.11l2.26,0.03l-0.51,2.76l0.76,1.3l0.5,0.12l1.05,-0.53l1.19,-0.12l0.61,0.24l1.43,-0.62l0.1,-0.67l-0.71,-0.62l1.57,-1.7l8.65,4.86l0.32,1.53l3.34,2.33l-1.05,2.8l0.13,1.61l1.63,1.12l-0.6,1.76l-0.01,2.33l1.89,4.03l0.57,0.43l-1.46,1.08l-2.61,0.94l-1.43,-0.04l-1.06,0.77l-2.29,0.36l-2.87,-0.68l-0.83,0.07l-0.63,-0.75l-0.31,-2.78l-1.32,-1.35l-3.25,-0.77l-3.96,-1.58l-1.18,-2.41l-0.32,-1.75l-1.76,-1.49l0.42,-1.05l-0.44,-0.89l0.08,-0.96l-0.46,-0.58l0.06,-0.56Z", "name": "Tanzania"}, "AZ": {"path": "M539.29,175.73l1.33,0.32l1.94,-1.8l2.3,3.34l1.43,0.43l-1.26,0.15l-0.35,0.32l-0.8,3.14l-0.99,0.96l0.05,1.11l-1.26,-1.13l0.7,-1.18l-0.04,-0.47l-0.74,-0.86l-1.48,0.15l-2.34,1.71l-0.03,-1.27l-2.03,-1.35l0.47,-0.62l-0.08,-0.56l-1.03,-0.79l0.29,-0.43l-0.14,-0.58l-1.13,-0.86l1.89,0.68l1.69,0.06l0.37,-0.87l-0.81,-1.37l0.42,0.06l1.63,1.72ZM533.78,180.57l0.61,0.46l0.69,-0.0l0.59,1.15l-0.68,-0.15l-1.21,-1.45Z", "name": "Azerbaijan"}, "IE": {"path": "M405.08,135.42l0.35,2.06l-1.75,2.78l-4.22,1.88l-2.84,-0.4l1.73,-3.0l-1.18,-3.53l4.6,-3.74l0.32,1.15l-0.49,1.74l0.4,0.51l1.47,-0.04l1.6,0.6Z", "name": "Ireland"}, "ID": {"path": "M756.47,287.89l0.69,4.01l2.79,1.78l0.51,-0.1l2.04,-2.59l2.71,-1.43l2.05,-0.0l3.9,1.73l2.46,0.45l0.08,15.12l-1.75,-1.54l-2.54,-0.51l-0.88,0.71l-2.32,0.06l0.69,-1.33l1.45,-0.64l0.23,-0.46l-0.65,-2.74l-1.24,-2.21l-5.04,-2.29l-2.09,-0.23l-3.68,-2.27l-0.55,0.13l-0.65,1.07l-0.52,0.12l-0.55,-1.89l-1.21,-0.78l1.84,-0.62l1.72,0.05l0.39,-0.52l-0.21,-0.66l-0.38,-0.28l-3.45,-0.0l-1.13,-1.48l-2.1,-0.43l-0.52,-0.6l2.69,-0.48l1.28,-0.78l3.66,0.94l0.3,0.71ZM757.91,300.34l-0.62,0.82l-0.1,-0.8l0.59,-1.12l0.13,1.1ZM747.38,292.98l0.34,0.72l-1.22,-0.57l-4.68,-0.1l0.27,-0.62l2.78,-0.09l2.52,0.67ZM741.05,285.25l-0.67,-2.88l0.64,-2.01l0.41,0.86l1.21,0.18l0.16,0.7l-0.1,1.68l-0.84,-0.16l-0.46,0.3l-0.34,1.34ZM739.05,293.5l-0.5,0.44l-1.34,-0.36l-0.17,-0.37l1.73,-0.08l0.27,0.36ZM721.45,284.51l-0.19,1.97l2.24,2.23l0.54,0.02l1.27,-1.07l2.75,-0.5l-0.9,1.21l-2.11,0.93l-0.16,0.6l2.22,3.01l-0.3,1.07l1.36,1.74l-2.26,0.85l-0.28,-0.31l0.12,-1.19l-1.64,-1.34l0.17,-2.23l-0.56,-0.39l-1.67,0.76l-0.23,0.39l0.3,6.17l-1.1,0.25l-0.69,-0.47l0.64,-2.21l-0.39,-2.42l-0.39,-0.34l-0.8,-0.01l-0.58,-1.29l0.98,-1.6l0.35,-1.96l1.32,-3.87ZM728.59,296.27l0.38,0.49l-0.02,1.28l-0.88,0.49l-0.53,-0.47l1.04,-1.79ZM729.04,286.98l0.27,-0.05l-0.02,0.13l-0.24,-0.08ZM721.68,284.05l0.16,-0.32l1.89,-1.65l1.83,0.68l3.16,0.35l2.94,-0.1l2.39,-1.66l-1.73,2.13l-1.66,0.43l-2.41,-0.48l-4.17,0.13l-2.39,0.51ZM730.55,310.47l1.11,-1.93l2.03,-0.82l0.08,0.62l-1.45,1.67l-1.77,0.46ZM728.12,305.88l-0.1,0.38l-3.46,0.66l-2.91,-0.27l-0.0,-0.25l1.54,-0.41l1.66,0.73l1.67,-0.19l1.61,-0.65ZM722.9,310.24l-0.64,0.03l-2.26,-1.2l1.11,-0.24l1.78,1.41ZM716.26,305.77l0.88,0.51l1.28,-0.17l0.2,0.35l-4.65,0.73l0.39,-0.67l1.15,-0.02l0.75,-0.73ZM711.66,293.84l-0.38,-0.16l-2.54,1.01l-1.12,-1.44l-1.69,-0.13l-1.16,-0.75l-3.04,0.77l-1.1,-1.15l-3.31,-0.11l-0.35,-3.05l-1.35,-0.95l-1.11,-1.98l-0.33,-2.06l0.27,-2.14l0.9,-1.01l0.37,1.15l2.09,1.49l1.53,-0.48l1.82,0.08l1.38,-1.19l1.0,-0.18l2.28,0.67l2.26,-0.53l1.52,-3.64l1.01,-0.99l0.78,-2.57l4.1,0.3l-1.11,1.77l0.02,0.46l1.7,2.2l-0.23,1.39l2.07,1.71l-2.33,0.42l-0.88,1.9l0.1,2.05l-2.4,1.9l-0.06,2.45l-0.7,2.79ZM692.58,302.03l
294090.35,0.26l4.8,0.25l0.78,-0.97l4.17,1.09l1.13,1.68l3.69,0.45l2.13,1.04l-1.8,0.6l-2.77,-0.99l-4.8,-0.12l-5.24,-1.41l-1.84,-0.25l-1.11,0.3l-4.26,-0.97l-0.7,-1.14l-1.59,-0.13l1.18,-1.65l2.74,0.13l2.87,1.13l0.26,0.68ZM685.53,299.17l-2.22,0.04l-2.06,-2.03l-3.15,-2.01l-2.93,-3.51l-3.11,-5.33l-2.2,-2.12l-1.64,-4.06l-2.32,-1.69l-1.27,-2.07l-1.96,-1.5l-2.51,-2.65l-0.11,-0.66l4.81,0.53l2.15,2.38l3.31,2.74l2.35,2.66l2.7,0.17l1.95,1.59l1.54,2.17l1.59,0.95l-0.84,1.71l0.15,0.52l1.44,0.87l0.79,0.1l0.4,1.58l0.87,1.4l1.96,0.39l1.0,1.31l-0.6,3.01l-0.09,3.5Z", "name": "Indonesia"}, "UA": {"path": "M492.5,162.44l1.28,-2.49l1.82,0.19l0.66,-0.23l0.09,-0.71l-0.25,-0.75l-0.79,-0.72l-0.33,-1.21l-0.86,-0.62l-0.02,-1.19l-1.13,-0.86l-1.15,-0.19l-2.04,-1.0l-1.66,0.32l-0.66,0.47l-0.92,-0.0l-0.84,0.78l-2.48,0.7l-1.18,-0.71l-3.07,-0.36l-0.89,0.43l-0.24,-0.55l-1.11,-0.7l0.35,-0.93l1.26,-1.02l-0.54,-1.23l2.04,-2.43l1.4,-0.62l0.25,-1.19l-1.04,-2.39l0.83,-0.13l1.28,-0.84l1.8,-0.07l2.47,0.26l2.86,0.81l1.88,0.06l0.86,0.44l1.04,-0.41l0.77,0.66l2.18,-0.15l0.92,0.3l0.52,-0.34l0.15,-1.53l0.56,-0.54l2.85,-0.05l0.84,-0.72l3.04,-0.18l1.23,1.46l-0.48,0.77l0.21,1.03l0.36,0.32l1.8,0.14l0.93,2.08l3.18,1.15l1.94,-0.45l1.67,1.49l1.4,-0.03l3.35,0.96l0.02,0.54l-0.96,1.59l0.47,1.97l-0.26,0.7l-2.36,0.28l-1.29,0.89l-0.23,1.38l-1.83,0.27l-1.58,0.97l-2.41,0.21l-2.16,1.17l-0.21,0.38l0.34,2.26l1.23,0.75l2.13,-0.08l-0.14,0.31l-2.65,0.53l-3.23,1.69l-0.87,-0.39l0.42,-1.1l-0.25,-0.52l-2.21,-0.73l2.35,-1.06l0.12,-0.65l-0.93,-0.82l-3.62,-0.74l-0.13,-0.89l-0.46,-0.34l-2.61,0.59l-0.91,1.69l-1.71,2.04l-0.86,-0.4l-1.62,0.27Z", "name": "Ukraine"}, "QA": {"path": "M549.33,221.64l-0.76,-0.23l-0.14,-1.64l0.84,-1.29l0.47,0.52l0.04,1.34l-0.45,
294091.3Z", "name": "Qatar"}, "MZ": {"path": "M508.58,318.75l-0.34,-2.57l0.51,-2.05l3.55,0.63l2.5,-0.38l1.02,-0.76l1.49,0.01l2.74,-0.98l1.66,-1.2l0.5,9.24l0.41,1.23l-0.68,1.67l-0.93,1.71l-1.5,1.5l-5.16,2.28l-2.78,2.73l-1.02,0.53l-1.71,1.8l-0.98,0.57l-0.35,2.41l1.16,1.94l0.49,2.17l0.43,0.31l-0.06,2.06l-0.39,1.17l0.5,0.72l-0.25,0.73l-0.92,0.83l-5.12,2.39l-1.22,1.36l0.21,1.13l0.58,0.39l-0.11,0.72l-1.22,-0.01l-0.73,-2.97l0.42,-3.09l-1.78,-5.37l2.49,-2.81l0.69,-1.89l0.44,-0.43l0.28,-1.53l-0.39,-0.93l0.59,-3.65l-0.01,-3.26l-1.49,-1.16l-1.2,-0.22l-1.74,-1.17l-1.92,0.01l-0.29,-2.08l7.06,-1.96l1.28,1.09l0.89,-0.1l0.67,0.44l0.1,0.73l-0.51,1.29l0.19,1.81l1.75,1.83l0.65,-0.13l0.71,-1.65l1.17,-0.86l-0.26,-3.47l-1.05,-1.85l-1.04,-0.94Z", "name": "Mozambique"}}, "height": 440.70631074413296, "projection": {"type": "mill", "centralMeridian": 11.5}, "width": 900.0});
29410;/*! version : 4.17.47
29411 =========================================================
29412 bootstrap-datetimejs
29413 https://github.com/Eonasdan/bootstrap-datetimepicker
29414 Copyright (c) 2015 Jonathan Peterson
29415 =========================================================
29416 */
29417/*
29418 The MIT License (MIT)
29419
29420 Copyright (c) 2015 Jonathan Peterson
29421
29422 Permission is hereby granted, free of charge, to any person obtaining a copy
29423 of this software and associated documentation files (the "Software"), to deal
29424 in the Software without restriction, including without limitation the rights
29425 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29426 copies of the Software, and to permit persons to whom the Software is
29427 furnished to do so, subject to the following conditions:
29428
29429 The above copyright notice and this permission notice shall be included in
29430 all copies or substantial portions of the Software.
29431
29432 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29433 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29434 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29435 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29436 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29437 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29438 THE SOFTWARE.
29439 */
29440/*global define:false */
29441/*global exports:false */
29442/*global require:false */
29443/*global jQuery:false */
29444/*global moment:false */
29445(function (factory) {
29446    'use strict';
29447    if (typeof define === 'function' && define.amd) {
29448        // AMD is used - Register as an anonymous module.
29449        define(['jquery', 'moment'], factory);
29450    } else if (typeof exports === 'object') {
29451        module.exports = factory(require('jquery'), require('moment'));
29452    } else {
29453        // Neither AMD nor CommonJS used. Use global variables.
29454        if (typeof jQuery === 'undefined') {
29455            throw 'bootstrap-datetimepicker requires jQuery to be loaded first';
29456        }
29457        if (typeof moment === 'undefined') {
29458            throw 'bootstrap-datetimepicker requires Moment.js to be loaded first';
29459        }
29460        factory(jQuery, moment);
29461    }
29462}(function ($, moment) {
29463    'use strict';
29464    if (!moment) {
29465        throw new Error('bootstrap-datetimepicker requires Moment.js to be loaded first');
29466    }
29467
29468    var dateTimePicker = function (element, options) {
29469        var picker = {},
29470            date,
29471            viewDate,
29472            unset = true,
29473            input,
29474            component = false,
29475            widget = false,
29476            use24Hours,
29477            minViewModeNumber = 0,
29478            actualFormat,
29479            parseFormats,
29480            currentViewMode,
29481            datePickerModes = [
29482                {
29483                    clsName: 'days',
29484                    navFnc: 'M',
29485                    navStep: 1
29486                },
29487                {
29488                    clsName: 'months',
29489                    navFnc: 'y',
29490                    navStep: 1
29491                },
29492                {
29493                    clsName: 'years',
29494                    navFnc: 'y',
29495                    navStep: 10
29496                },
29497                {
29498                    clsName: 'decades',
29499                    navFnc: 'y',
29500                    navStep: 100
29501                }
29502            ],
29503            viewModes = ['days', 'months', 'years', 'decades'],
29504            verticalModes = ['top', 'bottom', 'auto'],
29505            horizontalModes = ['left', 'right', 'auto'],
29506            toolbarPlacements = ['default', 'top', 'bottom'],
29507            keyMap = {
29508                'up': 38,
29509                38: 'up',
29510                'down': 40,
29511                40: 'down',
29512                'left': 37,
29513                37: 'left',
29514                'right': 39,
29515                39: 'right',
29516                'tab': 9,
29517                9: 'tab',
29518                'escape': 27,
29519                27: 'escape',
29520                'enter': 13,
29521                13: 'enter',
29522                'pageUp': 33,
29523                33: 'pageUp',
29524                'pageDown': 34,
29525                34: 'pageDown',
29526                'shift': 16,
29527                16: 'shift',
29528                'control': 17,
29529                17: 'control',
29530                'space': 32,
29531                32: 'space',
29532                't': 84,
29533                84: 't',
29534                'delete': 46,
29535                46: 'delete'
29536            },
29537            keyState = {},
29538
29539            /********************************************************************************
29540             *
29541             * Private functions
29542             *
29543             ********************************************************************************/
29544
29545            hasTimeZone = function () {
29546                return moment.tz !== undefined && options.timeZone !== undefined && options.timeZone !== null && options.timeZone !== '';
29547            },
29548
29549            getMoment = function (d) {
29550                var returnMoment;
29551
29552                if (d === undefined || d === null) {
29553                    returnMoment = moment(); //TODO should this use format? and locale?
29554                } else if (moment.isDate(d) || moment.isMoment(d)) {
29555                    // If the date that is passed in is already a Date() or moment() object,
29556                    // pass it directly to moment.
29557                    returnMoment = moment(d);
29558                } else if (hasTimeZone()) { // There is a string to parse and a default time zone
29559                    // parse with the tz function which takes a default time zone if it is not in the format str
29559ing
29560                    returnMoment = moment.tz(d, parseFormats, options.useStrict, options.timeZone);
29561                } else {
29562                    returnMoment = moment(d, parseFormats, options.useStrict);
29563                }
29564
29565                if (hasTimeZone()) {
29566                    returnMoment.tz(options.timeZone);
29567                }
29568
29569                return returnMoment;
29570            },
29571
29572            isEnabled = function (granularity) {
29573                if (typeof granularity !== 'string' || granularity.length > 1) {
29574                    throw new TypeError('isEnabled expects a single character string parameter');
29575                }
29576                switch (granularity) {
29577                    case 'y':
29578                        return actualFormat.indexOf('Y') !== -1;
29579                    case 'M':
29580                        return actualFormat.indexOf('M') !== -1;
29581                    case 'd':
29582                        return actualFormat.toLowerCase().indexOf('d') !== -1;
29583                    case 'h':
29584                    case 'H':
29585                        return actualFormat.toLowerCase().indexOf('h') !== -1;
29586                    case 'm':
29587                        return actualFormat.indexOf('m') !== -1;
29588                    case 's':
29589                        return actualFormat.indexOf('s') !== -1;
29590                    default:
29591                        return false;
29592                }
29593            },
29594
29595            hasTime = function () {
29596                return (isEnabled('h') || isEnabled('m') || isEnabled('s'));
29597            },
29598
29599            hasDate = function () {
29600                return (isEnabled('y') || isEnabled('M') || isEnabled('d'));
29601            },
29602
29603            getDatePickerTemplate = function () {
29604                var headTemplate = $('<thead>')
29605                        .append($('<tr>')
29606                            .append($('<th>').addClass('prev').attr('data-action', 'previous')
29607                                .append($('<span>').addClass(options.icons.previous))
29608                                )
29609                            .append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', (options.calendarWeeks ? '6' : '5')))
29610                            .append($('<th>').addClass('next').attr('data-action', 'next')
29611                                .append($('<span>').addClass(options.icons.next))
29612                                )
29613                            ),
29614                    contTemplate = $('<tbody>')
29615                        .append($('<tr>')
29616                            .append($('<td>').attr('colspan', (options.calendarWeeks ? '8' : '7')))
29617                            );
29618
29619                return [
29620                    $('<div>').addClass('datepicker-days')
29621                        .append($('<table>').addClass('table-condensed')
29622                            .append(headTemplate)
29623                            .append($('<tbody>'))
29624                            ),
29625                    $('<div>').addClass('datepicker-months')
29626                        .append($('<table>').addClass('table-condensed')
29627                            .append(headTemplate.clone())
29628                            .append(contTemplate.clone())
29629                            ),
29630                    $('<div>').addClass('datepicker-years')
29631                        .append($('<table>').addClass('table-condensed')
29632                            .append(headTemplate.clone())
29633                            .append(contTemplate.clone())
29634                            ),
29635                    $('<div>').addClass('datepicker-decades')
29636                        .append($('<table>').addClass('table-condensed')
29637                            .append(headTemplate.clone())
29638                            .append(contTemplate.clone())
29639                            )
29640                ];
29641            },
29642
29643            getTimePickerMainTemplate = function () {
29644                var topRow = $('<tr>'),
29645                    middleRow = $('<tr>'),
29646                    bottomRow = $('<tr>');
29647
29648                if (isEnabled('h')) {
29649                    topRow.append($('<td>')
29650                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementHour }).addClass('btn').attr('data-action', 'incrementHours').append($('<span>').addClass(options.icons.up))));
29651                    middleRow.append($('<td>')
29652                        .append($('<span>').addClass('timepicker-hour').attr({ 'data-time-component': 'hours', 'title': options.tooltips.pickHour }).attr('data-action', 'showHours')));
29653                    bottomRow.append($('<td>')
29654                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementHour }).addClass('btn').attr('data-action', 'decrementHours').append($('<span>').addClass(options.icons.down))));
29655                }
29656                if (isEnabled('m')) {
29657                    if (isEnabled('h')) {
29658                        topRow.append($('<td>').addClass('separator'));
29659                        middleRow.append($('<td>').addClass('separator').html(':'));
29660                        bottomRow.append($('<td>').addClass('separator'));
29661                    }
29662                    topRow.append($('<td>')
29663                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementMinute }).addClass('btn').attr('data-action', 'incrementMinutes')
29664                            .append($('<span>').addClass(options.icons.up))));
29665                    middleRow.append($('<td>')
29666                        .append($('<span>').addClass('timepicker-minute').attr({ 'data-time-component': 'minutes', 'title': options.tooltips.pickMinute }).attr('data-action', 'showMinutes')));
29667                    bottomRow.append($('<td>')
29668                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementMinute }).addClass('btn').attr('data-action', 'decrementMinutes')
29669                            .append($('<span>').addClass(options.icons.down))));
29670                }
29671                if (isEnabled('s')) {
29672                    if (isEnabled('m')) {
29673                        topRow.append($('<td>').addClass('separator'));
29674                        middleRow.append($('<td>').addClass('separator').html(':'));
29675                        bottomRow.append($('<td>').addClass('separator'));
29676                    }
29677                    topRow.append($('<td>')
29678                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementSecond }).addClass('btn').attr('data-action', 'incrementSeconds')
29679                            .append($('<span>').addClass(options.icons.up))));
29680                    middleRow.append($('<td>')
29681                        .append($('<span>').addClass('timepicker-second').attr({ 'data-time-component': '
29681seconds', 'title': options.tooltips.pickSecond }).attr('data-action', 'showSeconds')));
29682                    bottomRow.append($('<td>')
29683                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementSecond }).addClass('btn').attr('data-action', 'decrementSeconds')
29684                            .append($('<span>').addClass(options.icons.down))));
29685                }
29686
29687                if (!use24Hours) {
29688                    topRow.append($('<td>').addClass('separator'));
29689                    middleRow.append($('<td>')
29690                        .append($('<button>').addClass('btn btn-primary').attr({ 'data-action': 'togglePeriod', tabindex: '-1', 'title': options.tooltips.togglePeriod })));
29691                    bottomRow.append($('<td>').addClass('separator'));
29692                }
29693
29694                return $('<div>').addClass('timepicker-picker')
29695                    .append($('<table>').addClass('table-condensed')
29696                        .append([topRow, middleRow, bottomRow]));
29697            },
29698
29699            getTimePickerTemplate = function () {
29700                var hoursView = $('<div>').addClass('timepicker-hours')
29701                        .append($('<table>').addClass('table-condensed')),
29702                    minutesView = $('<div>').addClass('timepicker-minutes')
29703                        .append($('<table>').addClass('table-condensed')),
29704                    secondsView = $('<div>').addClass('timepicker-seconds')
29705                        .append($('<table>').addClass('table-condensed')),
29706                    ret = [getTimePickerMainTemplate()];
29707
29708                if (isEnabled('h')) {
29709                    ret.push(hoursView);
29710                }
29711                if (isEnabled('m')) {
29712                    ret.push(minutesView);
29713                }
29714                if (isEnabled('s')) {
29715                    ret.push(secondsView);
29716                }
29717
29718                return ret;
29719            },
29720
29721            getToolbar = function () {
29722                var row = [];
29723                if (options.showTodayButton) {
29724                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'today', 'title': options.tooltips.today }).append($('<span>').addClass(options.icons.today))));
29725                }
29726                if (!options.sideBySide && hasDate() && hasTime()) {
29727                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'togglePicker', 'title': options.tooltips.selectTime }).append($('<span>').addClass(options.icons.time))));
29728                }
29729                if (options.showClear) {
29730                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'clear', 'title': options.tooltips.clear }).append($('<span>').addClass(options.icons.clear))));
29731                }
29732                if (options.showClose) {
29733                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'close', 'title': options.tooltips.close }).append($('<span>').addClass(options.icons.close))));
29734                }
29735                return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));
29736            },
29737
29738            getTemplate = function () {
29739                var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),
29740                    dateView = $('<div>').addClass('datepicker').append(getDatePickerTemplate()),
29741                    timeView = $('<div>').addClass('timepicker').append(getTimePickerTemplate()),
29742                    content = $('<ul>').addClass('list-unstyled'),
29743                    toolbar = $('<li>').addClass('picker-switch' + (options.collapse ? ' accordion-toggle' : '')).append(getToolbar());
29744
29745                if (options.inline) {
29746                    template.removeClass('dropdown-menu');
29747                }
29748
29749                if (use24Hours) {
29750                    template.addClass('usetwentyfour');
29751                }
29752
29753                if (isEnabled('s') && !use24Hours) {
29754                    template.addClass('wider');
29755                }
29756
29757                if (options.sideBySide && hasDate() && hasTime()) {
29758                    template.addClass('timepicker-sbs');
29759                    if (options.toolbarPlacement === 'top') {
29760                        template.append(toolbar);
29761                    }
29762                    template.append(
29763                        $('<div>').addClass('row')
29764                            .append(dateView.addClass('col-md-6'))
29765                            .append(timeView.addClass('col-md-6'))
29766                    );
29767                    if (options.toolbarPlacement === 'bottom') {
29768                        template.append(toolbar);
29769                    }
29770                    return template;
29771                }
29772
29773                if (options.toolbarPlacement === 'top') {
29774                    content.append(toolbar);
29775                }
29776                if (hasDate()) {
29777                    content.append($('<li>').addClass((options.collapse && hasTime() ? 'collapse in' : '')).append(dateView));
29778                }
29779                if (options.toolbarPlacement === 'default') {
29780                    content.append(toolbar);
29781                }
29782                if (hasTime()) {
29783                    content.append($('<li>').addClass((options.collapse && hasDate() ? 'collapse' : '')).append(timeView));
29784                }
29785                if (options.toolbarPlacement === 'bottom') {
29786                    content.append(toolbar);
29787                }
29788                return template.append(content);
29789            },
29790
29791            dataToOptions = function () {
29792                var eData,
29793                    dataOptions = {};
29794
29795                if (element.is('input') || options.inline) {
29796                    eData = element.data();
29797                } else {
29798                    eData = element.find('input').data();
29799                }
29800
29801                if (eData.dateOptions && eData.dateOptions instanceof Object) {
29802                    dataOptions = $.extend(true, dataOptions, eData.dateOptions);
29803                }
29804
29805                $.each(options, function (key) {
29806                    var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1);
29807                    if (eData[attributeName] !== undefined) {
29808                        dataOptions[key] = eData[attributeName];
29809                    }
29810                });
29811                return dataOptions;
29812            },
29813
29814            place = function () {
29815                var position = (component || element).position(),
29816                    offset = (component || element).offset(),
29817                    vertical = options.widgetPositioning.vertical,
29818                    horizontal = options.widgetPositioning.horizontal,
29819                    parent;
29820
29821                if (options.widgetParent) {
29822                    parent = options.widgetParent.append(widget);
29823                } else if (element.is('input')) {
29824                    parent = element.after(widget).parent();
29825                } else if (options.inline) {
29826                    parent = element.append(widget);
29827                    return;
29828                } else {
29829                    parent = element;
29830                    element.children().first().after(widget);
29831                }
29832
29833                // Top and bottom logic
29834                if (vertical === 'auto') {
29835                    if (offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() &&
29836                        widget.height() + element.outerHeight() < offset.top) {
29837                        vertical = 'top';
29838                    } else {
29839                        vertical = 'bottom';
29840                    }
29841                }
29842
29843                // Left and right logic
29844                if (horizontal === 'auto') {
29845                    if (parent.width() < offset.left + widget.outerWidth() / 2 &&
29846                        offset.left + widget.outerWidth() > $(window).width()) {
29847                        horizontal = 'right';
29848                    } else {
29849                        horizontal = 'left';
29850                    }
29851                }
29852
29853                if (vertical === 'top') {
29854                    widget.addClass('top').removeClass('bottom');
29855                } else {
29856                    widget.addClass('bottom').removeClass('top');
29857                }
29858
29859                if (horizontal === 'right') {
29860                    widget.addClass('pull-right');
29861                } else {
29862                    widget.removeClass('pull-right');
29863                }
29864
29865                // find the first parent element that has a non-static css positioning
29866                if (parent.css('position') === 'static') {
29867                    parent = parent.parents().filter(function () {
29868                        return $(this).css('position') !== 'static';
29869                    }).first();
29870                }
29871
29872                if (parent.length === 0) {
29873                    throw new Error('datetimepicker component should be placed within a non-static positioned container');
29874                }
29875
29876                widget.css({
29877                    top: vertical === 'top' ? 'auto' : position.top + element.outerHeight(),
29878                    bottom: vertical === 'top' ? parent.outerHeight() - (parent === element ? 0 : position.top) : 'auto',
29879                    left: horizontal === 'left' ? (parent === element ? 0 : position.left) : 'auto',
29880                    right: horizontal === 'left' ? 'auto' : parent.outerWidth() - element.outerWidth() - (parent === element ? 0 : position.left)
29881                });
29882            },
29883
29884            notifyEvent = function (e) {
29885                if (e.type === 'dp.change' && ((e.date && e.date.isSame(e.oldDate)) || (!e.date && !e.oldDate))) {
29886                    return;
29887                }
29888                element.trigger(e);
29889            },
29890
29891            viewUpdate = function (e) {
29892                if (e === 'y') {
29893                    e = 'YYYY';
29894                }
29895                notifyEvent({
29896                    type: 'dp.update',
29897                    change: e,
29898                    viewDate: viewDate.clone()
29899                });
29900            },
29901
29902            showMode = function (dir) {
29903                if (!widget) {
29904                    return;
29905                }
29906                if (dir) {
29907                    currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir));
29908                }
29909                widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show();
29910            },
29911
29912            fillDow = function () {
29913                var row = $('<tr>'),
29914                    currentDate = viewDate.clone().startOf('w').startOf('d');
29915
29916                if (options.calendarWeeks === true) {
29917                    row.append($('<th>').addClass('cw').text('#'));
29918                }
29919
29920                while (currentDate.isBefore(viewDate.clone().endOf('w'))) {
29921                    row.append($('<th>').addClass('dow').text(currentDate.format('dd')));
29922                    currentDate.add(1, 'd');
29923                }
29924                widget.find('.datepicker-days thead').append(row);
29925            },
29926
29927            isInDisabledDates = function (testDate) {
29928                return options.disabledDates[testDate.format('YYYY-MM-DD')] === true;
29929            },
29930
29931            isInEnabledDates = function (testDate) {
29932                return options.enabledDates[testDate.format('YYYY-MM-DD')] === true;
29933            },
29934
29935            isInDisabledHours = function (testDate) {
29936                return options.disabledHours[testDate.format('H')] === true;
29937            },
29938
29939            isInEnabledHours = function (testDate) {
29940                return options.enabledHours[testDate.format('H')] === true;
29941            },
29942
29943            isValid = function (targetMoment, granularity) {
29944                if (!targetMoment.isValid()) {
29945                    return false;
29946                }
29947                if (options.disabledDates && granularity === 'd' && isInDisabledDates(targetMoment)) {
29948                    return false;
29949                }
29950                if (options.enabledDates && granularity === 'd' && !isInEnabledDates(targetMoment)) {
29951                    return false;
29952                }
29953                if (options.minDate && targetMoment.isBefore(options.minDate, granularity)) {
29954                    return false;
29955                }
29956                if (options.maxDate && targetMoment.isAfter(options.maxDate, granularity)) {
29957                    return false;
29958                }
29959                if (options.daysOfWeekDisabled && granularity === 'd' && options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {
29960                    return false;
29961                }
29962                if (options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && isInDisabledHours(targetMoment)) {
29963                    return false;
29964                }
29965                if (options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !isInEnabledHours(targetMoment)) {
29966                    return false;
29967                }
29968                if (options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {
29969                    var found = false;
29970                    $.each(options.disabledTimeIntervals, function () {
29971                        if (targetMoment.isBetween(this[0], this[1])) {
29972                            found = true;
29973                            return false;
29974                        }
29975                    });
29976                    if (found) {
29977                        return false;
29978                    }
29979                }
29980                return true;
29981            },
29982
29983            fillMonths = function () {
29984                var spans = [],
29985                    monthsShort = viewDate.clone().startOf('y').startOf('d');
29986                while (monthsShort.isSame(viewDate, 'y')) {
29987                    spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));
29988                    monthsShort.add(1, 'M');
29989                }
29990                widget.find('.datepicker-months td').empty().append(spans);
29991            },
29992
29993            updateMonths = function () {
29994                var monthsView = widget.find('.datepicker-months'),
29995                    monthsViewHeader = monthsView.find('th'),
29996                    months = monthsView.find('tbody').find('span');
29997
29998                monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);
29999                monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);
30000                monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);
30001
30002                monthsView.find('.disabled').removeClass('disabled');
30003
30004                if (!isValid(viewDate.clone().subtract(1, 'y'), 'y')) {
30005                    monthsViewHeader.eq(0).addClass('disabled');
30006                }
30007
30008                monthsViewHeader.eq(1).text(viewDate.year());
30009
30010                if (!isValid(viewDate.clone().add(1, 'y'), 'y')) {
30011                    monthsViewHeader.eq(2).addClass('disabled');
30012                }
30013
30014                months.removeClass('active');
30015                if (date.isSame(viewDate, 'y') && !unset) {
30016                    months.eq(date.month()).addClass('active');
30017                }
30018
30019                months.each(function (index) {
30020                    if (!isValid(viewDate.clone().month(index), 'M')) {
30021                        $(this).addClass('disabled');
30022                    }
30023                });
30024            },
30025
30026            updateYears = function () {
30027                var yearsView = widget.find('.datepicker-years'),
30028                    yearsViewHeader = yearsView.find('th'),
30029                    startYear = viewDate.clone().subtract(5, 'y'),
30030                    endYear = viewDate.clone().add(6, 'y'),
30031                    html = '';
30032
30033                yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevDecade);
30034                yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);
30035                yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextDecade);
30036
30037                yearsView.find('.disabled').removeClass('disabled');
30038
30039                if (options.minDate && options.minDate.isAfter(startYear, 'y')) {
30040                    yearsViewHeader.eq(0).addClass('disabled');
30041                }
30042
30043                yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());
30044
30045                if (options.maxDate && options.maxDate.isBefore(endYear, 'y')) {
30046                    yearsViewHeader.eq(2).addClass('disabled');
30047                }
30048
30049                while (!startYear.isAfter(endYear, 'y')) {
30050                    html += '<span data-action="selectYear" class="year' + (startYear.isSame(date, 'y') && !unset ? ' active' : '') + (!isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
30051                    startYear.add(1, 'y');
30052                }
30053
30054                yearsView.find('td').html(html);
30055            },
30056
30057            updateDecades = function () {
30058                var decadesView = widget.find('.datepicker-decades'),
30059                    decadesViewHeader = decadesView.find('th'),
30060                    startDecade = moment({ y: viewDate.year() - (viewDate.year() % 100) - 1 }),
30061                    endDecade = startDecade.clone().add(100, 'y'),
30062                    startedAt = startDecade.clone(),
30063                    minDateDecade = false,
30064                    maxDateDecade = false,
30065                    endDecadeYear,
30066                    html = '';
30067
30068                decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);
30069                decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);
30070
30071                decadesView.find('.disabled').removeClass('disabled');
30072
30073                if (startDecade.isSame(moment({ y: 1900 })) || (options.minDate && options.minDate.isAfter(startDecade, 'y'))) {
30074                    decadesViewHeader.eq(0).addClass('disabled');
30075                }
30076
30077                decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());
30078
30079                if (startDecade.isSame(moment({ y: 2000 })) || (options.maxDate && options.maxDate.isBefore(endDecade, 'y'))) {
30080                    decadesViewHeader.eq(2).addClass('disabled');
30081                }
30082
30083                while (!startDecade.isAfter(endDecade, 'y')) {
30084                    endDecadeYear = startDecade.year() + 12;
30085                    minDateDecade = options.minDate && options.minDate.isAfter(startDecade, 'y') && options.minDate.year() <= endDecadeYear;
30086                    maxDateDecade = options.maxDate && options.maxDate.isAfter(startDecade, 'y') && options.maxDate.year() <= endDecadeYear;
30087                    html += '<span data-action="selectDecade" class="decade' + (date.isAfter(startDecade) && date.year() <= endDecadeYear ? ' active' : '') +
30088                        (!isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade ? ' disabled' : '') + '" data-selection="' + (startDecade.year() + 6) + '">' + (startDecade.year() + 1) + ' - ' + (startDecade.year() + 12) + '</span>';
30089                    startDecade.add(12, 'y');
30090                }
30091                html += '<span></span><span></span><span></span>'; //push the dangling block over, at least this way it's even
30092
30093                decadesView.find('td').html(html);
30094                decadesViewHeader.eq(1).text((startedAt.year() + 1) + '-' + (startDecade.year()));
30095            },
30096
30097            fillDate = function () {
30098                var daysView = widget.find('.datepicker-days'),
30099                    daysViewHeader = daysView.find('th'),
30100                    currentDate,
30101                    html = [],
30102                    row,
30103                    clsNames = [],
30104                    i;
30105
30106                if (!hasDate()) {
30107                    return;
30108                }
30109
30110                daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);
30111                daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);
30112                daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);
30113
30114                daysView.find('.disabled').removeClass('disabled');
30115                daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));
30116
30117                if (!isValid(viewDate.clone().subtract(1, 'M'), 'M')) {
30118                    daysViewHeader.eq(0).addClass('disabled');
30119                }
30120                if (!isValid(viewDate.clone().add(1, 'M'), 'M')) {
30121                    daysViewHeader.eq(2).addClass('disabled');
30122                }
30123
30124                currentDate = viewDate.clone().startOf('M').startOf('w').startOf('d');
30125
30126                for (i = 0; i < 42; i++) { //always display 42 days (should show 6 weeks)
30127                    if (currentDate.weekday() === 0) {
30128                        row = $('<tr>');
30129                        if (options.calendarWeeks) {
30130                            row.append('<td class="cw">' + currentDate.week() + '</td>');
30131                        }
30132                        html.push(row);
30133                    }
30134                    clsNames = ['day'];
30135                    if (currentDate.isBefore(viewDate, 'M')) {
30136                        clsNames.push('old');
30137                    }
30138                    if (currentDate.isAfter(viewDate, 'M')) {
30139                        clsNames.push('new');
30140                    }
30141                    if (currentDate.isSame(date, 'd') && !unset) {
30142                        clsNames.push('active');
30143                    }
30144                    if (!isValid(currentDate, 'd')) {
30145                        clsNames.push('disabled');
30146                    }
30147                    if (currentDate.isSame(getMoment(), 'd')) {
30148                        clsNames.push('today');
30149                    }
30150                    if (currentDate.day() === 0 || currentDate.day() === 6) {
30151                        clsNames.push('weekend');
30152                    }
30153                    notifyEvent({
30154                        type: 'dp.classify',
30155                        date: currentDate,
30156                        classNames: clsNames
30157                    });
30158                    row.append('<td data-action="selectDay" data-day="' + currentDate.format('L') + '" class="' + clsNames.join(' ') + '">' + currentDate.date() + '</td>');
30159                    currentDate.add(1, 'd');
30160                }
30161
30162                daysView.find('tbody').empty().append(html);
30163
30164                updateMonths();
30165
30166                updateYears();
30167
30168                updateDecades();
30169            },
30170
30171            fillHours = function () {
30172                var table = widget.find('.timepicker-hours table'),
30173                    currentHour = viewDate.clone().startOf('d'),
30174                    html = [],
30175                    row = $('<tr>');
30176
30177                if (viewDate.hour() > 11 && !use24Hours) {
30178                    currentHour.hour(12);
30179                }
30180                while (currentHour.isSame(viewDate, 'd') && (use24Hours || (viewDate.hour() < 12 && currentHour.hour() < 12) || viewDate.hour() > 11)) {
30181                    if (currentHour.hour() % 4 === 0) {
30182                        row = $('<tr>');
30183                        html.push(row);
30184                    }
30185                    row.append('<td data-action="selectHour" class="hour' + (!isValid(currentHour, 'h') ? ' disabled' : '') + '">' + currentHour.format(use24Hours ? 'HH' : 'hh') + '</td>');
30186                    currentHour.add(1, 'h');
30187                }
30188                table.empty().append(html);
30189            },
30190
30191            fillMinutes = function () {
30192                var table = widget.find('.timepicker-minutes table'),
30193                    currentMinute = viewDate.clone().startOf('h'),
30194                    html = [],
30195                    row = $('<tr>'),
30196                    step = options.stepping === 1 ? 5 : options.stepping;
30197
30198                while (viewDate.isSame(currentMinute, 'h')) {
30199                    if (currentMinute.minute() % (step * 4) === 0) {
30200                        row = $('<tr>');
30201                        html.push(row);
30202                    }
30203                    row.append('<td data-action="selectMinute" class="minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '">' + currentMinute.format('mm') + '</td>');
30204                    currentMinute.add(step, 'm');
30205                }
30206                table.empty().append(html);
30207            },
30208
30209            fillSeconds = function () {
30210                var table = widget.find('.timepicker-seconds table'),
30211                    currentSecond = viewDate.clone().startOf('m'),
30212                    html = [],
30213                    row = $('<tr>');
30214
30215                while (viewDate.isSame(currentSecond, 'm')) {
30216                    if (currentSecond.second() % 20 === 0) {
30217                        row = $('<tr>');
30218                        html.push(row);
30219                    }
30220                    row.append('<td data-action="selectSecond" class="second' + (!isValid(currentSecond, 's') ? ' disabled' : '') + '">' + currentSecond.format('ss') + '</td>');
30221                    currentSecond.add(5, 's');
30222                }
30223
30224                table.empty().append(html);
30225            },
30226
30227            fillTime = function () {
30228                var toggle, newDate, timeComponents = widget.find('.timepicker span[data-time-component]');
30229
30230                if (!use24Hours) {
30231                    toggle = widget.find('.timepicker [data-action=togglePeriod]');
30232                    newDate = date.clone().add((date.hours() >= 12) ? -12 : 12, 'h');
30233
30234                    toggle.text(date.format('A'));
30235
30236                    if (isValid(newDate, 'h')) {
30237                        toggle.removeClass('disabled');
30238                    } else {
30239                        toggle.addClass('disabled');
30240                    }
30241                }
30242                timeComponents.filter('[data-time-component=hours]').text(date.format(use24Hours ? 'HH' : 'hh'));
30243                timeComponents.filter('[data-time-component=minutes]').text(date.format('mm'));
30244                timeComponents.filter('[data-time-component=seconds]').text(date.format('ss'));
30245
30246                fillHours();
30247                fillMinutes();
30248                fillSeconds();
30249            },
30250
30251            update = function () {
30252                if (!widget) {
30253                    return;
30254                }
30255                fillDate();
30256                fillTime();
30257            },
30258
30259            setValue = function (targetMoment) {
30260                var oldDate = unset ? null : date;
30261
30262                // case of calling setValue(null or false)
30263                if (!targetMoment) {
30264                    unset = true;
30265                    input.val('');
30266                    element.data('date', '');
30267                    notifyEvent({
30268                        type: 'dp.change',
30269                        date: false,
30270                        oldDate: oldDate
30271                    });
30272                    update();
30273                    return;
30274                }
30275
30276                targetMoment = targetMoment.clone().locale(options.locale);
30277
30278                if (hasTimeZone()) {
30279                    targetMoment.tz(options.timeZone);
30280                }
30281
30282                if (options.stepping !== 1) {
30283                    targetMoment.minutes((Math.round(targetMoment.minutes() / options.stepping) * options.stepping)).seconds(0);
30284
30285                    while (options.minDate && targetMoment.isBefore(options.minDate)) {
30286                        targetMoment.add(options.stepping, 'minutes');
30287                    }
30288                }
30289
30290                if (isValid(targetMoment)) {
30291                    date = targetMoment;
30292                    viewDate = date.clone();
30293                    input.val(date.format(actualFormat));
30294                    element.data('date', date.format(actualFormat));
30295                    unset = false;
30296                    update();
30297                    notifyEvent({
30298                        type: 'dp.change',
30299                        date: date.clone(),
30300                        oldDate: oldDate
30301                    });
30302                } else {
30303                    if (!options.keepInvalid) {
30304                        input.val(unset ? '' : date.format(actualFormat));
30305                    } else {
30306                        notifyEvent({
30307                            type: 'dp.change',
30308                            date: targetMoment,
30309                            oldDate: oldDate
30310                        });
30311                    }
30312                    notifyEvent({
30313                        type: 'dp.error',
30314                        date: targetMoment,
30315                        oldDate: oldDate
30316                    });
30317                }
30318            },
30319
30320            /**
30321             * Hides the widget. Possibly will emit dp.hide
30322             */
30323            hide = function () {
30324                var transitioning = false;
30325                if (!widget) {
30326                    return picker;
30327                }
30328                // Ignore event if in the middle of a picker transition
30329                widget.find('.collapse').each(function () {
30330                    var collapseData = $(this).data('collapse');
30331                    if (collapseData && collapseData.transitioning) {
30332                        transitioning = true;
30333                        return false;
30334                    }
30335                    return true;
30336                });
30337                if (transitioning) {
30338                    return picker;
30339                }
30340                if (component && component.hasClass('btn')) {
30341                    component.toggleClass('active');
30342                }
30343                widget.hide();
30344
30345                $(window).off('resize', place);
30346                widget.off('click', '[data-action]');
30347                widget.off('mousedown', false);
30348
30349                widget.remove();
30350                widget = false;
30351
30352                notifyEvent({
30353                    type: 'dp.hide',
30354                    date: date.clone()
30355                });
30356
30357                input.blur();
30358
30359                viewDate = date.clone();
30360
30361                return picker;
30362            },
30363
30364            clear = function () {
30365                setValue(null);
30366            },
30367
30368            parseInputDate = function (inputDate) {
30369                if (options.parseInputDate === undefined) {
30370                    if (!moment.isMoment(inputDate) || inputDate instanceof Date) {
30371                        inputDate = getMoment(inputDate);
30372                    }
30373                } else {
30374                    inputDate = options.parseInputDate(inputDate);
30375                }
30376                //inputDate.locale(options.locale);
30377                return inputDate;
30378            },
30379
30380            /********************************************************************************
30381             *
30382             * Widget UI interaction functions
30383             *
30384             ********************************************************************************/
30385            actions = {
30386                next: function () {
30387                    var navFnc = datePickerModes[currentViewMode].navFnc;
30388                    viewDate.add(datePickerModes[currentViewMode].navStep, navFnc);
30389                    fillDate();
30390                    viewUpdate(navFnc);
30391                },
30392
30393                previous: function () {
30394                    var navFnc = datePickerModes[currentViewMode].navFnc;
30395                    viewDate.subtract(datePickerModes[currentViewMode].navStep, navFnc);
30396                    fillDate();
30397                    viewUpdate(navFnc);
30398                },
30399
30400                pickerSwitch: function () {
30401                    showMode(1);
30402                },
30403
30404                selectMonth: function (e) {
30405                    var month = $(e.target).closest('tbody').find('span').index($(e.target));
30406                    viewDate.month(month);
30407                    if (currentViewMode === minViewModeNumber) {
30408                        setValue(date.clone().year(viewDate.year()).month(viewDate.month()));
30409                        if (!options.inline) {
30410                            hide();
30411                        }
30412                    } else {
30413                        showMode(-1);
30414                        fillDate();
30415                    }
30416                    viewUpdate('M');
30417                },
30418
30419                selectYear: function (e) {
30420                    var year = parseInt($(e.target).text(), 10) || 0;
30421                    viewDate.year(year);
30422                    if (currentViewMode === minViewModeNumber) {
30423                        setValue(date.clone().year(viewDate.year()));
30424                        if (!options.inline) {
30425                            hide();
30426                        }
30427                    } else {
30428                        showMode(-1);
30429                        fillDate();
30430                    }
30431                    viewUpdate('YYYY');
30432                },
30433
30434                selectDecade: function (e) {
30435                    var year = parseInt($(e.target).data('selection'), 10) || 0;
30436                    viewDate.year(year);
30437                    if (currentViewMode === minViewModeNumber) {
30438                        setValue(date.clone().year(viewDate.year()));
30439                        if (!options.inline) {
30440                            hide();
30441                        }
30442                    } else {
30443                        showMode(-1);
30444                        fillDate();
30445                    }
30446                    viewUpdate('YYYY');
30447                },
30448
30449                selectDay: function (e) {
30450                    var day = viewDate.clone();
30451                    if ($(e.target).is('.old')) {
30452                        day.subtract(1, 'M');
30453                    }
30454                    if ($(e.target).is('.new')) {
30455                        day.add(1, 'M');
30456                    }
30457                    setValue(day.date(parseInt($(e.target).text(), 10)));
30458                    if (!hasTime() && !options.keepOpen && !options.inline) {
30459                        hide();
30460                    }
30461                },
30462
30463                incrementHours: function () {
30464                    var newDate = date.clone().add(1, 'h');
30465                    if (isValid(newDate, 'h')) {
30466                        setValue(newDate);
30467                    }
30468                },
30469
30470                incrementMinutes: function () {
30471                    var newDate = date.clone().add(options.stepping, 'm');
30472                    if (isValid(newDate, 'm')) {
30473                        setValue(newDate);
30474                    }
30475                },
30476
30477                incrementSeconds: function () {
30478                    var newDate = date.clone().add(1, 's');
30479                    if (isValid(newDate, 's')) {
30480                        setValue(newDate);
30481                    }
30482                },
30483
30484                decrementHours: function () {
30485                    var newDate = date.clone().subtract(1, 'h');
30486                    if (isValid(newDate, 'h')) {
30487                        setValue(newDate);
30488                    }
30489                },
30490
30491                decrementMinutes: function () {
30492                    var newDate = date.clone().subtract(options.stepping, 'm');
30493                    if (isValid(newDate, 'm')) {
30494                        setValue(newDate);
30495                    }
30496                },
30497
30498                decrementSeconds: function () {
30499                    var newDate = date.clone().subtract(1, 's');
30500                    if (isValid(newDate, 's')) {
30501                        setValue(newDate);
30502                    }
30503                },
30504
30505                togglePeriod: function () {
30506                    setValue(date.clone().add((date.hours() >= 12) ? -12 : 12, 'h'));
30507                },
30508
30509                togglePicker: function (e) {
30510                    var $this = $(e.target),
30511                        $parent = $this.closest('ul'),
30512                        expanded = $parent.find('.in'),
30513                        closed = $parent.find('.collapse:not(.in)'),
30514                        collapseData;
30515
30516                    if (expanded && expanded.length) {
30517                        collapseData = expanded.data('collapse');
30518                        if (collapseData && collapseData.transitioning) {
30519                            return;
30520                        }
30521                        if (expanded.collapse) { // if collapse plugin is available through bootstrap.js then use it
30522                            expanded.collapse('hide');
30523                            closed.collapse('show');
30524                        } else { // otherwise just toggle in class on the two views
30525                            expanded.removeClass('in');
30526                            closed.addClass('in');
30527                        }
30528                        if ($this.is('span')) {
30529                            $this.toggleClass(options.icons.time + ' ' + options.icons.date);
30530                        } else {
30531                            $this.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
30532                        }
30533
30534                        // NOTE: uncomment if toggled state will be restored in show()
30535                        //if (component) {
30536                        //    component.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
30537                        //}
30538                    }
30539                },
30540
30541                showPicker: function () {
30542                    widget.find('.timepicker > div:not(.timepicker-picker)').hide();
30543                    widget.find('.timepicker .timepicker-picker').show();
30544                },
30545
30546                showHours: function () {
30547                    widget.find('.timepicker .timepicker-picker').hide();
30548                    widget.find('.timepicker .timepicker-hours').show();
30549                },
30550
30551                showMinutes: function () {
30552                    widget.find('.timepicker .timepicker-picker').hide();
30553                    widget.find('.timepicker .timepicker-minutes').show();
30554                },
30555
30556                showSeconds: function () {
30557                    widget.find('.timepicker .timepicker-picker').hide();
30558                    widget.find('.timepicker .timepicker-seconds').show();
30559                },
30560
30561                selectHour: function (e) {
30562                    var hour = parseInt($(e.target).text(), 10);
30563
30564                    if (!use24Hours) {
30565                        if (date.hours() >= 12) {
30566                            if (hour !== 12) {
30567                                hour += 12;
30568                            }
30569                        } else {
30570                            if (hour === 12) {
30571                                hour = 0;
30572                            }
30573                        }
30574                    }
30575                    setValue(date.clone().hours(hour));
30576                    actions.showPicker.call(picker);
30577                },
30578
30579                selectMinute: function (e) {
30580                    setValue(date.clone().minutes(parseInt($(e.target).text(), 10)));
30581                    actions.showPicker.call(picker);
30582                },
30583
30584                selectSecond: function (e) {
30585                    setValue(date.clone().seconds(parseInt($(e.target).text(), 10)));
30586                    actions.showPicker.call(picker);
30587                },
30588
30589                clear: clear,
30590
30591                today: function () {
30592                    var todaysDate = getMoment();
30593                    if (isValid(todaysDate, 'd')) {
30594                        setValue(todaysDate);
30595                    }
30596                },
30597
30598                close: hide
30599            },
30600
30601            doAction = function (e) {
30602                if ($(e.currentTarget).is('.disabled')) {
30603                    return false;
30604                }
30605                actions[$(e.currentTarget).data('action')].apply(
30605picker, arguments);
30606                return false;
30607            },
30608
30609            /**
30610             * Shows the widget. Possibly will emit dp.show and dp.change
30611             */
30612            show = function () {
30613                var currentMoment,
30614                    useCurrentGranularity = {
30615                        'year': function (m) {
30616                            return m.month(0).date(1).hours(0).seconds(0).minutes(0);
30617                        },
30618                        'month': function (m) {
30619                            return m.date(1).hours(0).seconds(0).minutes(0);
30620                        },
30621                        'day': function (m) {
30622                            return m.hours(0).seconds(0).minutes(0);
30623                        },
30624                        'hour': function (m) {
30625                            return m.seconds(0).minutes(0);
30626                        },
30627                        'minute': function (m) {
30628                            return m.seconds(0);
30629                        }
30630                    };
30631
30632                if (input.prop('disabled') || (!options.ignoreReadonly && input.prop('readonly')) || widget) {
30633                    return picker;
30634                }
30635                if (input.val() !== undefined && input.val().trim().length !== 0) {
30636                    setValue(parseInputDate(input.val().trim()));
30637                } else if (unset && options.useCurrent && (options.inline || (input.is('input') && input.val().trim().length === 0))) {
30638                    currentMoment = getMoment();
30639                    if (typeof options.useCurrent === 'string') {
30640                        currentMoment = useCurrentGranularity[options.useCurrent](currentMoment);
30641                    }
30642                    setValue(currentMoment);
30643                }
30644                widget = getTemplate();
30645
30646                fillDow();
30647                fillMonths();
30648
30649                widget.find('.timepicker-hours').hide();
30650                widget.find('.timepicker-minutes').hide();
30651                widget.find('.timepicker-seconds').hide();
30652
30653                update();
30654                showMode();
30655
30656                $(window).on('resize', place);
30657                widget.on('click', '[data-action]', doAction); // this handles clicks on the widget
30658                widget.on('mousedown', false);
30659
30660                if (component && component.hasClass('btn')) {
30661                    component.toggleClass('active');
30662                }
30663                place();
30664                widget.show();
30665                if (options.focusOnShow && !input.is(':focus')) {
30666                    input.focus();
30667                }
30668
30669                notifyEvent({
30670                    type: 'dp.show'
30671                });
30672                return picker;
30673            },
30674
30675            /**
30676             * Shows or hides the widget
30677             */
30678            toggle = function () {
30679                return (widget ? hide() : show());
30680            },
30681
30682            keydown = function (e) {
30683                var handler = null,
30684                    index,
30685                    index2,
30686                    pressedKeys = [],
30687                    pressedModifiers = {},
30688                    currentKey = e.which,
30689                    keyBindKeys,
30690                    allModifiersPressed,
30691                    pressed = 'p';
30692
30693                keyState[currentKey] = pressed;
30694
30695                for (index in keyState) {
30696                    if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {
30697                        pressedKeys.push(index);
30698                        if (parseInt(index, 10) !== currentKey) {
30699                            pressedModifiers[index] = true;
30700                        }
30701                    }
30702                }
30703
30704                for (index in options.keyBinds) {
30705                    if (options.keyBinds.hasOwnProperty(index) && typeof (options.keyBinds[index]) === 'function') {
30706                        keyBindKeys = index.split(' ');
30707                        if (keyBindKeys.length === pressedKeys.length && keyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {
30708                            allModifiersPressed = true;
30709                            for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {
30710                                if (!(keyMap[keyBindKeys[index2]] in pressedModifiers)) {
30711                                    allModifiersPressed = false;
30712                                    break;
30713                                }
30714                            }
30715                            if (allModifiersPressed) {
30716                                handler = options.keyBinds[index];
30717                                break;
30718                            }
30719                        }
30720                    }
30721                }
30722
30723                if (handler) {
30724                    handler.call(picker, widget);
30725                    e.stopPropagation();
30726                    e.preventDefault();
30727                }
30728            },
30729
30730            keyup = function (e) {
30731                keyState[e.which] = 'r';
30732                e.stopPropagation();
30733                e.preventDefault();
30734            },
30735
30736            change = function (e) {
30737                var val = $(e.target).val().trim(),
30738                    parsedDate = val ? parseInputDate(val) : null;
30739                setValue(parsedDate);
30740                e.stopImmediatePropagation();
30741                return false;
30742            },
30743
30744            attachDatePickerElementEvents = function () {
30745                input.on({
30746                    'change': change,
30747                    'blur': options.debug ? '' : hide,
30748                    'keydown': keydown,
30749                    'keyup': keyup,
30750                    'focus': options.allowInputToggle ? show : ''
30751                });
30752
30753                if (element.is('input')) {
30754                    input.on({
30755                        'focus': show
30756                    });
30757                } else if (component) {
30758                    component.on('click', toggle);
30759                    component.on('mousedown', false);
30760                }
30761            },
30762
30763            detachDatePickerElementEvents = function () {
30764                input.off({
30765                    'change': change,
30766                    'blur': blur,
30767                    'keydown': keydown,
30768                    'keyup': keyup,
30769                    'focus': options.allowInputToggle ? hide : ''
30770                });
30771
30772                if (element.is('input')) {
30773                    input.off({
30774                        'focus': show
30775                    });
30776                } else if (component) {
30777                    component.off('click', toggle);
30778                    component.off('mousedown', false);
30779                }
30780            },
30781
30782            indexGivenDates = function (givenDatesArray) {
30783                // Store given enabledDates and disabledDates as keys.
30784                // This way we can check their existence in O(1) time instead of looping through whole array.
30785                // (for example: options.enabledDates['2014-02-27'] === true)
30786                var givenDatesIndexed = {};
30787                $.each(givenDatesArray, function () {
30788                    var dDate = parseInputDate(this);
30789                    if (dDate.isValid()) {
30790                        givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
30791                    }
30792                });
30793                return (Object.keys(givenDatesIndexed).length) ? givenDatesIndexed : false;
30794            },
30795
30796            indexGivenHours = function (givenHoursArray) {
30797                // Store given enabledHours and disabledHours as keys.
30798                // This way we can check their existence in O(1) time instead of looping through whole array.
30799                // (for example: options.enabledHours['2014-02-27'] === true)
30800                var givenHoursIndexed = {};
30801                $.each(givenHoursArray, function () {
30802                    givenHoursIndexed[this] = true;
30803                });
30804                return (Object.keys(givenHoursIndexed).length) ? givenHoursIndexed : false;
30805            },
30806
30807            initFormatting = function () {
30808                var format = options.format || 'L LT';
30809
30810                actualFormat = format.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {
30811                    var newinput = date.localeData().longDateFormat(formatInput) || formatInput;
30812                    return newinput.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput2) { //temp fix for #740
30813                        return date.localeData().longDateFormat(formatInput2) || formatInput2;
30814                    });
30815                });
30816
30817
30818                parseFormats = options.extraFormats ? options.extraFormats.slice() : [];
30819                if (parseFormats.indexOf(format) < 0 && parseFormats.indexOf(actualFormat) < 0) {
30820                    parseFormats.push(actualFormat);
30821                }
30822
30823                use24Hours = (actualFormat.toLowerCase().indexOf('a') < 1 && actualFormat.replace(/\[.*?\]/g, '').indexOf('h') < 1);
30824
30825                if (isEnabled('y')) {
30826                    minViewModeNumber = 2;
30827                }
30828                if (isEnabled('M')) {
30829                    minViewModeNumber = 1;
30830                }
30831                if (isEnabled('d')) {
30832                    minViewModeNumber = 0;
30833                }
30834
30835                currentViewMode = Math.max(minViewModeNumber, currentViewMode);
30836
30837                if (!unset) {
30838                    setValue(date);
30839                }
30840            };
30841
30842        /********************************************************************************
30843         *
30844         * Public API functions
30845         * =====================
30846         *
30847         * Important: Do not expose direct references to private objects or the options
30848         * object to the outer world. Always return a clone when returning values or make
30849         * a clone when setting a private variable.
30850         *
30851         ********************************************************************************/
30852        picker.destroy = function () {
30853            ///<summary>Destroys the widget and removes all attached event listeners</summary>
30854            hide();
30855            detachDatePickerElementEvents();
30856            element.removeData('DateTimePicker');
30857            element.removeData('date');
30858        };
30859
30860        picker.toggle = toggle;
30861
30862        picker.show = show;
30863
30864        picker.hide = hide;
30865
30866        picker.disable = function () {
30867            ///<summary>Disables the input element, the component is attached to, by adding a disabled="true" attribute to it.
30868            ///If the widget was visible before that call it is hidden. Possibly emits dp.hide</summary>
30869            hide();
30870            if (component && component.hasClass('btn')) {
30871                component.addClass('disabled');
30872            }
30873            input.prop('disabled', true);
30874            return picker;
30875        };
30876
30877        picker.enable = function () {
30878            ///<summary>Enables the input element, the component is attached to, by removing disabled attribute from it.</summary>
30879            if (component && component.hasClass('btn')) {
30880                component.removeClass('disabled');
30881            }
30882            input.prop('disabled', false);
30883            return picker;
30884        };
30885
30886        picker.ignoreReadonly = function (ignoreReadonly) {
30887            if (arguments.length === 0) {
30888                return options.ignoreReadonly;
30889            }
30890            if (typeof ignoreReadonly !== 'boolean') {
30891                throw new TypeError('ignoreReadonly () expects a boolean parameter');
30892            }
30893            options.ignoreReadonly = ignoreReadonly;
30894            return picker;
30895        };
30896
30897        picker.options = function (newOptions) {
30898            if (arguments.length === 0) {
30899                return $.extend(true, {}, options);
30900            }
30901
30902            if (!(newOptions instanceof Object)) {
30903                throw new TypeError('options() options parameter should be an object');
30904            }
30905            $.extend(true, options, newOptions);
30906            $.each(options, function (key, value) {
30907                if (picker[key] !== undefined) {
30908                    picker[key](value);
30909                } else {
30910                    throw new TypeError('option ' + key + ' is not recognized!');
30911                }
30912            });
30913            return picker;
30914        };
30915
30916        picker.date = function (newDate) {
30917            ///<signature helpKeyword="$.fn.datetimepicker.date">
30918            ///<summary>Returns the component's model current date, a moment object or null if not set.</summary>
30919            ///<returns type="Moment">date.clone()</returns>
30920            ///</signature>
30921            ///<signature>
30922            ///<summary>Sets the components model current moment to it. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.</summary>
30923            ///<param name="newDate" locid="$.fn.datetimepicker.date_p:newDate">Takes string, Date, moment, null parameter.</param>
30924            ///</signature>
30925            if (arguments.length === 0) {
30926                if (unset) {
30927                    return null;
30928                }
30929                return date.clone();
30930            }
30931
30932            if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
30933                throw new TypeError('date() parameter must be one of [null, string, moment or Date]');
30934            }
30935
30936            setValue(newDate === null ? null : parseInputDate(newDate));
30937            return picker;
30938        };
30939
30940        picker.format = function (newFormat) {
30941            ///<summary>test su</summary>
30942            ///<param name="newFormat">info about para</param>
30943            ///<returns type="string|boolean">returns foo</returns>
30944            if (arguments.length === 0) {
30945                return options.format;
30946            }
30947
30948            if ((typeof newFormat !== 'string') && ((typeof newFormat !== 'boolean') || (newFormat !== false))) {
30949                throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);
30950            }
30951
30952            options.format = newFormat;
30953            if (actualFormat) {
30954                initFormatting(); // reinit formatting
30955            }
30956            return picker;
30957        };
30958
30959        picker.timeZone = function (newZone) {
30960            if (arguments.length === 0) {
30961                return options.timeZone;
30962            }
30963
30964            if (typeof newZone !== 'string') {
30965                throw new TypeError('newZone() expects a string parameter');
30966            }
30967
30968            options.timeZone = newZone;
30969
30970            return picker;
30971        };
30972
30973        picker.dayViewHeaderFormat = function (newFormat) {
30974            if (arguments.length === 0) {
30975                return options.dayViewHeaderFormat;
30976            }
30977
30978            if (typeof newFormat !== 'string') {
30979                throw new TypeError('dayViewHeaderFormat() expects a string parameter');
30980            }
30981
30982            options.dayViewHeaderFormat = newFormat;
30983            return picker;
30984        };
30985
30986        picker.extraFormats = function (formats) {
30987            if (arguments.length === 0) {
30988                return options.extraFormats;
30989            }
30990
30991            if (formats !== false && !(formats instanceof Array)) {
30992                throw new TypeError('extraFormats() expects an array or false parameter');
30993            }
30994
30995            options.extraFormats = formats;
30996            if (parseFormats) {
30997                initFormatting(); // reinit formatting
30998            }
30999            return picker;
31000        };
31001
31002        picker.disabledDates = function (dates) {
31003            ///<signature helpKeyword="$.fn.datetimepicker.disabledDates">
31004            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>
31005            ///<returns type="array">options.disabledDates</returns>
31006            ///</signature>
31007            ///<signature>
31008            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
31009            ///options.enabledDates if such exist.</summary>
31010            ///<param name="dates" locid="$.fn.datetimepicker.disabledDates_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.
31010</param>
31011            ///</signature>
31012            if (arguments.length === 0) {
31013                return (options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates);
31014            }
31015
31016            if (!dates) {
31017                options.disabledDates = false;
31018                update();
31019                return picker;
31020            }
31021            if (!(dates instanceof Array)) {
31022                throw new TypeError('disabledDates() expects an array parameter');
31023            }
31024            options.disabledDates = indexGivenDates(dates);
31025            options.enabledDates = false;
31026            update();
31027            return picker;
31028        };
31029
31030        picker.enabledDates = function (dates) {
31031            ///<signature helpKeyword="$.fn.datetimepicker.enabledDates">
31032            ///<summary>Returns an array with the currently set enabled dates on the component.</summary>
31033            ///<returns type="array">options.enabledDates</returns>
31034            ///</signature>
31035            ///<signature>
31036            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledDates if such exist.</summary>
31037            ///<param name="dates" locid="$.fn.datetimepicker.enabledDates_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>
31038            ///</signature>
31039            if (arguments.length === 0) {
31040                return (options.enabledDates ? $.extend({}, options.enabledDates) : options.enabledDates);
31041            }
31042
31043            if (!dates) {
31044                options.enabledDates = false;
31045                update();
31046                return picker;
31047            }
31048            if (!(dates instanceof Array)) {
31049                throw new TypeError('enabledDates() expects an array parameter');
31050            }
31051            options.enabledDates = indexGivenDates(dates);
31052            options.disabledDates = false;
31053            update();
31054            return picker;
31055        };
31056
31057        picker.daysOfWeekDisabled = function (daysOfWeekDisabled) {
31058            if (arguments.length === 0) {
31059                return options.daysOfWeekDisabled.splice(0);
31060            }
31061
31062            if ((typeof daysOfWeekDisabled === 'boolean') && !daysOfWeekDisabled) {
31063                options.daysOfWeekDisabled = false;
31064                update();
31065                return picker;
31066            }
31067
31068            if (!(daysOfWeekDisabled instanceof Array)) {
31069                throw new TypeError('daysOfWeekDisabled() expects an array parameter');
31070            }
31071            options.daysOfWeekDisabled = daysOfWeekDisabled.reduce(function (previousValue, currentValue) {
31072                currentValue = parseInt(currentValue, 10);
31073                if (currentValue > 6 || currentValue < 0 || isNaN(currentValue)) {
31074                    return previousValue;
31075                }
31076                if (previousValue.indexOf(currentValue) === -1) {
31077                    previousValue.push(currentValue);
31078                }
31079                return previousValue;
31080            }, []).sort();
31081            if (options.useCurrent && !options.keepInvalid) {
31082                var tries = 0;
31083                while (!isValid(date, 'd')) {
31084                    date.add(1, 'd');
31085                    if (tries === 31) {
31086                        throw 'Tried 31 times to find a valid date';
31087                    }
31088                    tries++;
31089                }
31090                setValue(date);
31091            }
31092            update();
31093            return picker;
31094        };
31095
31096        picker.maxDate = function (maxDate) {
31097            if (arguments.length === 0) {
31098                return options.maxDate ? options.maxDate.clone() : options.maxDate;
31099            }
31100
31101            if ((typeof maxDate === 'boolean') && maxDate === false) {
31102                options.maxDate = false;
31103                update();
31104                return picker;
31105            }
31106
31107            if (typeof maxDate === 'string') {
31108                if (maxDate === 'now' || maxDate === 'moment') {
31109                    maxDate = getMoment();
31110                }
31111            }
31112
31113            var parsedDate = parseInputDate(maxDate);
31114
31115            if (!parsedDate.isValid()) {
31116                throw new TypeError('maxDate() Could not parse date parameter: ' + maxDate);
31117            }
31118            if (options.minDate && parsedDate.isBefore(options.minDate)) {
31119                throw new TypeError('maxDate() date parameter is before options.minDate: ' + parsedDate.format(actualFormat));
31120            }
31121            options.maxDate = parsedDate;
31122            if (options.useCurrent && !options.keepInvalid && date.isAfter(maxDate)) {
31123                setValue(options.maxDate);
31124            }
31125            if (viewDate.isAfter(parsedDate)) {
31126                viewDate = parsedDate.clone().subtract(options.stepping, 'm');
31127            }
31128            update();
31129            return picker;
31130        };
31131
31132        picker.minDate = function (minDate) {
31133            if (arguments.length === 0) {
31134                return options.minDate ? options.minDate.clone() : options.minDate;
31135            }
31136
31137            if ((typeof minDate === 'boolean') && minDate === false) {
31138                options.minDate = false;
31139                update();
31140                return picker;
31141            }
31142
31143            if (typeof minDate === 'string') {
31144                if (minDate === 'now' || minDate === 'moment') {
31145                    minDate = getMoment();
31146                }
31147            }
31148
31149            var parsedDate = parseInputDate(minDate);
31150
31151            if (!parsedDate.isValid()) {
31152                throw new TypeError('minDate() Could not parse date parameter: ' + minDate);
31153            }
31154            if (options.maxDate && parsedDate.isAfter(options.maxDate)) {
31155                throw new TypeError('minDate() date parameter is after options.maxDate: ' + parsedDate.format(actualFormat));
31156            }
31157            options.minDate = parsedDate;
31158            if (options.useCurrent && !options.keepInvalid && date.isBefore(minDate)) {
31159                setValue(options.minDate);
31160            }
31161            if (viewDate.isBefore(parsedDate)) {
31162                viewDate = parsedDate.clone().add(options.stepping, 'm');
31163            }
31164            update();
31165            return picker;
31166        };
31167
31168        picker.defaultDate = function (defaultDate) {
31169            ///<signature helpKeyword="$.fn.datetimepicker.defaultDate">
31170            ///<summary>Returns a moment with the options.defaultDate option configuration or false if not set</summary>
31171            ///<returns type="Moment">date.clone()</returns>
31172            ///</signature>
31173            ///<signature>
31174            ///<summary>Will set the picker's inital date. If a boolean:false value is passed the options.defaultDate parameter is cleared.</summary>
31175            ///<param name="defaultDate" locid="$.fn.datetimepicker.defaultDate_p:defaultDate">Takes a string, Date, moment, boolean:false</param>
31176            ///</signature>
31177            if (arguments.length === 0) {
31178                return options.defaultDate ? options.defaultDate.clone() : options.defaultDate;
31179            }
31180            if (!defaultDate) {
31181                options.defaultDate = false;
31182                return picker;
31183            }
31184
31185            if (typeof defaultDate === 'string') {
31186                if (defaultDate === 'now' || defaultDate === 'moment') {
31187                    defaultDate = getMoment();
31188                } else {
31189                    defaultDate = getMoment(defaultDate);
31190                }
31191            }
31192
31193            var parsedDate = parseInputDate(defaultDate);
31194            if (!parsedDate.isValid()) {
31195                throw new TypeError('defaultDate() Could not parse date parameter: ' + defaultDate);
31196            }
31197            if (!isValid(parsedDate)) {
31198                throw new TypeError('defaultDate() date passed is invalid according to component setup validations');
31199            }
31200
31201            options.defaultDate = parsedDate;
31202
31203            if ((options.defaultDate && options.inline) || input.val().trim() === '') {
31204                setValue(options.defaultDate);
31205            }
31206            return picker;
31207        };
31208
31209        picker.locale = function (locale) {
31210            if (arguments.length === 0) {
31211                return options.locale;
31212            }
31213
31214            if (!moment.localeData(locale)) {
31215                throw new TypeError('locale() locale ' + locale + ' is not loaded from moment locales!');
31216            }
31217
31218            options.locale = locale;
31219            date.locale(options.locale);
31220            viewDate.locale(options.locale);
31221
31222            if (actualFormat) {
31223                initFormatting(); // reinit formatting
31224            }
31225            if (widget) {
31226                hide();
31227                show();
31228            }
31229            return picker;
31230        };
31231
31232        picker.stepping = function (stepping) {
31233            if (arguments.length === 0) {
31234                return options.stepping;
31235            }
31236
31237            stepping = parseInt(stepping, 10);
31238            if (isNaN(stepping) || stepping < 1) {
31239                stepping = 1;
31240            }
31241            options.stepping = stepping;
31242            return picker;
31243        };
31244
31245        picker.useCurrent = function (useCurrent) {
31246            var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];
31247            if (arguments.length === 0) {
31248                return options.useCurrent;
31249            }
31250
31251            if ((typeof useCurrent !== 'boolean') && (typeof useCurrent !== 'string')) {
31252                throw new TypeError('useCurrent() expects a boolean or string parameter');
31253            }
31254            if (typeof useCurrent === 'string' && useCurrentOptions.indexOf(useCurrent.toLowerCase()) === -1) {
31255                throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));
31256            }
31257            options.useCurrent = useCurrent;
31258            return picker;
31259        };
31260
31261        picker.collapse = function (collapse) {
31262            if (arguments.length === 0) {
31263                return options.collapse;
31264            }
31265
31266            if (typeof collapse !== 'boolean') {
31267                throw new TypeError('collapse() expects a boolean parameter');
31268            }
31269            if (options.collapse === collapse) {
31270                return picker;
31271            }
31272            options.collapse = collapse;
31273            if (widget) {
31274                hide();
31275                show();
31276            }
31277            return picker;
31278        };
31279
31280        picker.icons = function (icons) {
31281            if (arguments.length === 0) {
31282                return $.extend({}, options.icons);
31283            }
31284
31285            if (!(icons instanceof Object)) {
31286                throw new TypeError('icons() expects parameter to be an Object');
31287            }
31288            $.extend(options.icons, icons);
31289            if (widget) {
31290                hide();
31291                show();
31292            }
31293            return picker;
31294        };
31295
31296        picker.tooltips = function (tooltips) {
31297            if (arguments.length === 0) {
31298                return $.extend({}, options.tooltips);
31299            }
31300
31301            if (!(tooltips instanceof Object)) {
31302                throw new TypeError('tooltips() expects parameter to be an Object');
31303            }
31304            $.extend(options.tooltips, tooltips);
31305            if (widget) {
31306                hide();
31307                show();
31308            }
31309            return picker;
31310        };
31311
31312        picker.useStrict = function (useStrict) {
31313            if (arguments.length === 0) {
31314                return options.useStrict;
31315            }
31316
31317            if (typeof useStrict !== 'boolean') {
31318                throw new TypeError('useStrict() expects a boolean parameter');
31319            }
31320            options.useStrict = useStrict;
31321            return picker;
31322        };
31323
31324        picker.sideBySide = function (sideBySide) {
31325            if (arguments.length === 0) {
31326                return options.sideBySide;
31327            }
31328
31329            if (typeof sideBySide !== 'boolean') {
31330                throw new TypeError('sideBySide() expects a boolean parameter');
31331            }
31332            options.sideBySide = sideBySide;
31333            if (widget) {
31334                hide();
31335                show();
31336            }
31337            return picker;
31338        };
31339
31340        picker.viewMode = function (viewMode) {
31341            if (arguments.length === 0) {
31342                return options.viewMode;
31343            }
31344
31345            if (typeof viewMode !== 'string') {
31346                throw new TypeError('viewMode() expects a string parameter');
31347            }
31348
31349            if (viewModes.indexOf(viewMode) === -1) {
31350                throw new TypeError('viewMode() parameter must be one of (' + viewModes.join(', ') + ') value');
31351            }
31352
31353            options.viewMode = viewMode;
31354            currentViewMode = Math.max(viewModes.indexOf(viewMode), minViewModeNumber);
31355
31356            showMode();
31357            return picker;
31358        };
31359
31360        picker.toolbarPlacement = function (toolbarPlacement) {
31361            if (arguments.length === 0) {
31362                return options.toolbarPlacement;
31363            }
31364
31365            if (typeof toolbarPlacement !== 'string') {
31366                throw new TypeError('toolbarPlacement() expects a string parameter');
31367            }
31368            if (toolbarPlacements.indexOf(toolbarPlacement) === -1) {
31369                throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');
31370            }
31371            options.toolbarPlacement = toolbarPlacement;
31372
31373            if (widget) {
31374                hide();
31375                show();
31376            }
31377            return picker;
31378        };
31379
31380        picker.widgetPositioning = function (widgetPositioning) {
31381            if (arguments.length === 0) {
31382                return $.extend({}, options.widgetPositioning);
31383            }
31384
31385            if (({}).toString.call(widgetPositioning) !== '[object Object]') {
31386                throw new TypeError('widgetPositioning() expects an object variable');
31387            }
31388            if (widgetPositioning.horizontal) {
31389                if (typeof widgetPositioning.horizontal !== 'string') {
31390                    throw new TypeError('widgetPositioning() horizontal variable must be a string');
31391                }
31392                widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();
31393                if (horizontalModes.indexOf(widgetPositioning.horizontal) === -1) {
31394                    throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');
31395                }
31396                options.widgetPositioning.horizontal = widgetPositioning.horizontal;
31397            }
31398            if (widgetPositioning.vertical) {
31399                if (typeof widgetPositioning.vertical !== 'string') {
31400                    throw new TypeError('widgetPositioning() vertical variable must be a string');
31401                }
31402                widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();
31403                if (verticalModes.indexOf(widgetPositioning.vertical) === -1) {
31404                    throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');
31405                }
31406                options.widgetPositioning.vertical = widgetPositioning.vertical;
31407            }
31408            update();
31409            return picker;
31410        };
31411
31412        picker.calendarWeeks = function (calendarWeeks) {
31413            if (arguments.length === 0) {
31414                return options.calendarWeeks;
31415            }
31416
31417            if (typeof calendarWeeks !== 'boolean') {
31418                throw new TypeError('calendarWeeks() expects parameter to be a boolean value');
31419            }
31420
31421            options.calendarWeeks = calendarWeeks;
31422            update();
31423            return picker;
31424        };
31425
31426        picker.showTodayButton = function (showTodayButton) {
31427            if (arguments.length === 0) {
31428                return options.showTodayButton;
31429            }
31430
31431            if (typeof showTodayButton !== 'boolean') {
31432                throw new TypeError('showTodayButton() expects a boolean parameter');
31433            }
31434
31435            options.showTodayButton = showTodayButton;
31436            if (widget) {
31437                hide();
31438                show();
31439            }
31440            return picker;
31441        };
31442
31443        picker.showClear = function (showClear) {
31444            if (arguments.length === 0) {
31445                return options.showClear;
31446            }
31447
31448            if (typeof showClear !== 'boolean') {
31449                throw new TypeError('showClear() expects a boolean parameter');
31450            }
31451
31452            options.showClear = showClear;
31453            if (widget) {
31454                hide();
31455                show();
31456            }
31457            return picker;
31458        };
31459
31460        picker.widgetParent = function (widgetParent) {
31461            if (arguments.length === 0) {
31462                return options.widgetParent;
31463            }
31464
31465            if (typeof widgetParent === 'string') {
31466                widgetParent = $(widgetParent);
31467            }
31468
31469            if (widgetParent !== null && (typeof widgetParent !== 'string' && !(widgetParent instanceof $))) {
31470                throw new TypeError('widgetParent() expects a string or a jQuery object parameter');
31471            }
31472
31473            options.widgetParent = widgetParent;
31474            if (widget) {
31475                hide();
31476                show();
31477            }
31478            return picker;
31479        };
31480
31481        picker.keepOpen = function (keepOpen) {
31482            if (arguments.length === 0) {
31483                return options.keepOpen;
31484            }
31485
31486            if (typeof keepOpen !== 'boolean') {
31487                throw new TypeError('keepOpen() expects a boolean parameter');
31488            }
31489
31490            options.keepOpen = keepOpen;
31491            return picker;
31492        };
31493
31494        picker.focusOnShow = function (focusOnShow) {
31495            if (arguments.length === 0) {
31496                return options.focusOnShow;
31497            }
31498
31499            if (typeof focusOnShow !== 'boolean') {
31500                throw new TypeError('focusOnShow() expects a boolean parameter');
31501            }
31502
31503            options.focusOnShow = focusOnShow;
31504            return picker;
31505        };
31506
31507        picker.inline = function (inline) {
31508            if (arguments.length === 0) {
31509                return options.inline;
31510            }
31511
31512            if (typeof inline !== 'boolean') {
31513                throw new TypeError('inline() expects a boolean parameter');
31514            }
31515
31516            options.inline = inline;
31517            return picker;
31518        };
31519
31520        picker.clear = function () {
31521            clear();
31522            return picker;
31523        };
31524
31525        picker.keyBinds = function (keyBinds) {
31526            if (arguments.length === 0) {
31527                return options.keyBinds;
31528            }
31529
31530            options.keyBinds = keyBinds;
31531            return picker;
31532        };
31533
31534        picker.getMoment = function (d) {
31535            return getMoment(d);
31536        };
31537
31538        picker.debug = function (debug) {
31539            if (typeof debug !== 'boolean') {
31540                throw new TypeError('debug() expects a boolean parameter');
31541            }
31542
31543            options.debug = debug;
31544            return picker;
31545        };
31546
31547        picker.allowInputToggle = function (allowInputToggle) {
31548            if (arguments.length === 0) {
31549                return options.allowInputToggle;
31550            }
31551
31552            if (typeof allowInputToggle !== 'boolean') {
31553                throw new TypeError('allowInputToggle() expects a boolean parameter');
31554            }
31555
31556            options.allowInputToggle = allowInputToggle;
31557            return picker;
31558        };
31559
31560        picker.showClose = function (showClose) {
31561            if (arguments.length === 0) {
31562                return options.showClose;
31563            }
31564
31565            if (typeof showClose !== 'boolean') {
31566                throw new TypeError('showClose() expects a boolean parameter');
31567            }
31568
31569            options.showClose = showClose;
31570            return picker;
31571        };
31572
31573        picker.keepInvalid = function (keepInvalid) {
31574            if (arguments.length === 0) {
31575                return options.keepInvalid;
31576            }
31577
31578            if (typeof keepInvalid !== 'boolean') {
31579                throw new TypeError('keepInvalid() expects a boolean parameter');
31580            }
31581            options.keepInvalid = keepInvalid;
31582            return picker;
31583        };
31584
31585        picker.datepickerInput = function (datepickerInput) {
31586            if (arguments.length === 0) {
31587                return options.datepickerInput;
31588            }
31589
31590            if (typeof datepickerInput !== 'string') {
31591                throw new TypeError('datepickerInput() expects a string parameter');
31592            }
31593
31594            options.datepickerInput = datepickerInput;
31595            return picker;
31596        };
31597
31598        picker.parseInputDate = function (parseInputDate) {
31599            if (arguments.length === 0) {
31600                return options.parseInputDate;
31601            }
31602
31603            if (typeof parseInputDate !== 'function') {
31604                throw new TypeError('parseInputDate() sholud be as function');
31605            }
31606
31607            options.parseInputDate = parseInputDate;
31608
31609            return picker;
31610        };
31611
31612        picker.disabledTimeIntervals = function (disabledTimeIntervals) {
31613            ///<signature helpKeyword="$.fn.datetimepicker.disabledTimeIntervals">
31614            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>
31615            ///<returns type="array">options.disabledTimeIntervals</returns>
31616            ///</signature>
31617            ///<signature>
31618            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
31619            ///options.enabledDates if such exist.</summary>
31620            ///<param name="dates" locid="$.fn.datetimepicker.disabledTimeIntervals_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>
31621            ///</signature>
31622            if (arguments.length === 0) {
31623                return (options.disabledTimeIntervals ? $.extend({}, options.disabledTimeIntervals) : options.disabledTimeIntervals);
31624            }
31625
31626            if (!disabledTimeIntervals) {
31627                options.disabledTimeIntervals = false;
31628                update();
31629                return picker;
31630            }
31631            if (!(disabledTimeIntervals instanceof Array)) {
31632                throw new TypeError('disabledTimeIntervals() expects an array parameter');
31633            }
31634            options.disabledTimeIntervals = disabledTimeIntervals;
31635            update();
31636            return picker;
31637        };
31638
31639        picker.disabledHours = function (hours) {
31640            ///<signature helpKeyword="$.fn.datetimepicker.disabledHours">
31641            ///<summary>Returns an array with the currently set disabled hours on the component.</summary>
31642            ///<returns type="array">options.disabledHours</returns>
31643            ///</signature>
31644            ///<signature>
31645            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
31646            ///options.enabledHours if such exist.</summary>
31647            ///<param name="hours" locid="$.fn.datetimepicker.disabledHours_p:hours">Takes an [ int ] of values and disallows the user to select only from those hours.</param>
31648            ///</signature>
31649            if (arguments.length === 0) {
31650                return (options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours);
31651            }
31652
31653            if (!hours) {
31654                options.disabledHours = false;
31655                update();
31656                return picker;
31657            }
31658            if (!(hours instanceof Array)) {
31659                throw new TypeError('disabledHours() expects an array parameter');
31660            }
31661            options.disabledHours = indexGivenHours(hours);
31662            options.enabledHours = false;
31663            if (options.useCurrent && !options.keepInvalid) {
31664                var tries = 0;
31665                while (!isValid(date, 'h')) {
31666                    date.add(1, 'h');
31667                    if (tries === 24) {
31668                        throw 'Tried 24 times to find a valid date';
31669                    }
31670                    tries++;
31671                }
31672                setValue(date);
31673            }
31674            update();
31675            return picker;
31676        };
31677
31678        picker.enabledHours = function (hours) {
31679            ///<signature helpKeyword="$.fn.datetimepicker.enabledHours">
31680            ///<summary>Returns an array with the currently set enabled hours on the component.</summary>
31681            ///<returns type="array">options.enabledHours</returns>
31682            ///</signature>
31683            ///<signature>
31684            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledHours if such exist.</summary>
31685            ///<param name="hours" locid="$.fn.datetimepicker.enabledHours_p:hours">Takes an [ int ] of values and allows the user to select only from those hours.</param>
31686            ///</signature>
31687            if (arguments.length === 0) {
31688                return (options.enabledHours ? $.extend({}, options.enabledHours) : options.enabledHours);
31689            }
31690
31691            if (!hours) {
31692                options.enabledHours = false;
31693                update();
31694                return picker;
31695            }
31696            if (!(hours instanceof Array)) {
31697                throw new TypeError('enabledHours() expects an array parameter');
31698            }
31699            options.enabledHours = indexGivenHours(hours);
31700            options.disabledHours = false;
31701            if (options.useCurrent && !options.keepInvalid) {
31702                var tries = 0;
31703                while (!isValid(date, 'h')) {
31704                    date.add(1, 'h');
31705                    if (tries === 24) {
31706                        throw 'Tried 24 times to find a valid date';
31707                    }
31708                    tries++;
31709                }
31710                setValue(date);
31711            }
31712            update();
31713            return picker;
31714        };
31715        /**
31716         * Returns the component's model current viewDate, a moment object or null if not set. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.
31717         * @param {Takes string, viewDate, moment, null parameter.} newDate
31718         * @returns {viewDate.clone()}
31719         */
31720        picker.viewDate = function (newDate) {
31721            if (arguments.length === 0) {
31722                return viewDate.clone();
31723            }
31724
31725            if (!newDate) {
31726                viewDate = date.clone();
31727                return picker;
31728            }
31729
31730            if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
31731                throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');
31732            }
31733
31734            viewDate = parseInputDate(newDate);
31735            viewUpdate();
31736            return picker;
31737        };
31738
31739        // initializing element and component attributes
31740        if (element.is('input')) {
31741            input = element;
31742        } else {
31743            input = element.find(options.datepickerInput);
31744            if (input.length === 0) {
31745                input = element.find('input');
31746            } else if (!input.is('input')) {
31747                throw new Error('CSS class "' + options.datepickerInput + '" cannot be applied to non input element');
31748            }
31749        }
31750
31751        if (element.hasClass('input-group')) {
31752            // in case there is more then one 'input-group-addon' Issue #48
31753            if (element.find('.datepickerbutton').length === 0) {
31754                component = element.find('.input-group-addon');
31755            } else {
31756                component = element.find('.datepickerbutton');
31757            }
31758        }
31759
31760        if (!options.inline && !input.is('input')) {
31761            throw new Error('Could not initialize DateTimePicker without an input element');
31762        }
31763
31764        // Set defaults for date here now instead of in var declaration
31765        date = getMoment();
31766        viewDate = date.clone();
31767
31768        $.extend(true, options, dataToOptions());
31769
31770        picker.options(options);
31771
31772        initFormatting();
31773
31774        attachDatePickerElementEvents();
31775
31776        if (input.prop('disabled')) {
31777            picker.disable();
31778        }
31779        if (input.is('input') && input.val().trim().length !== 0) {
31780            setValue(parseInputDate(input.val().trim()));
31781        }
31782        else if (options.defaultDate && input.attr('placeholder') 
31782=== undefined) {
31783            setValue(options.defaultDate);
31784        }
31785        if (options.inline) {
31786            show();
31787        }
31788        return picker;
31789    };
31790
31791    /********************************************************************************
31792     *
31793     * jQuery plugin constructor and defaults object
31794     *
31795     ********************************************************************************/
31796
31797    /**
31798    * See (http://jquery.com/).
31799    * @name jQuery
31800    * @class
31801    * See the jQuery Library  (http://jquery.com/) for full details.  This just
31802    * documents the function and classes that are added to jQuery by this plug-in.
31803    */
31804    /**
31805     * See (http://jquery.com/)
31806     * @name fn
31807     * @class
31808     * See the jQuery Library  (http://jquery.com/) for full details.  This just
31809     * documents the function and classes that are added to jQuery by this plug-in.
31810     * @memberOf jQuery
31811     */
31812    /**
31813     * Show comments
31814     * @class datetimepicker
31815     * @memberOf jQuery.fn
31816     */
31817    $.fn.datetimepicker = function (options) {
31818        options = options || {};
31819
31820        var args = Array.prototype.slice.call(arguments, 1),
31821            isInstance = true,
31822            thisMethods = ['destroy', 'hide', 'show', 'toggle'],
31823            returnValue;
31824
31825        if (typeof options === 'object') {
31826            return this.each(function () {
31827                var $this = $(this),
31828                    _options;
31829                if (!$this.data('DateTimePicker')) {
31830                    // create a private copy of the defaults object
31831                    _options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);
31832                    $this.data('DateTimePicker', dateTimePicker($this, _options));
31833                }
31834            });
31835        } else if (typeof options === 'string') {
31836            this.each(function () {
31837                var $this = $(this),
31838                    instance = $this.data('DateTimePicker');
31839                if (!instance) {
31840                    throw new Error('bootstrap-datetimepicker("' + options + '") method was called on an element that is not using DateTimePicker');
31841                }
31842
31843                returnValue = instance[options].apply(instance, args);
31844                isInstance = returnValue === instance;
31845            });
31846
31847            if (isInstance || $.inArray(options, thisMethods) > -1) {
31848                return this;
31849            }
31850
31851            return returnValue;
31852        }
31853
31854        throw new TypeError('Invalid arguments for DateTimePicker: ' + options);
31855    };
31856
31857    $.fn.datetimepicker.defaults = {
31858        timeZone: '',
31859        format: false,
31860        dayViewHeaderFormat: 'MMMM YYYY',
31861        extraFormats: false,
31862        stepping: 1,
31863        minDate: false,
31864        maxDate: false,
31865        useCurrent: true,
31866        collapse: true,
31867        locale: moment.locale(),
31868        defaultDate: false,
31869        disabledDates: false,
31870        enabledDates: false,
31871        icons: {
31872            time: 'glyphicon glyphicon-time',
31873            date: 'glyphicon glyphicon-calendar',
31874            up: 'glyphicon glyphicon-chevron-up',
31875            down: 'glyphicon glyphicon-chevron-down',
31876            previous: 'glyphicon glyphicon-chevron-left',
31877            next: 'glyphicon glyphicon-chevron-right',
31878            today: 'glyphicon glyphicon-screenshot',
31879            clear: 'glyphicon glyphicon-trash',
31880            close: 'glyphicon glyphicon-remove'
31881        },
31882        tooltips: {
31883            today: 'Go to today',
31884            clear: 'Clear selection',
31885            close: 'Close the picker',
31886            selectMonth: 'Select Month',
31887            prevMonth: 'Previous Month',
31888            nextMonth: 'Next Month',
31889            selectYear: 'Select Year',
31890            prevYear: 'Previous Year',
31891            nextYear: 'Next Year',
31892            selectDecade: 'Select Decade',
31893            prevDecade: 'Previous Decade',
31894            nextDecade: 'Next Decade',
31895            prevCentury: 'Previous Century',
31896            nextCentury: 'Next Century',
31897            pickHour: 'Pick Hour',
31898            incrementHour: 'Increment Hour',
31899            decrementHour: 'Decrement Hour',
31900            pickMinute: 'Pick Minute',
31901            incrementMinute: 'Increment Minute',
31902            decrementMinute: 'Decrement Minute',
31903            pickSecond: 'Pick Second',
31904            incrementSecond: 'Increment Second',
31905            decrementSecond: 'Decrement Second',
31906            togglePeriod: 'Toggle Period',
31907            selectTime: 'Select Time'
31908        },
31909        useStrict: false,
31910        sideBySide: false,
31911        daysOfWeekDisabled: false,
31912        calendarWeeks: false,
31913        viewMode: 'days',
31914        toolbarPlacement: 'default',
31915        showTodayButton: false,
31916        showClear: false,
31917        showClose: false,
31918        widgetPositioning: {
31919            horizontal: 'auto',
31920            vertical: 'auto'
31921        },
31922        widgetParent: null,
31923        ignoreReadonly: false,
31924        keepOpen: false,
31925        focusOnShow: true,
31926        inline: false,
31927        keepInvalid: false,
31928        datepickerInput: '.datepickerinput',
31929        keyBinds: {
31930            up: function (widget) {
31931                if (!widget) {
31932                    return;
31933                }
31934                var d = this.date() || this.getMoment();
31935                if (widget.find('.datepicker').is(':visible')) {
31936                    this.date(d.clone().subtract(7, 'd'));
31937                } else {
31938                    this.date(d.clone().add(this.stepping(), 'm'));
31939                }
31940            },
31941            down: function (widget) {
31942                if (!widget) {
31943                    this.show();
31944                    return;
31945                }
31946                var d = this.date() || this.getMoment();
31947                if (widget.find('.datepicker').is(':visible')) {
31948                    this.date(d.clone().add(7, 'd'));
31949                } else {
31950                    this.date(d.clone().subtract(this.stepping(), 'm'));
31951                }
31952            },
31953            'control up': function (widget) {
31954                if (!widget) {
31955                    return;
31956                }
31957                var d = this.date() || this.getMoment();
31958                if (widget.find('.datepicker').is(':visible')) {
31959                    this.date(d.clone().subtract(1, 'y'));
31960                } else {
31961                    this.date(d.clone().add(1, 'h'));
31962                }
31963            },
31964            'control down': function (widget) {
31965                if (!widget) {
31966                    return;
31967                }
31968                var d = this.date() || this.getMoment();
31969                if (widget.find('.datepicker').is(':visible')) {
31970                    this.date(d.clone().add(1, 'y'));
31971                } else {
31972                    this.date(d.clone().subtract(1, 'h'));
31973                }
31974            },
31975            left: function (widget) {
31976                if (!widget) {
31977                    return;
31978                }
31979                var d = this.date() || this.getMoment();
31980                if (widget.find('.datepicker').is(':visible')) {
31981                    this.date(d.clone().subtract(1, 'd'));
31982                }
31983            },
31984            right: function (widget) {
31985                if (!widget) {
31986                    return;
31987                }
31988                var d = this.date() || this.getMoment();
31989                if (widget.find('.datepicker').is(':visible')) {
31990                    this.date(d.clone().add(1, 'd'));
31991                }
31992            },
31993            pageUp: function (widget) {
31994                if (!widget) {
31995                    return;
31996                }
31997                var d = this.date() || this.getMoment();
31998                if (widget.find('.datepicker').is(':visible')) {
31999                    this.date(d.clone().subtract(1, 'M'));
32000                }
32001            },
32002            pageDown: function (widget) {
32003                if (!widget) {
32004                    return;
32005                }
32006                var d = this.date() || this.getMoment();
32007                if (widget.find('.datepicker').is(':visible')) {
32008                    this.date(d.clone().add(1, 'M'));
32009                }
32010            },
32011            enter: function () {
32012                this.hide();
32013            },
32014            escape: function () {
32015                this.hide();
32016            },
32017            //tab: function (widget) { //this break the flow of the form. disabling for now
32018            //    var toggle = widget.find('.picker-switch a[data-action="togglePicker"]');
32019            //    if(toggle.length > 0) toggle.click();
32020            //},
32021            'control space': function (widget) {
32022                if (!widget) {
32023                    return;
32024                }
32025                if (widget.find('.timepicker').is(':visible')) {
32026                    widget.find('.btn[data-action="togglePeriod"]').click();
32027                }
32028            },
32029            t: function () {
32030                this.date(this.getMoment());
32031            },
32032            'delete': function () {
32033                this.clear();
32034            }
32035        },
32036        debug: false,
32037        allowInputToggle: false,
32038        disabledTimeIntervals: false,
32039        disabledHours: false,
32040        enabledHours: false,
32041        viewDate: false
32042    };
32043
32044    return $.fn.datetimepicker;
32045}));
32046
32047;/*! nouislider - 14.7.0 - 4/6/2021 */
32048!function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";var lt="14.7.0";function ut(t){t.parentElement.removeChild(t)}function ct(t){return null!=t}function pt(t){t.preventDefault()}function o(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}
32048function ft(t,e,r){0<r&&(mt(t,e),setTimeout(function(){gt(t,e)},r))}function dt(t){return Math.max(Math.min(t,100),0)}function ht(t){return Array.isArray(t)?t:[t]}function e(t){var e=(t=String(t)).split(".");return 1<e.length?e[1].length:0}function mt(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function gt(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function vt(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function c(t,e){return 100/(e-t)}function p(t,e,r){return 100*e/(t[r+1]-t[r])}function f(t,e){for(var r=1;t>=e[r];)r+=1;return r}function r(t,e,r){if(r>=t.slice(-1)[0])return 100;var n,i,o=f(r,t),s=t[o-1],a=t[o],l=e[o-1],u=e[o];return l+(i=r,p(n=[s,a],n[0]<0?i+Math.abs(n[0]):i-n[0],0)/c(l,u))}function n(t,e,r,n){if(100===n)return n;var i,o,s=f(n,t),a=t[s-1],l=t[s];return r?(l-a)/2<n-a?l:a:e[s-1]?t[s-1]+(i=n-t[s-1],o=e[s-1],Math.round(i/o)*o):n}function s(t,e,r){var n;if("number"==typeof e&&(e=[e]),!Array.isArray(e))throw new Error("noUiSlider ("+lt+"): 'range' contains invalid value.");if(!o(n="min"===t?0:"max"===t?100:parseFloat(t))||!o(e[0]))throw new Error("noUiSlider ("+lt+"): 'range' value isn't numeric.");r.xPct.push(n),r.xVal.push(e[0]),n?r.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(r.xSteps[0]=e[1]),r.xHighestCompleteStep.push(0)}function a(t,e,r){if(e)if(r.xVal[t]!==r.xVal[t+1]){r.xSteps[t]=p([r.xVal[t],r.xVal[t+1]],e,0)/c(r.xPct[t],r.xPct[t+1]);var n=(r.xVal[t+1]-r.xVal[t])/r.xNumSteps[t],i=Math.ceil(Number(n.toFixed(3))-1),o=r.xVal[t]+r.xNumSteps[t]*i;r.xHighestCompleteStep[t]=o}else r.xSteps[t]=r.xHighestCompleteStep[t]=r.xVal[t]}function i(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i=[];for(n in t)t.hasOwnProperty(n)&&i.push([t[n],n]);for(i.length&&"object"==typeof i[0][0]?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),n=0;n<i.length;n++)s(i[n][1],i[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)a(n,this.xNumSteps[n],this)}i.prototype.getDistance=function(t){var e,r=[];for(e=0;e<this.xNumSteps.length-1;e++){var n=this.xNumSteps[e];if(n&&t/n%1!=0)throw new Error("noUiSlider ("+lt+"): 'limit', 'margin' and 'padding' of "+this.xPct[e]+"% range must be divisible by step.");r[e]=p(this.xVal,t,e)}return r},i.prototype.getAbsoluteDistance=function(t,e,r){var n,i=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++;var o=1,s=e[i],a=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);0<s;)a=this.xPct[i+1+c]-this.xPct[i+c],100<e[i+c]*o+100-100*n?(l=a*n,o=(s-100*n)/e[i+c],n=1):(l=e[i+c]*a/100*o,o=0),r?(u-=l,1<=this.xPct.length+c&&c--):(u+=l,1<=this.xPct.length-c&&c++),s=e[i+c]*o;return t+u},i.prototype.toStepping=function(t){return t=r(this.xVal,this.xPct,t)},i.prototype.fromStepping=function(t){return function(t,e,r){if(100<=r)return t.slice(-1)[0];var n,i=f(r,e),o=t[i-1],s=t[i],a=e[i-1],l=e[i];return n=[o,s],(r-a)*c(a,l)*(n[1]-n[0])/100+n[0]}(this.xVal,this.xPct,t)},i.prototype.getStep=function(t){return t=n(this.xPct,this.xSteps,this.snap,t)},i.prototype.getDefaultStep=function(t,e,r){var n=f(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},i.prototype.getNearbySteps=function(t){var e=f(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},i.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(e);return Math.max.apply(null,t)}
32048,i.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var l={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number},u={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},bt={tooltips:".__tooltips",aria:".__aria"};function d(t){if("object"==typeof(e=t)&&"function"==typeof e.to&&"function"==typeof e.from)return!0;var e;throw new Error("noUiSlider ("+lt+"): 'format' requires 'to' and 'from' methods.")}function h(t,e){if(!o(e))throw new Error("noUiSlider ("+lt+"): 'step' is not numeric.");t.singleStep=e}function m(t,e){if(!o(e))throw new Error("noUiSlider ("+lt+"): 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function g(t,e){if(!o(e))throw new Error("noUiSlider ("+lt+"): 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function v(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider ("+lt+"): 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider ("+lt+"): Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider ("+lt+"): 'range' 'min' and 'max' cannot be equal.");t.spectrum=new i(e,t.snap,t.singleStep)}function b(t,e){if(e=ht(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider ("+lt+"): 'start' option is incorrect.");t.handles=e.length,t.start=e}function x(t,e){if("boolean"!=typeof(t.snap=e))throw new Error("noUiSlider ("+lt+"): 'snap' option must be a boolean.")}function S(t,e){if("boolean"!=typeof(t.animate=e))throw new Error("noUiSlider ("+lt+"): 'animate' option must be a boolean.")}function w(t,e){if("number"!=typeof(t.animationDuration=e))throw new Error("noUiSlider ("+lt+"): 'animationDuration' option must be a number.")}function y(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r<t.handles;r++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider ("+lt+"): 'connect' option doesn't match handle count.");n=e}t.connect=n}function E(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider ("+lt+"): 'orientation' option is invalid.")}}function C(t,e){if(!o(e))throw new Error("noUiSlider ("+lt+"): 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function P(t,e){if(!o(e))throw new Error("noUiSlider ("+lt+"): 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider ("+lt+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function N(t,e){var r;if(!o(e)&&!Array.isArray(e))throw new Error("noUiSlider ("+lt+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!o(e[0])&&!o(e[1]))throw new Error("noUiSlider ("+lt+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],r=0;r<t.spectrum.xNumSteps.length-1;r++)if(t.padding[0][r]<0||t.padding[1][r]<0)throw new Error("noUiSlider ("+lt+"): 'padding' option must be a positive number(s).");var n=e[0]+e[1],i=t.spectrum.xVal[0];if(1<n/(t.spectrum.xVal[t.spectrum.xVal.length-1]-i))throw new Error("noUiSlider ("+lt+"): 'padding' option must not exceed 100% of the range.")}}function k(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider ("+lt+"): 'direction' option was not recognized.")}}function U(t,e){if("string"!=typeof e)throw new Error("noUiSlider ("+lt+"): 'behaviour' must be a string containing options.");var r=0<=e.indexOf("tap"),n=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),o=0<=e.indexOf("snap"),s=0<=e.indexOf("hover"),a=0<=e.indexOf("unconstrained");if(i){if(2!==t.handles)throw new Error("noUiSlider ("+lt+"): 'fixed' behaviour must be used with 2 handles");C(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error("noUiSlider ("+lt+"): 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,fixed:i,snap:o,hover:s,unconstrained:a}}function A(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var r=0;r<t.handles;r++)t.tooltips.push(!0)}else{if(t.tooltips=ht(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider ("+lt+"): must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider ("+lt+"): 'tooltips' must be passed a formatter or 'false'.")})}}function V(t,e){d(t.ariaFormat=e)}function D(t,e){d(t.format=e)}function M(t,e){if("boolean"!=typeof(t.keyboardSupport=e))throw new Error("noUiSlider ("+lt+"): 'keyboardSupport' option must be a boolean.")}function O(t,e){t.documentElement=e}function L(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider ("+lt+"): 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function z(t,e){if("object"!=typeof e)throw new Error("noUiSlider ("+lt+"): 'cssClasse
32048s' must be an object.");if("string"==typeof t.cssPrefix)for(var r in t.cssClasses={},e)e.hasOwnProperty(r)&&(t.cssClasses[r]=t.cssPrefix+e[r]);else t.cssClasses=e}function xt(e){var r={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:l,format:l},n={step:{r:!1,t:h},keyboardPageMultiplier:{r:!1,t:m},keyboardDefaultStep:{r:!1,t:g},start:{r:!0,t:b},connect:{r:!0,t:y},direction:{r:!0,t:k},snap:{r:!1,t:x},animate:{r:!1,t:S},animationDuration:{r:!1,t:w},range:{r:!0,t:v},orientation:{r:!1,t:E},margin:{r:!1,t:C},limit:{r:!1,t:P},padding:{r:!1,t:N},behaviour:{r:!0,t:U},ariaFormat:{r:!1,t:V},format:{r:!1,t:D},tooltips:{r:!1,t:A},keyboardSupport:{r:!0,t:M},documentElement:{r:!1,t:O},cssPrefix:{r:!0,t:L},cssClasses:{r:!0,t:z}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:u,keyboardPageMultiplier:5,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(t){if(!ct(e[t])&&void 0===i[t]){if(n[t].r)throw new Error("noUiSlider ("+lt+"): '"+t+"' is required.");return!0}n[t].t(r,ct(e[t])?e[t]:i[t])}),r.pips=e.pips;var t=document.createElement("div"),o=void 0!==t.style.msTransform,s=void 0!==t.style.transform;r.transformRule=s?"transform":o?"msTransform":"webkitTransform";return r.style=[["left","top"],["right","bottom"]][r.dir][r.ort],r}function H(t,b,o){var l,u,s,c,i,a,e,p,f=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},d=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),h=t,y=b.spectrum,x=[],S=[],m=[],g=0,v={},w=t.ownerDocument,E=b.documentElement||w.documentElement,C=w.body,P=-1,N=0,k=1,U=2,A="rtl"===w.dir||1===b.ort?0:100;function V(t,e){var r=w.createElement("div");return e&&mt(r,e),t.appendChild(r),r}function D(t,e){var r=V(t,b.cssClasses.origin),n=V(r,b.cssClasses.handle);return V(n,b.cssClasses.touchArea),n.setAttribute("data-handle",e),b.keyboardSupport&&(n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(t){return function(t,e){if(O()||L(e))return!1;var r=["Left","Right"],n=["Down","Up"],i=["PageDown","PageUp"],o=["Home","End"];b.dir&&!b.ort?r.reverse():b.ort&&!b.dir&&(n.reverse(),i.reverse());var s,a=t.key.replace("Arrow",""),l=a===i[0],u=a===i[1],c=a===n[0]||a===r[0]||l,p=a===n[1]||a===r[1]||u,f=a===o[0],d=a===o[1];if(!(c||p||f||d))return!0;if(t.preventDefault(),p||c){var h=b.keyboardPageMultiplier,m=c?0:1,g=at(e),v=g[m];if(null===v)return!1;!1===v&&(v=y.getDefaultStep(S[e],c,b.keyboardDefaultStep)),(u||l)&&(v*=h),v=Math.max(v,1e-7),v*=c?-1:1,s=x[e]+v}else s=d?b.spectrum.xVal[b.spectrum.xVal.length-1]:b.spectrum.xVal[0];return rt(e,y.toStepping(s),!0,!0),J("slide",e),J("update",e),J("change",e),J("set",e),!1}(t,e)})),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",b.ort?"vertical":"horizontal"),0===e?mt(n,b.cssClasses.handleLower):e===b.handles-1&&mt(n,b.cssClasses.handleUpper),r}function M(t,e){return!!e&&V(t,b.cssClasses.connect)}function r(t,e){return!!b.tooltips[e]&&V(t.firstChild,b.cssClasses.tooltip)}function O(){return h.hasAttribute("disabled")}function L(t){return u[t].hasAttribute("disabled")}function z(){i&&(G("update"+bt.tooltips),i.forEach(function(t){t&&ut(t)}),i=null)}function H(){z(),i=u.map(r),$("update"+bt.tooltips,function(t,e,r){if(i[e]){var n=t[e];!0!==b.tooltips[e]&&(n=b.tooltips[e].to(r[e])),i[e].innerHTML=n}})}function j(e,i,o){var s=w.createElement("div"),a=[];a[N]=b.cssClasses.valueNormal,a[k]=b.cssClasses.valueLarge,a[U]=b.cssClasses.valueSub;var l=[];l[N]=b.cssClasses.markerNormal,l[k]=b.cssClasses.markerLarge,l[U]=b.cssClasses.markerSub;var u=[b.cssClasses.valueHorizontal,b.cssClasses.valueVertical],c=[b.cssClasses.markerHorizontal,b.cssClasses.markerVertical];
32048function p(t,e){var r=e===b.cssClasses.value,n=r?a:l;return e+" "+(r?u:c)[b.ort]+" "+n[t]}return mt(s,b.cssClasses.pips),mt(s,0===b.ort?b.cssClasses.pipsHorizontal:b.cssClasses.pipsVertical),Object.keys(e).forEach(function(t){!function(t,e,r){if((r=i?i(e,r):r)!==P){var n=V(s,!1);n.className=p(r,b.cssClasses.marker),n.style[b.style]=t+"%",N<r&&((n=V(s,!1)).className=p(r,b.cssClasses.value),n.setAttribute("data-value",e),n.style[b.style]=t+"%",n.innerHTML=o.to(e))}}(t,e[t][0],e[t][1])}),s}function F(){c&&(ut(c),c=null)}function R(t){F();var m,g,v,b,e,r,x,S,w,n=t.mode,i=t.density||1,o=t.filter||!1,s=function(t,e,r){if("range"===t||"steps"===t)return y.xVal;if("count"===t){if(e<2)throw new Error("noUiSlider ("+lt+"): 'values' (>= 2) required for mode 'count'.");var n=e-1,i=100/n;for(e=[];n--;)e[n]=n*i;e.push(100),t="positions"}return"positions"===t?e.map(function(t){return y.fromStepping(r?y.getStep(t):t)}):"values"===t?r?e.map(function(t){return y.fromStepping(y.getStep(y.toStepping(t)))}):e:void 0}(n,t.values||!1,t.stepped||!1),a=(m=i,g=n,v=s,b={},e=y.xVal[0],r=y.xVal[y.xVal.length-1],S=x=!1,w=0,(v=v.slice().sort(function(t,e){return t-e}).filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==e&&(v.unshift(e),x=!0),v[v.length-1]!==r&&(v.push(r),S=!0),v.forEach(function(t,e){var r,n,i,o,s,a,l,u,c,p,f=t,d=v[e+1],h="steps"===g;if(h&&(r=y.xNumSteps[e]),r||(r=d-f),!1!==f)for(void 0===d&&(d=f),r=Math.max(r,1e-7),n=f;n<=d;n=(n+r).toFixed(7)/1){for(u=(s=(o=y.toStepping(n))-w)/m,p=s/(c=Math.round(u)),i=1;i<=c;i+=1)b[(a=w+i*p).toFixed(5)]=[y.fromStepping(a),0];l=-1<v.indexOf(n)?k:h?U:N,!e&&x&&n!==d&&(l=0),n===d&&S||(b[o.toFixed(5)]=[n,l]),w=o}}),b),l=t.format||{to:Math.round};return c=h.appendChild(j(a,o,l))}function T(){var t=l.getBoundingClientRect(),e="offset"+["Width","Height"][b.ort];return 0===b.ort?t.width||l[e]:t.height||l[e]}function _(n,i,o,s){var e=function(t){return!!(t=function(t,e,r){var n,i,o=0===t.type.indexOf("touch"),s=0===t.type.indexOf("mouse"),a=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(a=!0);if("mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(o){var l=function(t){return t.target===r||r.contains(t.target)||t.target.shadowRoot&&t.target.shadowRoot.contains(r)};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(1<u.length)return!1;n=u[0].pageX,i=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;n=c.pageX,i=c.pageY}}e=e||vt(w),(s||a)&&(n=t.clientX+e.x,i=t.clientY+e.y);return t.pageOffset=e,t.points=[n,i],t.cursor=s||a,t}(t,s.pageOffset,s.target||i))&&(!(O()&&!s.doNotReject)&&(e=h,r=b.cssClasses.tap,!((e.classList?e.classList.contains(r):new RegExp("\\b"+r+"\\b").test(e.className))&&!s.doNotReject)&&(!(n===f.start&&void 0!==t.buttons&&1<t.buttons)&&((!s.hover||!t.buttons)&&(d||t.preventDefault(),t.calcPoint=t.points[b.ort],void o(t,s))))));var e,r},r=[];return n.split(" ").forEach(function(t){i.addEventListener(t,e,!!d&&{passive:!0}),r.push([t,e])}),r}function B(t){var e,r,n,i,o,s,a=100*(t-(e=l,r=b.ort,n=e.getBoundingClientRect(),i=e.ownerDocument,o=i.documentElement,s=vt(i),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(s.x=0),r?n.top+s.y-o.clientTop:n.left+s.x-o.clientLeft))/T();return a=dt(a),b.dir?100-a:a}function q(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&Y(t,e)}function X(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return Y(t,e);var r=(b.dir?-1:1)*(t.calcPoint-e.startCalcPoint);Z(0<r,100*r/e.baseSize,e.locations,e.handleNumbers)}function Y(t,e){e.handle&&(gt(e.handle,b.cssClasses.active),g-=1),e.listeners.forEach(function(t){E.removeEventListener(t[0],t[1])}),0===g&&(gt(h,b.cssClasses.drag),et(),t.cursor&&(C.style.cursor="",C.removeEventListener("selectstart",pt))),e.handleNumbers.forEach(function(t){J("change",t),J("set",t),J("end",t)})}function I(t,e){if(e.handleNumbers.some(L))return!1;var r;1===e.handleNumbers.length&&(r=u[e.handleNumbers[0]].children[0],g+=1,mt(r,b.cssClasses.active));t.stopPropagation();var n=[],i=_(f.move,E,X,{target:t.target,handle:r,listeners:n,startCalcPoint:t.calcPoint,baseSize:T(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:S.slice()}),o=_(f.end,E,Y,{target:t.target,handle:r,listeners:n,doNotReject:!0,handleNumbers:e.handleNumbers}),s=_("mouseout",E,q,{target:t.target,handle:r,listeners:n,doNotReject:!0,handleNumbers:e.handleNumbers});n.push.apply(n,i.concat(o,s)),t.cursor&&(C.style.cursor=getComputedStyle(t.target).cursor,1<u.length&&mt(h,b.cssClasse
32048s.drag),C.addEventListener("selectstart",pt,!1)),e.handleNumbers.forEach(function(t){J("start",t)})}function n(t){t.stopPropagation();var i,o,s,e=B(t.calcPoint),r=(i=e,s=!(o=100),u.forEach(function(t,e){if(!L(e)){var r=S[e],n=Math.abs(r-i);(n<o||n<=o&&r<i||100===n&&100===o)&&(s=e,o=n)}}),s);if(!1===r)return!1;b.events.snap||ft(h,b.cssClasses.tap,b.animationDuration),rt(r,e,!0,!0),et(),J("slide",r,!0),J("update",r,!0),J("change",r,!0),J("set",r,!0),b.events.snap&&I(t,{handleNumbers:[r]})}function W(t){var e=B(t.calcPoint),r=y.getStep(e),n=y.fromStepping(r);Object.keys(v).forEach(function(t){"hover"===t.split(".")[0]&&v[t].forEach(function(t){t.call(a,n)})})}function $(t,e){v[t]=v[t]||[],v[t].push(e),"update"===t.split(".")[0]&&u.forEach(function(t,e){J("update",e)})}function G(t){var i=t&&t.split(".")[0],o=i?t.substring(i.length):t;Object.keys(v).forEach(function(t){var e,r=t.split(".")[0],n=t.substring(r.length);i&&i!==r||o&&o!==n||((e=n)!==bt.aria&&e!==bt.tooltips||o===n)&&delete v[t]})}function J(r,n,i){Object.keys(v).forEach(function(t){var e=t.split(".")[0];r===e&&v[t].forEach(function(t){t.call(a,x.map(b.format.to),n,x.slice(),i||!1,S.slice(),a)})})}function K(t,e,r,n,i,o){var s;return 1<u.length&&!b.events.unconstrained&&(n&&0<e&&(s=y.getAbsoluteDistance(t[e-1],b.margin,0),r=Math.max(r,s)),i&&e<u.length-1&&(s=y.getAbsoluteDistance(t[e+1],b.margin,1),r=Math.min(r,s))),1<u.length&&b.limit&&(n&&0<e&&(s=y.getAbsoluteDistance(t[e-1],b.limit,0),r=Math.min(r,s)),i&&e<u.length-1&&(s=y.getAbsoluteDistance(t[e+1],b.limit,1),r=Math.max(r,s))),b.padding&&(0===e&&(s=y.getAbsoluteDistance(0,b.padding[0],0),r=Math.max(r,s)),e===u.length-1&&(s=y.getAbsoluteDistance(100,b.padding[1],1),r=Math.min(r,s))),!((r=dt(r=y.getStep(r)))===t[e]&&!o)&&r}function Q(t,e){var r=b.ort;return(r?e:t)+", "+(r?t:e)}function Z(t,n,r,e){var i=r.slice(),o=[!t,t],s=[t,!t];e=e.slice(),t&&e.reverse(),1<e.length?e.forEach(function(t,e){var r=K(i,t,i[t]+n,o[e],s[e],!1);!1===r?n=0:(n=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;e.forEach(function(t,e){a=rt(t,r[t]+n,o[e],s[e])||a}),a&&e.forEach(function(t){J("update",t),J("slide",t)})}function tt(t,e){return b.dir?100-t-e:t}function et(){m.forEach(function(t){var e=50<S[t]?-1:1,r=3+(u.length+e*t);u[t].style.zIndex=r})}function rt(t,e,r,n,i){return i||(e=K(S,t,e,r,n,!1)),!1!==e&&(function(t,e){S[t]=e,x[t]=y.fromStepping(e);var r="translate("+Q(10*(tt(e,0)-A)+"%","0")+")";u[t].style[b.transformRule]=r,nt(t),nt(t+1)}(t,e),!0)}function nt(t){if(s[t]){var e=0,r=100;0!==t&&(e=S[t-1]),t!==s.length-1&&(r=S[t]);var n=r-e,i="translate("+Q(tt(e,n)+"%","0")+")",o="scale("+Q(n/100,"1")+")";s[t].style[b.transformRule]=i+" "+o}}function it(t,e){return null===t||!1===t||void 0===t?S[e]:("number"==typeof t&&(t=String(t)),t=b.format.from(t),!1===(t=y.toStepping(t))||isNaN(t)?S[e]:t)}function ot(t,e,r){var n=ht(t),i=void 0===S[0];e=void 0===e||!!e,b.animate&&!i&&ft(h,b.cssClasses.tap,b.animationDuration),m.forEach(function(t){rt(t,it(n[t],t),!0,!1,r)});for(var o=1===m.length?0:1;o<m.length;++o)m.forEach(function(t){rt(t,S[t],!0,!0,r)});et(),m.forEach(function(t){J("update",t),null!==n[t]&&e&&J("set",t)})}function st(){var t=x.map(b.format.to);return 1===t.length?t[0]:t}function at(t){var e=S[t],r=y.getNearbySteps(e),n=x[t],i=r.thisStep.step,o=null;if(b.snap)return[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null];!1!==i&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n),o=n>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&n-r.stepBefore.highestStep,100===e?i=null:0===e&&(o=null);var s=y.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]}return mt(e=h,b.cssClasses.target),0===b.dir?mt(e,b.cssClasses.ltr):mt(e,b.cssClasses.rtl),0===b.ort?mt(e,b.cssClasses.horizontal):mt(e,b.cssClasses.vertical),mt(e,"rtl"===getComputedStyle(e).direction?b.cssClasses.textDirectionRtl:b.cssClasses.textDirectionLtr),l=V(e,b.cssClasses.base),function(t,e){var r=V(e,b.cssClasses.connects);u=[],(s=[]).push(M(r,t[0]));for(var n=0;n<b.handles;n++)u.push(D(e,n)),m[n]=n,s.push(M(r,t[n+1]))}(b.connect,l),(p=b.events).fixed||u.forEach(function(t,e){_(f.start,t.children[0],I,{handleNumbers:[e]})}),p.tap&&_(f.start,l,n,{}),p.hover&&_(f.move,l,W,{hover:!0}
32048),p.drag&&s.forEach(function(t,e){if(!1!==t&&0!==e&&e!==s.length-1){var r=u[e-1],n=u[e],i=[t];mt(t,b.cssClasses.draggable),p.fixed&&(i.push(r.children[0]),i.push(n.children[0])),i.forEach(function(t){_(f.start,t,I,{handles:[r,n],handleNumbers:[e-1,e]})})}}),ot(b.start),b.pips&&R(b.pips),b.tooltips&&H(),G("update"+bt.aria),$("update"+bt.aria,function(t,e,s,r,a){m.forEach(function(t){var e=u[t],r=K(S,t,0,!0,!0,!0),n=K(S,t,100,!0,!0,!0),i=a[t],o=b.ariaFormat.to(s[t]);r=y.fromStepping(r).toFixed(1),n=y.fromStepping(n).toFixed(1),i=y.fromStepping(i).toFixed(1),e.children[0].setAttribute("aria-valuemin",r),e.children[0].setAttribute("aria-valuemax",n),e.children[0].setAttribute("aria-valuenow",i),e.children[0].setAttribute("aria-valuetext",o)})}),a={destroy:function(){for(var t in G(bt.aria),G(bt.tooltips),b.cssClasses)b.cssClasses.hasOwnProperty(t)&&gt(h,b.cssClasses[t]);for(;h.firstChild;)h.removeChild(h.firstChild);delete h.noUiSlider},steps:function(){return m.map(at)},on:$,off:G,get:st,set:ot,setHandle:function(t,e,r,n){if(!(0<=(t=Number(t))&&t<m.length))throw new Error("noUiSlider ("+lt+"): invalid handle number, got: "+t);rt(t,it(e,t),!0,!0,n),J("update",t),r&&J("set",t)},reset:function(t){ot(b.start,t)},__moveHandles:function(t,e,r){Z(t,e,S,r)},options:o,updateOptions:function(e,t){var r=st(),n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];n.forEach(function(t){void 0!==e[t]&&(o[t]=e[t])});var i=xt(o);n.forEach(function(t){void 0!==e[t]&&(b[t]=i[t])}),y=i.spectrum,b.margin=i.margin,b.limit=i.limit,b.padding=i.padding,b.pips?R(b.pips):F(),b.tooltips?H():z(),S=[],ot(ct(e.start)?e.start:r,t)},target:h,removePips:F,removeTooltips:z,getTooltips:function(){return i},getOrigins:function(){return u},pips:R}}return{__spectrum:i,version:lt,cssClasses:u,create:function(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider ("+lt+"): create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider ("+lt+"): Slider was already initialized.");var r=H(t,xt(e),e);return t.noUiSlider=r}}});
32049;/*! DataTables 1.13.7
32050 * ©2008-2023 SpryMedia Ltd - datatables.net/license
32051 */
32052
32053/**
32054 * @summary     DataTables
32055 * @description Paginate, search and order HTML tables
32056 * @version     1.13.7
32057 * @author      SpryMedia Ltd
32058 * @contact     www.datatables.net
32059 * @copyright   SpryMedia Ltd.
32060 *
32061 * This source file is free software, available under the following license:
32062 *   MIT license - https://datatables.net/license
32063 *
32064 * This source file is distributed in the hope that it will be useful, but
32065 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
32066 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
32067 *
32068 * For details please refer to: https://www.datatables.net
32069 */
32070
32071/*jslint evil: true, undef: true, browser: true */
32072/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/
32073
32074(function( factory ) {
32075	"use strict";
32076
32077	if ( typeof define === 'function' && define.amd ) {
32078		// AMD
32079		define( ['jquery'], function ( $ ) {
32080			return factory( $, window, document );
32081		} );
32082	}
32083	else if ( typeof exports === 'object' ) {
32084		// CommonJS
32085		// jQuery's factory checks for a global window - if it isn't present then it
32086		// returns a factory function that expects the window object
32087		var jq = require('jquery');
32088
32089		if (typeof window =
vendor: 42,311 bytes, lines 32089-33396
32089== 'undefined') {
32090			module.exports = function (root, $) {
32091				if ( ! root ) {
32092					// CommonJS environments without a window global must pass a
32093					// root. This will give an error otherwise
32094					root = window;
32095				}
32096
32097				if ( ! $ ) {
32098					$ = jq( root );
32099				}
32100
32101				return factory( $, root, root.document );
32102			};
32103		}
32104		else {
32105			return factory( jq, window, window.document );
32106		}
32107	}
32108	else {
32109		// Browser
32110		window.DataTable = factory( jQuery, window, document );
32111	}
32112}
32113(function( $, window, document, undefined ) {
32114	"use strict";
32115
32116	
32117	var DataTable = function ( selector, options )
32118	{
32119		// Check if called with a window or jQuery object for DOM less applications
32120		// This is for backwards compatibility
32121		if (DataTable.factory(selector, options)) {
32122			return DataTable;
32123		}
32124	
32125		// When creating with `new`, create a new DataTable, returning the API instance
32126		if (this instanceof DataTable) {
32127			return $(selector).DataTable(options);
32128		}
32129		else {
32130			// Argument switching
32131			options = selector;
32132		}
32133	
32134		/**
32135		 * Perform a jQuery selector action on the table's TR elements (from the tbody) and
32136		 * return the resulting jQuery object.
32137		 *  @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
32138		 *  @param {object} [oOpts] Optional parameters for modifying the rows to be included
32139		 *  @param {string} [oOpts.filter=none] Select TR elements that meet the current filter
32140		 *    criterion ("applied") or all TR elements (i.e. no filter).
32141		 *  @param {string} [oOpts.order=current] Order of the TR elements in the processed array.
32142		 *    Can be either 'current', whereby the current sorting of the table is used, or
32143		 *    'original' whereby the original order the data was read into the table is used.
32144		 *  @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
32145		 *    ("current") or not ("all"). If 'current' is given, then order is assumed to be
32146		 *    'current' and filter is 'applied', regardless of what they might be given as.
32147		 *  @returns {object} jQuery object, filtered by the given selector.
32148		 *  @dtopt API
32149		 *  @deprecated Since v1.10
32150		 *
32151		 *  @example
32152		 *    $(document).ready(function() {
32153		 *      var oTable = $('#example').dataTable();
32154		 *
32155		 *      // Highlight every second row
32156		 *      oTable.$('tr:odd').css('backgroundColor', 'blue');
32157		 *    } );
32158		 *
32159		 *  @example
32160		 *    $(document).ready(function() {
32161		 *      var oTable = $('#example').dataTable();
32162		 *
32163		 *      // Filter to rows with 'Webkit' in them, add a background colour and then
32164		 *      // remove the filter, thus highlighting the 'Webkit' rows only.
32165		 *      oTable.fnFilter('Webkit');
32166		 *      oTable.$('tr', {"search": "applied"}).css('backgroundColor', 'blue');
32167		 *      oTable.fnFilter('');
32168		 *    } );
32169		 */
32170		this.$ = function ( sSelector, oOpts )
32171		{
32172			return this.api(true).$( sSelector, oOpts );
32173		};
32174		
32175		
32176		/**
32177		 * Almost identical to $ in operation, but in this case returns the data for the matched
32178		 * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
32179		 * rather than any descendants, so the data can be obtained for the row/cell. If matching
32180		 * rows are found, the data returned is the original data array/object that was used to
32181		 * create the row (or a generated array if from a DOM source).
32182		 *
32183		 * This method is often useful in-combination with $ where both functions are given the
32184		 * same parameters and the array indexes will match identically.
32185		 *  @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
32186		 *  @param {object} [oOpts] Optional parameters for modifying the rows to be included
32187		 *  @param {string} [oOpts.filter=none] Select elements that meet the current filter
32188		 *    criterion ("applied") or all elements (i.e. no filter).
32189		 *  @param {string} [oOpts.order=current] Order of the data in the processed array.
32190		 *    Can be either 'current', whereby the current sorting of the table is used, or
32191		 *    'original' whereby the original order the data was read into the table is used.
32192		 *  @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
32193		 *    ("current") or not ("all"). If 'current' is given, then order is assumed to be
32194		 *    'current' and filter is 'applied', regardless of what they might be given as.
32195		 *  @returns {array} Data for the matched elements. If any elements, as a result of the
32196		 *    selector, were not TR, TD or TH elements in the DataTable, they will have a null
32197		 *    entry in the array.
32198		 *  @dtopt API
32199		 *  @deprecated Since v1.10
32200		 *
32201		 *  @example
32202		 *    $(document).ready(function() {
32203		 *      var oTable = $('#example').dataTable();
32204		 *
32205		 *      // Get the data from the first row in the table
32206		 *      var data = oTable._('tr:first');
32207		 *
32208		 *      // Do something useful with the data
32209		 *      alert( "First cell is: "+data[0] );
32210		 *    } );
32211		 *
32212		 *  @example
32213		 *    $(document).ready(function() {
32214		 *      var oTable = $('#example').dataTable();
32215		 *
32216		 *      // Filter to 'Webkit' and get all data for
32217		 *      oTable.fnFilter('Webkit');
32218		 *      var data = oTable._('tr', {"search": "applied"});
32219		 *
32220		 *      // Do something with the data
32221		 *      alert( data.length+" rows matched the search" );
32222		 *    } );
32223		 */
32224		this._ = function ( sSelector, oOpts )
32225		{
32226			return this.api(true).rows( sSelector, oOpts ).data();
32227		};
32228		
32229		
32230		/**
32231		 * Create a DataTables Api instance, with the currently selected tables for
32232		 * the Api's context.
32233		 * @param {boolean} [traditional=false] Set the API instance's context to be
32234		 *   only the table referred to by the `DataTable.ext.iApiIndex` option, as was
32235		 *   used in the API presented by DataTables 1.9- (i.e. the traditional mode),
32236		 *   or if all tables captured in the jQuery object should be used.
32237		 * @return {DataTables.Api}
32238		 */
32239		this.api = function ( traditional )
32240		{
32241			return traditional ?
32242				new _Api(
32243					_fnSettingsFromNode( this[ _ext.iApiIndex ] )
32244				) :
32245				new _Api( this );
32246		};
32247		
32248		
32249		/**
32250		 * Add a single new row or multiple rows of data to the table. Please note
32251		 * that this is suitable for client-side processing only - if you are using
32252		 * server-side processing (i.e. "bServerSide": true), then to add data, you
32253		 * must add it to the data source, i.e. the server-side, through an Ajax call.
32254		 *  @param {array|object} data The data to be added to the table. This can be:
32255		 *    <ul>
32256		 *      <li>1D array of data - add a single row with the data provided</li>
32257		 *      <li>2D array of arrays - add multiple rows in a single call</li>
32258		 *      <li>object - data object when using <i>mData</i></li>
32259		 *      <li>array of objects - multiple data objects when using <i>mData</i></li>
32260		 *    </ul>
32261		 *  @param {bool} [redraw=true] redraw the table or not
32262		 *  @returns {array} An array of integers, representing the list of indexes in
32263		 *    <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to
32264		 *    the table.
32265		 *  @dtopt API
32266		 *  @deprecated Since v1.10
32267		 *
32268		 *  @example
32269		 *    // Global var for counter
32270		 *    var giCount = 2;
32271		 *
32272		 *    $(document).ready(function() {
32273		 *      $('#example').dataTable();
32274		 *    } );
32275		 *
32276		 *    function fnClickAddRow() {
32277		 *      $('#example').dataTable().fnAddData( [
32278		 *        giCount+".1",
32279		 *        giCount+".2",
32280		 *        giCount+".3",
32281		 *        giCount+".4" ]
32282		 *      );
32283		 *
32284		 *      giCount++;
32285		 *    }
32286		 */
32287		this.fnAddData = function( data, redraw )
32288		{
32289			var api = this.api( true );
32290		
32291			/* Check if we want to add multiple rows or not */
32292			var rows = Array.isArray(data) && ( Array.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
32293				api.rows.add( data ) :
32294				api.row.add( data );
32295		
32296			if ( redraw === undefined || redraw ) {
32297				api.draw();
32298			}
32299		
32300			return rows.flatten().toArray();
32301		};
32302		
32303		
32304		/**
32305		 * This function will make DataTables recalculate the column sizes, based on the data
32306		 * contained in the table and the sizes applied to the columns (in the DOM, CSS or
32307		 * through the sWidth parameter). This can be useful when the width of the table's
32308		 * parent element changes (for example a window resize).
32309		 *  @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to
32310		 *  @dtopt API
32311		 *  @deprecated Since v1.10
32312		 *
32313		 *  @example
32314		 *    $(document).ready(function() {
32315		 *      var oTable = $('#example').dataTable( {
32316		 *        "sScrollY": "200px",
32317		 *        "bPaginate": false
32318		 *      } );
32319		 *
32320		 *      $(window).on('resize', function () {
32321		 *        oTable.fnAdjustColumnSizing();
32322		 *      } );
32323		 *    } );
32324		 */
32325		this.fnAdjustColumnSizing = function ( bRedraw )
32326		{
32327			var api = this.api( true ).columns.adjust();
32328			var settings = api.settings()[0];
32329			var scroll = settings.oScroll;
32330		
32331			if ( bRedraw === undefined || bRedraw ) {
32332				api.draw( false );
32333			}
32334			else if ( scroll.sX !== "" || scroll.sY !== "" ) {
32335				/* If not redrawing, but scrolling, we want to apply the new column sizes anyway */
32336				_fnScrollDraw( settings );
32337			}
32338		};
32339		
32340		
32341		/**
32342		 * Quickly and simply clear a table
32343		 *  @param {bool} [bRedraw=true] redraw the table or not
32344		 *  @dtopt API
32345		 *  @deprecated Since v1.10
32346		 *
32347		 *  @example
32348		 *    $(document).ready(function() {
32349		 *      var oTable = $('#example').dataTable();
32350		 *
32351		 *      // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
32352		 *      oTable.fnClearTable();
32353		 *    } );
32354		 */
32355		this.fnClearTable = function( bRedraw )
32356		{
32357			var api = this.api( true ).clear();
32358		
32359			if ( bRedraw === undefined || bRedraw ) {
32360				api.draw();
32361			}
32362		};
32363		
32364		
32365		/**
32366		 * The exact opposite of 'opening' a row, this function will close any rows which
32367		 * are currently 'open'.
32368		 *  @param {node} nTr the table row to 'close'
32369		 *  @returns {int} 0 on success, or 1 if failed (can't find the row)
32370		 *  @dtopt API
32371		 *  @deprecated Since v1.10
32372		 *
32373		 *  @example
32374		 *    $(document).ready(function() {
32375		 *      var oTable;
32376		 *
32377		 *      // 'open' an information row when a row is clicked on
32378		 *      $('#example tbody tr').click( function () {
32379		 *        if ( oTable.fnIsOpen(this) ) {
32380		 *          oTable.fnClose( this );
32381		 *        } else {
32382		 *          oTable.fnOpen( this, "Temporary row opened", "info_row" );
32383		 *        }
32384		 *      } );
32385		 *
32386		 *      oTable = $('#example').dataTable();
32387		 *    } );
32388		 */
32389		this.fnClose = function( nTr )
32390		{
32391			this.api( true ).row( nTr ).child.hide();
32392		};
32393		
32394		
32395		/**
32396		 * Remove a row for the table
32397		 *  @param {mixed} target The index of the row from aoData to be deleted, or
32398		 *    the TR element you want to delete
32399		 *  @param {function|null} [callBack] Callback function
32400		 *  @param {bool} [redraw=true] Redraw the table or not
32401		 *  @returns {array} The row that was deleted
32402		 *  @dtopt API
32403		 *  @deprecated Since v1.10
32404		 *
32405		 *  @example
32406		 *    $(document).ready(function() {
32407		 *      var oTable = $('#example').dataTable();
32408		 *
32409		 *      // Immediately remove the first row
32410		 *      oTable.fnDeleteRow( 0 );
32411		 *    } );
32412		 */
32413		this.fnDeleteRow = function( target, callback, redraw )
32414		{
32415			var api = this.api( true );
32416			var rows = api.rows( target );
32417			var settings = rows.settings()[0];
32418			var data = settings.aoData[ rows[0][0] ];
32419		
32420			rows.remove();
32421		
32422			if ( callback ) {
32423				callback.call( this, settings, data );
32424			}
32425		
32426			if ( redraw === undefined || redraw ) {
32427				api.draw();
32428			}
32429		
32430			return data;
32431		};
32432		
32433		
32434		/**
32435		 * Restore the table to it's original state in the DOM by removing all of DataTables
32436		 * enhancements, alterations to the DOM structure of the table and event listeners.
32437		 *  @param {boolean} [remove=false] Completely remove the table from the DOM
32438		 *  @dtopt API
32439		 *  @deprecated Since v1.10
32440		 *
32441		 *  @example
32442		 *    $(document).ready(function() {
32443		 *      // This example is fairly pointless in reality, but shows how fnDestroy can be used
32444		 *      var oTable = $('#example').dataTable();
32445		 *      oTable.fnDestroy();
32446		 *    } );
32447		 */
32448		this.fnDestroy = function ( remove )
32449		{
32450			this.api( true ).destroy( remove );
32451		};
32452		
32453		
32454		/**
32455		 * Redraw the table
32456		 *  @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw.
32457		 *  @dtopt API
32458		 *  @deprecated Since v1.10
32459		 *
32460		 *  @example
32461		 *    $(document).ready(function() {
32462		 *      var oTable = $('#example').dataTable();
32463		 *
32464		 *      // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
32465		 *      oTable.fnDraw();
32466		 *    } );
32467		 */
32468		this.fnDraw = function( complete )
32469		{
32470			// Note that this isn't an exact match to the old call to _fnDraw - it takes
32471			// into account the new data, but can hold position.
32472			this.api( true ).draw( complete );
32473		};
32474		
32475		
32476		/**
32477		 * Filter the input based on data
32478		 *  @param {string} sInput String to filter the table on
32479		 *  @param {int|null} [iColumn] Column to limit filtering to
32480		 *  @param {bool} [bRegex=false] Treat as regular expression or not
32481		 *  @param {bool} [bSmart=true] Perform smart filtering or not
32482		 *  @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)
32483		 *  @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)
32484		 *  @dtopt API
32485		 *  @deprecated Since v1.10
32486		 *
32487		 *  @example
32488		 *    $(document).ready(function() {
32489		 *      var oTable = $('#example').dataTable();
32490		 *
32491		 *      // Sometime later - filter...
32492		 *      oTable.fnFilter( 'test string' );
32493		 *    } );
32494		 */
32495		this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )
32496		{
32497			var api = this.api( true );
32498		
32499			if ( iColumn === null || iColumn === undefined ) {
32500				api.search( sInput, bRegex, bSmart, bCaseInsensitive );
32501			}
32502			else {
32503				api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive );
32504			}
32505		
32506			api.draw();
32507		};
32508		
32509		
32510		/**
32511		 * Get the data for the whole table, an individual row or an individual cell based on the
32512		 * provided parameters.
32513		 *  @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as
32514		 *    a TR node then the data source for the whole row will be returned. If given as a
32515		 *    TD/TH cell node then iCol will be automatically calculated and the data for the
32516		 *    cell returned. If given as an integer, then this is treated as the aoData internal
32517		 *    data index for the row (see fnGetPosition) and the data for that row used.
32518		 *  @param {int} [col] Optional column index that you want the data of.
32519		 *  @returns {array|object|string} If mRow is undefined, then the data for all rows is
32520		 *    returned. If mRow is defined, just data for that row, and is iCol is
32521		 *    defined, only data for the designated cell is returned.
32522		 *  @dtopt API
32523		 *  @deprecated Since v1.10
32524		 *
32525		 *  @example
32526		 *    // Row data
32527		 *    $(document).ready(function() {
32528		 *      oTable = $('#example').dataTable();
32529		 *
32530		 *      oTable.$('tr').click( function () {
32531		 *        var data = oTable.fnGetData( this );
32532		 *        // ... do something with the array / object of data for the row
32533		 *      } );
32534		 *    } );
32535		 *
32536		 *  @example
32537		 *    // Individual cell data
32538		 *    $(document).ready(function() {
32539		 *      oTable = $('#example').dataTable();
32540		 *
32541		 *      oTable.$('td').click( function () {
32542		 *        var sData = oTable.fnGetData( this );
32543		 *        alert( 'The cell clicked on had the value of '+sData );
32544		 *      } );
32545		 *    } );
32546		 */
32547		this.fnGetData = function( src, col )
32548		{
32549			var api = this.api( true );
32550		
32551			if ( src !== undefined ) {
32552				var type = src.nodeName ? src.nodeName.toLowerCase() : '';
32553		
32554				return col !== undefined || type == 'td' || type == 'th' ?
32555					api.cell( src, col ).data() :
32556					api.row( src ).data() || null;
32557			}
32558		
32559			return api.data().toArray();
32560		};
32561		
32562		
32563		/**
32564		 * Get an array of the TR nodes that are used in the table's body. Note that you will
32565		 * typically want to use the '$' API method in preference to this as it is more
32566		 * flexible.
32567		 *  @param {int} [iRow] Optional row index for the TR element you want
32568		 *  @returns {array|node} If iRow is undefined, returns an array of all TR elements
32569		 *    in the table's body, or iRow is defined, just the TR element requested.
32570		 *  @dtopt API
32571		 *  @deprecated Since v1.10
32572		 *
32573		 *  @example
32574		 *    $(document).ready(function() {
32575		 *      var oTable = $('#example').dataTable();
32576		 *
32577		 *      // Get the nodes from the table
32578		 *      var nNodes = oTable.fnGetNodes( );
32579		 *    } );
32580		 */
32581		this.fnGetNodes = function( iRow )
32582		{
32583			var api = this.api( true );
32584		
32585			return iRow !== undefined ?
32586				api.row( iRow ).node() :
32587				api.rows().nodes().flatten().toArray();
32588		};
32589		
32590		
32591		/**
32592		 * Get the array indexes of a particular cell from it's DOM element
32593		 * and column index including hidden columns
32594		 *  @param {node} node this can either be a TR, TD or TH in the table's body
32595		 *  @returns {int} If nNode is given as a TR, then a single index is returned, or
32596		 *    if given as a cell, an array of [row index, column index (visible),
32597		 *    column index (all)] is given.
32598		 *  @dtopt API
32599		 *  @deprecated Since v1.10
32600		 *
32601		 *  @example
32602		 *    $(document).ready(function() {
32603		 *      $('#example tbody td').click( function () {
32604		 *        // Get the position of the current data from the node
32605		 *        var aPos = oTable.fnGetPosition( this );
32606		 *
32607		 *        // Get the data array for this row
32608		 *        var aData = oTable.fnGetData( aPos[0] );
32609		 *
32610		 *        // Update the data array and return the value
32611		 *        aData[ aPos[1] ] = 'clicked';
32612		 *        this.innerHTML = 'clicked';
32613		 *      } );
32614		 *
32615		 *      // Init DataTables
32616		 *      oTable = $('#example').dataTable();
32617		 *    } );
32618		 */
32619		this.fnGetPosition = function( node )
32620		{
32621			var api = this.api( true );
32622			var nodeName = node.nodeName.toUpperCase();
32623		
32624			if ( nodeName == 'TR' ) {
32625				return api.row( node ).index();
32626			}
32627			else if ( nodeName == 'TD' || nodeName == 'TH' ) {
32628				var cell = api.cell( node ).index();
32629		
32630				return [
32631					cell.row,
32632					cell.columnVisible,
32633					cell.column
32634				];
32635			}
32636			return null;
32637		};
32638		
32639		
32640		/**
32641		 * Check to see if a row is 'open' or not.
32642		 *  @param {node} nTr the table row to check
32643		 *  @returns {boolean} true if the row is currently open, false otherwise
32644		 *  @dtopt API
32645		 *  @deprecated Since v1.10
32646		 *
32647		 *  @example
32648		 *    $(document).ready(function() {
32649		 *      var oTable;
32650		 *
32651		 *      // 'open' an information row when a row is clicked on
32652		 *      $('#example tbody tr').click( function () {
32653		 *        if ( oTable.fnIsOpen(this) ) {
32654		 *          oTable.fnClose( this );
32655		 *        } else {
32656		 *          oTable.fnOpen( this, "Temporary row opened", "info_row" );
32657		 *        }
32658		 *      } );
32659		 *
32660		 *      oTable = $('#example').dataTable();
32661		 *    } );
32662		 */
32663		this.fnIsOpen = function( nTr )
32664		{
32665			return this.api( true ).row( nTr ).child.isShown();
32666		};
32667		
32668		
32669		/**
32670		 * This function will place a new row directly after a row which is currently
32671		 * on display on the page, with the HTML contents that is passed into the
32672		 * function. This can be used, for example, to ask for confirmation that a
32673		 * particular record should be deleted.
32674		 *  @param {node} nTr The table row to 'open'
32675		 *  @param {string|node|jQuery} mHtml The HTML to put into the row
32676		 *  @param {string} sClass Class to give the new TD cell
32677		 *  @returns {node} The row opened. Note that if the table row passed in as the
32678		 *    first parameter, is not found in the table, this method will silently
32679		 *    return.
32680		 *  @dtopt API
32681		 *  @deprecated Since v1.10
32682		 *
32683		 *  @example
32684		 *    $(document).ready(function() {
32685		 *      var oTable;
32686		 *
32687		 *      // 'open' an information row when a row is clicked on
32688		 *      $('#example tbody tr').click( function () {
32689		 *        if ( oTable.fnIsOpen(this) ) {
32690		 *          oTable.fnClose( this );
32691		 *        } else {
32692		 *          oTable.fnOpen( this, "Temporary row opened", "info_row" );
32693		 *        }
32694		 *      } );
32695		 *
32696		 *      oTable = $('#example').dataTable();
32697		 *    } );
32698		 */
32699		this.fnOpen = function( nTr, mHtml, sClass )
32700		{
32701			return this.api( true )
32702				.row( nTr )
32703				.child( mHtml, sClass )
32704				.show()
32705				.child()[0];
32706		};
32707		
32708		
32709		/**
32710		 * Change the pagination - provides the internal logic for pagination in a simple API
32711		 * function. With this function you can have a DataTables table go to the next,
32712		 * previous, first or last pages.
32713		 *  @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
32714		 *    or page number to jump to (integer), note that page 0 is the first page.
32715		 *  @param {bool} [bRedraw=true] Redraw the table or not
32716		 *  @dtopt API
32717		 *  @deprecated Since v1.10
32718		 *
32719		 *  @example
32720		 *    $(document).ready(function() {
32721		 *      var oTable = $('#example').dataTable();
32722		 *      oTable.fnPageChange( 'next' );
32723		 *    } );
32724		 */
32725		this.fnPageChange = function ( mAction, bRedraw )
32726		{
32727			var api = this.api( true ).page( mAction );
32728		
32729			if ( bRedraw === undefined || bRedraw ) {
32730				api.draw(false);
32731			}
32732		};
32733		
32734		
32735		/**
32736		 * Show a particular column
32737		 *  @param {int} iCol The column whose display should be changed
32738		 *  @param {bool} bShow Show (true) or hide (false) the column
32739		 *  @param {bool} [bRedraw=true] Redraw the table or not
32740		 *  @dtopt API
32741		 *  @deprecated Since v1.10
32742		 *
32743		 *  @example
32744		 *    $(document).ready(function() {
32745		 *      var oTable = $('#example').dataTable();
32746		 *
32747		 *      // Hide the second column after initialisation
32748		 *      oTable.fnSetColumnVis( 1, false );
32749		 *    } );
32750		 */
32751		this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
32752		{
32753			var api = this.api( true ).column( iCol ).visible( bShow );
32754		
32755			if ( bRedraw === undefined || bRedraw ) {
32756				api.columns.adjust().draw();
32757			}
32758		};
32759		
32760		
32761		/**
32762		 * Get the settings for a particular table for external manipulation
32763		 *  @returns {object} DataTables settings object. See
32764		 *    {@link DataTable.models.oSettings}
32765		 *  @dtopt API
32766		 *  @deprecated Since v1.10
32767		 *
32768		 *  @example
32769		 *    $(document).ready(function() {
32770		 *      var oTable = $('#example').dataTable();
32771		 *      var oSettings = oTable.fnSettings();
32772		 *
32773		 *      // Show an example parameter from the settings
32774		 *      alert( oSettings._iDisplayStart );
32775		 *    } );
32776		 */
32777		this.fnSettings = function()
32778		{
32779			return _fnSettingsFromNode( this[_ext.iApiIndex] );
32780		};
32781		
32782		
32783		/**
32784		 * Sort the table by a particular column
32785		 *  @param {int} iCol the data index to sort on. Note that this will not match the
32786		 *    'display index' if you have hidden data entries
32787		 *  @dtopt API
32788		 *  @deprecated Since v1.10
32789		 *
32790		 *  @example
32791		 *    $(document).ready(function() {
32792		 *      var oTable = $('#example').dataTable();
32793		 *
32794		 *      // Sort immediately with columns 0 and 1
32795		 *      oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
32796		 *    } );
32797		 */
32798		this.fnSort = function( aaSort )
32799		{
32800			this.api( true ).order( aaSort ).draw();
32801		};
32802		
32803		
32804		/**
32805		 * Attach a sort listener to an element for a given column
32806		 *  @param {node} nNode the element to attach the sort listener to
32807		 *  @param {int} iColumn the column that a click on this node will sort on
32808		 *  @param {function} [fnCallback] callback function when sort is run
32809		 *  @dtopt API
32810		 *  @deprecated Since v1.10
32811		 *
32812		 *  @example
32813		 *    $(document).ready(function() {
32814		 *      var oTable = $('#example').dataTable();
32815		 *
32816		 *      // Sort on column 1, when 'sorter' is clicked on
32817		 *      oTable.fnSortListener( document.getElementById('sorter'), 1 );
32818		 *    } );
32819		 */
32820		this.fnSortListener = function( nNode, iColumn, fnCallback )
32821		{
32822			this.api( true ).order.listener( nNode, iColumn, fnCallback );
32823		};
32824		
32825		
32826		/**
32827		 * Update a table cell or row - this method will accept either a single value to
32828		 * update the cell with, an array of values with one element for each column or
32829		 * an object in the same format as the original data source. The function is
32830		 * self-referencing in order to make the multi column updates easier.
32831		 *  @param {object|array|string} mData Data to update the cell/row with
32832		 *  @param {node|int} mRow TR element you want to update or the aoData index
32833		 *  @param {int} [iColumn] The column to update, give as null or undefined to
32834		 *    update a whole row.
32835		 *  @param {bool} [bRedraw=true] Redraw the table or not
32836		 *  @param {bool} [bAction=true] Perform pre-draw actions or not
32837		 *  @returns {int} 0 on success, 1 on error
32838		 *  @dtopt API
32839		 *  @deprecated Since v1.10
32840		 *
32841		 *  @example
32842		 *    $(document).ready(function() {
32843		 *      var oTable = $('#example').dataTable();
32844		 *      oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
32845		 *      oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row
32846		 *    } );
32847		 */
32848		this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
32849		{
32850			var api = this.api( true );
32851		
32852			if ( iColumn === undefined || iColumn === null ) {
32853				api.row( mRow ).data( mData );
32854			}
32855			else {
32856				api.cell( mRow, iColumn ).data( mData );
32857			}
32858		
32859			if ( bAction === undefined || bAction ) {
32860				api.columns.adjust();
32861			}
32862		
32863			if ( bRedraw === undefined || bRedraw ) {
32864				api.draw();
32865			}
32866			return 0;
32867		};
32868		
32869		
32870		/**
32871		 * Provide a common method for plug-ins to check the version of DataTables being used, in order
32872		 * to ensure compatibility.
32873		 *  @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
32874		 *    formats "X" and "X.Y" are also acceptable.
32875		 *  @returns {boolean} true if this version of DataTables is greater or equal to the required
32876		 *    version, or false if this version of DataTales is not suitable
32877		 *  @method
32878		 *  @dtopt API
32879		 *  @deprecated Since v1.10
32880		 *
32881		 *  @example
32882		 *    $(document).ready(function() {
32883		 *      var oTable = $('#example').dataTable();
32884		 *      alert( oTable.fnVersionCheck( '1.9.0' ) );
32885		 *    } );
32886		 */
32887		this.fnVersionCheck = _ext.fnVersionCheck;
32888		
32889	
32890		var _that = this;
32891		var emptyInit = options === undefined;
32892		var len = this.length;
32893	
32894		if ( emptyInit ) {
32895			options = {};
32896		}
32897	
32898		this.oApi = this.internal = _ext.internal;
32899	
32900		// Extend with old style plug-in API methods
32901		for ( var fn in DataTable.ext.internal ) {
32902			if ( fn ) {
32903				this[fn] = _fnExternApiFunc(fn);
32904			}
32905		}
32906	
32907		this.each(function() {
32908			// For each initialisation we want to give it a clean initialisation
32909			// object that can be bashed around
32910			var o = {};
32911			var oInit = len > 1 ? // optimisation for single table case
32912				_fnExtend( o, options, true ) :
32913				options;
32914	
32915			/*global oInit,_that,emptyInit*/
32916			var i=0, iLen, j, jLen, k, kLen;
32917			var sId = this.getAttribute( 'id' );
32918			var bInitHandedOff = false;
32919			var defaults = DataTable.defaults;
32920			var $this = $(this);
32921			
32922			
32923			/* Sanity check */
32924			if ( this.nodeName.toLowerCase() != 'table' )
32925			{
32926				_fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );
32927				return;
32928			}
32929			
32930			/* Backwards compatibility for the defaults */
32931			_fnCompatOpts( defaults );
32932			_fnCompatCols( defaults.column );
32933			
32934			/* Convert the camel-case defaults to Hungarian */
32935			_fnCamelToHungarian( defaults, defaults, true );
32936			_fnCamelToHungarian( defaults.column, defaults.column, true );
32937			
32938			/* Setting up the initialisation object */
32939			_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true );
32940			
32941			
32942			
32943			/* Check to see if we are re-initialising a table */
32944			var allSettings = DataTable.settings;
32945			for ( i=0, iLen=allSettings.length ; i<iLen ; i++ )
32946			{
32947				var s = allSettings[i];
32948			
32949				/* Base check on table node */
32950				if (
32951					s.nTable == this ||
32952					(s.nTHead && s.nTHead.parentNode == this) ||
32953					(s.nTFoot && s.nTFoot.parentNode == this)
32954				) {
32955					var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;
32956					var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;
32957			
32958					if ( emptyInit || bRetrieve )
32959					{
32960						return s.oInstance;
32961					}
32962					else if ( bDestroy )
32963					{
32964						s.oInstance.fnDestroy();
32965						break;
32966					}
32967					else
32968					{
32969						_fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );
32970						return;
32971					}
32972				}
32973			
32974				/* If the element we are initialising has the same ID as a table which was previously
32975				 * initialised, but the table nodes don't match (from before) then we destroy the old
32976				 * instance by simply deleting it. This is under the assumption that the table has been
32977				 * destroyed by other methods. Anyone using non-id selectors will need to do this manually
32978				 */
32979				if ( s.sTableId == this.id )
32980				{
32981					allSettings.splice( i, 1 );
32982					break;
32983				}
32984			}
32985			
32986			/* Ensure the table has an ID - required for accessibility */
32987			if ( sId === null || sId === "" )
32988			{
32989				sId = "DataTables_Table_"+(DataTable.ext._unique++);
32990				this.id = sId;
32991			}
32992			
32993			/* Create the settings object for this table and set some of the default parameters */
32994			var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
32995				"sDestroyWidth": $this[0].style.width,
32996				"sInstance":     sId,
32997				"sTableId":      sId
32998			} );
32999			oSettings.nTable = this;
33000			oSettings.oApi   = _that.internal;
33001			oSettings.oInit  = oInit;
33002			
33003			allSettings.push( oSettings );
33004			
33005			// Need to add the instance after the instance after the settings object has been added
33006			// to the settings array, so we can self reference the table instance if more than one
33007			oSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();
33008			
33009			// Backwards compatibility, before we apply all the defaults
33010			_fnCompatOpts( oInit );
33011			_fnLanguageCompat( oInit.oLanguage );
33012			
33013			// If the length menu is given, but the init display length is not, use the length menu
33014			if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
33015			{
33016				oInit.iDisplayLength = Array.isArray( oInit.aLengthMenu[0] ) ?
33017					oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
33018			}
33019			
33020			// Apply the defaults and init options to make a single init object will all
33021			// options defined from defaults and instance options.
33022			oInit = _fnExtend( $.extend( true, {}, defaults ), oInit );
33023			
33024			
33025			// Map the initialisation options onto the settings object
33026			_fnMap( oSettings.oFeatures, oInit, [
33027				"bPaginate",
33028				"bLengthChange",
33029				"bFilter",
33030				"bSort",
33031				"bSortMulti",
33032				"bInfo",
33033				"bProcessing",
33034				"bAutoWidth",
33035				"bSortClasses",
33036				"bServerSide",
33037				"bDeferRender"
33038			] );
33039			_fnMap( oSettings, oInit, [
33040				"asStripeClasses",
33041				"ajax",
33042				"fnServerData",
33043				"fnFormatNumber",
33044				"sServerMethod",
33045				"aaSorting",
33046				"aaSortingFixed",
33047				"aLengthMenu",
33048				"sPaginationType",
33049				"sAjaxSource",
33050				"sAjaxDataProp",
33051				"iStateDuration",
33052				"sDom",
33053				"bSortCellsTop",
33054				"iTabIndex",
33055				"fnStateLoadCallback",
33056				"fnStateSaveCallback",
33057				"renderer",
33058				"searchDelay",
33059				"rowId",
33060				[ "iCookieDuration", "iStateDuration" ], // backwards compat
33061				[ "oSearch", "oPreviousSearch" ],
33062				[ "aoSearchCols", "aoPreSearchCols" ],
33063				[ "iDisplayLength", "_iDisplayLength" ]
33064			] );
33065			_fnMap( oSettings.oScroll, oInit, [
33066				[ "sScrollX", "sX" ],
33067				[ "sScrollXInner", "sXInner" ],
33068				[ "sScrollY", "sY" ],
33069				[ "bScrollCollapse", "bCollapse" ]
33070			] );
33071			_fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
33072			
33073			/* Callback functions which are array driven */
33074			_fnCallbackReg( oSettings, 'aoDrawCallback',       oInit.fnDrawCallback,      'user' );
33075			_fnCallbackReg( oSettings, 'aoServerParams',       oInit.fnServerParams,      'user' );
33076			_fnCallbackReg( oSettings, 'aoStateSaveParams',    oInit.fnStateSaveParams,   'user' );
33077			_fnCallbackReg( oSettings, 'aoStateLoadParams',    oInit.fnStateLoadParams,   'user' );
33078			_fnCallbackReg( oSettings, 'aoStateLoaded',        oInit.fnStateLoaded,       'user' );
33079			_fnCallbackReg( oSettings, 'aoRowCallback',        oInit.fnRowCallback,       'user' );
33080			_fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow,        'user' );
33081			_fnCallbackReg( oSettings, 'aoHeaderCallback',     oInit.fnHeaderCallback,    'user' );
33082			_fnCallbackReg( oSettings, 'aoFooterCallback',     oInit.fnFooterCallback,    'user' );
33083			_fnCallbackReg( oSettings, 'aoInitComplete',       oInit.fnInitComplete,      'user' );
33084			_fnCallbackReg( oSettings, 'aoPreDrawCallback',    oInit.fnPreDrawCallback,   'user' );
33085			
33086			oSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId );
33087			
33088			/* Browser support detection */
33089			_fnBrowserDetect( oSettings );
33090			
33091			var oClasses = oSettings.oClasses;
33092			
33093			$.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
33094			$this.addClass( oClasses.sTable );
33095			
33096			
33097			if ( oSettings.iInitDisplayStart === undefined )
33098			{
33099				/* Display start point, taking into account the save saving */
33100				oSettings.iInitDisplayStart = oInit.iDisplayStart;
33101				oSettings._iDisplayStart = oInit.iDisplayStart;
33102			}
33103			
33104			if ( oInit.iDeferLoading !== null )
33105			{
33106				oSettings.bDeferLoading = true;
33107				var tmp = Array.isArray( oInit.iDeferLoading );
33108				oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
33109				oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
33110			}
33111			
33112			/* Language definitions */
33113			var oLanguage = oSettings.oLanguage;
33114			$.extend( true, oLanguage, oInit.oLanguage );
33115			
33116			if ( oLanguage.sUrl )
33117			{
33118				/* Get the language definitions from a file - because this Ajax call makes the language
33119				 * get async to the remainder of this function we use bInitHandedOff to indicate that
33120				 * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
33121				 */
33122				$.ajax( {
33123					dataType: 'json',
33124					url: oLanguage.sUrl,
33125					success: function ( json ) {
33126						_fnCamelToHungarian( defaults.oLanguage, json );
33127						_fnLanguageCompat( json );
33128						$.extend( true, oLanguage, json, oSettings.oInit.oLanguage );
33129			
33130						_fnCallbackFire( oSettings, null, 'i18n', [oSettings]);
33131						_fnInitialise( oSettings );
33132					},
33133					error: function () {
33134						// Error occurred loading language file, continue on as best we can
33135						_fnInitialise( oSettings );
33136					}
33137				} );
33138				bInitHandedOff = true;
33139			}
33140			else {
33141				_fnCallbackFire( oSettings, null, 'i18n', [oSettings]);
33142			}
33143			
33144			/*
33145			 * Stripes
33146			 */
33147			if ( oInit.asStripeClasses === null )
33148			{
33149				oSettings.asStripeClasses =[
33150					oClasses.sStripeOdd,
33151					oClasses.sStripeEven
33152				];
33153			}
33154			
33155			/* Remove row stripe classes if they are already on the table row */
33156			var stripeClasses = oSettings.asStripeClasses;
33157			var rowOne = $this.children('tbody').find('tr').eq(0);
33158			if ( $.inArray( true, $.map( stripeClasses, function(el, i) {
33159				return rowOne.hasClass(el);
33160			} ) ) !== -1 ) {
33161				$('tbody tr', this).removeClass( stripeClasses.join(' ') );
33162				oSettings.asDestroyStripes = stripeClasses.slice();
33163			}
33164			
33165			/*
33166			 * Columns
33167			 * See if we should load columns automatically or use defined ones
33168			 */
33169			var anThs = [];
33170			var aoColumnsInit;
33171			var nThead = this.getElementsByTagName('thead');
33172			if ( nThead.length !== 0 )
33173			{
33174				_fnDetectHeader( oSettings.aoHeader, nThead[0] );
33175				anThs = _fnGetUniqueThs( oSettings );
33176			}
33177			
33178			/* If not given a column array, generate one with nulls */
33179			if ( oInit.aoColumns === null )
33180			{
33181				aoColumnsInit = [];
33182				for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
33183				{
33184					aoColumnsInit.push( null );
33185				}
33186			}
33187			else
33188			{
33189				aoColumnsInit = oInit.aoColumns;
33190			}
33191			
33192			/* Add the columns */
33193			for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
33194			{
33195				_fnAddColumn( oSettings, anThs ? anThs[i] : null );
33196			}
33197			
33198			/* Apply the column definitions */
33199			_fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
33200				_fnColumnOptions( oSettings, iCol, oDef );
33201			} );
33202			
33203			/* HTML5 attribute detection - build an mData object automatically if the
33204			 * attributes are found
33205			 */
33206			if ( rowOne.length ) {
33207				var a = function ( cell, name ) {
33208					return cell.getAttribute( 'data-'+name ) !== null ? name : null;
33209				};
33210			
33211				$( rowOne[0] ).children('th, td').each( function (i, cell) {
33212					var col = oSettings.aoColumns[i];
33213			
33214					if (! col) {
33215						_fnLog( oSettings, 0, 'Incorrect column count', 18 );
33216					}
33217			
33218					if ( col.mData === i ) {
33219						var sort = a( cell, 'sort' ) || a( cell, 'order' );
33220						var filter = a( cell, 'filter' ) || a( cell, 'search' );
33221			
33222						if ( sort !== null || filter !== null ) {
33223							col.mData = {
33224								_:      i+'.display',
33225								sort:   sort !== null   ? i+'.@data-'+sort   : undefined,
33226								type:   sort !== null   ? i+'.@data-'+sort   : undefined,
33227								filter: filter !== null ? i+'.@data-'+filter : undefined
33228							};
33229							col._isArrayHost = true;
33230			
33231							_fnColumnOptions( oSettings, i );
33232						}
33233					}
33234				} );
33235			}
33236			
33237			var features = oSettings.oFeatures;
33238			var loadedInit = function () {
33239				/*
33240				 * Sorting
33241				 * @todo For modularisation (1.11) this needs to do into a sort start up handler
33242				 */
33243			
33244				// If aaSorting is not defined, then we use the first indicator in asSorting
33245				// in case that has been altered, so the default sort reflects that option
33246				if ( oInit.aaSorting === undefined ) {
33247					var sorting = oSettings.aaSorting;
33248					for ( i=0, iLen=sorting.length ; i<iLen ; i++ ) {
33249						sorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];
33250					}
33251				}
33252			
33253				/* Do a first pass on the sorting classes (allows any size changes to be taken into
33254				 * account, and also will apply sorting disabled classes if disabled
33255				 */
33256				_fnSortingClasses( oSettings );
33257			
33258				if ( features.bSort ) {
33259					_fnCallbackReg( oSettings, 'aoDrawCallback', function () {
33260						if ( oSettings.bSorted ) {
33261							var aSort = _fnSortFlatten( oSettings );
33262							var sortedColumns = {};
33263			
33264							$.each( aSort, function (i, val) {
33265								sortedColumns[ val.src ] = val.dir;
33266							} );
33267			
33268							_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
33269							_fnSortAria( oSettings );
33270						}
33271					} );
33272				}
33273			
33274				_fnCallbackReg( oSettings, 'aoDrawCallback', function () {
33275					if ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {
33276						_fnSortingClasses( oSettings );
33277					}
33278				}, 'sc' );
33279			
33280			
33281				/*
33282				 * Final init
33283				 * Cache the header, body and footer as required, creating them if needed
33284				 */
33285			
33286				// Work around for Webkit bug 83867 - store the caption-side before removing from doc
33287				var captions = $this.children('caption').each( function () {
33288					this._captionSide = $(this).css('caption-side');
33289				} );
33290			
33291				var thead = $this.children('thead');
33292				if ( thead.length === 0 ) {
33293					thead = $('<thead/>').appendTo($this);
33294				}
33295				oSettings.nTHead = thead[0];
33296			
33297				var tbody = $this.children('tbody');
33298				if ( tbody.length === 0 ) {
33299					tbody = $('<tbody/>').insertAfter(thead);
33300				}
33301				oSettings.nTBody = tbody[0];
33302			
33303				var tfoot = $this.children('tfoot');
33304				if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) {
33305					// If we are a scrolling table, and no footer has been given, then we need to create
33306					// a tfoot element for the caption element to be appended to
33307					tfoot = $('<tfoot/>').appendTo($this);
33308				}
33309			
33310				if ( tfoot.length === 0 || tfoot.children().length === 0 ) {
33311					$this.addClass( oClasses.sNoFooter );
33312				}
33313				else if ( tfoot.length > 0 ) {
33314					oSettings.nTFoot = tfoot[0];
33315					_fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
33316				}
33317			
33318				/* Check if there is data passing into the constructor */
33319				if ( oInit.aaData ) {
33320					for ( i=0 ; i<oInit.aaData.length ; i++ ) {
33321						_fnAddData( oSettings, oInit.aaData[ i ] );
33322					}
33323				}
33324				else if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' ) {
33325					/* Grab the data from the page - only do this when deferred loading or no Ajax
33326					 * source since there is no point in reading the DOM data if we are then going
33327					 * to replace it with Ajax data
33328					 */
33329					_fnAddTr( oSettings, $(oSettings.nTBody).children('tr') );
33330				}
33331			
33332				/* Copy the data index array */
33333				oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
33334			
33335				/* Initialisation complete - table can be drawn */
33336				oSettings.bInitialised = true;
33337			
33338				/* Check if we need to initialise the table (it might not have been handed off to the
33339				 * language processor)
33340				 */
33341				if ( bInitHandedOff === false ) {
33342					_fnInitialise( oSettings );
33343				}
33344			};
33345			
33346			/* Must be done after everything which can be overridden by the state saving! */
33347			_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
33348			
33349			if ( oInit.bStateSave )
33350			{
33351				features.bStateSave = true;
33352				_fnLoadState( oSettings, oInit, loadedInit );
33353			}
33354			else {
33355				loadedInit();
33356			}
33357			
33358		} );
33359		_that = null;
33360		return this;
33361	};
33362	
33363	
33364	/*
33365	 * It is useful to have variables which are scoped locally so only the
33366	 * DataTables functions can access them and they don't leak into global space.
33367	 * At the same time these functions are often useful over multiple files in the
33368	 * core and API, so we list, or at least document, all variables which are used
33369	 * by DataTables as private variables here. This also ensures that there is no
33370	 * clashing of variable names and that they can easily referenced for reuse.
33371	 */
33372	
33373	
33374	// Defined else where
33375	//  _selector_run
33376	//  _selector_opts
33377	//  _selector_first
33378	//  _selector_row_indexes
33379	
33380	var _ext; // DataTable.ext
33381	var _Api; // DataTable.Api
33382	var _api_register; // DataTable.Api.register
33383	var _api_registerPlural; // DataTable.Api.registerPlural
33384	
33385	var _re_dic = {};
33386	var _re_new_lines = /[\r\n\u2028]/g;
33387	var _re_html = /<.*?>/g;
33388	
33389	// This is not strict ISO8601 - Date.parse() is quite lax, although
33390	// implementations differ between browsers.
33391	var _re_date = /^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/;
33392	
33393	// Escape regular expression special characters
33394	var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
33395	
33396	// http
33396s
vendor: 27,673 bytes, lines 33396-34395
33396://en.wikipedia.org/wiki/Foreign_exchange_market
33397	// - \u20BD - Russian ruble.
33398	// - \u20a9 - South Korean Won
33399	// - \u20BA - Turkish Lira
33400	// - \u20B9 - Indian Rupee
33401	// - R - Brazil (R$) and South Africa
33402	// - fr - Swiss Franc
33403	// - kr - Swedish krona, Norwegian krone and Danish krone
33404	// - \u2009 is thin space and \u202F is narrow no-break space, both used in many
33405	// - Ƀ - Bitcoin
33406	// - Ξ - Ethereum
33407	//   standards as thousands separators.
33408	var _re_formatted_numeric = /['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
33409	
33410	
33411	var _empty = function ( d ) {
33412		return !d || d === true || d === '-' ? true : false;
33413	};
33414	
33415	
33416	var _intVal = function ( s ) {
33417		var integer = parseInt( s, 10 );
33418		return !isNaN(integer) && isFinite(s) ? integer : null;
33419	};
33420	
33421	// Convert from a formatted number with characters other than `.` as the
33422	// decimal place, to a Javascript number
33423	var _numToDecimal = function ( num, decimalPoint ) {
33424		// Cache created regular expressions for speed as this function is called often
33425		if ( ! _re_dic[ decimalPoint ] ) {
33426			_re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );
33427		}
33428		return typeof num === 'string' && decimalPoint !== '.' ?
33429			num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :
33430			num;
33431	};
33432	
33433	
33434	var _isNumber = function ( d, decimalPoint, formatted ) {
33435		var type = typeof d;
33436		var strType = type === 'string';
33437	
33438		if ( type === 'number' || type === 'bigint') {
33439			return true;
33440		}
33441	
33442		// If empty return immediately so there must be a number if it is a
33443		// formatted string (this stops the string "k", or "kr", etc being detected
33444		// as a formatted number for currency
33445		if ( _empty( d ) ) {
33446			return true;
33447		}
33448	
33449		if ( decimalPoint && strType ) {
33450			d = _numToDecimal( d, decimalPoint );
33451		}
33452	
33453		if ( formatted && strType ) {
33454			d = d.replace( _re_formatted_numeric, '' );
33455		}
33456	
33457		return !isNaN( parseFloat(d) ) && isFinite( d );
33458	};
33459	
33460	
33461	// A string without HTML in it can be considered to be HTML still
33462	var _isHtml = function ( d ) {
33463		return _empty( d ) || typeof d === 'string';
33464	};
33465	
33466	
33467	var _htmlNumeric = function ( d, decimalPoint, formatted ) {
33468		if ( _empty( d ) ) {
33469			return true;
33470		}
33471	
33472		var html = _isHtml( d );
33473		return ! html ?
33474			null :
33475			_isNumber( _stripHtml( d ), decimalPoint, formatted ) ?
33476				true :
33477				null;
33478	};
33479	
33480	
33481	var _pluck = function ( a, prop, prop2 ) {
33482		var out = [];
33483		var i=0, ien=a.length;
33484	
33485		// Could have the test in the loop for slightly smaller code, but speed
33486		// is essential here
33487		if ( prop2 !== undefined ) {
33488			for ( ; i<ien ; i++ ) {
33489				if ( a[i] && a[i][ prop ] ) {
33490					out.push( a[i][ prop ][ prop2 ] );
33491				}
33492			}
33493		}
33494		else {
33495			for ( ; i<ien ; i++ ) {
33496				if ( a[i] ) {
33497					out.push( a[i][ prop ] );
33498				}
33499			}
33500		}
33501	
33502		return out;
33503	};
33504	
33505	
33506	// Basically the same as _pluck, but rather than looping over `a` we use `order`
33507	// as the indexes to pick from `a`
33508	var _pluck_order = function ( a, order, prop, prop2 )
33509	{
33510		var out = [];
33511		var i=0, ien=order.length;
33512	
33513		// Could have the test in the loop for slightly smaller code, but speed
33514		// is essential here
33515		if ( prop2 !== undefined ) {
33516			for ( ; i<ien ; i++ ) {
33517				if ( a[ order[i] ][ prop ] ) {
33518					out.push( a[ order[i] ][ prop ][ prop2 ] );
33519				}
33520			}
33521		}
33522		else {
33523			for ( ; i<ien ; i++ ) {
33524				out.push( a[ order[i] ][ prop ] );
33525			}
33526		}
33527	
33528		return out;
33529	};
33530	
33531	
33532	var _range = function ( len, start )
33533	{
33534		var out = [];
33535		var end;
33536	
33537		if ( start === undefined ) {
33538			start = 0;
33539			end = len;
33540		}
33541		else {
33542			end = start;
33543			start = len;
33544		}
33545	
33546		for ( var i=start ; i<end ; i++ ) {
33547			out.push( i );
33548		}
33549	
33550		return out;
33551	};
33552	
33553	
33554	var _removeEmpty = function ( a )
33555	{
33556		var out = [];
33557	
33558		for ( var i=0, ien=a.length ; i<ien ; i++ ) {
33559			if ( a[i] ) { // careful - will remove all falsy values!
33560				out.push( a[i] );
33561			}
33562		}
33563	
33564		return out;
33565	};
33566	
33567	
33568	var _stripHtml = function ( d ) {
33569		return d
33570			.replace( _re_html, '' ) // Complete tags
33571			.replace(/<script/i, ''); // Safety for incomplete script tag
33572	};
33573	
33574	
33575	/**
33576	 * Determine if all values in the array are unique. This means we can short
33577	 * cut the _unique method at the cost of a single loop. A sorted array is used
33578	 * to easily check the values.
33579	 *
33580	 * @param  {array} src Source array
33581	 * @return {boolean} true if all unique, false otherwise
33582	 * @ignore
33583	 */
33584	var _areAllUnique = function ( src ) {
33585		if ( src.length < 2 ) {
33586			return true;
33587		}
33588	
33589		var sorted = src.slice().sort();
33590		var last = sorted[0];
33591	
33592		for ( var i=1, ien=sorted.length ; i<ien ; i++ ) {
33593			if ( sorted[i] === last ) {
33594				return false;
33595			}
33596	
33597			last = sorted[i];
33598		}
33599	
33600		return true;
33601	};
33602	
33603	
33604	/**
33605	 * Find the unique elements in a source array.
33606	 *
33607	 * @param  {array} src Source array
33608	 * @return {array} Array of unique items
33609	 * @ignore
33610	 */
33611	var _unique = function ( src )
33612	{
33613		if ( _areAllUnique( src ) ) {
33614			return src.slice();
33615		}
33616	
33617		// A faster unique method is to use object keys to identify used values,
33618		// but this doesn't work with arrays or objects, which we must also
33619		// consider. See jsperf.com/compare-array-unique-versions/4 for more
33620		// information.
33621		var
33622			out = [],
33623			val,
33624			i, ien=src.length,
33625			j, k=0;
33626	
33627		again: for ( i=0 ; i<ien ; i++ ) {
33628			val = src[i];
33629	
33630			for ( j=0 ; j<k ; j++ ) {
33631				if ( out[j] === val ) {
33632					continue again;
33633				}
33634			}
33635	
33636			out.push( val );
33637			k++;
33638		}
33639	
33640		return out;
33641	};
33642	
33643	// Surprisingly this is faster than [].concat.apply
33644	// https://jsperf.com/flatten-an-array-loop-vs-reduce/2
33645	var _flatten = function (out, val) {
33646		if (Array.isArray(val)) {
33647			for (var i=0 ; i<val.length ; i++) {
33648				_flatten(out, val[i]);
33649			}
33650		}
33651		else {
33652			out.push(val);
33653		}
33654	  
33655		return out;
33656	}
33657	
33658	var _includes = function (search, start) {
33659		if (start === undefined) {
33660			start = 0;
33661		}
33662	
33663		return this.indexOf(search, start) !== -1;	
33664	};
33665	
33666	// Array.isArray polyfill.
33667	// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
33668	if (! Array.isArray) {
33669	    Array.isArray = function(arg) {
33670	        return Object.prototype.toString.call(arg) === '[object Array]';
33671	    };
33672	}
33673	
33674	if (! Array.prototype.includes) {
33675		Array.prototype.includes = _includes;
33676	}
33677	
33678	// .trim() polyfill
33679	// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim
33680	if (!String.prototype.trim) {
33681	  String.prototype.trim = function () {
33682	    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
33683	  };
33684	}
33685	
33686	if (! String.prototype.includes) {
33687		String.prototype.includes = _includes;
33688	}
33689	
33690	/**
33691	 * DataTables utility methods
33692	 * 
33693	 * This namespace provides helper methods that DataTables uses internally to
33694	 * create a DataTable, but which are not exclusively used only for DataTables.
33695	 * These methods can be used by extension authors to save the duplication of
33696	 * code.
33697	 *
33698	 *  @namespace
33699	 */
33700	DataTable.util = {
33701		/**
33702		 * Throttle the calls to a function. Arguments and context are maintained
33703		 * for the throttled function.
33704		 *
33705		 * @param {function} fn Function to be called
33706		 * @param {integer} freq Call frequency in mS
33707		 * @return {function} Wrapped function
33708		 */
33709		throttle: function ( fn, freq ) {
33710			var
33711				frequency = freq !== undefined ? freq : 200,
33712				last,
33713				timer;
33714	
33715			return function () {
33716				var
33717					that = this,
33718					now  = +new Date(),
33719					args = arguments;
33720	
33721				if ( last && now < last + frequency ) {
33722					clearTimeout( timer );
33723	
33724					timer = setTimeout( function () {
33725						last = undefined;
33726						fn.apply( that, args );
33727					}, frequency );
33728				}
33729				else {
33730					last = now;
33731					fn.apply( that, args );
33732				}
33733			};
33734		},
33735	
33736	
33737		/**
33738		 * Escape a string such that it can be used in a regular expression
33739		 *
33740		 *  @param {string} val string to escape
33741		 *  @returns {string} escaped string
33742		 */
33743		escapeRegex: function ( val ) {
33744			return val.replace( _re_escape_regex, '\\$1' );
33745		},
33746	
33747		/**
33748		 * Create a function that will write to a nested object or array
33749		 * @param {*} source JSON notation string
33750		 * @returns Write function
33751		 */
33752		set: function ( source ) {
33753			if ( $.isPlainObject( source ) ) {
33754				/* Unlike get, only the underscore (global) option is used for for
33755				 * setting data since we don't know the type here. This is why an object
33756				 * option is not documented for `mData` (which is read/write), but it is
33757				 * for `mRender` which is read only.
33758				 */
33759				return DataTable.util.set( source._ );
33760			}
33761			else if ( source === null ) {
33762				// Nothing to do when the data source is null
33763				return function () {};
33764			}
33765			else if ( typeof source === 'function' ) {
33766				return function (data, val, meta) {
33767					source( data, 'set', val, meta );
33768				};
33769			}
33770			else if ( typeof source === 'string' && (source.indexOf('.') !== -1 ||
33771					  source.indexOf('[') !== -1 || source.indexOf('(') !== -1) )
33772			{
33773				// Like the get, we need to get data from a nested object
33774				var setData = function (data, val, src) {
33775					var a = _fnSplitObjNotation( src ), b;
33776					var aLast = a[a.length-1];
33777					var arrayNotation, funcNotation, o, innerSrc;
33778		
33779					for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ ) {
33780						// Protect against prototype pollution
33781						if (a[i] === '__proto__' || a[i] === 'constructor') {
33782							throw new Error('Cannot set prototype values');
33783						}
33784		
33785						// Check if we are dealing with an array notation request
33786						arrayNotation = a[i].match(__reArray);
33787						funcNotation = a[i].match(__reFn);
33788		
33789						if ( arrayNotation ) {
33790							a[i] = a[i].replace(__reArray, '');
33791							data[ a[i] ] = [];
33792		
33793							// Get the remainder of the nested object to set so we can recurse
33794							b = a.slice();
33795							b.splice( 0, i+1 );
33796							innerSrc = b.join('.');
33797		
33798							// Traverse each entry in the array setting the properties requested
33799							if ( Array.isArray( val ) ) {
33800								for ( var j=0, jLen=val.length ; j<jLen ; j++ ) {
33801									o = {};
33802									setData( o, val[j], innerSrc );
33803									data[ a[i] ].push( o );
33804								}
33805							}
33806							else {
33807								// We've been asked to save data to an array, but it
33808								// isn't array data to be saved. Best that can be done
33809								// is to just save the value.
33810								data[ a[i] ] = val;
33811							}
33812		
33813							// The inner call to setData has already traversed through the remainder
33814							// of the source and has set the data, thus we can exit here
33815							return;
33816						}
33817						else if ( funcNotation ) {
33818							// Function call
33819							a[i] = a[i].replace(__reFn, '');
33820							data = data[ a[i] ]( val );
33821						}
33822		
33823						// If the nested object doesn't currently exist - since we are
33824						// trying to set the value - create it
33825						if ( data[ a[i] ] === null || data[ a[i] ] === undefined ) {
33826							data[ a[i] ] = {};
33827						}
33828						data = data[ a[i] ];
33829					}
33830		
33831					// Last item in the input - i.e, the actual set
33832					if ( aLast.match(__reFn ) ) {
33833						// Function call
33834						data = data[ aLast.replace(__reFn, '') ]( val );
33835					}
33836					else {
33837						// If array notation is used, we just want to strip it and use the property name
33838						// and assign the value. If it isn't used, then we get the result we want anyway
33839						data[ aLast.replace(__reArray, '') ] = val;
33840					}
33841				};
33842		
33843				return function (data, val) { // meta is also passed in, but not used
33844					return setData( data, val, source );
33845				};
33846			}
33847			else {
33848				// Array or flat object mapping
33849				return function (data, val) { // meta is also passed in, but not used
33850					data[source] = val;
33851				};
33852			}
33853		},
33854	
33855		/**
33856		 * Create a function that will read nested objects from arrays, based on JSON notation
33857		 * @param {*} source JSON notation string
33858		 * @returns Value read
33859		 */
33860		get: function ( source ) {
33861			if ( $.isPlainObject( source ) ) {
33862				// Build an object of get functions, and wrap them in a single call
33863				var o = {};
33864				$.each( source, function (key, val) {
33865					if ( val ) {
33866						o[key] = DataTable.util.get( val );
33867					}
33868				} );
33869		
33870				return function (data, type, row, meta) {
33871					var t = o[type] || o._;
33872					return t !== undefined ?
33873						t(data, type, row, meta) :
33874						data;
33875				};
33876			}
33877			else if ( source === null ) {
33878				// Give an empty string for rendering / sorting etc
33879				return function (data) { // type, row and meta also passed, but not used
33880					return data;
33881				};
33882			}
33883			else if ( typeof source === 'function' ) {
33884				return function (data, type, row, meta) {
33885					return source( data, type, row, meta );
33886				};
33887			}
33888			else if ( typeof source === 'string' && (source.indexOf('.') !== -1 ||
33889					  source.indexOf('[') !== -1 || source.indexOf('(') !== -1) )
33890			{
33891				/* If there is a . in the source string then the data source is in a
33892				 * nested object so we loop over the data for each level to get the next
33893				 * level down. On each loop we test for undefined, and if found immediately
33894				 * return. This allows entire objects to be missing and sDefaultContent to
33895				 * be used if defined, rather than throwing an error
33896				 */
33897				var fetchData = function (data, type, src) {
33898					var arrayNotation, funcNotation, out, innerSrc;
33899		
33900					if ( src !== "" ) {
33901						var a = _fnSplitObjNotation( src );
33902		
33903						for ( var i=0, iLen=a.length ; i<iLen ; i++ ) {
33904							// Check if we are dealing with special notation
33905							arrayNotation = a[i].match(__reArray);
33906							funcNotation = a[i].match(__reFn);
33907		
33908							if ( arrayNotation ) {
33909								// Array notation
33910								a[i] = a[i].replace(__reArray, '');
33911		
33912								// Condition allows simply [] to be passed in
33913								if ( a[i] !== "" ) {
33914									data = data[ a[i] ];
33915								}
33916								out = [];
33917		
33918								// Get the remainder of the nested object to get
33919								a.splice( 0, i+1 );
33920								innerSrc = a.join('.');
33921		
33922								// Traverse each entry in the array getting the properties requested
33923								if ( Array.isArray( data ) ) {
33924									for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
33925										out.push( fetchData( data[j], type, innerSrc ) );
33926									}
33927								}
33928		
33929								// If a string is given in between the array notation indicators, that
33930								// is used to join the strings together, otherwise an array is returned
33931								var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
33932								data = (join==="") ? out : out.join(join);
33933		
33934								// The inner call to fetchData has already traversed through the remainder
33935								// of the source requested, so we exit from the loop
33936								break;
33937							}
33938							else if ( funcNotation ) {
33939								// Function call
33940								a[i] = a[i].replace(__reFn, '');
33941								data = data[ a[i] ]();
33942								continue;
33943							}
33944		
33945							if (data === null || data[ a[i] ] === null) {
33946								return null;
33947							}
33948							else if ( data === undefined || data[ a[i] ] === undefined ) {
33949								return undefined;
33950							}
33951	
33952							data = data[ a[i] ];
33953						}
33954					}
33955		
33956					return data;
33957				};
33958		
33959				return function (data, type) { // row and meta also passed, but not used
33960					return fetchData( data, type, source );
33961				};
33962			}
33963			else {
33964				// Array or flat object mapping
33965				return function (data, type) { // row and meta also passed, but not used
33966					return data[source];
33967				};
33968			}
33969		}
33970	};
33971	
33972	
33973	
33974	/**
33975	 * Create a mapping object that allows camel case parameters to be looked up
33976	 * for their Hungarian counterparts. The mapping is stored in a private
33977	 * parameter called `_hungarianMap` which can be accessed on the source object.
33978	 *  @param {object} o
33979	 *  @memberof DataTable#oApi
33980	 */
33981	function _fnHungarianMap ( o )
33982	{
33983		var
33984			hungarian = 'a aa ai ao as b fn i m o s ',
33985			match,
33986			newKey,
33987			map = {};
33988	
33989		$.each( o, function (key, val) {
33990			match = key.match(/^([^A-Z]+?)([A-Z])/);
33991	
33992			if ( match && hungarian.indexOf(match[1]+' ') !== -1 )
33993			{
33994				newKey = key.replace( match[0], match[2].toLowerCase() );
33995				map[ newKey ] = key;
33996	
33997				if ( match[1] === 'o' )
33998				{
33999					_fnHungarianMap( o[key] );
34000				}
34001			}
34002		} );
34003	
34004		o._hungarianMap = map;
34005	}
34006	
34007	
34008	/**
34009	 * Convert from camel case parameters to Hungarian, based on a Hungarian map
34010	 * created by _fnHungarianMap.
34011	 *  @param {object} src The model object which holds all parameters that can be
34012	 *    mapped.
34013	 *  @param {object} user The object to convert from camel case to Hungarian.
34014	 *  @param {boolean} force When set to `true`, properties which already have a
34015	 *    Hungarian value in the `user` object will be overwritten. Otherwise they
34016	 *    won't be.
34017	 *  @memberof DataTable#oApi
34018	 */
34019	function _fnCamelToHungarian ( src, user, force )
34020	{
34021		if ( ! src._hungarianMap ) {
34022			_fnHungarianMap( src );
34023		}
34024	
34025		var hungarianKey;
34026	
34027		$.each( user, function (key, val) {
34028			hungarianKey = src._hungarianMap[ key ];
34029	
34030			if ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )
34031			{
34032				// For objects, we need to buzz down into the object to copy parameters
34033				if ( hungarianKey.charAt(0) === 'o' )
34034				{
34035					// Copy the camelCase options over to the hungarian
34036					if ( ! user[ hungarianKey ] ) {
34037						user[ hungarianKey ] = {};
34038					}
34039					$.extend( true, user[hungarianKey], user[key] );
34040	
34041					_fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );
34042				}
34043				else {
34044					user[hungarianKey] = user[ key ];
34045				}
34046			}
34047		} );
34048	}
34049	
34050	
34051	/**
34052	 * Language compatibility - when certain options are given, and others aren't, we
34053	 * need to duplicate the values over, in order to provide backwards compatibility
34054	 * with older language files.
34055	 *  @param {object} oSettings dataTables settings object
34056	 *  @memberof DataTable#oApi
34057	 */
34058	function _fnLanguageCompat( lang )
34059	{
34060		// Note the use of the Hungarian notation for the parameters in this method as
34061		// this is called after the mapping of camelCase to Hungarian
34062		var defaults = DataTable.defaults.oLanguage;
34063	
34064		// Default mapping
34065		var defaultDecimal = defaults.sDecimal;
34066		if ( defaultDecimal ) {
34067			_addNumericSort( defaultDecimal );
34068		}
34069	
34070		if ( lang ) {
34071			var zeroRecords = lang.sZeroRecords;
34072	
34073			// Backwards compatibility - if there is no sEmptyTable given, then use the same as
34074			// sZeroRecords - assuming that is given.
34075			if ( ! lang.sEmptyTable && zeroRecords &&
34076				defaults.sEmptyTable === "No data available in table" )
34077			{
34078				_fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
34079			}
34080	
34081			// Likewise with loading records
34082			if ( ! lang.sLoadingRecords && zeroRecords &&
34083				defaults.sLoadingRecords === "Loading..." )
34084			{
34085				_fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
34086			}
34087	
34088			// Old parameter name of the thousands separator mapped onto the new
34089			if ( lang.sInfoThousands ) {
34090				lang.sThousands = lang.sInfoThousands;
34091			}
34092	
34093			var decimal = lang.sDecimal;
34094			if ( decimal && defaultDecimal !== decimal ) {
34095				_addNumericSort( decimal );
34096			}
34097		}
34098	}
34099	
34100	
34101	/**
34102	 * Map one parameter onto another
34103	 *  @param {object} o Object to map
34104	 *  @param {*} knew The new parameter name
34105	 *  @param {*} old The old parameter name
34106	 */
34107	var _fnCompatMap = function ( o, knew, old ) {
34108		if ( o[ knew ] !== undefined ) {
34109			o[ old ] = o[ knew ];
34110		}
34111	};
34112	
34113	
34114	/**
34115	 * Provide backwards compatibility for the main DT options. Note that the new
34116	 * options are mapped onto the old parameters, so this is an external interface
34117	 * change only.
34118	 *  @param {object} init Object to map
34119	 */
34120	function _fnCompatOpts ( init )
34121	{
34122		_fnCompatMap( init, 'ordering',      'bSort' );
34123		_fnCompatMap( init, 'orderMulti',    'bSortMulti' );
34124		_fnCompatMap( init, 'orderClasses',  'bSortClasses' );
34125		_fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );
34126		_fnCompatMap( init, 'order',         'aaSorting' );
34127		_fnCompatMap( init, 'orderFixed',    'aaSortingFixed' );
34128		_fnCompatMap( init, 'paging',        'bPaginate' );
34129		_fnCompatMap( init, 'pagingType',    'sPaginationType' );
34130		_fnCompatMap( init, 'pageLength',    'iDisplayLength' );
34131		_fnCompatMap( init, 'searching',     'bFilter' );
34132	
34133		// Boolean initialisation of x-scrolling
34134		if ( typeof init.sScrollX === 'boolean' ) {
34135			init.sScrollX = init.sScrollX ? '100%' : '';
34136		}
34137		if ( typeof init.scrollX === 'boolean' ) {
34138			init.scrollX = init.scrollX ? '100%' : '';
34139		}
34140	
34141		// Column search objects are in an array, so it needs to be converted
34142		// element by element
34143		var searchCols = init.aoSearchCols;
34144	
34145		if ( searchCols ) {
34146			for ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {
34147				if ( searchCols[i] ) {
34148					_fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );
34149				}
34150			}
34151		}
34152	}
34153	
34154	
34155	/**
34156	 * Provide backwards compatibility for column options. Note that the new options
34157	 * are mapped onto the old parameters, so this is an external interface change
34158	 * only.
34159	 *  @param {object} init Object to map
34160	 */
34161	function _fnCompatCols ( init )
34162	{
34163		_fnCompatMap( init, 'orderable',     'bSortable' );
34164		_fnCompatMap( init, 'orderData',     'aDataSort' );
34165		_fnCompatMap( init, 'orderSequence', 'asSorting' );
34166		_fnCompatMap( init, 'orderDataType', 'sortDataType' );
34167	
34168		// orderData can be given as an integer
34169		var dataSort = init.aDataSort;
34170		if ( typeof dataSort === 'number' && ! Array.isArray( dataSort ) ) {
34171			init.aDataSort = [ dataSort ];
34172		}
34173	}
34174	
34175	
34176	/**
34177	 * Browser feature detection for capabilities, quirks
34178	 *  @param {object} settings dataTables settings object
34179	 *  @memberof DataTable#oApi
34180	 */
34181	function _fnBrowserDetect( settings )
34182	{
34183		// We don't need to do this every time DataTables is constructed, the values
34184		// calculated are specific to the browser and OS configuration which we
34185		// don't expect to change between initialisations
34186		if ( ! DataTable.__browser ) {
34187			var browser = {};
34188			DataTable.__browser = browser;
34189	
34190			// Scrolling feature / quirks detection
34191			var n = $('<div/>')
34192				.css( {
34193					position: 'fixed',
34194					top: 0,
34195					left: $(window).scrollLeft()*-1, // allow for scrolling
34196					height: 1,
34197					width: 1,
34198					overflow: 'hidden'
34199				} )
34200				.append(
34201					$('<div/>')
34202						.css( {
34203							position: 'absolute',
34204							top: 1,
34205							left: 1,
34206							width: 100,
34207							overflow: 'scroll'
34208						} )
34209						.append(
34210							$('<div/>')
34211								.css( {
34212									width: '100%',
34213									height: 10
34214								} )
34215						)
34216				)
34217				.appendTo( 'body' );
34218	
34219			var outer = n.children();
34220			var inner = outer.children();
34221	
34222			// Numbers below, in order, are:
34223			// inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth
34224			//
34225			// IE6 XP:                           100 100 100  83
34226			// IE7 Vista:                        100 100 100  83
34227			// IE 8+ Windows:                     83  83 100  83
34228			// Evergreen Windows:                 83  83 100  83
34229			// Evergreen Mac with scrollbars:     85  85 100  85
34230			// Evergreen Mac without scrollbars: 100 100 100 100
34231	
34232			// Get scrollbar width
34233			browser.barWidth = outer[0].offsetWidth - outer[0].clientWidth;
34234	
34235			// IE6/7 will oversize a width 100% element inside a scrolling element, to
34236			// include the width of the scrollbar, while other browsers ensure the inner
34237			// element is contained without forcing scrolling
34238			browser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100;
34239	
34240			// In rtl text layout, some browsers (most, but not all) will place the
34241			// scrollbar on the left, rather than the right.
34242			browser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1;
34243	
34244			// IE8- don't provide height and width for getBoundingClientRect
34245			browser.bBounding = n[0].getBoundingClientRect().width ? true : false;
34246	
34247			n.remove();
34248		}
34249	
34250		$.extend( settings.oBrowser, DataTable.__browser );
34251		settings.oScroll.iBarWidth = DataTable.__browser.barWidth;
34252	}
34253	
34254	
34255	/**
34256	 * Array.prototype reduce[Right] method, used for browsers which don't support
34257	 * JS 1.6. Done this way to reduce code size, since we iterate either way
34258	 *  @param {object} settings dataTables settings object
34259	 *  @memberof DataTable#oApi
34260	 */
34261	function _fnReduce ( that, fn, init, start, end, inc )
34262	{
34263		var
34264			i = start,
34265			value,
34266			isSet = false;
34267	
34268		if ( init !== undefined ) {
34269			value = init;
34270			isSet = true;
34271		}
34272	
34273		while ( i !== end ) {
34274			if ( ! that.hasOwnProperty(i) ) {
34275				continue;
34276			}
34277	
34278			value = isSet ?
34279				fn( value, that[i], i, that ) :
34280				that[i];
34281	
34282			isSet = true;
34283			i += inc;
34284		}
34285	
34286		return value;
34287	}
34288	
34289	/**
34290	 * Add a column to the list used for the table with default values
34291	 *  @param {object} oSettings dataTables settings object
34292	 *  @param {node} nTh The th element for this column
34293	 *  @memberof DataTable#oApi
34294	 */
34295	function _fnAddColumn( oSettings, nTh )
34296	{
34297		// Add column to aoColumns array
34298		var oDefaults = DataTable.defaults.column;
34299		var iCol = oSettings.aoColumns.length;
34300		var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
34301			"nTh": nTh ? nTh : document.createElement('th'),
34302			"sTitle":    oDefaults.sTitle    ? oDefaults.sTitle    : nTh ? nTh.innerHTML : '',
34303			"aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
34304			"mData": oDefaults.mData ? oDefaults.mData : iCol,
34305			idx: iCol
34306		} );
34307		oSettings.aoColumns.push( oCol );
34308	
34309		// Add search object for column specific search. Note that the `searchCols[ iCol ]`
34310		// passed into extend can be undefined. This allows the user to give a default
34311		// with only some of the parameters defined, and also not give a default
34312		var searchCols = oSettings.aoPreSearchCols;
34313		searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );
34314	
34315		// Use the default column options function to initialise classes etc
34316		_fnColumnOptions( oSettings, iCol, $(nTh).data() );
34317	}
34318	
34319	
34320	/**
34321	 * Apply options for a column
34322	 *  @param {object} oSettings dataTables settings object
34323	 *  @param {int} iCol column index to consider
34324	 *  @param {object} oOptions object with sType, bVisible and bSearchable etc
34325	 *  @memberof DataTable#oApi
34326	 */
34327	function _fnColumnOptions( oSettings, iCol, oOptions )
34328	{
34329		var oCol = oSettings.aoColumns[ iCol ];
34330		var oClasses = oSettings.oClasses;
34331		var th = $(oCol.nTh);
34332	
34333		// Try to get width information from the DOM. We can't get it from CSS
34334		// as we'd need to parse the CSS stylesheet. `width` option can override
34335		if ( ! oCol.sWidthOrig ) {
34336			// Width attribute
34337			oCol.sWidthOrig = th.attr('width') || null;
34338	
34339			// Style attribute
34340			var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/);
34341			if ( t ) {
34342				oCol.sWidthOrig = t[1];
34343			}
34344		}
34345	
34346		/* User specified column options */
34347		if ( oOptions !== undefined && oOptions !== null )
34348		{
34349			// Backwards compatibility
34350			_fnCompatCols( oOptions );
34351	
34352			// Map camel case parameters to their Hungarian counterparts
34353			_fnCamelToHungarian( DataTable.defaults.column, oOptions, true );
34354	
34355			/* Backwards compatibility for mDataProp */
34356			if ( oOptions.mDataProp !== undefined && !oOptions.mData )
34357			{
34358				oOptions.mData = oOptions.mDataProp;
34359			}
34360	
34361			if ( oOptions.sType )
34362			{
34363				oCol._sManualType = oOptions.sType;
34364			}
34365	
34366			// `class` is a reserved word in Javascript, so we need to provide
34367			// the ability to use a valid name for the camel case input
34368			if ( oOptions.className && ! oOptions.sClass )
34369			{
34370				oOptions.sClass = oOptions.className;
34371			}
34372			if ( oOptions.sClass ) {
34373				th.addClass( oOptions.sClass );
34374			}
34375	
34376			var origClass = oCol.sClass;
34377	
34378			$.extend( oCol, oOptions );
34379			_fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
34380	
34381			// Merge class from previously defined classes with this one, rather than just
34382			// overwriting it in the extend above
34383			if (origClass !== oCol.sClass) {
34384				oCol.sClass = origClass + ' ' + oCol.sClass;
34385			}
34386	
34387			/* iDataSort to be applied (backwards compatibility), but aDataSort will take
34388			 * priority if defined
34389			 */
34390			if ( oOptions.iDataSort !== undefined )
34391			{
34392				oCol.aDataSort = [ oOptions.iDataSort ];
34393			}
34394			_fnMap( oCol, oOptions, "aDataSort" );
34395	
34395
34396			// Fall back to the aria-label attribute on the table header if no ariaTitle is
34397			// provided.
34398			if (! oCol.ariaTitle) {
34399				oCol.ariaTitle = th.attr("aria-label");
34400			}
vendor: 54,944 bytes, lines 34400-36364
34400
34401		}
34402	
34403		/* Cache the data get and set functions for speed */
34404		var mDataSrc = oCol.mData;
34405		var mData = _fnGetObjectDataFn( mDataSrc );
34406		var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
34407	
34408		var attrTest = function( src ) {
34409			return typeof src === 'string' && src.indexOf('@') !== -1;
34410		};
34411		oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (
34412			attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)
34413		);
34414		oCol._setter = null;
34415	
34416		oCol.fnGetData = function (rowData, type, meta) {
34417			var innerData = mData( rowData, type, undefined, meta );
34418	
34419			return mRender && type ?
34420				mRender( innerData, type, rowData, meta ) :
34421				innerData;
34422		};
34423		oCol.fnSetData = function ( rowData, val, meta ) {
34424			return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );
34425		};
34426	
34427		// Indicate if DataTables should read DOM data as an object or array
34428		// Used in _fnGetRowElements
34429		if ( typeof mDataSrc !== 'number' && ! oCol._isArrayHost ) {
34430			oSettings._rowReadObject = true;
34431		}
34432	
34433		/* Feature sorting overrides column specific when off */
34434		if ( !oSettings.oFeatures.bSort )
34435		{
34436			oCol.bSortable = false;
34437			th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called
34438		}
34439	
34440		/* Check that the class assignment is correct for sorting */
34441		var bAsc = $.inArray('asc', oCol.asSorting) !== -1;
34442		var bDesc = $.inArray('desc', oCol.asSorting) !== -1;
34443		if ( !oCol.bSortable || (!bAsc && !bDesc) )
34444		{
34445			oCol.sSortingClass = oClasses.sSortableNone;
34446			oCol.sSortingClassJUI = "";
34447		}
34448		else if ( bAsc && !bDesc )
34449		{
34450			oCol.sSortingClass = oClasses.sSortableAsc;
34451			oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed;
34452		}
34453		else if ( !bAsc && bDesc )
34454		{
34455			oCol.sSortingClass = oClasses.sSortableDesc;
34456			oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed;
34457		}
34458		else
34459		{
34460			oCol.sSortingClass = oClasses.sSortable;
34461			oCol.sSortingClassJUI = oClasses.sSortJUI;
34462		}
34463	}
34464	
34465	
34466	/**
34467	 * Adjust the table column widths for new data. Note: you would probably want to
34468	 * do a redraw after calling this function!
34469	 *  @param {object} settings dataTables settings object
34470	 *  @memberof DataTable#oApi
34471	 */
34472	function _fnAdjustColumnSizing ( settings )
34473	{
34474		/* Not interested in doing column width calculation if auto-width is disabled */
34475		if ( settings.oFeatures.bAutoWidth !== false )
34476		{
34477			var columns = settings.aoColumns;
34478	
34479			_fnCalculateColumnWidths( settings );
34480			for ( var i=0 , iLen=columns.length ; i<iLen ; i++ )
34481			{
34482				columns[i].nTh.style.width = columns[i].sWidth;
34483			}
34484		}
34485	
34486		var scroll = settings.oScroll;
34487		if ( scroll.sY !== '' || scroll.sX !== '')
34488		{
34489			_fnScrollDraw( settings );
34490		}
34491	
34492		_fnCallbackFire( settings, null, 'column-sizing', [settings] );
34493	}
34494	
34495	
34496	/**
34497	 * Convert the index of a visible column to the index in the data array (take account
34498	 * of hidden columns)
34499	 *  @param {object} oSettings dataTables settings object
34500	 *  @param {int} iMatch Visible column index to lookup
34501	 *  @returns {int} i the data index
34502	 *  @memberof DataTable#oApi
34503	 */
34504	function _fnVisibleToColumnIndex( oSettings, iMatch )
34505	{
34506		var aiVis = _fnGetColumns( oSettings, 'bVisible' );
34507	
34508		return typeof aiVis[iMatch] === 'number' ?
34509			aiVis[iMatch] :
34510			null;
34511	}
34512	
34513	
34514	/**
34515	 * Convert the index of an index in the data array and convert it to the visible
34516	 *   column index (take account of hidden columns)
34517	 *  @param {int} iMatch Column index to lookup
34518	 *  @param {object} oSettings dataTables settings object
34519	 *  @returns {int} i the data index
34520	 *  @memberof DataTable#oApi
34521	 */
34522	function _fnColumnIndexToVisible( oSettings, iMatch )
34523	{
34524		var aiVis = _fnGetColumns( oSettings, 'bVisible' );
34525		var iPos = $.inArray( iMatch, aiVis );
34526	
34527		return iPos !== -1 ? iPos : null;
34528	}
34529	
34530	
34531	/**
34532	 * Get the number of visible columns
34533	 *  @param {object} oSettings dataTables settings object
34534	 *  @returns {int} i the number of visible columns
34535	 *  @memberof DataTable#oApi
34536	 */
34537	function _fnVisbleColumns( oSettings )
34538	{
34539		var vis = 0;
34540	
34541		// No reduce in IE8, use a loop for now
34542		$.each( oSettings.aoColumns, function ( i, col ) {
34543			if ( col.bVisible && $(col.nTh).css('display') !== 'none' ) {
34544				vis++;
34545			}
34546		} );
34547	
34548		return vis;
34549	}
34550	
34551	
34552	/**
34553	 * Get an array of column indexes that match a given property
34554	 *  @param {object} oSettings dataTables settings object
34555	 *  @param {string} sParam Parameter in aoColumns to look for - typically
34556	 *    bVisible or bSearchable
34557	 *  @returns {array} Array of indexes with matched properties
34558	 *  @memberof DataTable#oApi
34559	 */
34560	function _fnGetColumns( oSettings, sParam )
34561	{
34562		var a = [];
34563	
34564		$.map( oSettings.aoColumns, function(val, i) {
34565			if ( val[sParam] ) {
34566				a.push( i );
34567			}
34568		} );
34569	
34570		return a;
34571	}
34572	
34573	
34574	/**
34575	 * Calculate the 'type' of a column
34576	 *  @param {object} settings dataTables settings object
34577	 *  @memberof DataTable#oApi
34578	 */
34579	function _fnColumnTypes ( settings )
34580	{
34581		var columns = settings.aoColumns;
34582		var data = settings.aoData;
34583		var types = DataTable.ext.type.detect;
34584		var i, ien, j, jen, k, ken;
34585		var col, cell, detectedType, cache;
34586	
34587		// For each column, spin over the 
34588		for ( i=0, ien=columns.length ; i<ien ; i++ ) {
34589			col = columns[i];
34590			cache = [];
34591	
34592			if ( ! col.sType && col._sManualType ) {
34593				col.sType = col._sManualType;
34594			}
34595			else if ( ! col.sType ) {
34596				for ( j=0, jen=types.length ; j<jen ; j++ ) {
34597					for ( k=0, ken=data.length ; k<ken ; k++ ) {
34598						// Use a cache array so we only need to get the type data
34599						// from the formatter once (when using multiple detectors)
34600						if ( cache[k] === undefined ) {
34601							cache[k] = _fnGetCellData( settings, k, i, 'type' );
34602						}
34603	
34604						detectedType = types[j]( cache[k], settings );
34605	
34606						// If null, then this type can't apply to this column, so
34607						// rather than testing all cells, break out. There is an
34608						// exception for the last type which is `html`. We need to
34609						// scan all rows since it is possible to mix string and HTML
34610						// types
34611						if ( ! detectedType && j !== types.length-1 ) {
34612							break;
34613						}
34614	
34615						// Only a single match is needed for html type since it is
34616						// bottom of the pile and very similar to string - but it
34617						// must not be empty
34618						if ( detectedType === 'html' && ! _empty(cache[k]) ) {
34619							break;
34620						}
34621					}
34622	
34623					// Type is valid for all data points in the column - use this
34624					// type
34625					if ( detectedType ) {
34626						col.sType = detectedType;
34627						break;
34628					}
34629				}
34630	
34631				// Fall back - if no type was detected, always use string
34632				if ( ! col.sType ) {
34633					col.sType = 'string';
34634				}
34635			}
34636		}
34637	}
34638	
34639	
34640	/**
34641	 * Take the column definitions and static columns arrays and calculate how
34642	 * they relate to column indexes. The callback function will then apply the
34643	 * definition found for a column to a suitable configuration object.
34644	 *  @param {object} oSettings dataTables settings object
34645	 *  @param {array} aoColDefs The aoColumnDefs array that is to be applied
34646	 *  @param {array} aoCols The aoColumns array that defines columns individually
34647	 *  @param {function} fn Callback function - takes two parameters, the calculated
34648	 *    column index and the definition for that column.
34649	 *  @memberof DataTable#oApi
34650	 */
34651	function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
34652	{
34653		var i, iLen, j, jLen, k, kLen, def;
34654		var columns = oSettings.aoColumns;
34655	
34656		// Column definitions with aTargets
34657		if ( aoColDefs )
34658		{
34659			/* Loop over the definitions array - loop in reverse so first instance has priority */
34660			for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
34661			{
34662				def = aoColDefs[i];
34663	
34664				/* Each definition can target multiple columns, as it is an array */
34665				var aTargets = def.target !== undefined
34666					? def.target
34667					: def.targets !== undefined
34668						? def.targets
34669						: def.aTargets;
34670	
34671				if ( ! Array.isArray( aTargets ) )
34672				{
34673					aTargets = [ aTargets ];
34674				}
34675	
34676				for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
34677				{
34678					if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
34679					{
34680						/* Add columns that we don't yet know about */
34681						while( columns.length <= aTargets[j] )
34682						{
34683							_fnAddColumn( oSettings );
34684						}
34685	
34686						/* Integer, basic index */
34687						fn( aTargets[j], def );
34688					}
34689					else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
34690					{
34691						/* Negative integer, right to left column counting */
34692						fn( columns.length+aTargets[j], def );
34693					}
34694					else if ( typeof aTargets[j] === 'string' )
34695					{
34696						/* Class name matching on TH element */
34697						for ( k=0, kLen=columns.length ; k<kLen ; k++ )
34698						{
34699							if ( aTargets[j] == "_all" ||
34700							     $(columns[k].nTh).hasClass( aTargets[j] ) )
34701							{
34702								fn( k, def );
34703							}
34704						}
34705					}
34706				}
34707			}
34708		}
34709	
34710		// Statically defined columns array
34711		if ( aoCols )
34712		{
34713			for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
34714			{
34715				fn( i, aoCols[i] );
34716			}
34717		}
34718	}
34719	
34720	/**
34721	 * Add a data array to the table, creating DOM node etc. This is the parallel to
34722	 * _fnGatherData, but for adding rows from a Javascript source, rather than a
34723	 * DOM source.
34724	 *  @param {object} oSettings dataTables settings object
34725	 *  @param {array} aData data array to be added
34726	 *  @param {node} [nTr] TR element to add to the table - optional. If not given,
34727	 *    DataTables will create a row automatically
34728	 *  @param {array} [anTds] Array of TD|TH elements for the row - must be given
34729	 *    if nTr is.
34730	 *  @returns {int} >=0 if successful (index of new aoData entry), -1 if failed
34731	 *  @memberof DataTable#oApi
34732	 */
34733	function _fnAddData ( oSettings, aDataIn, nTr, anTds )
34734	{
34735		/* Create the object for storing information about this new row */
34736		var iRow = oSettings.aoData.length;
34737		var oData = $.extend( true, {}, DataTable.models.oRow, {
34738			src: nTr ? 'dom' : 'data',
34739			idx: iRow
34740		} );
34741	
34742		oData._aData = aDataIn;
34743		oSettings.aoData.push( oData );
34744	
34745		/* Create the cells */
34746		var nTd, sThisType;
34747		var columns = oSettings.aoColumns;
34748	
34749		// Invalidate the column types as the new data needs to be revalidated
34750		for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
34751		{
34752			columns[i].sType = null;
34753		}
34754	
34755		/* Add to the display array */
34756		oSettings.aiDisplayMaster.push( iRow );
34757	
34758		var id = oSettings.rowIdFn( aDataIn );
34759		if ( id !== undefined ) {
34760			oSettings.aIds[ id ] = oData;
34761		}
34762	
34763		/* Create the DOM information, or register it if already present */
34764		if ( nTr || ! oSettings.oFeatures.bDeferRender )
34765		{
34766			_fnCreateTr( oSettings, iRow, nTr, anTds );
34767		}
34768	
34769		return iRow;
34770	}
34771	
34772	
34773	/**
34774	 * Add one or more TR elements to the table. Generally we'd expect to
34775	 * use this for reading data from a DOM sourced table, but it could be
34776	 * used for an TR element. Note that if a TR is given, it is used (i.e.
34777	 * it is not cloned).
34778	 *  @param {object} settings dataTables settings object
34779	 *  @param {array|node|jQuery} trs The TR element(s) to add to the table
34780	 *  @returns {array} Array of indexes for the added rows
34781	 *  @memberof DataTable#oApi
34782	 */
34783	function _fnAddTr( settings, trs )
34784	{
34785		var row;
34786	
34787		// Allow an individual node to be passed in
34788		if ( ! (trs instanceof $) ) {
34789			trs = $(trs);
34790		}
34791	
34792		return trs.map( function (i, el) {
34793			row = _fnGetRowElements( settings, el );
34794			return _fnAddData( settings, row.data, el, row.cells );
34795		} );
34796	}
34797	
34798	
34799	/**
34800	 * Take a TR element and convert it to an index in aoData
34801	 *  @param {object} oSettings dataTables settings object
34802	 *  @param {node} n the TR element to find
34803	 *  @returns {int} index if the node is found, null if not
34804	 *  @memberof DataTable#oApi
34805	 */
34806	function _fnNodeToDataIndex( oSettings, n )
34807	{
34808		return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;
34809	}
34810	
34811	
34812	/**
34813	 * Take a TD element and convert it into a column data index (not the visible index)
34814	 *  @param {object} oSettings dataTables settings object
34815	 *  @param {int} iRow The row number the TD/TH can be found in
34816	 *  @param {node} n The TD/TH element to find
34817	 *  @returns {int} index if the node is found, -1 if not
34818	 *  @memberof DataTable#oApi
34819	 */
34820	function _fnNodeToColumnIndex( oSettings, iRow, n )
34821	{
34822		return $.inArray( n, oSettings.aoData[ iRow ].anCells );
34823	}
34824	
34825	
34826	/**
34827	 * Get the data for a given cell from the internal cache, taking into account data mapping
34828	 *  @param {object} settings dataTables settings object
34829	 *  @param {int} rowIdx aoData row id
34830	 *  @param {int} colIdx Column index
34831	 *  @param {string} type data get type ('display', 'type' 'filter|search' 'sort|order')
34832	 *  @returns {*} Cell data
34833	 *  @memberof DataTable#oApi
34834	 */
34835	function _fnGetCellData( settings, rowIdx, colIdx, type )
34836	{
34837		if (type === 'search') {
34838			type = 'filter';
34839		}
34840		else if (type === 'order') {
34841			type = 'sort';
34842		}
34843	
34844		var draw           = settings.iDraw;
34845		var col            = settings.aoColumns[colIdx];
34846		var rowData        = settings.aoData[rowIdx]._aData;
34847		var defaultContent = col.sDefaultContent;
34848		var cellData       = col.fnGetData( rowData, type, {
34849			settings: settings,
34850			row:      rowIdx,
34851			col:      colIdx
34852		} );
34853	
34854		if ( cellData === undefined ) {
34855			if ( settings.iDrawError != draw && defaultContent === null ) {
34856				_fnLog( settings, 0, "Requested unknown parameter "+
34857					(typeof col.mData=='function' ? '{function}' : "'"+col.mData+"'")+
34858					" for row "+rowIdx+", column "+colIdx, 4 );
34859				settings.iDrawError = draw;
34860			}
34861			return defaultContent;
34862		}
34863	
34864		// When the data source is null and a specific data type is requested (i.e.
34865		// not the original data), we can use default column data
34866		if ( (cellData === rowData || cellData === null) && defaultContent !== null && type !== undefined ) {
34867			cellData = defaultContent;
34868		}
34869		else if ( typeof cellData === 'function' ) {
34870			// If the data source is a function, then we run it and use the return,
34871			// executing in the scope of the data object (for instances)
34872			return cellData.call( rowData );
34873		}
34874	
34875		if ( cellData === null && type === 'display' ) {
34876			return '';
34877		}
34878	
34879		if ( type === 'filter' ) {
34880			var fomatters = DataTable.ext.type.search;
34881	
34882			if ( fomatters[ col.sType ] ) {
34883				cellData = fomatters[ col.sType ]( cellData );
34884			}
34885		}
34886	
34887		return cellData;
34888	}
34889	
34890	
34891	/**
34892	 * Set the value for a specific cell, into the internal data cache
34893	 *  @param {object} settings dataTables settings object
34894	 *  @param {int} rowIdx aoData row id
34895	 *  @param {int} colIdx Column index
34896	 *  @param {*} val Value to set
34897	 *  @memberof DataTable#oApi
34898	 */
34899	function _fnSetCellData( settings, rowIdx, colIdx, val )
34900	{
34901		var col     = settings.aoColumns[colIdx];
34902		var rowData = settings.aoData[rowIdx]._aData;
34903	
34904		col.fnSetData( rowData, val, {
34905			settings: settings,
34906			row:      rowIdx,
34907			col:      colIdx
34908		}  );
34909	}
34910	
34911	
34912	// Private variable that is used to match action syntax in the data property object
34913	var __reArray = /\[.*?\]$/;
34914	var __reFn = /\(\)$/;
34915	
34916	/**
34917	 * Split string on periods, taking into account escaped periods
34918	 * @param  {string} str String to split
34919	 * @return {array} Split string
34920	 */
34921	function _fnSplitObjNotation( str )
34922	{
34923		return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) {
34924			return s.replace(/\\\./g, '.');
34925		} );
34926	}
34927	
34928	
34929	/**
34930	 * Return a function that can be used to get data from a source object, taking
34931	 * into account the ability to use nested objects as a source
34932	 *  @param {string|int|function} mSource The data source for the object
34933	 *  @returns {function} Data get function
34934	 *  @memberof DataTable#oApi
34935	 */
34936	var _fnGetObjectDataFn = DataTable.util.get;
34937	
34938	
34939	/**
34940	 * Return a function that can be used to set data from a source object, taking
34941	 * into account the ability to use nested objects as a source
34942	 *  @param {string|int|function} mSource The data source for the object
34943	 *  @returns {function} Data set function
34944	 *  @memberof DataTable#oApi
34945	 */
34946	var _fnSetObjectDataFn = DataTable.util.set;
34947	
34948	
34949	/**
34950	 * Return an array with the full table data
34951	 *  @param {object} oSettings dataTables settings object
34952	 *  @returns array {array} aData Master data array
34953	 *  @memberof DataTable#oApi
34954	 */
34955	function _fnGetDataMaster ( settings )
34956	{
34957		return _pluck( settings.aoData, '_aData' );
34958	}
34959	
34960	
34961	/**
34962	 * Nuke the table
34963	 *  @param {object} oSettings dataTables settings object
34964	 *  @memberof DataTable#oApi
34965	 */
34966	function _fnClearTable( settings )
34967	{
34968		settings.aoData.length = 0;
34969		settings.aiDisplayMaster.length = 0;
34970		settings.aiDisplay.length = 0;
34971		settings.aIds = {};
34972	}
34973	
34974	
34975	 /**
34976	 * Take an array of integers (index array) and remove a target integer (value - not
34977	 * the key!)
34978	 *  @param {array} a Index array to target
34979	 *  @param {int} iTarget value to find
34980	 *  @memberof DataTable#oApi
34981	 */
34982	function _fnDeleteIndex( a, iTarget, splice )
34983	{
34984		var iTargetIndex = -1;
34985	
34986		for ( var i=0, iLen=a.length ; i<iLen ; i++ )
34987		{
34988			if ( a[i] == iTarget )
34989			{
34990				iTargetIndex = i;
34991			}
34992			else if ( a[i] > iTarget )
34993			{
34994				a[i]--;
34995			}
34996		}
34997	
34998		if ( iTargetIndex != -1 && splice === undefined )
34999		{
35000			a.splice( iTargetIndex, 1 );
35001		}
35002	}
35003	
35004	
35005	/**
35006	 * Mark cached data as invalid such that a re-read of the data will occur when
35007	 * the cached data is next requested. Also update from the data source object.
35008	 *
35009	 * @param {object} settings DataTables settings object
35010	 * @param {int}    rowIdx   Row index to invalidate
35011	 * @param {string} [src]    Source to invalidate from: undefined, 'auto', 'dom'
35012	 *     or 'data'
35013	 * @param {int}    [colIdx] Column index to invalidate. If undefined the whole
35014	 *     row will be invalidated
35015	 * @memberof DataTable#oApi
35016	 *
35017	 * @todo For the modularisation of v1.11 this will need to become a callback, so
35018	 *   the sort and filter methods can subscribe to it. That will required
35019	 *   initialisation options for sorting, which is why it is not already baked in
35020	 */
35021	function _fnInvalidate( settings, rowIdx, src, colIdx )
35022	{
35023		var row = settings.aoData[ rowIdx ];
35024		var i, ien;
35025		var cellWrite = function ( cell, col ) {
35026			// This is very frustrating, but in IE if you just write directly
35027			// to innerHTML, and elements that are overwritten are GC'ed,
35028			// even if there is a reference to them elsewhere
35029			while ( cell.childNodes.length ) {
35030				cell.removeChild( cell.firstChild );
35031			}
35032	
35033			cell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' );
35034		};
35035	
35036		// Are we reading last data from DOM or the data object?
35037		if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {
35038			// Read the data from the DOM
35039			row._aData = _fnGetRowElements(
35040					settings, row, colIdx, colIdx === undefined ? undefined : row._aData
35041				)
35042				.data;
35043		}
35044		else {
35045			// Reading from data object, update the DOM
35046			var cells = row.anCells;
35047	
35048			if ( cells ) {
35049				if ( colIdx !== undefined ) {
35050					cellWrite( cells[colIdx], colIdx );
35051				}
35052				else {
35053					for ( i=0, ien=cells.length ; i<ien ; i++ ) {
35054						cellWrite( cells[i], i );
35055					}
35056				}
35057			}
35058		}
35059	
35060		// For both row and cell invalidation, the cached data for sorting and
35061		// filtering is nulled out
35062		row._aSortData = null;
35063		row._aFilterData = null;
35064	
35065		// Invalidate the type for a specific column (if given) or all columns since
35066		// the data might have changed
35067		var cols = settings.aoColumns;
35068		if ( colIdx !== undefined ) {
35069			cols[ colIdx ].sType = null;
35070		}
35071		else {
35072			for ( i=0, ien=cols.length ; i<ien ; i++ ) {
35073				cols[i].sType = null;
35074			}
35075	
35076			// Update DataTables special `DT_*` attributes for the row
35077			_fnRowAttributes( settings, row );
35078		}
35079	}
35080	
35081	
35082	/**
35083	 * Build a data source object from an HTML row, reading the contents of the
35084	 * cells that are in the row.
35085	 *
35086	 * @param {object} settings DataTables settings object
35087	 * @param {node|object} TR element from which to read data or existing row
35088	 *   object from which to re-read the data from the cells
35089	 * @param {int} [colIdx] Optional column index
35090	 * @param {array|object} [d] Data source object. If `colIdx` is given then this
35091	 *   parameter should also be given and will be used to write the data into.
35092	 *   Only the column in question will be written
35093	 * @returns {object} Object with two parameters: `data` the data read, in
35094	 *   document order, and `cells` and array of nodes (they can be useful to the
35095	 *   caller, so rather than needing a second traversal to get them, just return
35096	 *   them from here).
35097	 * @memberof DataTable#oApi
35098	 */
35099	function _fnGetRowElements( settings, row, colIdx, d )
35100	{
35101		var
35102			tds = [],
35103			td = row.firstChild,
35104			name, col, o, i=0, contents,
35105			columns = settings.aoColumns,
35106			objectRead = settings._rowReadObject;
35107	
35108		// Allow the data object to be passed in, or construct
35109		d = d !== undefined ?
35110			d :
35111			objectRead ?
35112				{} :
35113				[];
35114	
35115		var attr = function ( str, td  ) {
35116			if ( typeof str === 'string' ) {
35117				var idx = str.indexOf('@');
35118	
35119				if ( idx !== -1 ) {
35120					var attr = str.substring( idx+1 );
35121					var setter = _fnSetObjectDataFn( str );
35122					setter( d, td.getAttribute( attr ) );
35123				}
35124			}
35125		};
35126	
35127		// Read data from a cell and store into the data object
35128		var cellProcess = function ( cell ) {
35129			if ( colIdx === undefined || colIdx === i ) {
35130				col = columns[i];
35131				contents = (cell.innerHTML).trim();
35132	
35133				if ( col && col._bAttrSrc ) {
35134					var setter = _fnSetObjectDataFn( col.mData._ );
35135					setter( d, contents );
35136	
35137					attr( col.mData.sort, cell );
35138					attr( col.mData.type, cell );
35139					attr( col.mData.filter, cell );
35140				}
35141				else {
35142					// Depending on the `data` option for the columns the data can
35143					// be read to either an object or an array.
35144					if ( objectRead ) {
35145						if ( ! col._setter ) {
35146							// Cache the setter function
35147							col._setter = _fnSetObjectDataFn( col.mData );
35148						}
35149						col._setter( d, contents );
35150					}
35151					else {
35152						d[i] = contents;
35153					}
35154				}
35155			}
35156	
35157			i++;
35158		};
35159	
35160		if ( td ) {
35161			// `tr` element was passed in
35162			while ( td ) {
35163				name = td.nodeName.toUpperCase();
35164	
35165				if ( name == "TD" || name == "TH" ) {
35166					cellProcess( td );
35167					tds.push( td );
35168				}
35169	
35170				td = td.nextSibling;
35171			}
35172		}
35173		else {
35174			// Existing row object passed in
35175			tds = row.anCells;
35176	
35177			for ( var j=0, jen=tds.length ; j<jen ; j++ ) {
35178				cellProcess( tds[j] );
35179			}
35180		}
35181	
35182		// Read the ID from the DOM if present
35183		var rowNode = row.firstChild ? row : row.nTr;
35184	
35185		if ( rowNode ) {
35186			var id = rowNode.getAttribute( 'id' );
35187	
35188			if ( id ) {
35189				_fnSetObjectDataFn( settings.rowId )( d, id );
35190			}
35191		}
35192	
35193		return {
35194			data: d,
35195			cells: tds
35196		};
35197	}
35198	/**
35199	 * Create a new TR element (and it's TD children) for a row
35200	 *  @param {object} oSettings dataTables settings object
35201	 *  @param {int} iRow Row to consider
35202	 *  @param {node} [nTrIn] TR element to add to the table - optional. If not given,
35203	 *    DataTables will create a row automatically
35204	 *  @param {array} [anTds] Array of TD|TH elements for the row - must be given
35205	 *    if nTr is.
35206	 *  @memberof DataTable#oApi
35207	 */
35208	function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
35209	{
35210		var
35211			row = oSettings.aoData[iRow],
35212			rowData = row._aData,
35213			cells = [],
35214			nTr, nTd, oCol,
35215			i, iLen, create;
35216	
35217		if ( row.nTr === null )
35218		{
35219			nTr = nTrIn || document.createElement('tr');
35220	
35221			row.nTr = nTr;
35222			row.anCells = cells;
35223	
35224			/* Use a private property on the node to allow reserve mapping from the node
35225			 * to the aoData array for fast look up
35226			 */
35227			nTr._DT_RowIndex = iRow;
35228	
35229			/* Special parameters can be given by the data source to be used on the row */
35230			_fnRowAttributes( oSettings, row );
35231	
35232			/* Process each column */
35233			for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
35234			{
35235				oCol = oSettings.aoColumns[i];
35236				create = nTrIn ? false : true;
35237	
35238				nTd = create ? document.createElement( oCol.sCellType ) : anTds[i];
35239	
35240				if (! nTd) {
35241					_fnLog( oSettings, 0, 'Incorrect column count', 18 );
35242				}
35243	
35244				nTd._DT_CellIndex = {
35245					row: iRow,
35246					column: i
35247				};
35248				
35249				cells.push( nTd );
35250	
35251				// Need to create the HTML if new, or if a rendering function is defined
35252				if ( create || ((oCol.mRender || oCol.mData !== i) &&
35253					 (!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display')
35254				)) {
35255					nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
35256				}
35257	
35258				/* Add user defined class */
35259				if ( oCol.sClass )
35260				{
35261					nTd.className += ' '+oCol.sClass;
35262				}
35263	
35264				// Visibility - add or remove as required
35265				if ( oCol.bVisible && ! nTrIn )
35266				{
35267					nTr.appendChild( nTd );
35268				}
35269				else if ( ! oCol.bVisible && nTrIn )
35270				{
35271					nTd.parentNode.removeChild( nTd );
35272				}
35273	
35274				if ( oCol.fnCreatedCell )
35275				{
35276					oCol.fnCreatedCell.call( oSettings.oInstance,
35277						nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i
35278					);
35279				}
35280			}
35281	
35282			_fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow, cells] );
35283		}
35284	}
35285	
35286	
35287	/**
35288	 * Add attributes to a row based on the special `DT_*` parameters in a data
35289	 * source object.
35290	 *  @param {object} settings DataTables settings object
35291	 *  @param {object} DataTables row object for the row to be modified
35292	 *  @memberof DataTable#oApi
35293	 */
35294	function _fnRowAttributes( settings, row )
35295	{
35296		var tr = row.nTr;
35297		var data = row._aData;
35298	
35299		if ( tr ) {
35300			var id = settings.rowIdFn( data );
35301	
35302			if ( id ) {
35303				tr.id = id;
35304			}
35305	
35306			if ( data.DT_RowClass ) {
35307				// Remove any classes added by DT_RowClass before
35308				var a = data.DT_RowClass.split(' ');
35309				row.__rowc = row.__rowc ?
35310					_unique( row.__rowc.concat( a ) ) :
35311					a;
35312	
35313				$(tr)
35314					.removeClass( row.__rowc.join(' ') )
35315					.addClass( data.DT_RowClass );
35316			}
35317	
35318			if ( data.DT_RowAttr ) {
35319				$(tr).attr( data.DT_RowAttr );
35320			}
35321	
35322			if ( data.DT_RowData ) {
35323				$(tr).data( data.DT_RowData );
35324			}
35325		}
35326	}
35327	
35328	
35329	/**
35330	 * Create the HTML header for the table
35331	 *  @param {object} oSettings dataTables settings object
35332	 *  @memberof DataTable#oApi
35333	 */
35334	function _fnBuildHead( oSettings )
35335	{
35336		var i, ien, cell, row, column;
35337		var thead = oSettings.nTHead;
35338		var tfoot = oSettings.nTFoot;
35339		var createHeader = $('th, td', thead).length === 0;
35340		var classes = oSettings.oClasses;
35341		var columns = oSettings.aoColumns;
35342	
35343		if ( createHeader ) {
35344			row = $('<tr/>').appendTo( thead );
35345		}
35346	
35347		for ( i=0, ien=columns.length ; i<ien ; i++ ) {
35348			column = columns[i];
35349			cell = $( column.nTh ).addClass( column.sClass );
35350	
35351			if ( createHeader ) {
35352				cell.appendTo( row );
35353			}
35354	
35355			// 1.11 move into sorting
35356			if ( oSettings.oFeatures.bSort ) {
35357				cell.addClass( column.sSortingClass );
35358	
35359				if ( column.bSortable !== false ) {
35360					cell
35361						.attr( 'tabindex', oSettings.iTabIndex )
35362						.attr( 'aria-controls', oSettings.sTableId );
35363	
35364					_fnSortAttachListener( oSettings, column.nTh, i );
35365				}
35366			}
35367	
35368			if ( column.sTitle != cell[0].innerHTML ) {
35369				cell.html( column.sTitle );
35370			}
35371	
35372			_fnRenderer( oSettings, 'header' )(
35373				oSettings, cell, column, classes
35374			);
35375		}
35376	
35377		if ( createHeader ) {
35378			_fnDetectHeader( oSettings.aoHeader, thead );
35379		}
35380	
35381		/* Deal with the footer - add classes if required */
35382		$(thead).children('tr').children('th, td').addClass( classes.sHeaderTH );
35383		$(tfoot).children('tr').children('th, td').addClass( classes.sFooterTH );
35384	
35385		// Cache the footer cells. Note that we only take the cells from the first
35386		// row in the footer. If there is more than one row the user wants to
35387		// interact with, they need to use the table().foot() method. Note also this
35388		// allows cells to be used for multiple columns using colspan
35389		if ( tfoot !== null ) {
35390			var cells = oSettings.aoFooter[0];
35391	
35392			for ( i=0, ien=cells.length ; i<ien ; i++ ) {
35393				column = columns[i];
35394	
35395				if (column) {
35396					column.nTf = cells[i].cell;
35397		
35398					if ( column.sClass ) {
35399						$(column.nTf).addClass( column.sClass );
35400					}
35401				}
35402				else {
35403					_fnLog( oSettings, 0, 'Incorrect column count', 18 );
35404				}
35405			}
35406		}
35407	}
35408	
35409	
35410	/**
35411	 * Draw the header (or footer) element based on the column visibility states. The
35412	 * methodology here is to use the layout array from _fnDetectHeader, modified for
35413	 * the instantaneous column visibility, to construct the new layout. The grid is
35414	 * traversed over cell at a time in a rows x columns grid fashion, although each
35415	 * cell insert can cover multiple elements in the grid - which is tracks using the
35416	 * aApplied array. Cell inserts in the grid will only occur where there isn't
35417	 * already a cell in that position.
35418	 *  @param {object} oSettings dataTables settings object
35419	 *  @param array {objects} aoSource Layout array from _fnDetectHeader
35420	 *  @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,
35421	 *  @memberof DataTable#oApi
35422	 */
35423	function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
35424	{
35425		var i, iLen, j, jLen, k, kLen, n, nLocalTr;
35426		var aoLocal = [];
35427		var aApplied = [];
35428		var iColumns = oSettings.aoColumns.length;
35429		var iRowspan, iColspan;
35430	
35431		if ( ! aoSource )
35432		{
35433			return;
35434		}
35435	
35436		if (  bIncludeHidden === undefined )
35437		{
35438			bIncludeHidden = false;
35439		}
35440	
35441		/* Make a copy of the master layout array, but without the visible columns in it */
35442		for ( i=0, iLen=aoSource.length ; i<iLen ; i++ )
35443		{
35444			aoLocal[i] = aoSource[i].slice();
35445			aoLocal[i].nTr = aoSource[i].nTr;
35446	
35447			/* Remove any columns which are currently hidden */
35448			for ( j=iColumns-1 ; j>=0 ; j-- )
35449			{
35450				if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )
35451				{
35452					aoLocal[i].splice( j, 1 );
35453				}
35454			}
35455	
35456			/* Prep the applied array - it needs an element for each row */
35457			aApplied.push( [] );
35458		}
35459	
35460		for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
35461		{
35462			nLocalTr = aoLocal[i].nTr;
35463	
35464			/* All cells are going to be replaced, so empty out the row */
35465			if ( nLocalTr )
35466			{
35467				while( (n = nLocalTr.firstChild) )
35468				{
35469					nLocalTr.removeChild( n );
35470				}
35471			}
35472	
35473			for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )
35474			{
35475				iRowspan = 1;
35476				iColspan = 1;
35477	
35478				/* Check to see if there is already a cell (row/colspan) covering our target
35479				 * insert point. If there is, then there is nothing to do.
35480				 */
35481				if ( aApplied[i][j] === undefined )
35482				{
35483					nLocalTr.appendChild( aoLocal[i][j].cell );
35484					aApplied[i][j] = 1;
35485	
35486					/* Expand the cell to cover as many rows as needed */
35487					while ( aoLocal[i+iRowspan] !== undefined &&
35488					        aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )
35489					{
35490						aApplied[i+iRowspan][j] = 1;
35491						iRowspan++;
35492					}
35493	
35494					/* Expand the cell to cover as many columns as needed */
35495					while ( aoLocal[i][j+iColspan] !== undefined &&
35496					        aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )
35497					{
35498						/* Must update the applied array over the rows for the columns */
35499						for ( k=0 ; k<iRowspan ; k++ )
35500						{
35501							aApplied[i+k][j+iColspan] = 1;
35502						}
35503						iColspan++;
35504					}
35505	
35506					/* Do the actual expansion in the DOM */
35507					$(aoLocal[i][j].cell)
35508						.attr('rowspan', iRowspan)
35509						.attr('colspan', iColspan);
35510				}
35511			}
35512		}
35513	}
35514	
35515	
35516	/**
35517	 * Insert the required TR nodes into the table for display
35518	 *  @param {object} oSettings dataTables settings object
35519	 *  @param ajaxComplete true after ajax call to complete rendering
35520	 *  @memberof DataTable#oApi
35521	 */
35522	function _fnDraw( oSettings, ajaxComplete )
35523	{
35524		// Allow for state saving and a custom start position
35525		_fnStart( oSettings );
35526	
35527		/* Provide a pre-callback function which can be used to cancel the draw is false is returned */
35528		var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
35529		if ( $.inArray( false, aPreDraw ) !== -1 )
35530		{
35531			_fnProcessingDisplay( oSettings, false );
35532			return;
35533		}
35534	
35535		var anRows = [];
35536		var iRowCount = 0;
35537		var asStripeClasses = oSettings.asStripeClasses;
35538		var iStripes = asStripeClasses.length;
35539		var oLang = oSettings.oLanguage;
35540		var bServerSide = _fnDataSource( oSettings ) == 'ssp';
35541		var aiDisplay = oSettings.aiDisplay;
35542		var iDisplayStart = oSettings._iDisplayStart;
35543		var iDisplayEnd = oSettings.fnDisplayEnd();
35544	
35545		oSettings.bDrawing = true;
35546	
35547		/* Server-side processing draw intercept */
35548		if ( oSettings.bDeferLoading )
35549		{
35550			oSettings.bDeferLoading = false;
35551			oSettings.iDraw++;
35552			_fnProcessingDisplay( oSettings, false );
35553		}
35554		else if ( !bServerSide )
35555		{
35556			oSettings.iDraw++;
35557		}
35558		else if ( !oSettings.bDestroying && !ajaxComplete)
35559		{
35560			_fnAjaxUpdate( oSettings );
35561			return;
35562		}
35563	
35564		if ( aiDisplay.length !== 0 )
35565		{
35566			var iStart = bServerSide ? 0 : iDisplayStart;
35567			var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
35568	
35569			for ( var j=iStart ; j<iEnd ; j++ )
35570			{
35571				var iDataIndex = aiDisplay[j];
35572				var aoData = oSettings.aoData[ iDataIndex ];
35573				if ( aoData.nTr === null )
35574				{
35575					_fnCreateTr( oSettings, iDataIndex );
35576				}
35577	
35578				var nRow = aoData.nTr;
35579	
35580				/* Remove the old striping classes and then add the new one */
35581				if ( iStripes !== 0 )
35582				{
35583					var sStripe = asStripeClasses[ iRowCount % iStripes ];
35584					if ( aoData._sRowStripe != sStripe )
35585					{
35586						$(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );
35587						aoData._sRowStripe = sStripe;
35588					}
35589				}
35590	
35591				// Row callback functions - might want to manipulate the row
35592				// iRowCount and j are not currently documented. Are they at all
35593				// useful?
35594				_fnCallbackFire( oSettings, 'aoRowCallback', null,
35595					[nRow, aoData._aData, iRowCount, j, iDataIndex] );
35596	
35597				anRows.push( nRow );
35598				iRowCount++;
35599			}
35600		}
35601		else
35602		{
35603			/* Table is empty - create a row with an empty message in it */
35604			var sZero = oLang.sZeroRecords;
35605			if ( oSettings.iDraw == 1 &&  _fnDataSource( oSettings ) == 'ajax' )
35606			{
35607				sZero = oLang.sLoadingRecords;
35608			}
35609			else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
35610			{
35611				sZero = oLang.sEmptyTable;
35612			}
35613	
35614			anRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } )
35615				.append( $('<td />', {
35616					'valign':  'top',
35617					'colSpan': _fnVisbleColumns( oSettings ),
35618					'class':   oSettings.oClasses.sRowEmpty
35619				} ).html( sZero ) )[0];
35620		}
35621	
35622		/* Header and footer callbacks */
35623		_fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
35624			_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
35625	
35626		_fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
35627			_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
35628	
35629		var body = $(oSettings.nTBody);
35630	
35631		body.children().detach();
35632		body.append( $(anRows) );
35633	
35634		/* Call all required callback functions for the end of a draw */
35635		_fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
35636	
35637		/* Draw is complete, sorting and filtering must be as well */
35638		oSettings.bSorted = false;
35639		oSettings.bFiltered = false;
35640		oSettings.bDrawing = false;
35641	}
35642	
35643	
35644	/**
35645	 * Redraw the table - taking account of the various features which are enabled
35646	 *  @param {object} oSettings dataTables settings object
35647	 *  @param {boolean} [holdPosition] Keep the current paging position. By default
35648	 *    the paging is reset to the first page
35649	 *  @memberof DataTable#oApi
35650	 */
35651	function _fnReDraw( settings, holdPosition )
35652	{
35653		var
35654			features = settings.oFeatures,
35655			sort     = features.bSort,
35656			filter   = features.bFilter;
35657	
35658		if ( sort ) {
35659			_fnSort( settings );
35660		}
35661	
35662		if ( filter ) {
35663			_fnFilterComplete( settings, settings.oPreviousSearch );
35664		}
35665		else {
35666			// No filtering, so we want to just use the display master
35667			settings.aiDisplay = settings.aiDisplayMaster.slice();
35668		}
35669	
35670		if ( holdPosition !== true ) {
35671			settings._iDisplayStart = 0;
35672		}
35673	
35674		// Let any modules know about the draw hold position state (used by
35675		// scrolling internally)
35676		settings._drawHold = holdPosition;
35677	
35678		_fnDraw( settings );
35679	
35680		settings._drawHold = false;
35681	}
35682	
35683	
35684	/**
35685	 * Add the options to the page HTML for the table
35686	 *  @param {object} oSettings dataTables settings object
35687	 *  @memberof DataTable#oApi
35688	 */
35689	function _fnAddOptionsHtml ( oSettings )
35690	{
35691		var classes = oSettings.oClasses;
35692		var table = $(oSettings.nTable);
35693		var holding = $('<div/>').insertBefore( table ); // Holding element for speed
35694		var features = oSettings.oFeatures;
35695	
35696		// All DataTables are wrapped in a div
35697		var insert = $('<div/>', {
35698			id:      oSettings.sTableId+'_wrapper',
35699			'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)
35700		} );
35701	
35702		oSettings.nHolding = holding[0];
35703		oSettings.nTableWrapper = insert[0];
35704		oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;
35705	
35706		/* Loop over the user set positioning and place the elements as needed */
35707		var aDom = oSettings.sDom.split('');
35708		var featureNode, cOption, nNewNode, cNext, sAttr, j;
35709		for ( var i=0 ; i<aDom.length ; i++ )
35710		{
35711			featureNode = null;
35712			cOption = aDom[i];
35713	
35714			if ( cOption == '<' )
35715			{
35716				/* New container div */
35717				nNewNode = $('<div/>')[0];
35718	
35719				/* Check to see if we should append an id and/or a class name to the container */
35720				cNext = aDom[i+1];
35721				if ( cNext == "'" || cNext == '"' )
35722				{
35723					sAttr = "";
35724					j = 2;
35725					while ( aDom[i+j] != cNext )
35726					{
35727						sAttr += aDom[i+j];
35728						j++;
35729					}
35730	
35731					/* Replace jQuery UI constants @todo depreciated */
35732					if ( sAttr == "H" )
35733					{
35734						sAttr = classes.sJUIHeader;
35735					}
35736					else if ( sAttr == "F" )
35737					{
35738						sAttr = classes.sJUIFooter;
35739					}
35740	
35741					/* The attribute can be in the format of "#id.class", "#id" or "class" This logic
35742					 * breaks the string into parts and applies them as needed
35743					 */
35744					if ( sAttr.indexOf('.') != -1 )
35745					{
35746						var aSplit = sAttr.split('.');
35747						nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);
35748						nNewNode.className = aSplit[1];
35749					}
35750					else if ( sAttr.charAt(0) == "#" )
35751					{
35752						nNewNode.id = sAttr.substr(1, sAttr.length-1);
35753					}
35754					else
35755					{
35756						nNewNode.className = sAttr;
35757					}
35758	
35759					i += j; /* Move along the position array */
35760				}
35761	
35762				insert.append( nNewNode );
35763				insert = $(nNewNode);
35764			}
35765			else if ( cOption == '>' )
35766			{
35767				/* End container div */
35768				insert = insert.parent();
35769			}
35770			// @todo Move options into their own plugins?
35771			else if ( cOption == 'l' && features.bPaginate && features.bLengthChange )
35772			{
35773				/* Length */
35774				featureNode = _fnFeatureHtmlLength( oSettings );
35775			}
35776			else if ( cOption == 'f' && features.bFilter )
35777			{
35778				/* Filter */
35779				featureNode = _fnFeatureHtmlFilter( oSettings );
35780			}
35781			else if ( cOption == 'r' && features.bProcessing )
35782			{
35783				/* pRocessing */
35784				featureNode = _fnFeatureHtmlProcessing( oSettings );
35785			}
35786			else if ( cOption == 't' )
35787			{
35788				/* Table */
35789				featureNode = _fnFeatureHtmlTable( oSettings );
35790			}
35791			else if ( cOption ==  'i' && features.bInfo )
35792			{
35793				/* Info */
35794				featureNode = _fnFeatureHtmlInfo( oSettings );
35795			}
35796			else if ( cOption == 'p' && features.bPaginate )
35797			{
35798				/* Pagination */
35799				featureNode = _fnFeatureHtmlPaginate( oSettings );
35800			}
35801			else if ( DataTable.ext.feature.length !== 0 )
35802			{
35803				/* Plug-in features */
35804				var aoFeatures = DataTable.ext.feature;
35805				for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )
35806				{
35807					if ( cOption == aoFeatures[k].cFeature )
35808					{
35809						featureNode = aoFeatures[k].fnInit( oSettings );
35810						break;
35811					}
35812				}
35813			}
35814	
35815			/* Add to the 2D features array */
35816			if ( featureNode )
35817			{
35818				var aanFeatures = oSettings.aanFeatures;
35819	
35820				if ( ! aanFeatures[cOption] )
35821				{
35822					aanFeatures[cOption] = [];
35823				}
35824	
35825				aanFeatures[cOption].push( featureNode );
35826				insert.append( featureNode );
35827			}
35828		}
35829	
35830		/* Built our DOM structure - replace the holding div with what we want */
35831		holding.replaceWith( insert );
35832		oSettings.nHolding = null;
35833	}
35834	
35835	
35836	/**
35837	 * Use the DOM source to create up an array of header cells. The idea here is to
35838	 * create a layout grid (array) of rows x columns, which contains a reference
35839	 * to the cell that that point in the grid (regardless of col/rowspan), such that
35840	 * any column / row could be removed and the new grid constructed
35841	 *  @param array {object} aLayout Array to store the calculated layout in
35842	 *  @param {node} nThead The header/footer element for the table
35843	 *  @memberof DataTable#oApi
35844	 */
35845	function _fnDetectHeader ( aLayout, nThead )
35846	{
35847		var nTrs = $(nThead).children('tr');
35848		var nTr, nCell;
35849		var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
35850		var bUnique;
35851		var fnShiftCol = function ( a, i, j ) {
35852			var k = a[i];
35853	                while ( k[j] ) {
35854				j++;
35855			}
35856			return j;
35857		};
35858	
35859		aLayout.splice( 0, aLayout.length );
35860	
35861		/* We know how many rows there are in the layout - so prep it */
35862		for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
35863		{
35864			aLayout.push( [] );
35865		}
35866	
35867		/* Calculate a layout array */
35868		for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
35869		{
35870			nTr = nTrs[i];
35871			iColumn = 0;
35872	
35873			/* For every cell in the row... */
35874			nCell = nTr.firstChild;
35875			while ( nCell ) {
35876				if ( nCell.nodeName.toUpperCase() == "TD" ||
35877				     nCell.nodeName.toUpperCase() == "TH" )
35878				{
35879					/* Get the col and rowspan attributes from the DOM and sanitise them */
35880					iColspan = nCell.getAttribute('colspan') * 1;
35881					iRowspan = nCell.getAttribute('rowspan') * 1;
35882					iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
35883					iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
35884	
35885					/* There might be colspan cells already in this row, so shift our target
35886					 * accordingly
35887					 */
35888					iColShifted = fnShiftCol( aLayout, i, iColumn );
35889	
35890					/* Cache calculation for unique columns */
35891					bUnique = iColspan === 1 ? true : false;
35892	
35893					/* If there is col / rowspan, copy the information into the layout grid */
35894					for ( l=0 ; l<iColspan ; l++ )
35895					{
35896						for ( k=0 ; k<iRowspan ; k++ )
35897						{
35898							aLayout[i+k][iColShifted+l] = {
35899								"cell": nCell,
35900								"unique": bUnique
35901							};
35902							aLayout[i+k].nTr = nTr;
35903						}
35904					}
35905				}
35906				nCell = nCell.nextSibling;
35907			}
35908		}
35909	}
35910	
35911	
35912	/**
35913	 * Get an array of unique th elements, one for each column
35914	 *  @param {object} oSettings dataTables settings object
35915	 *  @param {node} nHeader automatically detect the layout from this node - optional
35916	 *  @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
35917	 *  @returns array {node} aReturn list of unique th's
35918	 *  @memberof DataTable#oApi
35919	 */
35920	function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
35921	{
35922		var aReturn = [];
35923		if ( !aLayout )
35924		{
35925			aLayout = oSettings.aoHeader;
35926			if ( nHeader )
35927			{
35928				aLayout = [];
35929				_fnDetectHeader( aLayout, nHeader );
35930			}
35931		}
35932	
35933		for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )
35934		{
35935			for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )
35936			{
35937				if ( aLayout[i][j].unique &&
35938					 (!aReturn[j] || !oSettings.bSortCellsTop) )
35939				{
35940					aReturn[j] = aLayout[i][j].cell;
35941				}
35942			}
35943		}
35944	
35945		return aReturn;
35946	}
35947	
35948	/**
35949	 * Set the start position for draw
35950	 *  @param {object} oSettings dataTables settings object
35951	 */
35952	function _fnStart( oSettings )
35953	{
35954		var bServerSide = _fnDataSource( oSettings ) == 'ssp';
35955		var iInitDisplayStart = oSettings.iInitDisplayStart;
35956	
35957		// Check and see if we have an initial draw position from state saving
35958		if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )
35959		{
35960			oSettings._iDisplayStart = bServerSide ?
35961				iInitDisplayStart :
35962				iInitDisplayStart >= oSettings.fnRecordsDisplay() ?
35963					0 :
35964					iInitDisplayStart;
35965	
35966			oSettings.iInitDisplayStart = -1;
35967		}
35968	}
35969	
35970	/**
35971	 * Create an Ajax call based on the table's settings, taking into account that
35972	 * parameters can have multiple forms, and backwards compatibility.
35973	 *
35974	 * @param {object} oSettings dataTables settings object
35975	 * @param {array} data Data to send to the server, required by
35976	 *     DataTables - may be augmented by developer callbacks
35977	 * @param {function} fn Callback function to run when data is obtained
35978	 */
35979	function _fnBuildAjax( oSettings, data, fn )
35980	{
35981		// Compatibility with 1.9-, allow fnServerData and event to manipulate
35982		_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
35983	
35984		// Convert to object based for 1.10+ if using the old array scheme which can
35985		// come from server-side processing or serverParams
35986		if ( data && Array.isArray(data) ) {
35987			var tmp = {};
35988			var rbracket = /(.*?)\[\]$/;
35989	
35990			$.each( data, function (key, val) {
35991				var match = val.name.match(rbracket);
35992	
35993				if ( match ) {
35994					// Support for arrays
35995					var name = match[0];
35996	
35997					if ( ! tmp[ name ] ) {
35998						tmp[ name ] = [];
35999					}
36000					tmp[ name ].push( val.value );
36001				}
36002				else {
36003					tmp[val.name] = val.value;
36004				}
36005			} );
36006			data = tmp;
36007		}
36008	
36009		var ajaxData;
36010		var ajax = oSettings.ajax;
36011		var instance = oSettings.oInstance;
36012		var callback = function ( json ) {
36013			var status = oSettings.jqXHR
36014				? oSettings.jqXHR.status
36015				: null;
36016	
36017			if ( json === null || (typeof status === 'number' && status == 204 ) ) {
36018				json = {};
36019				_fnAjaxDataSrc( oSettings, json, [] );
36020			}
36021	
36022			var error = json.error || json.sError;
36023			if ( error ) {
36024				_fnLog( oSettings, 0, error );
36025			}
36026	
36027			oSettings.json = json;
36028	
36029			_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
36030			fn( json );
36031		};
36032	
36033		if ( $.isPlainObject( ajax ) && ajax.data )
36034		{
36035			ajaxData = ajax.data;
36036	
36037			var newData = typeof ajaxData === 'function' ?
36038				ajaxData( data, oSettings ) :  // fn can manipulate data or return
36039				ajaxData;                      // an object object or array to merge
36040	
36041			// If the function returned something, use that alone
36042			data = typeof ajaxData === 'function' && newData ?
36043				newData :
36044				$.extend( true, data, newData );
36045	
36046			// Remove the data property as we've resolved it already and don't want
36047			// jQuery to do it again (it is restored at the end of the function)
36048			delete ajax.data;
36049		}
36050	
36051		var baseAjax = {
36052			"data": data,
36053			"success": callback,
36054			"dataType": "json",
36055			"cache": false,
36056			"type": oSettings.sServerMethod,
36057			"error": function (xhr, error, thrown) {
36058				var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
36059	
36060				if ( $.inArray( true, ret ) === -1 ) {
36061					if ( error == "parsererror" ) {
36062						_fnLog( oSettings, 0, 'Invalid JSON response', 1 );
36063					}
36064					else if ( xhr.readyState === 4 ) {
36065						_fnLog( oSettings, 0, 'Ajax error', 7 );
36066					}
36067				}
36068	
36069				_fnProcessingDisplay( oSettings, false );
36070			}
36071		};
36072	
36073		// Store the data submitted for the API
36074		oSettings.oAjaxData = data;
36075	
36076		// Allow plug-ins and external processes to modify the data
36077		_fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
36078	
36079		if ( oSettings.fnServerData )
36080		{
36081			// DataTables 1.9- compatibility
36082			oSettings.fnServerData.call( instance,
36083				oSettings.sAjaxSource,
36084				$.map( data, function (val, key) { // Need to convert back to 1.9 trad format
36085					return { name: key, value: val };
36086				} ),
36087				callback,
36088				oSettings
36089			);
36090		}
36091		else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
36092		{
36093			// DataTables 1.9- compatibility
36094			oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
36095				url: ajax || oSettings.sAjaxSource
36096			} ) );
36097		}
36098		else if ( typeof ajax === 'function' )
36099		{
36100			// Is a function - let the caller define what needs to be done
36101			oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
36102		}
36103		else
36104		{
36105			// Object to extend the base settings
36106			oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
36107	
36108			// Restore for next time around
36109			ajax.data = ajaxData;
36110		}
36111	}
36112	
36113	
36114	/**
36115	 * Update the table using an Ajax call
36116	 *  @param {object} settings dataTables settings object
36117	 *  @returns {boolean} Block the table drawing or not
36118	 *  @memberof DataTable#oApi
36119	 */
36120	function _fnAjaxUpdate( settings )
36121	{
36122		settings.iDraw++;
36123		_fnProcessingDisplay( settings, true );
36124	
36125		// Keep track of drawHold state to handle scrolling after the Ajax call
36126		var drawHold = settings._drawHold;
36127	
36128		_fnBuildAjax(
36129			settings,
36130			_fnAjaxParameters( settings ),
36131			function(json) {
36132				settings._drawHold = drawHold;
36133				_fnAjaxUpdateDraw( settings, json );
36134				settings._drawHold = false;
36135			}
36136		);
36137	}
36138	
36139	
36140	/**
36141	 * Build up the parameters in an object needed for a server-side processing
36142	 * request. Note that this is basically done twice, is different ways - a modern
36143	 * method which is used by default in DataTables 1.10 which uses objects and
36144	 * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if
36145	 * the sAjaxSource option is used in the initialisation, or the legacyAjax
36146	 * option is set.
36147	 *  @param {object} oSettings dataTables settings object
36148	 *  @returns {bool} block the table drawing or not
36149	 *  @memberof DataTable#oApi
36150	 */
36151	function _fnAjaxParameters( settings )
36152	{
36153		var
36154			columns = settings.aoColumns,
36155			columnCount = columns.length,
36156			features = settings.oFeatures,
36157			preSearch = settings.oPreviousSearch,
36158			preColSearch = settings.aoPreSearchCols,
36159			i, data = [], dataProp, column, columnSearch,
36160			sort = _fnSortFlatten( settings ),
36161			displayStart = settings._iDisplayStart,
36162			displayLength = features.bPaginate !== false ?
36163				settings._iDisplayLength :
36164				-1;
36165	
36166		var param = function ( name, value ) {
36167			data.push( { 'name': name, 'value': value } );
36168		};
36169	
36170		// DataTables 1.9- compatible method
36171		param( 'sEcho',          settings.iDraw );
36172		param( 'iColumns',       columnCount );
36173		param( 'sColumns',       _pluck( columns, 'sName' ).join(',') );
36174		param( 'iDisplayStart',  displayStart );
36175		param( 'iDisplayLength', displayLength );
36176	
36177		// DataTables 1.10+ method
36178		var d = {
36179			draw:    settings.iDraw,
36180			columns: [],
36181			order:   [],
36182			start:   displayStart,
36183			length:  displayLength,
36184			search:  {
36185				value: preSearch.sSearch,
36186				regex: preSearch.bRegex
36187			}
36188		};
36189	
36190		for ( i=0 ; i<columnCount ; i++ ) {
36191			column = columns[i];
36192			columnSearch = preColSearch[i];
36193			dataProp = typeof column.mData=="function" ? 'function' : column.mData ;
36194	
36195			d.columns.push( {
36196				data:       dataProp,
36197				name:       column.sName,
36198				searchable: column.bSearchable,
36199				orderable:  column.bSortable,
36200				search:     {
36201					value: columnSearch.sSearch,
36202					regex: columnSearch.bRegex
36203				}
36204			} );
36205	
36206			param( "mDataProp_"+i, dataProp );
36207	
36208			if ( features.bFilter ) {
36209				param( 'sSearch_'+i,     columnSearch.sSearch );
36210				param( 'bRegex_'+i,      columnSearch.bRegex );
36211				param( 'bSearchable_'+i, column.bSearchable );
36212			}
36213	
36214			if ( features.bSort ) {
36215				param( 'bSortable_'+i, column.bSortable );
36216			}
36217		}
36218	
36219		if ( features.bFilter ) {
36220			param( 'sSearch', preSearch.sSearch );
36221			param( 'bRegex', preSearch.bRegex );
36222		}
36223	
36224		if ( features.bSort ) {
36225			$.each( sort, function ( i, val ) {
36226				d.order.push( { column: val.col, dir: val.dir } );
36227	
36228				param( 'iSortCol_'+i, val.col );
36229				param( 'sSortDir_'+i, val.dir );
36230			} );
36231	
36232			param( 'iSortingCols', sort.length );
36233		}
36234	
36235		// If the legacy.ajax parameter is null, then we automatically decide which
36236		// form to use, based on sAjaxSource
36237		var legacy = DataTable.ext.legacy.ajax;
36238		if ( legacy === null ) {
36239			return settings.sAjaxSource ? data : d;
36240		}
36241	
36242		// Otherwise, if legacy has been specified then we use that to decide on the
36243		// form
36244		return legacy ? data : d;
36245	}
36246	
36247	
36248	/**
36249	 * Data the data from the server (nuking the old) and redraw the table
36250	 *  @param {object} oSettings dataTables settings object
36251	 *  @param {object} json json data return from the server.
36252	 *  @param {string} json.sEcho Tracking flag for DataTables to match requests
36253	 *  @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
36254	 *  @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
36255	 *  @param {array} json.aaData The data to display on this page
36256	 *  @param {string} [json.sColumns] Column ordering (sName, comma separated)
36257	 *  @memberof DataTable#oApi
36258	 */
36259	function _fnAjaxUpdateDraw ( settings, json )
36260	{
36261		// v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
36262		// Support both
36263		var compat = function ( old, modern ) {
36264			return json[old] !== undefined ? json[old] : json[modern];
36265		};
36266	
36267		var data = _fnAjaxDataSrc( settings, json );
36268		var draw            = compat( 'sEcho',                'draw' );
36269		var recordsTotal    = compat( 'iTotalRecords',        'recordsTotal' );
36270		var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' );
36271	
36272		if ( draw !== undefined ) {
36273			// Protect against out of sequence returns
36274			if ( draw*1 < settings.iDraw ) {
36275				return;
36276			}
36277			settings.iDraw = draw * 1;
36278		}
36279	
36280		// No data in returned object, so rather than an array, we show an empty table
36281		if ( ! data ) {
36282			data = [];
36283		}
36284	
36285		_fnClearTable( settings );
36286		settings._iRecordsTotal   = parseInt(recordsTotal, 10);
36287		settings._iRecordsDisplay = parseInt(recordsFiltered, 10);
36288	
36289		for ( var i=0, ien=data.length ; i<ien ; i++ ) {
36290			_fnAddData( settings, data[i] );
36291		}
36292		settings.aiDisplay = settings.aiDisplayMaster.slice();
36293	
36294		_fnDraw( settings, true );
36295	
36296		if ( ! settings._bInitComplete ) {
36297			_fnInitComplete( settings, json );
36298		}
36299	
36300		_fnProcessingDisplay( settings, false );
36301	}
36302	
36303	
36304	/**
36305	 * Get the data from the JSON data source to use for drawing a table. Using
36306	 * `_fnGetObjectDataFn` allows the data to be sourced from a property of the
36307	 * source object, or from a processing function.
36308	 *  @param {object} oSettings dataTables settings object
36309	 *  @param  {object} json Data source object / array from the server
36310	 *  @return {array} Array of data to use
36311	 */
36312	 function _fnAjaxDataSrc ( oSettings, json, write )
36313	 {
36314		var dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ?
36315			oSettings.ajax.dataSrc :
36316			oSettings.sAjaxDataProp; // Compatibility with 1.9-.
36317	
36318		if ( ! write ) {
36319			if ( dataSrc === 'data' ) {
36320				// If the default, then we still want to support the old style, and safely ignore
36321				// it if possible
36322				return json.aaData || json[dataSrc];
36323			}
36324	
36325			return dataSrc !== "" ?
36326				_fnGetObjectDataFn( dataSrc )( json ) :
36327				json;
36328		}
36329	
36330		// set
36331		_fnSetObjectDataFn( dataSrc )( json, write );
36332	}
36333	
36334	/**
36335	 * Generate the node required for filtering text
36336	 *  @returns {node} Filter control element
36337	 *  @param {object} oSettings dataTables settings object
36338	 *  @memberof DataTable#oApi
36339	 */
36340	function _fnFeatureHtmlFilter ( settings )
36341	{
36342		var classes = settings.oClasses;
36343		var tableId = settings.sTableId;
36344		var language = settings.oLanguage;
36345		var previousSearch = settings.oPreviousSearch;
36346		var features = settings.aanFeatures;
36347		var input = '<input type="search" class="'+classes.sFilterInput+'"/>';
36348	
36349		var str = language.sSearch;
36350		str = str.match(/_INPUT_/) ?
36351			str.replace('_INPUT_', input) :
36352			str+input;
36353	
36354		var filter = $('<div/>', {
36355				'id': ! features.f ? tableId+'_filter' : null,
36356				'class': classes.sFilter
36357			} )
36358			.append( $('<label/>' ).append( str ) );
36359	
36360		var searchFn = function(event) {
36361			/* Update all other filter input elements for the new display */
36362			var n = features.f;
36363			var val = !this.value ? "" : this.value; // mental IE8 fix :-(
36364			if(previousSearch
vendor: 10,320 bytes, lines 36364-36701
36364['return'] && event.key !== "Enter") {
36365				return;
36366			}
36367			/* Now do the filter */
36368			if ( val != previousSearch.sSearch ) {
36369				_fnFilterComplete( settings, {
36370					"sSearch": val,
36371					"bRegex": previousSearch.bRegex,
36372					"bSmart": previousSearch.bSmart ,
36373					"bCaseInsensitive": previousSearch.bCaseInsensitive,
36374					"return": previousSearch['return']
36375				} );
36376	
36377				// Need to redraw, without resorting
36378				settings._iDisplayStart = 0;
36379				_fnDraw( settings );
36380			}
36381		};
36382	
36383		var searchDelay = settings.searchDelay !== null ?
36384			settings.searchDelay :
36385			_fnDataSource( settings ) === 'ssp' ?
36386				400 :
36387				0;
36388	
36389		var jqFilter = $('input', filter)
36390			.val( previousSearch.sSearch )
36391			.attr( 'placeholder', language.sSearchPlaceholder )
36392			.on(
36393				'keyup.DT search.DT input.DT paste.DT cut.DT',
36394				searchDelay ?
36395					_fnThrottle( searchFn, searchDelay ) :
36396					searchFn
36397			)
36398			.on( 'mouseup.DT', function(e) {
36399				// Edge fix! Edge 17 does not trigger anything other than mouse events when clicking
36400				// on the clear icon (Edge bug 17584515). This is safe in other browsers as `searchFn`
36401				// checks the value to see if it has changed. In other browsers it won't have.
36402				setTimeout( function () {
36403					searchFn.call(jqFilter[0], e);
36404				}, 10);
36405			} )
36406			.on( 'keypress.DT', function(e) {
36407				/* Prevent form submission */
36408				if ( e.keyCode == 13 ) {
36409					return false;
36410				}
36411			} )
36412			.attr('aria-controls', tableId);
36413	
36414		// Update the input elements whenever the table is filtered
36415		$(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {
36416			if ( settings === s ) {
36417				// IE9 throws an 'unknown error' if document.activeElement is used
36418				// inside an iframe or frame...
36419				try {
36420					if ( jqFilter[0] !== document.activeElement ) {
36421						jqFilter.val( previousSearch.sSearch );
36422					}
36423				}
36424				catch ( e ) {}
36425			}
36426		} );
36427	
36428		return filter[0];
36429	}
36430	
36431	
36432	/**
36433	 * Filter the table using both the global filter and column based filtering
36434	 *  @param {object} oSettings dataTables settings object
36435	 *  @param {object} oSearch search information
36436	 *  @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
36437	 *  @memberof DataTable#oApi
36438	 */
36439	function _fnFilterComplete ( oSettings, oInput, iForce )
36440	{
36441		var oPrevSearch = oSettings.oPreviousSearch;
36442		var aoPrevSearch = oSettings.aoPreSearchCols;
36443		var fnSaveFilter = function ( oFilter ) {
36444			/* Save the filtering values */
36445			oPrevSearch.sSearch = oFilter.sSearch;
36446			oPrevSearch.bRegex = oFilter.bRegex;
36447			oPrevSearch.bSmart = oFilter.bSmart;
36448			oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
36449			oPrevSearch['return'] = oFilter['return'];
36450		};
36451		var fnRegex = function ( o ) {
36452			// Backwards compatibility with the bEscapeRegex option
36453			return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex;
36454		};
36455	
36456		// Resolve any column types that are unknown due to addition or invalidation
36457		// @todo As per sort - can this be moved into an event handler?
36458		_fnColumnTypes( oSettings );
36459	
36460		/* In server-side processing all filtering is done by the server, so no point hanging around here */
36461		if ( _fnDataSource( oSettings ) != 'ssp' )
36462		{
36463			/* Global filter */
36464			_fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive );
36465			fnSaveFilter( oInput );
36466	
36467			/* Now do the individual column filter */
36468			for ( var i=0 ; i<aoPrevSearch.length ; i++ )
36469			{
36470				_fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]),
36471					aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
36472			}
36473	
36474			/* Custom filtering */
36475			_fnFilterCustom( oSettings );
36476		}
36477		else
36478		{
36479			fnSaveFilter( oInput );
36480		}
36481	
36482		/* Tell the draw function we have been filtering */
36483		oSettings.bFiltered = true;
36484		_fnCallbackFire( oSettings, null, 'search', [oSettings] );
36485	}
36486	
36487	
36488	/**
36489	 * Apply custom filtering functions
36490	 *  @param {object} oSettings dataTables settings object
36491	 *  @memberof DataTable#oApi
36492	 */
36493	function _fnFilterCustom( settings )
36494	{
36495		var filters = DataTable.ext.search;
36496		var displayRows = settings.aiDisplay;
36497		var row, rowIdx;
36498	
36499		for ( var i=0, ien=filters.length ; i<ien ; i++ ) {
36500			var rows = [];
36501	
36502			// Loop over each row and see if it should be included
36503			for ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {
36504				rowIdx = displayRows[ j ];
36505				row = settings.aoData[ rowIdx ];
36506	
36507				if ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {
36508					rows.push( rowIdx );
36509				}
36510			}
36511	
36512			// So the array reference doesn't break set the results into the
36513			// existing array
36514			displayRows.length = 0;
36515			$.merge( displayRows, rows );
36516		}
36517	}
36518	
36519	
36520	/**
36521	 * Filter the table on a per-column basis
36522	 *  @param {object} oSettings dataTables settings object
36523	 *  @param {string} sInput string to filter on
36524	 *  @param {int} iColumn column to filter
36525	 *  @param {bool} bRegex treat search string as a regular expression or not
36526	 *  @param {bool} bSmart use smart filtering or not
36527	 *  @param {bool} bCaseInsensitive Do case insensitive matching or not
36528	 *  @memberof DataTable#oApi
36529	 */
36530	function _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive )
36531	{
36532		if ( searchStr === '' ) {
36533			return;
36534		}
36535	
36536		var data;
36537		var out = [];
36538		var display = settings.aiDisplay;
36539		var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive );
36540	
36541		for ( var i=0 ; i<display.length ; i++ ) {
36542			data = settings.aoData[ display[i] ]._aFilterData[ colIdx ];
36543	
36544			if ( rpSearch.test( data ) ) {
36545				out.push( display[i] );
36546			}
36547		}
36548	
36549		settings.aiDisplay = out;
36550	}
36551	
36552	
36553	/**
36554	 * Filter the data table based on user input and draw the table
36555	 *  @param {object} settings dataTables settings object
36556	 *  @param {string} input string to filter on
36557	 *  @param {int} force optional - force a research of the master array (1) or not (undefined or 0)
36558	 *  @param {bool} regex treat as a regular expression or not
36559	 *  @param {bool} smart perform smart filtering or not
36560	 *  @param {bool} caseInsensitive Do case insensitive matching or not
36561	 *  @memberof DataTable#oApi
36562	 */
36563	function _fnFilter( settings, input, force, regex, smart, caseInsensitive )
36564	{
36565		var rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive );
36566		var prevSearch = settings.oPreviousSearch.sSearch;
36567		var displayMaster = settings.aiDisplayMaster;
36568		var display, invalidated, i;
36569		var filtered = [];
36570	
36571		// Need to take account of custom filtering functions - always filter
36572		if ( DataTable.ext.search.length !== 0 ) {
36573			force = true;
36574		}
36575	
36576		// Check if any of the rows were invalidated
36577		invalidated = _fnFilterData( settings );
36578	
36579		// If the input is blank - we just want the full data set
36580		if ( input.length <= 0 ) {
36581			settings.aiDisplay = displayMaster.slice();
36582		}
36583		else {
36584			// New search - start from the master array
36585			if ( invalidated ||
36586				 force ||
36587				 regex ||
36588				 prevSearch.length > input.length ||
36589				 input.indexOf(prevSearch) !== 0 ||
36590				 settings.bSorted // On resort, the display master needs to be
36591				                  // re-filtered since indexes will have changed
36592			) {
36593				settings.aiDisplay = displayMaster.slice();
36594			}
36595	
36596			// Search the display array
36597			display = settings.aiDisplay;
36598	
36599			for ( i=0 ; i<display.length ; i++ ) {
36600				if ( rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) {
36601					filtered.push( display[i] );
36602				}
36603			}
36604	
36605			settings.aiDisplay = filtered;
36606		}
36607	}
36608	
36609	
36610	/**
36611	 * Build a regular expression object suitable for searching a table
36612	 *  @param {string} sSearch string to search for
36613	 *  @param {bool} bRegex treat as a regular expression or not
36614	 *  @param {bool} bSmart perform smart filtering or not
36615	 *  @param {bool} bCaseInsensitive Do case insensitive matching or not
36616	 *  @returns {RegExp} constructed object
36617	 *  @memberof DataTable#oApi
36618	 */
36619	function _fnFilterCreateSearch( search, regex, smart, caseInsensitive )
36620	{
36621		search = regex ?
36622			search :
36623			_fnEscapeRegex( search );
36624		
36625		if ( smart ) {
36626			/* For smart filtering we want to allow the search to work regardless of
36627			 * word order. We also want double quoted text to be preserved, so word
36628			 * order is important - a la google. So this is what we want to
36629			 * generate:
36630			 * 
36631			 * ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$
36632			 */
36633			var a = $.map( search.match( /["\u201C][^"\u201D]+["\u201D]|[^ ]+/g ) || [''], function ( word ) {
36634				if ( word.charAt(0) === '"' ) {
36635					var m = word.match( /^"(.*)"$/ );
36636					word = m ? m[1] : word;
36637				}
36638				else if ( word.charAt(0) === '\u201C' ) {
36639					var m = word.match( /^\u201C(.*)\u201D$/ );
36640					word = m ? m[1] : word;
36641				}
36642	
36643				return word.replace('"', '');
36644			} );
36645	
36646			search = '^(?=.*?'+a.join( ')(?=.*?' )+').*$';
36647		}
36648	
36649		return new RegExp( search, caseInsensitive ? 'i' : '' );
36650	}
36651	
36652	
36653	/**
36654	 * Escape a string such that it can be used in a regular expression
36655	 *  @param {string} sVal string to escape
36656	 *  @returns {string} escaped string
36657	 *  @memberof DataTable#oApi
36658	 */
36659	var _fnEscapeRegex = DataTable.util.escapeRegex;
36660	
36661	var __filter_div = $('<div>')[0];
36662	var __filter_div_textContent = __filter_div.textContent !== undefined;
36663	
36664	// Update the filtering data for each row if needed (by invalidation or first run)
36665	function _fnFilterData ( settings )
36666	{
36667		var columns = settings.aoColumns;
36668		var column;
36669		var i, j, ien, jen, filterData, cellData, row;
36670		var wasInvalidated = false;
36671	
36672		for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
36673			row = settings.aoData[i];
36674	
36675			if ( ! row._aFilterData ) {
36676				filterData = [];
36677	
36678				for ( j=0, jen=columns.length ; j<jen ; j++ ) {
36679					column = columns[j];
36680	
36681					if ( column.bSearchable ) {
36682						cellData = _fnGetCellData( settings, i, j, 'filter' );
36683	
36684						// Search in DataTables 1.10 is string based. In 1.11 this
36685						// should be altered to also allow strict type checking.
36686						if ( cellData === null ) {
36687							cellData = '';
36688						}
36689	
36690						if ( typeof cellData !== 'string' && cellData.toString ) {
36691							cellData = cellData.toString();
36692						}
36693					}
36694					else {
36695						cellData = '';
36696					}
36697	
36698					// If it looks like there is an HTML entity in the string,
36699					// attempt to decode it so sorting works as expected. Note that
36700					// we could use a single line of jQuery to do this, but the DOM
36701					// method used here is much faster https
vendor: 28,961 bytes, lines 36701-37726
36701://jsperf.com/html-decode
36702					if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
36703						__filter_div.innerHTML = cellData;
36704						cellData = __filter_div_textContent ?
36705							__filter_div.textContent :
36706							__filter_div.innerText;
36707					}
36708	
36709					if ( cellData.replace ) {
36710						cellData = cellData.replace(/[\r\n\u2028]/g, '');
36711					}
36712	
36713					filterData.push( cellData );
36714				}
36715	
36716				row._aFilterData = filterData;
36717				row._sFilterRow = filterData.join('  ');
36718				wasInvalidated = true;
36719			}
36720		}
36721	
36722		return wasInvalidated;
36723	}
36724	
36725	
36726	/**
36727	 * Convert from the internal Hungarian notation to camelCase for external
36728	 * interaction
36729	 *  @param {object} obj Object to convert
36730	 *  @returns {object} Inverted object
36731	 *  @memberof DataTable#oApi
36732	 */
36733	function _fnSearchToCamel ( obj )
36734	{
36735		return {
36736			search:          obj.sSearch,
36737			smart:           obj.bSmart,
36738			regex:           obj.bRegex,
36739			caseInsensitive: obj.bCaseInsensitive
36740		};
36741	}
36742	
36743	
36744	
36745	/**
36746	 * Convert from camelCase notation to the internal Hungarian. We could use the
36747	 * Hungarian convert function here, but this is cleaner
36748	 *  @param {object} obj Object to convert
36749	 *  @returns {object} Inverted object
36750	 *  @memberof DataTable#oApi
36751	 */
36752	function _fnSearchToHung ( obj )
36753	{
36754		return {
36755			sSearch:          obj.search,
36756			bSmart:           obj.smart,
36757			bRegex:           obj.regex,
36758			bCaseInsensitive: obj.caseInsensitive
36759		};
36760	}
36761	
36762	/**
36763	 * Generate the node required for the info display
36764	 *  @param {object} oSettings dataTables settings object
36765	 *  @returns {node} Information element
36766	 *  @memberof DataTable#oApi
36767	 */
36768	function _fnFeatureHtmlInfo ( settings )
36769	{
36770		var
36771			tid = settings.sTableId,
36772			nodes = settings.aanFeatures.i,
36773			n = $('<div/>', {
36774				'class': settings.oClasses.sInfo,
36775				'id': ! nodes ? tid+'_info' : null
36776			} );
36777	
36778		if ( ! nodes ) {
36779			// Update display on each draw
36780			settings.aoDrawCallback.push( {
36781				"fn": _fnUpdateInfo,
36782				"sName": "information"
36783			} );
36784	
36785			n
36786				.attr( 'role', 'status' )
36787				.attr( 'aria-live', 'polite' );
36788	
36789			// Table is described by our info div
36790			$(settings.nTable).attr( 'aria-describedby', tid+'_info' );
36791		}
36792	
36793		return n[0];
36794	}
36795	
36796	
36797	/**
36798	 * Update the information elements in the display
36799	 *  @param {object} settings dataTables settings object
36800	 *  @memberof DataTable#oApi
36801	 */
36802	function _fnUpdateInfo ( settings )
36803	{
36804		/* Show information about the table */
36805		var nodes = settings.aanFeatures.i;
36806		if ( nodes.length === 0 ) {
36807			return;
36808		}
36809	
36810		var
36811			lang  = settings.oLanguage,
36812			start = settings._iDisplayStart+1,
36813			end   = settings.fnDisplayEnd(),
36814			max   = settings.fnRecordsTotal(),
36815			total = settings.fnRecordsDisplay(),
36816			out   = total ?
36817				lang.sInfo :
36818				lang.sInfoEmpty;
36819	
36820		if ( total !== max ) {
36821			/* Record set after filtering */
36822			out += ' ' + lang.sInfoFiltered;
36823		}
36824	
36825		// Convert the macros
36826		out += lang.sInfoPostFix;
36827		out = _fnInfoMacros( settings, out );
36828	
36829		var callback = lang.fnInfoCallback;
36830		if ( callback !== null ) {
36831			out = callback.call( settings.oInstance,
36832				settings, start, end, max, total, out
36833			);
36834		}
36835	
36836		$(nodes).html( out );
36837	}
36838	
36839	
36840	function _fnInfoMacros ( settings, str )
36841	{
36842		// When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
36843		// internally
36844		var
36845			formatter  = settings.fnFormatNumber,
36846			start      = settings._iDisplayStart+1,
36847			len        = settings._iDisplayLength,
36848			vis        = settings.fnRecordsDisplay(),
36849			all        = len === -1;
36850	
36851		return str.
36852			replace(/_START_/g, formatter.call( settings, start ) ).
36853			replace(/_END_/g,   formatter.call( settings, settings.fnDisplayEnd() ) ).
36854			replace(/_MAX_/g,   formatter.call( settings, settings.fnRecordsTotal() ) ).
36855			replace(/_TOTAL_/g, formatter.call( settings, vis ) ).
36856			replace(/_PAGE_/g,  formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).
36857			replace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) );
36858	}
36859	
36860	
36861	
36862	/**
36863	 * Draw the table for the first time, adding all required features
36864	 *  @param {object} settings dataTables settings object
36865	 *  @memberof DataTable#oApi
36866	 */
36867	function _fnInitialise ( settings )
36868	{
36869		var i, iLen, iAjaxStart=settings.iInitDisplayStart;
36870		var columns = settings.aoColumns, column;
36871		var features = settings.oFeatures;
36872		var deferLoading = settings.bDeferLoading; // value modified by the draw
36873	
36874		/* Ensure that the table data is fully initialised */
36875		if ( ! settings.bInitialised ) {
36876			setTimeout( function(){ _fnInitialise( settings ); }, 200 );
36877			return;
36878		}
36879	
36880		/* Show the display HTML options */
36881		_fnAddOptionsHtml( settings );
36882	
36883		/* Build and draw the header / footer for the table */
36884		_fnBuildHead( settings );
36885		_fnDrawHead( settings, settings.aoHeader );
36886		_fnDrawHead( settings, settings.aoFooter );
36887	
36888		/* Okay to show that something is going on now */
36889		_fnProcessingDisplay( settings, true );
36890	
36891		/* Calculate sizes for columns */
36892		if ( features.bAutoWidth ) {
36893			_fnCalculateColumnWidths( settings );
36894		}
36895	
36896		for ( i=0, iLen=columns.length ; i<iLen ; i++ ) {
36897			column = columns[i];
36898	
36899			if ( column.sWidth ) {
36900				column.nTh.style.width = _fnStringToCss( column.sWidth );
36901			}
36902		}
36903	
36904		_fnCallbackFire( settings, null, 'preInit', [settings] );
36905	
36906		// If there is default sorting required - let's do it. The sort function
36907		// will do the drawing for us. Otherwise we draw the table regardless of the
36908		// Ajax source - this allows the table to look initialised for Ajax sourcing
36909		// data (show 'loading' message possibly)
36910		_fnReDraw( settings );
36911	
36912		// Server-side processing init complete is done by _fnAjaxUpdateDraw
36913		var dataSrc = _fnDataSource( settings );
36914		if ( dataSrc != 'ssp' || deferLoading ) {
36915			// if there is an ajax source load the data
36916			if ( dataSrc == 'ajax' ) {
36917				_fnBuildAjax( settings, [], function(json) {
36918					var aData = _fnAjaxDataSrc( settings, json );
36919	
36920					// Got the data - add it to the table
36921					for ( i=0 ; i<aData.length ; i++ ) {
36922						_fnAddData( settings, aData[i] );
36923					}
36924	
36925					// Reset the init display for cookie saving. We've already done
36926					// a filter, and therefore cleared it before. So we need to make
36927					// it appear 'fresh'
36928					settings.iInitDisplayStart = iAjaxStart;
36929	
36930					_fnReDraw( settings );
36931	
36932					_fnProcessingDisplay( settings, false );
36933					_fnInitComplete( settings, json );
36934				}, settings );
36935			}
36936			else {
36937				_fnProcessingDisplay( settings, false );
36938				_fnInitComplete( settings );
36939			}
36940		}
36941	}
36942	
36943	
36944	/**
36945	 * Draw the table for the first time, adding all required features
36946	 *  @param {object} oSettings dataTables settings object
36947	 *  @param {object} [json] JSON from the server that completed the table, if using Ajax source
36948	 *    with client-side processing (optional)
36949	 *  @memberof DataTable#oApi
36950	 */
36951	function _fnInitComplete ( settings, json )
36952	{
36953		settings._bInitComplete = true;
36954	
36955		// When data was added after the initialisation (data or Ajax) we need to
36956		// calculate the column sizing
36957		if ( json || settings.oInit.aaData ) {
36958			_fnAdjustColumnSizing( settings );
36959		}
36960	
36961		_fnCallbackFire( settings, null, 'plugin-init', [settings, json] );
36962		_fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] );
36963	}
36964	
36965	
36966	function _fnLengthChange ( settings, val )
36967	{
36968		var len = parseInt( val, 10 );
36969		settings._iDisplayLength = len;
36970	
36971		_fnLengthOverflow( settings );
36972	
36973		// Fire length change event
36974		_fnCallbackFire( settings, null, 'length', [settings, len] );
36975	}
36976	
36977	
36978	/**
36979	 * Generate the node required for user display length changing
36980	 *  @param {object} settings dataTables settings object
36981	 *  @returns {node} Display length feature node
36982	 *  @memberof DataTable#oApi
36983	 */
36984	function _fnFeatureHtmlLength ( settings )
36985	{
36986		var
36987			classes  = settings.oClasses,
36988			tableId  = settings.sTableId,
36989			menu     = settings.aLengthMenu,
36990			d2       = Array.isArray( menu[0] ),
36991			lengths  = d2 ? menu[0] : menu,
36992			language = d2 ? menu[1] : menu;
36993	
36994		var select = $('<select/>', {
36995			'name':          tableId+'_length',
36996			'aria-controls': tableId,
36997			'class':         classes.sLengthSelect
36998		} );
36999	
37000		for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
37001			select[0][ i ] = new Option(
37002				typeof language[i] === 'number' ?
37003					settings.fnFormatNumber( language[i] ) :
37004					language[i],
37005				lengths[i]
37006			);
37007		}
37008	
37009		var div = $('<div><label/></div>').addClass( classes.sLength );
37010		if ( ! settings.aanFeatures.l ) {
37011			div[0].id = tableId+'_length';
37012		}
37013	
37014		div.children().append(
37015			settings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML )
37016		);
37017	
37018		// Can't use `select` variable as user might provide their own and the
37019		// reference is broken by the use of outerHTML
37020		$('select', div)
37021			.val( settings._iDisplayLength )
37022			.on( 'change.DT', function(e) {
37023				_fnLengthChange( settings, $(this).val() );
37024				_fnDraw( settings );
37025			} );
37026	
37027		// Update node value whenever anything changes the table's length
37028		$(settings.nTable).on( 'length.dt.DT', function (e, s, len) {
37029			if ( settings === s ) {
37030				$('select', div).val( len );
37031			}
37032		} );
37033	
37034		return div[0];
37035	}
37036	
37037	
37038	
37039	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
37040	 * Note that most of the paging logic is done in
37041	 * DataTable.ext.pager
37042	 */
37043	
37044	/**
37045	 * Generate the node required for default pagination
37046	 *  @param {object} oSettings dataTables settings object
37047	 *  @returns {node} Pagination feature node
37048	 *  @memberof DataTable#oApi
37049	 */
37050	function _fnFeatureHtmlPaginate ( settings )
37051	{
37052		var
37053			type   = settings.sPaginationType,
37054			plugin = DataTable.ext.pager[ type ],
37055			modern = typeof plugin === 'function',
37056			redraw = function( settings ) {
37057				_fnDraw( settings );
37058			},
37059			node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0],
37060			features = settings.aanFeatures;
37061	
37062		if ( ! modern ) {
37063			plugin.fnInit( settings, node, redraw );
37064		}
37065	
37066		/* Add a draw callback for the pagination on first instance, to update the paging display */
37067		if ( ! features.p )
37068		{
37069			node.id = settings.sTableId+'_paginate';
37070	
37071			settings.aoDrawCallback.push( {
37072				"fn": function( settings ) {
37073					if ( modern ) {
37074						var
37075							start      = settings._iDisplayStart,
37076							len        = settings._iDisplayLength,
37077							visRecords = settings.fnRecordsDisplay(),
37078							all        = len === -1,
37079							page = all ? 0 : Math.ceil( start / len ),
37080							pages = all ? 1 : Math.ceil( visRecords / len ),
37081							buttons = plugin(page, pages),
37082							i, ien;
37083	
37084						for ( i=0, ien=features.p.length ; i<ien ; i++ ) {
37085							_fnRenderer( settings, 'pageButton' )(
37086								settings, features.p[i], i, buttons, page, pages
37087							);
37088						}
37089					}
37090					else {
37091						plugin.fnUpdate( settings, redraw );
37092					}
37093				},
37094				"sName": "pagination"
37095			} );
37096		}
37097	
37098		return node;
37099	}
37100	
37101	
37102	/**
37103	 * Alter the display settings to change the page
37104	 *  @param {object} settings DataTables settings object
37105	 *  @param {string|int} action Paging action to take: "first", "previous",
37106	 *    "next" or "last" or page number to jump to (integer)
37107	 *  @param [bool] redraw Automatically draw the update or not
37108	 *  @returns {bool} true page has changed, false - no change
37109	 *  @memberof DataTable#oApi
37110	 */
37111	function _fnPageChange ( settings, action, redraw )
37112	{
37113		var
37114			start     = settings._iDisplayStart,
37115			len       = settings._iDisplayLength,
37116			records   = settings.fnRecordsDisplay();
37117	
37118		if ( records === 0 || len === -1 )
37119		{
37120			start = 0;
37121		}
37122		else if ( typeof action === "number" )
37123		{
37124			start = action * len;
37125	
37126			if ( start > records )
37127			{
37128				start = 0;
37129			}
37130		}
37131		else if ( action == "first" )
37132		{
37133			start = 0;
37134		}
37135		else if ( action == "previous" )
37136		{
37137			start = len >= 0 ?
37138				start - len :
37139				0;
37140	
37141			if ( start < 0 )
37142			{
37143			  start = 0;
37144			}
37145		}
37146		else if ( action == "next" )
37147		{
37148			if ( start + len < records )
37149			{
37150				start += len;
37151			}
37152		}
37153		else if ( action == "last" )
37154		{
37155			start = Math.floor( (records-1) / len) * len;
37156		}
37157		else
37158		{
37159			_fnLog( settings, 0, "Unknown paging action: "+action, 5 );
37160		}
37161	
37162		var changed = settings._iDisplayStart !== start;
37163		settings._iDisplayStart = start;
37164	
37165		if ( changed ) {
37166			_fnCallbackFire( settings, null, 'page', [settings] );
37167	
37168			if ( redraw ) {
37169				_fnDraw( settings );
37170			}
37171		}
37172		else {
37173			// No change event - paging was called, but no change
37174			_fnCallbackFire( settings, null, 'page-nc', [settings] );
37175		}
37176	
37177		return changed;
37178	}
37179	
37180	
37181	
37182	/**
37183	 * Generate the node required for the processing node
37184	 *  @param {object} settings dataTables settings object
37185	 *  @returns {node} Processing element
37186	 *  @memberof DataTable#oApi
37187	 */
37188	function _fnFeatureHtmlProcessing ( settings )
37189	{
37190		return $('<div/>', {
37191				'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null,
37192				'class': settings.oClasses.sProcessing,
37193				'role': 'status'
37194			} )
37195			.html( settings.oLanguage.sProcessing )
37196			.append('<div><div></div><div></div><div></div><div></div></div>')
37197			.insertBefore( settings.nTable )[0];
37198	}
37199	
37200	
37201	/**
37202	 * Display or hide the processing indicator
37203	 *  @param {object} settings dataTables settings object
37204	 *  @param {bool} show Show the processing indicator (true) or not (false)
37205	 *  @memberof DataTable#oApi
37206	 */
37207	function _fnProcessingDisplay ( settings, show )
37208	{
37209		if ( settings.oFeatures.bProcessing ) {
37210			$(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' );
37211		}
37212	
37213		_fnCallbackFire( settings, null, 'processing', [settings, show] );
37214	}
37215	
37216	/**
37217	 * Add any control elements for the table - specifically scrolling
37218	 *  @param {object} settings dataTables settings object
37219	 *  @returns {node} Node to add to the DOM
37220	 *  @memberof DataTable#oApi
37221	 */
37222	function _fnFeatureHtmlTable ( settings )
37223	{
37224		var table = $(settings.nTable);
37225	
37226		// Scrolling from here on in
37227		var scroll = settings.oScroll;
37228	
37229		if ( scroll.sX === '' && scroll.sY === '' ) {
37230			return settings.nTable;
37231		}
37232	
37233		var scrollX = scroll.sX;
37234		var scrollY = scroll.sY;
37235		var classes = settings.oClasses;
37236		var caption = table.children('caption');
37237		var captionSide = caption.length ? caption[0]._captionSide : null;
37238		var headerClone = $( table[0].cloneNode(false) );
37239		var footerClone = $( table[0].cloneNode(false) );
37240		var footer = table.children('tfoot');
37241		var _div = '<div/>';
37242		var size = function ( s ) {
37243			return !s ? null : _fnStringToCss( s );
37244		};
37245	
37246		if ( ! footer.length ) {
37247			footer = null;
37248		}
37249	
37250		/*
37251		 * The HTML structure that we want to generate in this function is:
37252		 *  div - scroller
37253		 *    div - scroll head
37254		 *      div - scroll head inner
37255		 *        table - scroll head table
37256		 *          thead - thead
37257		 *    div - scroll body
37258		 *      table - table (master table)
37259		 *        thead - thead clone for sizing
37260		 *        tbody - tbody
37261		 *    div - scroll foot
37262		 *      div - scroll foot inner
37263		 *        table - scroll foot table
37264		 *          tfoot - tfoot
37265		 */
37266		var scroller = $( _div, { 'class': classes.sScrollWrapper } )
37267			.append(
37268				$(_div, { 'class': classes.sScrollHead } )
37269					.css( {
37270						overflow: 'hidden',
37271						position: 'relative',
37272						border: 0,
37273						width: scrollX ? size(scrollX) : '100%'
37274					} )
37275					.append(
37276						$(_div, { 'class': classes.sScrollHeadInner } )
37277							.css( {
37278								'box-sizing': 'content-box',
37279								width: scroll.sXInner || '100%'
37280							} )
37281							.append(
37282								headerClone
37283									.removeAttr('id')
37284									.css( 'margin-left', 0 )
37285									.append( captionSide === 'top' ? caption : null )
37286									.append(
37287										table.children('thead')
37288									)
37289							)
37290					)
37291			)
37292			.append(
37293				$(_div, { 'class': classes.sScrollBody } )
37294					.css( {
37295						position: 'relative',
37296						overflow: 'auto',
37297						width: size( scrollX )
37298					} )
37299					.append( table )
37300			);
37301	
37302		if ( footer ) {
37303			scroller.append(
37304				$(_div, { 'class': classes.sScrollFoot } )
37305					.css( {
37306						overflow: 'hidden',
37307						border: 0,
37308						width: scrollX ? size(scrollX) : '100%'
37309					} )
37310					.append(
37311						$(_div, { 'class': classes.sScrollFootInner } )
37312							.append(
37313								footerClone
37314									.removeAttr('id')
37315									.css( 'margin-left', 0 )
37316									.append( captionSide === 'bottom' ? caption : null )
37317									.append(
37318										table.children('tfoot')
37319									)
37320							)
37321					)
37322			);
37323		}
37324	
37325		var children = scroller.children();
37326		var scrollHead = children[0];
37327		var scrollBody = children[1];
37328		var scrollFoot = footer ? children[2] : null;
37329	
37330		// When the body is scrolled, then we also want to scroll the headers
37331		if ( scrollX ) {
37332			$(scrollBody).on( 'scroll.DT', function (e) {
37333				var scrollLeft = this.scrollLeft;
37334	
37335				scrollHead.scrollLeft = scrollLeft;
37336	
37337				if ( footer ) {
37338					scrollFoot.scrollLeft = scrollLeft;
37339				}
37340			} );
37341		}
37342	
37343		$(scrollBody).css('max-height', scrollY);
37344		if (! scroll.bCollapse) {
37345			$(scrollBody).css('height', scrollY);
37346		}
37347	
37348		settings.nScrollHead = scrollHead;
37349		settings.nScrollBody = scrollBody;
37350		settings.nScrollFoot = scrollFoot;
37351	
37352		// On redraw - align columns
37353		settings.aoDrawCallback.push( {
37354			"fn": _fnScrollDraw,
37355			"sName": "scrolling"
37356		} );
37357	
37358		return scroller[0];
37359	}
37360	
37361	
37362	
37363	/**
37364	 * Update the header, footer and body tables for resizing - i.e. column
37365	 * alignment.
37366	 *
37367	 * Welcome to the most horrible function DataTables. The process that this
37368	 * function follows is basically:
37369	 *   1. Re-create the table inside the scrolling div
37370	 *   2. Take live measurements from the DOM
37371	 *   3. Apply the measurements to align the columns
37372	 *   4. Clean up
37373	 *
37374	 *  @param {object} settings dataTables settings object
37375	 *  @memberof DataTable#oApi
37376	 */
37377	function _fnScrollDraw ( settings )
37378	{
37379		// Given that this is such a monster function, a lot of variables are use
37380		// to try and keep the minimised size as small as possible
37381		var
37382			scroll         = settings.oScroll,
37383			scrollX        = scroll.sX,
37384			scrollXInner   = scroll.sXInner,
37385			scrollY        = scroll.sY,
37386			barWidth       = scroll.iBarWidth,
37387			divHeader      = $(settings.nScrollHead),
37388			divHeaderStyle = divHeader[0].style,
37389			divHeaderInner = divHeader.children('div'),
37390			divHeaderInnerStyle = divHeaderInner[0].style,
37391			divHeaderTable = divHeaderInner.children('table'),
37392			divBodyEl      = settings.nScrollBody,
37393			divBody        = $(divBodyEl),
37394			divBodyStyle   = divBodyEl.style,
37395			divFooter      = $(settings.nScrollFoot),
37396			divFooterInner = divFooter.children('div'),
37397			divFooterTable = divFooterInner.children('table'),
37398			header         = $(settings.nTHead),
37399			table          = $(settings.nTable),
37400			tableEl        = table[0],
37401			tableStyle     = tableEl.style,
37402			footer         = settings.nTFoot ? $(settings.nTFoot) : null,
37403			browser        = settings.oBrowser,
37404			ie67           = browser.bScrollOversize,
37405			dtHeaderCells  = _pluck( settings.aoColumns, 'nTh' ),
37406			headerTrgEls, footerTrgEls,
37407			headerSrcEls, footerSrcEls,
37408			headerCopy, footerCopy,
37409			headerWidths=[], footerWidths=[],
37410			headerContent=[], footerContent=[],
37411			idx, correction, sanityWidth,
37412			zeroOut = function(nSizer) {
37413				var style = nSizer.style;
37414				style.paddingTop = "0";
37415				style.paddingBottom = "0";
37416				style.borderTopWidth = "0";
37417				style.borderBottomWidth = "0";
37418				style.height = 0;
37419			};
37420	
37421		// If the scrollbar visibility has changed from the last draw, we need to
37422		// adjust the column sizes as the table width will have changed to account
37423		// for the scrollbar
37424		var scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight;
37425		
37426		if ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) {
37427			settings.scrollBarVis = scrollBarVis;
37428			_fnAdjustColumnSizing( settings );
37429			return; // adjust column sizing will call this function again
37430		}
37431		else {
37432			settings.scrollBarVis = scrollBarVis;
37433		}
37434	
37435		/*
37436		 * 1. Re-create the table inside the scrolling div
37437		 */
37438	
37439		// Remove the old minimised thead and tfoot elements in the inner table
37440		table.children('thead, tfoot').remove();
37441	
37442		if ( footer ) {
37443			footerCopy = footer.clone().prependTo( table );
37444			footerTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized
37445			footerSrcEls = footerCopy.find('tr');
37446			footerCopy.find('[id]').removeAttr('id');
37447		}
37448	
37449		// Clone the current header and footer elements and then place it into the inner table
37450		headerCopy = header.clone().prependTo( table );
37451		headerTrgEls = header.find('tr'); // original header is in its own table
37452		headerSrcEls = headerCopy.find('tr');
37453		headerCopy.find('th, td').removeAttr('tabindex');
37454		headerCopy.find('[id]').removeAttr('id');
37455	
37456	
37457		/*
37458		 * 2. Take live measurements from the DOM - do not alter the DOM itself!
37459		 */
37460	
37461		// Remove old sizing and apply the calculated column widths
37462		// Get the unique column headers in the newly created (cloned) header. We want to apply the
37463		// calculated sizes to this header
37464		if ( ! scrollX )
37465		{
37466			divBodyStyle.width = '100%';
37467			divHeader[0].style.width = '100%';
37468		}
37469	
37470		$.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) {
37471			idx = _fnVisibleToColumnIndex( settings, i );
37472			el.style.width = settings.aoColumns[idx].sWidth;
37473		} );
37474	
37475		if ( footer ) {
37476			_fnApplyToChildren( function(n) {
37477				n.style.width = "";
37478			}, footerSrcEls );
37479		}
37480	
37481		// Size the table as a whole
37482		sanityWidth = table.outerWidth();
37483		if ( scrollX === "" ) {
37484			// No x scrolling
37485			tableStyle.width = "100%";
37486	
37487			// IE7 will make the width of the table when 100% include the scrollbar
37488			// - which is shouldn't. When there is a scrollbar we need to take this
37489			// into account.
37490			if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||
37491				divBody.css('overflow-y') == "scroll")
37492			) {
37493				tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);
37494			}
37495	
37496			// Recalculate the sanity width
37497			sanityWidth = table.outerWidth();
37498		}
37499		else if ( scrollXInner !== "" ) {
37500			// legacy x scroll inner has been given - use it
37501			tableStyle.width = _fnStringToCss(scrollXInner);
37502	
37503			// Recalculate the sanity width
37504			sanityWidth = table.outerWidth();
37505		}
37506	
37507		// Hidden header should have zero height, so remove padding and borders. Then
37508		// set the width based on the real headers
37509	
37510		// Apply all styles in one pass
37511		_fnApplyToChildren( zeroOut, headerSrcEls );
37512	
37513		// Read all widths in next pass
37514		_fnApplyToChildren( function(nSizer) {
37515			var style = window.getComputedStyle ?
37516				window.getComputedStyle(nSizer).width :
37517				_fnStringToCss( $(nSizer).width() );
37518	
37519			headerContent.push( nSizer.innerHTML );
37520			headerWidths.push( style );
37521		}, headerSrcEls );
37522	
37523		// Apply all widths in final pass
37524		_fnApplyToChildren( function(nToSize, i) {
37525			nToSize.style.width = headerWidths[i];
37526		}, headerTrgEls );
37527	
37528		$(headerSrcEls).css('height', 0);
37529	
37530		/* Same again with the footer if we have one */
37531		if ( footer )
37532		{
37533			_fnApplyToChildren( zeroOut, footerSrcEls );
37534	
37535			_fnApplyToChildren( function(nSizer) {
37536				footerContent.push( nSizer.innerHTML );
37537				footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
37538			}, footerSrcEls );
37539	
37540			_fnApplyToChildren( function(nToSize, i) {
37541				nToSize.style.width = footerWidths[i];
37542			}, footerTrgEls );
37543	
37544			$(footerSrcEls).height(0);
37545		}
37546	
37547	
37548		/*
37549		 * 3. Apply the measurements
37550		 */
37551	
37552		// "Hide" the header and footer that we used for the sizing. We need to keep
37553		// the content of the cell so that the width applied to the header and body
37554		// both match, but we want to hide it completely. We want to also fix their
37555		// width to what they currently are
37556		_fnApplyToChildren( function(nSizer, i) {
37557			nSizer.innerHTML = '<div class="dataTables_sizing">'+headerContent[i]+'</div>';
37558			nSizer.childNodes[0].style.height = "0";
37559			nSizer.childNodes[0].style.overflow = "hidden";
37560			nSizer.style.width = headerWidths[i];
37561		}, headerSrcEls );
37562	
37563		if ( footer )
37564		{
37565			_fnApplyToChildren( function(nSizer, i) {
37566				nSizer.innerHTML = '<div class="dataTables_sizing">'+footerContent[i]+'</div>';
37567				nSizer.childNodes[0].style.height = "0";
37568				nSizer.childNodes[0].style.overflow = "hidden";
37569				nSizer.style.width = footerWidths[i];
37570			}, footerSrcEls );
37571		}
37572	
37573		// Sanity check that the table is of a sensible width. If not then we are going to get
37574		// misalignment - try to prevent this by not allowing the table to shrink below its min width
37575		if ( Math.round(table.outerWidth()) < Math.round(sanityWidth) )
37576		{
37577			// The min width depends upon if we have a vertical scrollbar visible or not */
37578			correction = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight ||
37579				divBody.css('overflow-y') == "scroll")) ?
37580					sanityWidth+barWidth :
37581					sanityWidth;
37582	
37583			// IE6/7 are a law unto themselves...
37584			if ( ie67 && (divBodyEl.scrollHeight >
37585				divBodyEl.offsetHeight || divBody.css('overflow-y') == "scroll")
37586			) {
37587				tableStyle.width = _fnStringToCss( correction-barWidth );
37588			}
37589	
37590			// And give the user a warning that we've stopped the table getting too small
37591			if ( scrollX === "" || scrollXInner !== "" ) {
37592				_fnLog( settings, 1, 'Possible column misalignment', 6 );
37593			}
37594		}
37595		else
37596		{
37597			correction = '100%';
37598		}
37599	
37600		// Apply to the container elements
37601		divBodyStyle.width = _fnStringToCss( correction );
37602		divHeaderStyle.width = _fnStringToCss( correction );
37603	
37604		if ( footer ) {
37605			settings.nScrollFoot.style.width = _fnStringToCss( correction );
37606		}
37607	
37608	
37609		/*
37610		 * 4. Clean up
37611		 */
37612		if ( ! scrollY ) {
37613			/* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
37614			 * the scrollbar height from the visible display, rather than adding it on. We need to
37615			 * set the height in order to sort this. Don't want to do it in any other browsers.
37616			 */
37617			if ( ie67 ) {
37618				divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth );
37619			}
37620		}
37621	
37622		/* Finally set the width's of the header and footer tables */
37623		var iOuterWidth = table.outerWidth();
37624		divHeaderTable[0].style.width = _fnStringToCss( iOuterWidth );
37625		divHeaderInnerStyle.width = _fnStringToCss( iOuterWidth );
37626	
37627		// Figure out if there are scrollbar present - if so then we need a the header and footer to
37628		// provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
37629		var bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == "scroll";
37630		var padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );
37631		divHeaderInnerStyle[ padding ] = bScrolling ? barWidth+"px" : "0px";
37632	
37633		if ( footer ) {
37634			divFooterTable[0].style.width = _fnStringToCss( iOuterWidth );
37635			divFooterInner[0].style.width = _fnStringToCss( iOuterWidth );
37636			divFooterInner[0].style[padding] = bScrolling ? barWidth+"px" : "0px";
37637		}
37638	
37639		// Correct DOM ordering for colgroup - comes before the thead
37640		table.children('colgroup').insertBefore( table.children('thead') );
37641	
37642		/* Adjust the position of the header in case we loose the y-scrollbar */
37643		divBody.trigger('scroll');
37644	
37645		// If sorting or filtering has occurred, jump the scrolling back to the top
37646		// only if we aren't holding the position
37647		if ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {
37648			divBodyEl.scrollTop = 0;
37649		}
37650	}
37651	
37652	
37653	
37654	/**
37655	 * Apply a given function to the display child nodes of an element array (typically
37656	 * TD children of TR rows
37657	 *  @param {function} fn Method to apply to the objects
37658	 *  @param array {nodes} an1 List of elements to look through for display children
37659	 *  @param array {nodes} an2 Another list (identical structure to the first) - optional
37660	 *  @memberof DataTable#oApi
37661	 */
37662	function _fnApplyToChildren( fn, an1, an2 )
37663	{
37664		var index=0, i=0, iLen=an1.length;
37665		var nNode1, nNode2;
37666	
37667		while ( i < iLen ) {
37668			nNode1 = an1[i].firstChild;
37669			nNode2 = an2 ? an2[i].firstChild : null;
37670	
37671			while ( nNode1 ) {
37672				if ( nNode1.nodeType === 1 ) {
37673					if ( an2 ) {
37674						fn( nNode1, nNode2, index );
37675					}
37676					else {
37677						fn( nNode1, index );
37678					}
37679	
37680					index++;
37681				}
37682	
37683				nNode1 = nNode1.nextSibling;
37684				nNode2 = an2 ? nNode2.nextSibling : null;
37685			}
37686	
37687			i++;
37688		}
37689	}
37690	
37691	
37692	
37693	var __re_html_remove = /<.*?>/g;
37694	
37695	
37696	/**
37697	 * Calculate the width of columns for the table
37698	 *  @param {object} oSettings dataTables settings object
37699	 *  @memberof DataTable#oApi
37700	 */
37701	function _fnCalculateColumnWidths ( oSettings )
37702	{
37703		var
37704			table = oSettings.nTable,
37705			columns = oSettings.aoColumns,
37706			scroll = oSettings.oScroll,
37707			scrollY = scroll.sY,
37708			scrollX = scroll.sX,
37709			scrollXInner = scroll.sXInner,
37710			columnCount = columns.length,
37711			visibleColumns = _fnGetColumns( oSettings, 'bVisible' ),
37712			headerCells = $('th', oSettings.nTHead),
37713			tableWidthAttr = table.getAttribute('width'), // from DOM element
37714			tableContainer = table.parentNode,
37715			userInputs = false,
37716			i, column, columnIdx, width, outerWidth,
37717			browser = oSettings.oBrowser,
37718			ie67 = browser.bScrollOversize;
37719	
37720		var styleWidth = table.style.width;
37721		if ( styleWidth && styleWidth.indexOf('%') !== -1 ) {
37722			tableWidthAttr = styleWidth;
37723		}
37724	
37725		/* Convert any user input sizes into pixel sizes */
37726		
37726var sizes = _fnConvertToWidth(_pluck(columns, 'sWidthOrig'), tableContainer);
37727	
37728		for ( i=0 ; i<visibleColumns.length ; i++ ) {
37729			column = columns[ visibleColumns[i] ];
37730	
37731			if ( column.sWidth !== null ) {
37732				column.sWidth = sizes[i]
vendor: 6,819 bytes, lines 37732-37935
37732;
37733	
37734				userInputs = true;
37735			}
37736		}
37737	
37738		/* If the number of columns in the DOM equals the number that we have to
37739		 * process in DataTables, then we can use the offsets that are created by
37740		 * the web- browser. No custom sizes can be set in order for this to happen,
37741		 * nor scrolling used
37742		 */
37743		if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
37744		     columnCount == _fnVisbleColumns( oSettings ) &&
37745		     columnCount == headerCells.length
37746		) {
37747			for ( i=0 ; i<columnCount ; i++ ) {
37748				var colIdx = _fnVisibleToColumnIndex( oSettings, i );
37749	
37750				if ( colIdx !== null ) {
37751					columns[ colIdx ].sWidth = _fnStringToCss( headerCells.eq(i).width() );
37752				}
37753			}
37754		}
37755		else
37756		{
37757			// Otherwise construct a single row, worst case, table with the widest
37758			// node in the data, assign any user defined widths, then insert it into
37759			// the DOM and allow the browser to do all the hard work of calculating
37760			// table widths
37761			var tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table
37762				.css( 'visibility', 'hidden' )
37763				.removeAttr( 'id' );
37764	
37765			// Clean up the table body
37766			tmpTable.find('tbody tr').remove();
37767			var tr = $('<tr/>').appendTo( tmpTable.find('tbody') );
37768	
37769			// Clone the table header and footer - we can't use the header / footer
37770			// from the cloned table, since if scrolling is active, the table's
37771			// real header and footer are contained in different table tags
37772			tmpTable.find('thead, tfoot').remove();
37773			tmpTable
37774				.append( $(oSettings.nTHead).clone() )
37775				.append( $(oSettings.nTFoot).clone() );
37776	
37777			// Remove any assigned widths from the footer (from scrolling)
37778			tmpTable.find('tfoot th, tfoot td').css('width', '');
37779	
37780			// Apply custom sizing to the cloned header
37781			headerCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] );
37782	
37783			for ( i=0 ; i<visibleColumns.length ; i++ ) {
37784				column = columns[ visibleColumns[i] ];
37785	
37786				headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
37787					_fnStringToCss( column.sWidthOrig ) :
37788					'';
37789	
37790				// For scrollX we need to force the column width otherwise the
37791				// browser will collapse it. If this width is smaller than the
37792				// width the column requires, then it will have no effect
37793				if ( column.sWidthOrig && scrollX ) {
37794					$( headerCells[i] ).append( $('<div/>').css( {
37795						width: column.sWidthOrig,
37796						margin: 0,
37797						padding: 0,
37798						border: 0,
37799						height: 1
37800					} ) );
37801				}
37802			}
37803	
37804			// Find the widest cell for each column and put it into the table
37805			if ( oSettings.aoData.length ) {
37806				for ( i=0 ; i<visibleColumns.length ; i++ ) {
37807					columnIdx = visibleColumns[i];
37808					column = columns[ columnIdx ];
37809	
37810					$( _fnGetWidestNode( oSettings, columnIdx ) )
37811						.clone( false )
37812						.append( column.sContentPadding )
37813						.appendTo( tr );
37814				}
37815			}
37816	
37817			// Tidy the temporary table - remove name attributes so there aren't
37818			// duplicated in the dom (radio elements for example)
37819			$('[name]', tmpTable).removeAttr('name');
37820	
37821			// Table has been built, attach to the document so we can work with it.
37822			// A holding element is used, positioned at the top of the container
37823			// with minimal height, so it has no effect on if the container scrolls
37824			// or not. Otherwise it might trigger scrolling when it actually isn't
37825			// needed
37826			var holder = $('<div/>').css( scrollX || scrollY ?
37827					{
37828						position: 'absolute',
37829						top: 0,
37830						left: 0,
37831						height: 1,
37832						right: 0,
37833						overflow: 'hidden'
37834					} :
37835					{}
37836				)
37837				.append( tmpTable )
37838				.appendTo( tableContainer );
37839	
37840			// When scrolling (X or Y) we want to set the width of the table as 
37841			// appropriate. However, when not scrolling leave the table width as it
37842			// is. This results in slightly different, but I think correct behaviour
37843			if ( scrollX && scrollXInner ) {
37844				tmpTable.width( scrollXInner );
37845			}
37846			else if ( scrollX ) {
37847				tmpTable.css( 'width', 'auto' );
37848				tmpTable.removeAttr('width');
37849	
37850				// If there is no width attribute or style, then allow the table to
37851				// collapse
37852				if ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) {
37853					tmpTable.width( tableContainer.clientWidth );
37854				}
37855			}
37856			else if ( scrollY ) {
37857				tmpTable.width( tableContainer.clientWidth );
37858			}
37859			else if ( tableWidthAttr ) {
37860				tmpTable.width( tableWidthAttr );
37861			}
37862	
37863			// Get the width of each column in the constructed table - we need to
37864			// know the inner width (so it can be assigned to the other table's
37865			// cells) and the outer width so we can calculate the full width of the
37866			// table. This is safe since DataTables requires a unique cell for each
37867			// column, but if ever a header can span multiple columns, this will
37868			// need to be modified.
37869			var total = 0;
37870			for ( i=0 ; i<visibleColumns.length ; i++ ) {
37871				var cell = $(headerCells[i]);
37872				var border = cell.outerWidth() - cell.width();
37873	
37874				// Use getBounding... where possible (not IE8-) because it can give
37875				// sub-pixel accuracy, which we then want to round up!
37876				var bounding = browser.bBounding ?
37877					Math.ceil( headerCells[i].getBoundingClientRect().width ) :
37878					cell.outerWidth();
37879	
37880				// Total is tracked to remove any sub-pixel errors as the outerWidth
37881				// of the table might not equal the total given here (IE!).
37882				total += bounding;
37883	
37884				// Width for each column to use
37885				columns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding - border );
37886			}
37887	
37888			table.style.width = _fnStringToCss( total );
37889	
37890			// Finished with the table - ditch it
37891			holder.remove();
37892		}
37893	
37894		// If there is a width attr, we want to attach an event listener which
37895		// allows the table sizing to automatically adjust when the window is
37896		// resized. Use the width attr rather than CSS, since we can't know if the
37897		// CSS is a relative value or absolute - DOM read is always px.
37898		if ( tableWidthAttr ) {
37899			table.style.width = _fnStringToCss( tableWidthAttr );
37900		}
37901	
37902		if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {
37903			var bindResize = function () {
37904				$(window).on('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
37905					_fnAdjustColumnSizing( oSettings );
37906				} ) );
37907			};
37908	
37909			// IE6/7 will crash if we bind a resize event handler on page load.
37910			// To be removed in 1.11 which drops IE6/7 support
37911			if ( ie67 ) {
37912				setTimeout( bindResize, 1000 );
37913			}
37914			else {
37915				bindResize();
37916			}
37917	
37918			oSettings._reszEvt = true;
37919		}
37920	}
37921	
37922	
37923	/**
37924	 * Throttle the calls to a function. Arguments and context are maintained for
37925	 * the throttled function
37926	 *  @param {function} fn Function to be called
37927	 *  @param {int} [freq=200] call frequency in mS
37928	 *  @returns {function} wrapped function
37929	 *  @memberof DataTable#oApi
37930	 */
37931	var _fnThrottle = DataTable.util.throttle;
37932	
37933	
37934	/**
37935	 * Convert a 
37935set of CSS units width to pixels (e.g. 2em)
37936	 *  @param {string[]} widths widths to be converted
37937	 *  @param {node} parent parent to get the with for (required for relative widths) - optional
37938	 *  @returns {int[]} widths in pixels
37939	 *  @memberof DataTable#oApi
37940	 */
37941	function _fnConvertToWidth ( widths, parent )
37942	{
37943		var els = [];
37944		var results = [];
37945	
37946		// Add the elements in a single loop so we only need to reflow once
37947		for (var i=0 ; i<widths.length ; i++) {
37948			if (widths[i]) {
37949				els.push(
37950					$('<div/>')
37951						.css( 'width', _fnStringToCss( widths[i] ) )
37952						.appendTo( parent || document.body )
37953				)
37954			}
37955			else {
37956				els.push(null);
37957			}
37958		}
37959	
37960		// Get the sizes (will reflow once)
37961		for (var i=0 ; i<widths.length ; i++) {
37962			results.push(els[i] ? els[i][0].offsetWidth : null);
37963		}
37964	
37965		// Tidy
37966		$(els).remove();
37967	
37968		return results
vendor: 19,949 bytes, lines 37968-38703
37968;
37969	}
37970	
37971	
37972	/**
37973	 * Get the widest node
37974	 *  @param {object} settings dataTables settings object
37975	 *  @param {int} colIdx column of interest
37976	 *  @returns {node} widest table node
37977	 *  @memberof DataTable#oApi
37978	 */
37979	function _fnGetWidestNode( settings, colIdx )
37980	{
37981		var idx = _fnGetMaxLenString( settings, colIdx );
37982		if ( idx < 0 ) {
37983			return null;
37984		}
37985	
37986		var data = settings.aoData[ idx ];
37987		return ! data.nTr ? // Might not have been created when deferred rendering
37988			$('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] :
37989			data.anCells[ colIdx ];
37990	}
37991	
37992	
37993	/**
37994	 * Get the maximum strlen for each data column
37995	 *  @param {object} settings dataTables settings object
37996	 *  @param {int} colIdx column of interest
37997	 *  @returns {string} max string length for each column
37998	 *  @memberof DataTable#oApi
37999	 */
38000	function _fnGetMaxLenString( settings, colIdx )
38001	{
38002		var s, max=-1, maxIdx = -1;
38003	
38004		for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
38005			s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
38006			s = s.replace( __re_html_remove, '' );
38007			s = s.replace( /&nbsp;/g, ' ' );
38008	
38009			if ( s.length > max ) {
38010				max = s.length;
38011				maxIdx = i;
38012			}
38013		}
38014	
38015		return maxIdx;
38016	}
38017	
38018	
38019	/**
38020	 * Append a CSS unit (only if required) to a string
38021	 *  @param {string} value to css-ify
38022	 *  @returns {string} value with css unit
38023	 *  @memberof DataTable#oApi
38024	 */
38025	function _fnStringToCss( s )
38026	{
38027		if ( s === null ) {
38028			return '0px';
38029		}
38030	
38031		if ( typeof s == 'number' ) {
38032			return s < 0 ?
38033				'0px' :
38034				s+'px';
38035		}
38036	
38037		// Check it has a unit character already
38038		return s.match(/\d$/) ?
38039			s+'px' :
38040			s;
38041	}
38042	
38043	
38044	
38045	function _fnSortFlatten ( settings )
38046	{
38047		var
38048			i, iLen, k, kLen,
38049			aSort = [],
38050			aiOrig = [],
38051			aoColumns = settings.aoColumns,
38052			aDataSort, iCol, sType, srcCol,
38053			fixed = settings.aaSortingFixed,
38054			fixedObj = $.isPlainObject( fixed ),
38055			nestedSort = [],
38056			add = function ( a ) {
38057				if ( a.length && ! Array.isArray( a[0] ) ) {
38058					// 1D array
38059					nestedSort.push( a );
38060				}
38061				else {
38062					// 2D array
38063					$.merge( nestedSort, a );
38064				}
38065			};
38066	
38067		// Build the sort array, with pre-fix and post-fix options if they have been
38068		// specified
38069		if ( Array.isArray( fixed ) ) {
38070			add( fixed );
38071		}
38072	
38073		if ( fixedObj && fixed.pre ) {
38074			add( fixed.pre );
38075		}
38076	
38077		add( settings.aaSorting );
38078	
38079		if (fixedObj && fixed.post ) {
38080			add( fixed.post );
38081		}
38082	
38083		for ( i=0 ; i<nestedSort.length ; i++ )
38084		{
38085			srcCol = nestedSort[i][0];
38086			aDataSort = aoColumns[ srcCol ].aDataSort;
38087	
38088			for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
38089			{
38090				iCol = aDataSort[k];
38091				sType = aoColumns[ iCol ].sType || 'string';
38092	
38093				if ( nestedSort[i]._idx === undefined ) {
38094					nestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting );
38095				}
38096	
38097				aSort.push( {
38098					src:       srcCol,
38099					col:       iCol,
38100					dir:       nestedSort[i][1],
38101					index:     nestedSort[i]._idx,
38102					type:      sType,
38103					formatter: DataTable.ext.type.order[ sType+"-pre" ]
38104				} );
38105			}
38106		}
38107	
38108		return aSort;
38109	}
38110	
38111	/**
38112	 * Change the order of the table
38113	 *  @param {object} oSettings dataTables settings object
38114	 *  @memberof DataTable#oApi
38115	 *  @todo This really needs split up!
38116	 */
38117	function _fnSort ( oSettings )
38118	{
38119		var
38120			i, ien, iLen, j, jLen, k, kLen,
38121			sDataType, nTh,
38122			aiOrig = [],
38123			oExtSort = DataTable.ext.type.order,
38124			aoData = oSettings.aoData,
38125			aoColumns = oSettings.aoColumns,
38126			aDataSort, data, iCol, sType, oSort,
38127			formatters = 0,
38128			sortCol,
38129			displayMaster = oSettings.aiDisplayMaster,
38130			aSort;
38131	
38132		// Resolve any column types that are unknown due to addition or invalidation
38133		// @todo Can this be moved into a 'data-ready' handler which is called when
38134		//   data is going to be used in the table?
38135		_fnColumnTypes( oSettings );
38136	
38137		aSort = _fnSortFlatten( oSettings );
38138	
38139		for ( i=0, ien=aSort.length ; i<ien ; i++ ) {
38140			sortCol = aSort[i];
38141	
38142			// Track if we can use the fast sort algorithm
38143			if ( sortCol.formatter ) {
38144				formatters++;
38145			}
38146	
38147			// Load the data needed for the sort, for each cell
38148			_fnSortData( oSettings, sortCol.col );
38149		}
38150	
38151		/* No sorting required if server-side or no sorting array */
38152		if ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )
38153		{
38154			// Create a value - key array of the current row positions such that we can use their
38155			// current position during the sort, if values match, in order to perform stable sorting
38156			for ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {
38157				aiOrig[ displayMaster[i] ] = i;
38158			}
38159	
38160			/* Do the sort - here we want multi-column sorting based on a given data source (column)
38161			 * and sorting function (from oSort) in a certain direction. It's reasonably complex to
38162			 * follow on it's own, but this is what we want (example two column sorting):
38163			 *  fnLocalSorting = function(a,b){
38164			 *    var iTest;
38165			 *    iTest = oSort['string-asc']('data11', 'data12');
38166			 *      if (iTest !== 0)
38167			 *        return iTest;
38168			 *    iTest = oSort['numeric-desc']('data21', 'data22');
38169			 *    if (iTest !== 0)
38170			 *      return iTest;
38171			 *    return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
38172			 *  }
38173			 * Basically we have a test for each sorting column, if the data in that column is equal,
38174			 * test the next column. If all columns match, then we use a numeric sort on the row
38175			 * positions in the original data array to provide a stable sort.
38176			 *
38177			 * Note - I know it seems excessive to have two sorting methods, but the first is around
38178			 * 15% faster, so the second is only maintained for backwards compatibility with sorting
38179			 * methods which do not have a pre-sort formatting function.
38180			 */
38181			if ( formatters === aSort.length ) {
38182				// All sort types have formatting functions
38183				displayMaster.sort( function ( a, b ) {
38184					var
38185						x, y, k, test, sort,
38186						len=aSort.length,
38187						dataA = aoData[a]._aSortData,
38188						dataB = aoData[b]._aSortData;
38189	
38190					for ( k=0 ; k<len ; k++ ) {
38191						sort = aSort[k];
38192	
38193						x = dataA[ sort.col ];
38194						y = dataB[ sort.col ];
38195	
38196						test = x<y ? -1 : x>y ? 1 : 0;
38197						if ( test !== 0 ) {
38198							return sort.dir === 'asc' ? test : -test;
38199						}
38200					}
38201	
38202					x = aiOrig[a];
38203					y = aiOrig[b];
38204					return x<y ? -1 : x>y ? 1 : 0;
38205				} );
38206			}
38207			else {
38208				// Depreciated - remove in 1.11 (providing a plug-in option)
38209				// Not all sort types have formatting methods, so we have to call their sorting
38210				// methods.
38211				displayMaster.sort( function ( a, b ) {
38212					var
38213						x, y, k, l, test, sort, fn,
38214						len=aSort.length,
38215						dataA = aoData[a]._aSortData,
38216						dataB = aoData[b]._aSortData;
38217	
38218					for ( k=0 ; k<len ; k++ ) {
38219						sort = aSort[k];
38220	
38221						x = dataA[ sort.col ];
38222						y = dataB[ sort.col ];
38223	
38224						fn = oExtSort[ sort.type+"-"+sort.dir ] || oExtSort[ "string-"+sort.dir ];
38225						test = fn( x, y );
38226						if ( test !== 0 ) {
38227							return test;
38228						}
38229					}
38230	
38231					x = aiOrig[a];
38232					y = aiOrig[b];
38233					return x<y ? -1 : x>y ? 1 : 0;
38234				} );
38235			}
38236		}
38237	
38238		/* Tell the draw function that we have sorted the data */
38239		oSettings.bSorted = true;
38240	}
38241	
38242	
38243	function _fnSortAria ( settings )
38244	{
38245		var label;
38246		var nextSort;
38247		var columns = settings.aoColumns;
38248		var aSort = _fnSortFlatten( settings );
38249		var oAria = settings.oLanguage.oAria;
38250	
38251		// ARIA attributes - need to loop all columns, to update all (removing old
38252		// attributes as needed)
38253		for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
38254		{
38255			var col = columns[i];
38256			var asSorting = col.asSorting;
38257			var sTitle = col.ariaTitle || col.sTitle.replace( /<.*?>/g, "" );
38258			var th = col.nTh;
38259	
38260			// IE7 is throwing an error when setting these properties with jQuery's
38261			// attr() and removeAttr() methods...
38262			th.removeAttribute('aria-sort');
38263	
38264			/* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
38265			if ( col.bSortable ) {
38266				if ( aSort.length > 0 && aSort[0].col == i ) {
38267					th.setAttribute('aria-sort', aSort[0].dir=="asc" ? "ascending" : "descending" );
38268					nextSort = asSorting[ aSort[0].index+1 ] || asSorting[0];
38269				}
38270				else {
38271					nextSort = asSorting[0];
38272				}
38273	
38274				label = sTitle + ( nextSort === "asc" ?
38275					oAria.sSortAscending :
38276					oAria.sSortDescending
38277				);
38278			}
38279			else {
38280				label = sTitle;
38281			}
38282	
38283			th.setAttribute('aria-label', label);
38284		}
38285	}
38286	
38287	
38288	/**
38289	 * Function to run on user sort request
38290	 *  @param {object} settings dataTables settings object
38291	 *  @param {node} attachTo node to attach the handler to
38292	 *  @param {int} colIdx column sorting index
38293	 *  @param {boolean} [append=false] Append the requested sort to the existing
38294	 *    sort if true (i.e. multi-column sort)
38295	 *  @param {function} [callback] callback function
38296	 *  @memberof DataTable#oApi
38297	 */
38298	function _fnSortListener ( settings, colIdx, append, callback )
38299	{
38300		var col = settings.aoColumns[ colIdx ];
38301		var sorting = settings.aaSorting;
38302		var asSorting = col.asSorting;
38303		var nextSortIdx;
38304		var next = function ( a, overflow ) {
38305			var idx = a._idx;
38306			if ( idx === undefined ) {
38307				idx = $.inArray( a[1], asSorting );
38308			}
38309	
38310			return idx+1 < asSorting.length ?
38311				idx+1 :
38312				overflow ?
38313					null :
38314					0;
38315		};
38316	
38317		// Convert to 2D array if needed
38318		if ( typeof sorting[0] === 'number' ) {
38319			sorting = settings.aaSorting = [ sorting ];
38320		}
38321	
38322		// If appending the sort then we are multi-column sorting
38323		if ( append && settings.oFeatures.bSortMulti ) {
38324			// Are we already doing some kind of sort on this column?
38325			var sortIdx = $.inArray( colIdx, _pluck(sorting, '0') );
38326	
38327			if ( sortIdx !== -1 ) {
38328				// Yes, modify the sort
38329				nextSortIdx = next( sorting[sortIdx], true );
38330	
38331				if ( nextSortIdx === null && sorting.length === 1 ) {
38332					nextSortIdx = 0; // can't remove sorting completely
38333				}
38334	
38335				if ( nextSortIdx === null ) {
38336					sorting.splice( sortIdx, 1 );
38337				}
38338				else {
38339					sorting[sortIdx][1] = asSorting[ nextSortIdx ];
38340					sorting[sortIdx]._idx = nextSortIdx;
38341				}
38342			}
38343			else {
38344				// No sort on this column yet
38345				sorting.push( [ colIdx, asSorting[0], 0 ] );
38346				sorting[sorting.length-1]._idx = 0;
38347			}
38348		}
38349		else if ( sorting.length && sorting[0][0] == colIdx ) {
38350			// Single column - already sorting on this column, modify the sort
38351			nextSortIdx = next( sorting[0] );
38352	
38353			sorting.length = 1;
38354			sorting[0][1] = asSorting[ nextSortIdx ];
38355			sorting[0]._idx = nextSortIdx;
38356		}
38357		else {
38358			// Single column - sort only on this column
38359			sorting.length = 0;
38360			sorting.push( [ colIdx, asSorting[0] ] );
38361			sorting[0]._idx = 0;
38362		}
38363	
38364		// Run the sort by calling a full redraw
38365		_fnReDraw( settings );
38366	
38367		// callback used for async user interaction
38368		if ( typeof callback == 'function' ) {
38369			callback( settings );
38370		}
38371	}
38372	
38373	
38374	/**
38375	 * Attach a sort handler (click) to a node
38376	 *  @param {object} settings dataTables settings object
38377	 *  @param {node} attachTo node to attach the handler to
38378	 *  @param {int} colIdx column sorting index
38379	 *  @param {function} [callback] callback function
38380	 *  @memberof DataTable#oApi
38381	 */
38382	function _fnSortAttachListener ( settings, attachTo, colIdx, callback )
38383	{
38384		var col = settings.aoColumns[ colIdx ];
38385	
38386		_fnBindAction( attachTo, {}, function (e) {
38387			/* If the column is not sortable - don't to anything */
38388			if ( col.bSortable === false ) {
38389				return;
38390			}
38391	
38392			// If processing is enabled use a timeout to allow the processing
38393			// display to be shown - otherwise to it synchronously
38394			if ( settings.oFeatures.bProcessing ) {
38395				_fnProcessingDisplay( settings, true );
38396	
38397				setTimeout( function() {
38398					_fnSortListener( settings, colIdx, e.shiftKey, callback );
38399	
38400					// In server-side processing, the draw callback will remove the
38401					// processing display
38402					if ( _fnDataSource( settings ) !== 'ssp' ) {
38403						_fnProcessingDisplay( settings, false );
38404					}
38405				}, 0 );
38406			}
38407			else {
38408				_fnSortListener( settings, colIdx, e.shiftKey, callback );
38409			}
38410		} );
38411	}
38412	
38413	
38414	/**
38415	 * Set the sorting classes on table's body, Note: it is safe to call this function
38416	 * when bSort and bSortClasses are false
38417	 *  @param {object} oSettings dataTables settings object
38418	 *  @memberof DataTable#oApi
38419	 */
38420	function _fnSortingClasses( settings )
38421	{
38422		var oldSort = settings.aLastSort;
38423		var sortClass = settings.oClasses.sSortColumn;
38424		var sort = _fnSortFlatten( settings );
38425		var features = settings.oFeatures;
38426		var i, ien, colIdx;
38427	
38428		if ( features.bSort && features.bSortClasses ) {
38429			// Remove old sorting classes
38430			for ( i=0, ien=oldSort.length ; i<ien ; i++ ) {
38431				colIdx = oldSort[i].src;
38432	
38433				// Remove column sorting
38434				$( _pluck( settings.aoData, 'anCells', colIdx ) )
38435					.removeClass( sortClass + (i<2 ? i+1 : 3) );
38436			}
38437	
38438			// Add new column sorting
38439			for ( i=0, ien=sort.length ; i<ien ; i++ ) {
38440				colIdx = sort[i].src;
38441	
38442				$( _pluck( settings.aoData, 'anCells', colIdx ) )
38443					.addClass( sortClass + (i<2 ? i+1 : 3) );
38444			}
38445		}
38446	
38447		settings.aLastSort = sort;
38448	}
38449	
38450	
38451	// Get the data to sort a column, be it from cache, fresh (populating the
38452	// cache), or from a sort formatter
38453	function _fnSortData( settings, idx )
38454	{
38455		// Custom sorting function - provided by the sort data type
38456		var column = settings.aoColumns[ idx ];
38457		var customSort = DataTable.ext.order[ column.sSortDataType ];
38458		var customData;
38459	
38460		if ( customSort ) {
38461			customData = customSort.call( settings.oInstance, settings, idx,
38462				_fnColumnIndexToVisible( settings, idx )
38463			);
38464		}
38465	
38466		// Use / populate cache
38467		var row, cellData;
38468		var formatter = DataTable.ext.type.order[ column.sType+"-pre" ];
38469	
38470		for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
38471			row = settings.aoData[i];
38472	
38473			if ( ! row._aSortData ) {
38474				row._aSortData = [];
38475			}
38476	
38477			if ( ! row._aSortData[idx] || customSort ) {
38478				cellData = customSort ?
38479					customData[i] : // If there was a custom sort function, use data from there
38480					_fnGetCellData( settings, i, idx, 'sort' );
38481	
38482				row._aSortData[ idx ] = formatter ?
38483					formatter( cellData ) :
38484					cellData;
38485			}
38486		}
38487	}
38488	
38489	
38490	
38491	/**
38492	 * Save the state of a table
38493	 *  @param {object} oSettings dataTables settings object
38494	 *  @memberof DataTable#oApi
38495	 */
38496	function _fnSaveState ( settings )
38497	{
38498		if (settings._bLoadingState) {
38499			return;
38500		}
38501	
38502		/* Store the interesting variables */
38503		var state = {
38504			time:    +new Date(),
38505			start:   settings._iDisplayStart,
38506			length:  settings._iDisplayLength,
38507			order:   $.extend( true, [], settings.aaSorting ),
38508			search:  _fnSearchToCamel( settings.oPreviousSearch ),
38509			columns: $.map( settings.aoColumns, function ( col, i ) {
38510				return {
38511					visible: col.bVisible,
38512					search: _fnSearchToCamel( settings.aoPreSearchCols[i] )
38513				};
38514			} )
38515		};
38516	
38517		settings.oSavedState = state;
38518		_fnCallbackFire( settings, "aoStateSaveParams", 'stateSaveParams', [settings, state] );
38519		
38520		if ( settings.oFeatures.bStateSave && !settings.bDestroying )
38521		{
38522			settings.fnStateSaveCallback.call( settings.oInstance, settings, state );
38523		}	
38524	}
38525	
38526	
38527	/**
38528	 * Attempt to load a saved table state
38529	 *  @param {object} oSettings dataTables settings object
38530	 *  @param {object} oInit DataTables init object so we can override settings
38531	 *  @param {function} callback Callback to execute when the state has been loaded
38532	 *  @memberof DataTable#oApi
38533	 */
38534	function _fnLoadState ( settings, oInit, callback )
38535	{
38536		if ( ! settings.oFeatures.bStateSave ) {
38537			callback();
38538			return;
38539		}
38540	
38541		var loaded = function(state) {
38542			_fnImplementState(settings, state, callback);
38543		}
38544	
38545		var state = settings.fnStateLoadCallback.call( settings.oInstance, settings, loaded );
38546	
38547		if ( state !== undefined ) {
38548			_fnImplementState( settings, state, callback );
38549		}
38550		// otherwise, wait for the loaded callback to be executed
38551	
38552		return true;
38553	}
38554	
38555	function _fnImplementState ( settings, s, callback) {
38556		var i, ien;
38557		var columns = settings.aoColumns;
38558		settings._bLoadingState = true;
38559	
38560		// When StateRestore was introduced the state could now be implemented at any time
38561		// Not just initialisation. To do this an api instance is required in some places
38562		var api = settings._bInitComplete ? new DataTable.Api(settings) : null;
38563	
38564		if ( ! s || ! s.time ) {
38565			settings._bLoadingState = false;
38566			callback();
38567			return;
38568		}
38569	
38570		// Allow custom and plug-in manipulation functions to alter the saved data set and
38571		// cancelling of loading by returning false
38572		var abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, s] );
38573		if ( $.inArray( false, abStateLoad ) !== -1 ) {
38574			settings._bLoadingState = false;
38575			callback();
38576			return;
38577		}
38578	
38579		// Reject old data
38580		var duration = settings.iStateDuration;
38581		if ( duration > 0 && s.time < +new Date() - (duration*1000) ) {
38582			settings._bLoadingState = false;
38583			callback();
38584			return;
38585		}
38586	
38587		// Number of columns have changed - all bets are off, no restore of settings
38588		if ( s.columns && columns.length !== s.columns.length ) {
38589			settings._bLoadingState = false;
38590			callback();
38591			return;
38592		}
38593	
38594		// Store the saved state so it might be accessed at any time
38595		settings.oLoadedState = $.extend( true, {}, s );
38596	
38597		// Page Length
38598		if ( s.length !== undefined ) {
38599			// If already initialised just set the value directly so that the select element is also updated
38600			if (api) {
38601				api.page.len(s.length)
38602			}
38603			else {
38604				settings._iDisplayLength   = s.length;
38605			}
38606		}
38607	
38608		// Restore key features - todo - for 1.11 this needs to be done by
38609		// subscribed events
38610		if ( s.start !== undefined ) {
38611			if(api === null) {
38612				settings._iDisplayStart    = s.start;
38613				settings.iInitDisplayStart = s.start;
38614			}
38615			else {
38616				_fnPageChange(settings, s.start/settings._iDisplayLength);
38617			}
38618		}
38619	
38620		// Order
38621		if ( s.order !== undefined ) {
38622			settings.aaSorting = [];
38623			$.each( s.order, function ( i, col ) {
38624				settings.aaSorting.push( col[0] >= columns.length ?
38625					[ 0, col[1] ] :
38626					col
38627				);
38628			} );
38629		}
38630	
38631		// Search
38632		if ( s.search !== undefined ) {
38633			$.extend( settings.oPreviousSearch, _fnSearchToHung( s.search ) );
38634		}
38635	
38636		// Columns
38637		if ( s.columns ) {
38638			for ( i=0, ien=s.columns.length ; i<ien ; i++ ) {
38639				var col = s.columns[i];
38640	
38641				// Visibility
38642				if ( col.visible !== undefined ) {
38643					// If the api is defined, the table has been initialised so we need to use it rather than internal settings
38644					if (api) {
38645						// Don't redraw the columns on every iteration of this loop, we will do this at the end instead
38646						api.column(i).visible(col.visible, false);
38647					}
38648					else {
38649						columns[i].bVisible = col.visible;
38650					}
38651				}
38652	
38653				// Search
38654				if ( col.search !== undefined ) {
38655					$.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) );
38656				}
38657			}
38658			
38659			// If the api is defined then we need to adjust the columns once the visibility has been changed
38660			if (api) {
38661				api.columns.adjust();
38662			}
38663		}
38664	
38665		settings._bLoadingState = false;
38666		_fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, s] );
38667		callback();
38668	};
38669	
38670	
38671	/**
38672	 * Return the settings object for a particular table
38673	 *  @param {node} table table we are using as a dataTable
38674	 *  @returns {object} Settings object - or null if not found
38675	 *  @memberof DataTable#oApi
38676	 */
38677	function _fnSettingsFromNode ( table )
38678	{
38679		var settings = DataTable.settings;
38680		var idx = $.inArray( table, _pluck( settings, 'nTable' ) );
38681	
38682		return idx !== -1 ?
38683			settings[ idx ] :
38684			null;
38685	}
38686	
38687	
38688	/**
38689	 * Log an error message
38690	 *  @param {object} settings dataTables settings object
38691	 *  @param {int} level log error messages, or display them to the user
38692	 *  @param {string} msg error message
38693	 *  @param {int} tn Technical note id to get more information about the error.
38694	 *  @memberof DataTable#oApi
38695	 */
38696	function _fnLog( settings, level, msg, tn )
38697	{
38698		msg = 'DataTables warning: '+
38699			(settings ? 'table id='+settings.sTableId+' - ' : '')+msg;
38700	
38701		if ( tn ) {
38702			msg += '. For more information about this error, please see '+
38703			'http
38703s
vendor: 82,884 bytes, lines 38703-41841
38703://datatables.net/tn/'+tn;
38704		}
38705	
38706		if ( ! level  ) {
38707			// Backwards compatibility pre 1.10
38708			var ext = DataTable.ext;
38709			var type = ext.sErrMode || ext.errMode;
38710	
38711			if ( settings ) {
38712				_fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] );
38713			}
38714	
38715			if ( type == 'alert' ) {
38716				alert( msg );
38717			}
38718			else if ( type == 'throw' ) {
38719				throw new Error(msg);
38720			}
38721			else if ( typeof type == 'function' ) {
38722				type( settings, tn, msg );
38723			}
38724		}
38725		else if ( window.console && console.log ) {
38726			console.log( msg );
38727		}
38728	}
38729	
38730	
38731	/**
38732	 * See if a property is defined on one object, if so assign it to the other object
38733	 *  @param {object} ret target object
38734	 *  @param {object} src source object
38735	 *  @param {string} name property
38736	 *  @param {string} [mappedName] name to map too - optional, name used if not given
38737	 *  @memberof DataTable#oApi
38738	 */
38739	function _fnMap( ret, src, name, mappedName )
38740	{
38741		if ( Array.isArray( name ) ) {
38742			$.each( name, function (i, val) {
38743				if ( Array.isArray( val ) ) {
38744					_fnMap( ret, src, val[0], val[1] );
38745				}
38746				else {
38747					_fnMap( ret, src, val );
38748				}
38749			} );
38750	
38751			return;
38752		}
38753	
38754		if ( mappedName === undefined ) {
38755			mappedName = name;
38756		}
38757	
38758		if ( src[name] !== undefined ) {
38759			ret[mappedName] = src[name];
38760		}
38761	}
38762	
38763	
38764	/**
38765	 * Extend objects - very similar to jQuery.extend, but deep copy objects, and
38766	 * shallow copy arrays. The reason we need to do this, is that we don't want to
38767	 * deep copy array init values (such as aaSorting) since the dev wouldn't be
38768	 * able to override them, but we do want to deep copy arrays.
38769	 *  @param {object} out Object to extend
38770	 *  @param {object} extender Object from which the properties will be applied to
38771	 *      out
38772	 *  @param {boolean} breakRefs If true, then arrays will be sliced to take an
38773	 *      independent copy with the exception of the `data` or `aaData` parameters
38774	 *      if they are present. This is so you can pass in a collection to
38775	 *      DataTables and have that used as your data source without breaking the
38776	 *      references
38777	 *  @returns {object} out Reference, just for convenience - out === the return.
38778	 *  @memberof DataTable#oApi
38779	 *  @todo This doesn't take account of arrays inside the deep copied objects.
38780	 */
38781	function _fnExtend( out, extender, breakRefs )
38782	{
38783		var val;
38784	
38785		for ( var prop in extender ) {
38786			if ( extender.hasOwnProperty(prop) ) {
38787				val = extender[prop];
38788	
38789				if ( $.isPlainObject( val ) ) {
38790					if ( ! $.isPlainObject( out[prop] ) ) {
38791						out[prop] = {};
38792					}
38793					$.extend( true, out[prop], val );
38794				}
38795				else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && Array.isArray(val) ) {
38796					out[prop] = val.slice();
38797				}
38798				else {
38799					out[prop] = val;
38800				}
38801			}
38802		}
38803	
38804		return out;
38805	}
38806	
38807	
38808	/**
38809	 * Bind an event handers to allow a click or return key to activate the callback.
38810	 * This is good for accessibility since a return on the keyboard will have the
38811	 * same effect as a click, if the element has focus.
38812	 *  @param {element} n Element to bind the action to
38813	 *  @param {object} oData Data object to pass to the triggered function
38814	 *  @param {function} fn Callback function for when the event is triggered
38815	 *  @memberof DataTable#oApi
38816	 */
38817	function _fnBindAction( n, oData, fn )
38818	{
38819		$(n)
38820			.on( 'click.DT', oData, function (e) {
38821					$(n).trigger('blur'); // Remove focus outline for mouse users
38822					fn(e);
38823				} )
38824			.on( 'keypress.DT', oData, function (e){
38825					if ( e.which === 13 ) {
38826						e.preventDefault();
38827						fn(e);
38828					}
38829				} )
38830			.on( 'selectstart.DT', function () {
38831					/* Take the brutal approach to cancelling text selection */
38832					return false;
38833				} );
38834	}
38835	
38836	
38837	/**
38838	 * Register a callback function. Easily allows a callback function to be added to
38839	 * an array store of callback functions that can then all be called together.
38840	 *  @param {object} oSettings dataTables settings object
38841	 *  @param {string} sStore Name of the array storage for the callbacks in oSettings
38842	 *  @param {function} fn Function to be called back
38843	 *  @param {string} sName Identifying name for the callback (i.e. a label)
38844	 *  @memberof DataTable#oApi
38845	 */
38846	function _fnCallbackReg( oSettings, sStore, fn, sName )
38847	{
38848		if ( fn )
38849		{
38850			oSettings[sStore].push( {
38851				"fn": fn,
38852				"sName": sName
38853			} );
38854		}
38855	}
38856	
38857	
38858	/**
38859	 * Fire callback functions and trigger events. Note that the loop over the
38860	 * callback array store is done backwards! Further note that you do not want to
38861	 * fire off triggers in time sensitive applications (for example cell creation)
38862	 * as its slow.
38863	 *  @param {object} settings dataTables settings object
38864	 *  @param {string} callbackArr Name of the array storage for the callbacks in
38865	 *      oSettings
38866	 *  @param {string} eventName Name of the jQuery custom event to trigger. If
38867	 *      null no trigger is fired
38868	 *  @param {array} args Array of arguments to pass to the callback function /
38869	 *      trigger
38870	 *  @memberof DataTable#oApi
38871	 */
38872	function _fnCallbackFire( settings, callbackArr, eventName, args )
38873	{
38874		var ret = [];
38875	
38876		if ( callbackArr ) {
38877			ret = $.map( settings[callbackArr].slice().reverse(), function (val, i) {
38878				return val.fn.apply( settings.oInstance, args );
38879			} );
38880		}
38881	
38882		if ( eventName !== null ) {
38883			var e = $.Event( eventName+'.dt' );
38884			var table = $(settings.nTable);
38885	
38886			table.trigger( e, args );
38887	
38888			// If not yet attached to the document, trigger the event
38889			// on the body directly to sort of simulate the bubble
38890			if (table.parents('body').length === 0) {
38891				$('body').trigger( e, args );
38892			}
38893	
38894			ret.push( e.result );
38895		}
38896	
38897		return ret;
38898	}
38899	
38900	
38901	function _fnLengthOverflow ( settings )
38902	{
38903		var
38904			start = settings._iDisplayStart,
38905			end = settings.fnDisplayEnd(),
38906			len = settings._iDisplayLength;
38907	
38908		/* If we have space to show extra rows (backing up from the end point - then do so */
38909		if ( start >= end )
38910		{
38911			start = end - len;
38912		}
38913	
38914		// Keep the start record on the current page
38915		start -= (start % len);
38916	
38917		if ( len === -1 || start < 0 )
38918		{
38919			start = 0;
38920		}
38921	
38922		settings._iDisplayStart = start;
38923	}
38924	
38925	
38926	function _fnRenderer( settings, type )
38927	{
38928		var renderer = settings.renderer;
38929		var host = DataTable.ext.renderer[type];
38930	
38931		if ( $.isPlainObject( renderer ) && renderer[type] ) {
38932			// Specific renderer for this type. If available use it, otherwise use
38933			// the default.
38934			return host[renderer[type]] || host._;
38935		}
38936		else if ( typeof renderer === 'string' ) {
38937			// Common renderer - if there is one available for this type use it,
38938			// otherwise use the default
38939			return host[renderer] || host._;
38940		}
38941	
38942		// Use the default
38943		return host._;
38944	}
38945	
38946	
38947	/**
38948	 * Detect the data source being used for the table. Used to simplify the code
38949	 * a little (ajax) and to make it compress a little smaller.
38950	 *
38951	 *  @param {object} settings dataTables settings object
38952	 *  @returns {string} Data source
38953	 *  @memberof DataTable#oApi
38954	 */
38955	function _fnDataSource ( settings )
38956	{
38957		if ( settings.oFeatures.bServerSide ) {
38958			return 'ssp';
38959		}
38960		else if ( settings.ajax || settings.sAjaxSource ) {
38961			return 'ajax';
38962		}
38963		return 'dom';
38964	}
38965	
38966	
38967	
38968	
38969	/**
38970	 * Computed structure of the DataTables API, defined by the options passed to
38971	 * `DataTable.Api.register()` when building the API.
38972	 *
38973	 * The structure is built in order to speed creation and extension of the Api
38974	 * objects since the extensions are effectively pre-parsed.
38975	 *
38976	 * The array is an array of objects with the following structure, where this
38977	 * base array represents the Api prototype base:
38978	 *
38979	 *     [
38980	 *       {
38981	 *         name:      'data'                -- string   - Property name
38982	 *         val:       function () {},       -- function - Api method (or undefined if just an object
38983	 *         methodExt: [ ... ],              -- array    - Array of Api object definitions to extend the method result
38984	 *         propExt:   [ ... ]               -- array    - Array of Api object definitions to extend the property
38985	 *       },
38986	 *       {
38987	 *         name:     'row'
38988	 *         val:       {},
38989	 *         methodExt: [ ... ],
38990	 *         propExt:   [
38991	 *           {
38992	 *             name:      'data'
38993	 *             val:       function () {},
38994	 *             methodExt: [ ... ],
38995	 *             propExt:   [ ... ]
38996	 *           },
38997	 *           ...
38998	 *         ]
38999	 *       }
39000	 *     ]
39001	 *
39002	 * @type {Array}
39003	 * @ignore
39004	 */
39005	var __apiStruct = [];
39006	
39007	
39008	/**
39009	 * `Array.prototype` reference.
39010	 *
39011	 * @type object
39012	 * @ignore
39013	 */
39014	var __arrayProto = Array.prototype;
39015	
39016	
39017	/**
39018	 * Abstraction for `context` parameter of the `Api` constructor to allow it to
39019	 * take several different forms for ease of use.
39020	 *
39021	 * Each of the input parameter types will be converted to a DataTables settings
39022	 * object where possible.
39023	 *
39024	 * @param  {string|node|jQuery|object} mixed DataTable identifier. Can be one
39025	 *   of:
39026	 *
39027	 *   * `string` - jQuery selector. Any DataTables' matching the given selector
39028	 *     with be found and used.
39029	 *   * `node` - `TABLE` node which has already been formed into a DataTable.
39030	 *   * `jQuery` - A jQuery object of `TABLE` nodes.
39031	 *   * `object` - DataTables settings object
39032	 *   * `DataTables.Api` - API instance
39033	 * @return {array|null} Matching DataTables settings objects. `null` or
39034	 *   `undefined` is returned if no matching DataTable is found.
39035	 * @ignore
39036	 */
39037	var _toSettings = function ( mixed )
39038	{
39039		var idx, jq;
39040		var settings = DataTable.settings;
39041		var tables = $.map( settings, function (el, i) {
39042			return el.nTable;
39043		} );
39044	
39045		if ( ! mixed ) {
39046			return [];
39047		}
39048		else if ( mixed.nTable && mixed.oApi ) {
39049			// DataTables settings object
39050			return [ mixed ];
39051		}
39052		else if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {
39053			// Table node
39054			idx = $.inArray( mixed, tables );
39055			return idx !== -1 ? [ settings[idx] ] : null;
39056		}
39057		else if ( mixed && typeof mixed.settings === 'function' ) {
39058			return mixed.settings().toArray();
39059		}
39060		else if ( typeof mixed === 'string' ) {
39061			// jQuery selector
39062			jq = $(mixed);
39063		}
39064		else if ( mixed instanceof $ ) {
39065			// jQuery object (also DataTables instance)
39066			jq = mixed;
39067		}
39068	
39069		if ( jq ) {
39070			return jq.map( function(i) {
39071				idx = $.inArray( this, tables );
39072				return idx !== -1 ? settings[idx] : null;
39073			} ).toArray();
39074		}
39075	};
39076	
39077	
39078	/**
39079	 * DataTables API class - used to control and interface with  one or more
39080	 * DataTables enhanced tables.
39081	 *
39082	 * The API class is heavily based on jQuery, presenting a chainable interface
39083	 * that you can use to interact with tables. Each instance of the API class has
39084	 * a "context" - i.e. the tables that it will operate on. This could be a single
39085	 * table, all tables on a page or a sub-set thereof.
39086	 *
39087	 * Additionally the API is designed to allow you to easily work with the data in
39088	 * the tables, retrieving and manipulating it as required. This is done by
39089	 * presenting the API class as an array like interface. The contents of the
39090	 * array depend upon the actions requested by each method (for example
39091	 * `rows().nodes()` will return an array of nodes, while `rows().data()` will
39092	 * return an array of objects or arrays depending upon your table's
39093	 * configuration). The API object has a number of array like methods (`push`,
39094	 * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,
39095	 * `unique` etc) to assist your working with the data held in a table.
39096	 *
39097	 * Most methods (those which return an Api instance) are chainable, which means
39098	 * the return from a method call also has all of the methods available that the
39099	 * top level object had. For example, these two calls are equivalent:
39100	 *
39101	 *     // Not chained
39102	 *     api.row.add( {...} );
39103	 *     api.draw();
39104	 *
39105	 *     // Chained
39106	 *     api.row.add( {...} ).draw();
39107	 *
39108	 * @class DataTable.Api
39109	 * @param {array|object|string|jQuery} context DataTable identifier. This is
39110	 *   used to define which DataTables enhanced tables this API will operate on.
39111	 *   Can be one of:
39112	 *
39113	 *   * `string` - jQuery selector. Any DataTables' matching the given selector
39114	 *     with be found and used.
39115	 *   * `node` - `TABLE` node which has already been formed into a DataTable.
39116	 *   * `jQuery` - A jQuery object of `TABLE` nodes.
39117	 *   * `object` - DataTables settings object
39118	 * @param {array} [data] Data to initialise the Api instance with.
39119	 *
39120	 * @example
39121	 *   // Direct initialisation during DataTables construction
39122	 *   var api = $('#example').DataTable();
39123	 *
39124	 * @example
39125	 *   // Initialisation using a DataTables jQuery object
39126	 *   var api = $('#example').dataTable().api();
39127	 *
39128	 * @example
39129	 *   // Initialisation as a constructor
39130	 *   var api = new $.fn.DataTable.Api( 'table.dataTable' );
39131	 */
39132	_Api = function ( context, data )
39133	{
39134		if ( ! (this instanceof _Api) ) {
39135			return new _Api( context, data );
39136		}
39137	
39138		var settings = [];
39139		var ctxSettings = function ( o ) {
39140			var a = _toSettings( o );
39141			if ( a ) {
39142				settings.push.apply( settings, a );
39143			}
39144		};
39145	
39146		if ( Array.isArray( context ) ) {
39147			for ( var i=0, ien=context.length ; i<ien ; i++ ) {
39148				ctxSettings( context[i] );
39149			}
39150		}
39151		else {
39152			ctxSettings( context );
39153		}
39154	
39155		// Remove duplicates
39156		this.context = _unique( settings );
39157	
39158		// Initial data
39159		if ( data ) {
39160			$.merge( this, data );
39161		}
39162	
39163		// selector
39164		this.selector = {
39165			rows: null,
39166			cols: null,
39167			opts: null
39168		};
39169	
39170		_Api.extend( this, this, __apiStruct );
39171	};
39172	
39173	DataTable.Api = _Api;
39174	
39175	// Don't destroy the existing prototype, just extend it. Required for jQuery 2's
39176	// isPlainObject.
39177	$.extend( _Api.prototype, {
39178		any: function ()
39179		{
39180			return this.count() !== 0;
39181		},
39182	
39183	
39184		concat:  __arrayProto.concat,
39185	
39186	
39187		context: [], // array of table settings objects
39188	
39189	
39190		count: function ()
39191		{
39192			return this.flatten().length;
39193		},
39194	
39195	
39196		each: function ( fn )
39197		{
39198			for ( var i=0, ien=this.length ; i<ien; i++ ) {
39199				fn.call( this, this[i], i, this );
39200			}
39201	
39202			return this;
39203		},
39204	
39205	
39206		eq: function ( idx )
39207		{
39208			var ctx = this.context;
39209	
39210			return ctx.length > idx ?
39211				new _Api( ctx[idx], this[idx] ) :
39212				null;
39213		},
39214	
39215	
39216		filter: function ( fn )
39217		{
39218			var a = [];
39219	
39220			if ( __arrayProto.filter ) {
39221				a = __arrayProto.filter.call( this, fn, this );
39222			}
39223			else {
39224				// Compatibility for browsers without EMCA-252-5 (JS 1.6)
39225				for ( var i=0, ien=this.length ; i<ien ; i++ ) {
39226					if ( fn.call( this, this[i], i, this ) ) {
39227						a.push( this[i] );
39228					}
39229				}
39230			}
39231	
39232			return new _Api( this.context, a );
39233		},
39234	
39235	
39236		flatten: function ()
39237		{
39238			var a = [];
39239			return new _Api( this.context, a.concat.apply( a, this.toArray() ) );
39240		},
39241	
39242	
39243		join:    __arrayProto.join,
39244	
39245	
39246		indexOf: __arrayProto.indexOf || function (obj, start)
39247		{
39248			for ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) {
39249				if ( this[i] === obj ) {
39250					return i;
39251				}
39252			}
39253			return -1;
39254		},
39255	
39256		iterator: function ( flatten, type, fn, alwaysNew ) {
39257			var
39258				a = [], ret,
39259				i, ien, j, jen,
39260				context = this.context,
39261				rows, items, item,
39262				selector = this.selector;
39263	
39264			// Argument shifting
39265			if ( typeof flatten === 'string' ) {
39266				alwaysNew = fn;
39267				fn = type;
39268				type = flatten;
39269				flatten = false;
39270			}
39271	
39272			for ( i=0, ien=context.length ; i<ien ; i++ ) {
39273				var apiInst = new _Api( context[i] );
39274	
39275				if ( type === 'table' ) {
39276					ret = fn.call( apiInst, context[i], i );
39277	
39278					if ( ret !== undefined ) {
39279						a.push( ret );
39280					}
39281				}
39282				else if ( type === 'columns' || type === 'rows' ) {
39283					// this has same length as context - one entry for each table
39284					ret = fn.call( apiInst, context[i], this[i], i );
39285	
39286					if ( ret !== undefined ) {
39287						a.push( ret );
39288					}
39289				}
39290				else if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {
39291					// columns and rows share the same structure.
39292					// 'this' is an array of column indexes for each context
39293					items = this[i];
39294	
39295					if ( type === 'column-rows' ) {
39296						rows = _selector_row_indexes( context[i], selector.opts );
39297					}
39298	
39299					for ( j=0, jen=items.length ; j<jen ; j++ ) {
39300						item = items[j];
39301	
39302						if ( type === 'cell' ) {
39303							ret = fn.call( apiInst, context[i], item.row, item.column, i, j );
39304						}
39305						else {
39306							ret = fn.call( apiInst, context[i], item, i, j, rows );
39307						}
39308	
39309						if ( ret !== undefined ) {
39310							a.push( ret );
39311						}
39312					}
39313				}
39314			}
39315	
39316			if ( a.length || alwaysNew ) {
39317				var api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );
39318				var apiSelector = api.selector;
39319				apiSelector.rows = selector.rows;
39320				apiSelector.cols = selector.cols;
39321				apiSelector.opts = selector.opts;
39322				return api;
39323			}
39324			return this;
39325		},
39326	
39327	
39328		lastIndexOf: __arrayProto.lastIndexOf || function (obj, start)
39329		{
39330			// Bit cheeky...
39331			return this.indexOf.apply( this.toArray.reverse(), arguments );
39332		},
39333	
39334	
39335		length:  0,
39336	
39337	
39338		map: function ( fn )
39339		{
39340			var a = [];
39341	
39342			if ( __arrayProto.map ) {
39343				a = __arrayProto.map.call( this, fn, this );
39344			}
39345			else {
39346				// Compatibility for browsers without EMCA-252-5 (JS 1.6)
39347				for ( var i=0, ien=this.length ; i<ien ; i++ ) {
39348					a.push( fn.call( this, this[i], i ) );
39349				}
39350			}
39351	
39352			return new _Api( this.context, a );
39353		},
39354	
39355	
39356		pluck: function ( prop )
39357		{
39358			var fn = DataTable.util.get(prop);
39359	
39360			return this.map( function ( el ) {
39361				return fn(el);
39362			} );
39363		},
39364	
39365		pop:     __arrayProto.pop,
39366	
39367	
39368		push:    __arrayProto.push,
39369	
39370	
39371		// Does not return an API instance
39372		reduce: __arrayProto.reduce || function ( fn, init )
39373		{
39374			return _fnReduce( this, fn, init, 0, this.length, 1 );
39375		},
39376	
39377	
39378		reduceRight: __arrayProto.reduceRight || function ( fn, init )
39379		{
39380			return _fnReduce( this, fn, init, this.length-1, -1, -1 );
39381		},
39382	
39383	
39384		reverse: __arrayProto.reverse,
39385	
39386	
39387		// Object with rows, columns and opts
39388		selector: null,
39389	
39390	
39391		shift:   __arrayProto.shift,
39392	
39393	
39394		slice: function () {
39395			return new _Api( this.context, this );
39396		},
39397	
39398	
39399		sort:    __arrayProto.sort, // ? name - order?
39400	
39401	
39402		splice:  __arrayProto.splice,
39403	
39404	
39405		toArray: function ()
39406		{
39407			return __arrayProto.slice.call( this );
39408		},
39409	
39410	
39411		to$: function ()
39412		{
39413			return $( this );
39414		},
39415	
39416	
39417		toJQuery: function ()
39418		{
39419			return $( this );
39420		},
39421	
39422	
39423		unique: function ()
39424		{
39425			return new _Api( this.context, _unique(this) );
39426		},
39427	
39428	
39429		unshift: __arrayProto.unshift
39430	} );
39431	
39432	
39433	_Api.extend = function ( scope, obj, ext )
39434	{
39435		// Only extend API instances and static properties of the API
39436		if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {
39437			return;
39438		}
39439	
39440		var
39441			i, ien,
39442			struct,
39443			methodScoping = function ( scope, fn, struc ) {
39444				return function () {
39445					var ret = fn.apply( scope, arguments );
39446	
39447					// Method extension
39448					_Api.extend( ret, ret, struc.methodExt );
39449					return ret;
39450				};
39451			};
39452	
39453		for ( i=0, ien=ext.length ; i<ien ; i++ ) {
39454			struct = ext[i];
39455	
39456			// Value
39457			obj[ struct.name ] = struct.type === 'function' ?
39458				methodScoping( scope, struct.val, struct ) :
39459				struct.type === 'object' ?
39460					{} :
39461					struct.val;
39462	
39463			obj[ struct.name ].__dt_wrapper = true;
39464	
39465			// Property extension
39466			_Api.extend( scope, obj[ struct.name ], struct.propExt );
39467		}
39468	};
39469	
39470	
39471	// @todo - Is there need for an augment function?
39472	// _Api.augment = function ( inst, name )
39473	// {
39474	// 	// Find src object in the structure from the name
39475	// 	var parts = name.split('.');
39476	
39477	// 	_Api.extend( inst, obj );
39478	// };
39479	
39480	
39481	//     [
39482	//       {
39483	//         name:      'data'                -- string   - Property name
39484	//         val:       function () {},       -- function - Api method (or undefined if just an object
39485	//         methodExt: [ ... ],              -- array    - Array of Api object definitions to extend the method result
39486	//         propExt:   [ ... ]               -- array    - Array of Api object definitions to extend the property
39487	//       },
39488	//       {
39489	//         name:     'row'
39490	//         val:       {},
39491	//         methodExt: [ ... ],
39492	//         propExt:   [
39493	//           {
39494	//             name:      'data'
39495	//             val:       function () {},
39496	//             methodExt: [ ... ],
39497	//             propExt:   [ ... ]
39498	//           },
39499	//           ...
39500	//         ]
39501	//       }
39502	//     ]
39503	
39504	_Api.register = _api_register = function ( name, val )
39505	{
39506		if ( Array.isArray( name ) ) {
39507			for ( var j=0, jen=name.length ; j<jen ; j++ ) {
39508				_Api.register( name[j], val );
39509			}
39510			return;
39511		}
39512	
39513		var
39514			i, ien,
39515			heir = name.split('.'),
39516			struct = __apiStruct,
39517			key, method;
39518	
39519		var find = function ( src, name ) {
39520			for ( var i=0, ien=src.length ; i<ien ; i++ ) {
39521				if ( src[i].name === name ) {
39522					return src[i];
39523				}
39524			}
39525			return null;
39526		};
39527	
39528		for ( i=0, ien=heir.length ; i<ien ; i++ ) {
39529			method = heir[i].indexOf('()') !== -1;
39530			key = method ?
39531				heir[i].replace('()', '') :
39532				heir[i];
39533	
39534			var src = find( struct, key );
39535			if ( ! src ) {
39536				src = {
39537					name:      key,
39538					val:       {},
39539					methodExt: [],
39540					propExt:   [],
39541					type:      'object'
39542				};
39543				struct.push( src );
39544			}
39545	
39546			if ( i === ien-1 ) {
39547				src.val = val;
39548				src.type = typeof val === 'function' ?
39549					'function' :
39550					$.isPlainObject( val ) ?
39551						'object' :
39552						'other';
39553			}
39554			else {
39555				struct = method ?
39556					src.methodExt :
39557					src.propExt;
39558			}
39559		}
39560	};
39561	
39562	_Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {
39563		_Api.register( pluralName, val );
39564	
39565		_Api.register( singularName, function () {
39566			var ret = val.apply( this, arguments );
39567	
39568			if ( ret === this ) {
39569				// Returned item is the API instance that was passed in, return it
39570				return this;
39571			}
39572			else if ( ret instanceof _Api ) {
39573				// New API instance returned, want the value from the first item
39574				// in the returned array for the singular result.
39575				return ret.length ?
39576					Array.isArray( ret[0] ) ?
39577						new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
39578						ret[0] :
39579					undefined;
39580			}
39581	
39582			// Non-API return - just fire it back
39583			return ret;
39584		} );
39585	};
39586	
39587	
39588	/**
39589	 * Selector for HTML tables. Apply the given selector to the give array of
39590	 * DataTables settings objects.
39591	 *
39592	 * @param {string|integer} [selector] jQuery selector string or integer
39593	 * @param  {array} Array of DataTables settings objects to be filtered
39594	 * @return {array}
39595	 * @ignore
39596	 */
39597	var __table_selector = function ( selector, a )
39598	{
39599		if ( Array.isArray(selector) ) {
39600			return $.map( selector, function (item) {
39601				return __table_selector(item, a);
39602			} );
39603		}
39604	
39605		// Integer is used to pick out a table by index
39606		if ( typeof selector === 'number' ) {
39607			return [ a[ selector ] ];
39608		}
39609	
39610		// Perform a jQuery selector on the table nodes
39611		var nodes = $.map( a, function (el, i) {
39612			return el.nTable;
39613		} );
39614	
39615		return $(nodes)
39616			.filter( selector )
39617			.map( function (i) {
39618				// Need to translate back from the table node to the settings
39619				var idx = $.inArray( this, nodes );
39620				return a[ idx ];
39621			} )
39622			.toArray();
39623	};
39624	
39625	
39626	
39627	/**
39628	 * Context selector for the API's context (i.e. the tables the API instance
39629	 * refers to.
39630	 *
39631	 * @name    DataTable.Api#tables
39632	 * @param {string|integer} [selector] Selector to pick which tables the iterator
39633	 *   should operate on. If not given, all tables in the current context are
39634	 *   used. This can be given as a jQuery selector (for example `':gt(0)'`) to
39635	 *   select multiple tables or as an integer to select a single table.
39636	 * @returns {DataTable.Api} Returns a new API instance if a selector is given.
39637	 */
39638	_api_register( 'tables()', function ( selector ) {
39639		// A new instance is created if there was a selector specified
39640		return selector !== undefined && selector !== null ?
39641			new _Api( __table_selector( selector, this.context ) ) :
39642			this;
39643	} );
39644	
39645	
39646	_api_register( 'table()', function ( selector ) {
39647		var tables = this.tables( selector );
39648		var ctx = tables.context;
39649	
39650		// Truncate to the first matched table
39651		return ctx.length ?
39652			new _Api( ctx[0] ) :
39653			tables;
39654	} );
39655	
39656	
39657	_api_registerPlural( 'tables().nodes()', 'table().node()' , function () {
39658		return this.iterator( 'table', function ( ctx ) {
39659			return ctx.nTable;
39660		}, 1 );
39661	} );
39662	
39663	
39664	_api_registerPlural( 'tables().body()', 'table().body()' , function () {
39665		return this.iterator( 'table', function ( ctx ) {
39666			return ctx.nTBody;
39667		}, 1 );
39668	} );
39669	
39670	
39671	_api_registerPlural( 'tables().header()', 'table().header()' , function () {
39672		return this.iterator( 'table', function ( ctx ) {
39673			return ctx.nTHead;
39674		}, 1 );
39675	} );
39676	
39677	
39678	_api_registerPlural( 'tables().footer()', 'table().footer()' , function () {
39679		return this.iterator( 'table', function ( ctx ) {
39680			return ctx.nTFoot;
39681		}, 1 );
39682	} );
39683	
39684	
39685	_api_registerPlural( 'tables().containers()', 'table().container()' , function () {
39686		return this.iterator( 'table', function ( ctx ) {
39687			return ctx.nTableWrapper;
39688		}, 1 );
39689	} );
39690	
39691	
39692	
39693	/**
39694	 * Redraw the tables in the current context.
39695	 */
39696	_api_register( 'draw()', function ( paging ) {
39697		return this.iterator( 'table', function ( settings ) {
39698			if ( paging === 'page' ) {
39699				_fnDraw( settings );
39700			}
39701			else {
39702				if ( typeof paging === 'string' ) {
39703					paging = paging === 'full-hold' ?
39704						false :
39705						true;
39706				}
39707	
39708				_fnReDraw( settings, paging===false );
39709			}
39710		} );
39711	} );
39712	
39713	
39714	
39715	/**
39716	 * Get the current page index.
39717	 *
39718	 * @return {integer} Current page index (zero based)
39719	 *//**
39720	 * Set the current page.
39721	 *
39722	 * Note that if you attempt to show a page which does not exist, DataTables will
39723	 * not throw an error, but rather reset the paging.
39724	 *
39725	 * @param {integer|string} action The paging action to take. This can be one of:
39726	 *  * `integer` - The page index to jump to
39727	 *  * `string` - An action to take:
39728	 *    * `first` - Jump to first page.
39729	 *    * `next` - Jump to the next page
39730	 *    * `previous` - Jump to previous page
39731	 *    * `last` - Jump to the last page.
39732	 * @returns {DataTables.Api} this
39733	 */
39734	_api_register( 'page()', function ( action ) {
39735		if ( action === undefined ) {
39736			return this.page.info().page; // not an expensive call
39737		}
39738	
39739		// else, have an action to take on all tables
39740		return this.iterator( 'table', function ( settings ) {
39741			_fnPageChange( settings, action );
39742		} );
39743	} );
39744	
39745	
39746	/**
39747	 * Paging information for the first table in the current context.
39748	 *
39749	 * If you require paging information for another table, use the `table()` method
39750	 * with a suitable selector.
39751	 *
39752	 * @return {object} Object with the following properties set:
39753	 *  * `page` - Current page index (zero based - i.e. the first page is `0`)
39754	 *  * `pages` - Total number of pages
39755	 *  * `start` - Display index for the first record shown on the current page
39756	 *  * `end` - Display index for the last record shown on the current page
39757	 *  * `length` - Display length (number of records). Note that generally `start
39758	 *    + length = end`, but this is not always true, for example if there are
39759	 *    only 2 records to show on the final page, with a length of 10.
39760	 *  * `recordsTotal` - Full data set length
39761	 *  * `recordsDisplay` - Data set length once the current filtering criterion
39762	 *    are applied.
39763	 */
39764	_api_register( 'page.info()', function ( action ) {
39765		if ( this.context.length === 0 ) {
39766			return undefined;
39767		}
39768	
39769		var
39770			settings   = this.context[0],
39771			start      = settings._iDisplayStart,
39772			len        = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1,
39773			visRecords = settings.fnRecordsDisplay(),
39774			all        = len === -1;
39775	
39776		return {
39777			"page":           all ? 0 : Math.floor( start / len ),
39778			"pages":          all ? 1 : Math.ceil( visRecords / len ),
39779			"start":          start,
39780			"end":            settings.fnDisplayEnd(),
39781			"length":         len,
39782			"recordsTotal":   settings.fnRecordsTotal(),
39783			"recordsDisplay": visRecords,
39784			"serverSide":     _fnDataSource( settings ) === 'ssp'
39785		};
39786	} );
39787	
39788	
39789	/**
39790	 * Get the current page length.
39791	 *
39792	 * @return {integer} Current page length. Note `-1` indicates that all records
39793	 *   are to be shown.
39794	 *//**
39795	 * Set the current page length.
39796	 *
39797	 * @param {integer} Page length to set. Use `-1` to show all records.
39798	 * @returns {DataTables.Api} this
39799	 */
39800	_api_register( 'page.len()', function ( len ) {
39801		// Note that we can't call this function 'length()' because `length`
39802		// is a Javascript property of functions which defines how many arguments
39803		// the function expects.
39804		if ( len === undefined ) {
39805			return this.context.length !== 0 ?
39806				this.context[0]._iDisplayLength :
39807				undefined;
39808		}
39809	
39810		// else, set the page length
39811		return this.iterator( 'table', function ( settings ) {
39812			_fnLengthChange( settings, len );
39813		} );
39814	} );
39815	
39816	
39817	
39818	var __reload = function ( settings, holdPosition, callback ) {
39819		// Use the draw event to trigger a callback
39820		if ( callback ) {
39821			var api = new _Api( settings );
39822	
39823			api.one( 'draw', function () {
39824				callback( api.ajax.json() );
39825			} );
39826		}
39827	
39828		if ( _fnDataSource( settings ) == 'ssp' ) {
39829			_fnReDraw( settings, holdPosition );
39830		}
39831		else {
39832			_fnProcessingDisplay( settings, true );
39833	
39834			// Cancel an existing request
39835			var xhr = settings.jqXHR;
39836			if ( xhr && xhr.readyState !== 4 ) {
39837				xhr.abort();
39838			}
39839	
39840			// Trigger xhr
39841			_fnBuildAjax( settings, [], function( json ) {
39842				_fnClearTable( settings );
39843	
39844				var data = _fnAjaxDataSrc( settings, json );
39845				for ( var i=0, ien=data.length ; i<ien ; i++ ) {
39846					_fnAddData( settings, data[i] );
39847				}
39848	
39849				_fnReDraw( settings, holdPosition );
39850				_fnProcessingDisplay( settings, false );
39851			} );
39852		}
39853	};
39854	
39855	
39856	/**
39857	 * Get the JSON response from the last Ajax request that DataTables made to the
39858	 * server. Note that this returns the JSON from the first table in the current
39859	 * context.
39860	 *
39861	 * @return {object} JSON received from the server.
39862	 */
39863	_api_register( 'ajax.json()', function () {
39864		var ctx = this.context;
39865	
39866		if ( ctx.length > 0 ) {
39867			return ctx[0].json;
39868		}
39869	
39870		// else return undefined;
39871	} );
39872	
39873	
39874	/**
39875	 * Get the data submitted in the last Ajax request
39876	 */
39877	_api_register( 'ajax.params()', function () {
39878		var ctx = this.context;
39879	
39880		if ( ctx.length > 0 ) {
39881			return ctx[0].oAjaxData;
39882		}
39883	
39884		// else return undefined;
39885	} );
39886	
39887	
39888	/**
39889	 * Reload tables from the Ajax data source. Note that this function will
39890	 * automatically re-draw the table when the remote data has been loaded.
39891	 *
39892	 * @param {boolean} [reset=true] Reset (default) or hold the current paging
39893	 *   position. A full re-sort and re-filter is performed when this method is
39894	 *   called, which is why the pagination reset is the default action.
39895	 * @returns {DataTables.Api} this
39896	 */
39897	_api_register( 'ajax.reload()', function ( callback, resetPaging ) {
39898		return this.iterator( 'table', function (settings) {
39899			__reload( settings, resetPaging===false, callback );
39900		} );
39901	} );
39902	
39903	
39904	/**
39905	 * Get the current Ajax URL. Note that this returns the URL from the first
39906	 * table in the current context.
39907	 *
39908	 * @return {string} Current Ajax source URL
39909	 *//**
39910	 * Set the Ajax URL. Note that this will set the URL for all tables in the
39911	 * current context.
39912	 *
39913	 * @param {string} url URL to set.
39914	 * @returns {DataTables.Api} this
39915	 */
39916	_api_register( 'ajax.url()', function ( url ) {
39917		var ctx = this.context;
39918	
39919		if ( url === undefined ) {
39920			// get
39921			if ( ctx.length === 0 ) {
39922				return undefined;
39923			}
39924			ctx = ctx[0];
39925	
39926			return ctx.ajax ?
39927				$.isPlainObject( ctx.ajax ) ?
39928					ctx.ajax.url :
39929					ctx.ajax :
39930				ctx.sAjaxSource;
39931		}
39932	
39933		// set
39934		return this.iterator( 'table', function ( settings ) {
39935			if ( $.isPlainObject( settings.ajax ) ) {
39936				settings.ajax.url = url;
39937			}
39938			else {
39939				settings.ajax = url;
39940			}
39941			// No need to consider sAjaxSource here since DataTables gives priority
39942			// to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
39943			// value of `sAjaxSource` redundant.
39944		} );
39945	} );
39946	
39947	
39948	/**
39949	 * Load data from the newly set Ajax URL. Note that this method is only
39950	 * available when `ajax.url()` is used to set a URL. Additionally, this method
39951	 * has the same effect as calling `ajax.reload()` but is provided for
39952	 * convenience when setting a new URL. Like `ajax.reload()` it will
39953	 * automatically redraw the table once the remote data has been loaded.
39954	 *
39955	 * @returns {DataTables.Api} this
39956	 */
39957	_api_register( 'ajax.url().load()', function ( callback, resetPaging ) {
39958		// Same as a reload, but makes sense to present it for easy access after a
39959		// url change
39960		return this.iterator( 'table', function ( ctx ) {
39961			__reload( ctx, resetPaging===false, callback );
39962		} );
39963	} );
39964	
39965	
39966	
39967	
39968	var _selector_run = function ( type, selector, selectFn, settings, opts )
39969	{
39970		var
39971			out = [], res,
39972			a, i, ien, j, jen,
39973			selectorType = typeof selector;
39974	
39975		// Can't just check for isArray here, as an API or jQuery instance might be
39976		// given with their array like look
39977		if ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {
39978			selector = [ selector ];
39979		}
39980	
39981		for ( i=0, ien=selector.length ; i<ien ; i++ ) {
39982			// Only split on simple strings - complex expressions will be jQuery selectors
39983			a = selector[i] && selector[i].split && ! selector[i].match(/[\[\(:]/) ?
39984				selector[i].split(',') :
39985				[ selector[i] ];
39986	
39987			for ( j=0, jen=a.length ; j<jen ; j++ ) {
39988				res = selectFn( typeof a[j] === 'string' ? (a[j]).trim() : a[j] );
39989	
39990				if ( res && res.length ) {
39991					out = out.concat( res );
39992				}
39993			}
39994		}
39995	
39996		// selector extensions
39997		var ext = _ext.selector[ type ];
39998		if ( ext.length ) {
39999			for ( i=0, ien=ext.length ; i<ien ; i++ ) {
40000				out = ext[i]( settings, opts, out );
40001			}
40002		}
40003	
40004		return _unique( out );
40005	};
40006	
40007	
40008	var _selector_opts = function ( opts )
40009	{
40010		if ( ! opts ) {
40011			opts = {};
40012		}
40013	
40014		// Backwards compatibility for 1.9- which used the terminology filter rather
40015		// than search
40016		if ( opts.filter && opts.search === undefined ) {
40017			opts.search = opts.filter;
40018		}
40019	
40020		return $.extend( {
40021			search: 'none',
40022			order: 'current',
40023			page: 'all'
40024		}, opts );
40025	};
40026	
40027	
40028	var _selector_first = function ( inst )
40029	{
40030		// Reduce the API instance to the first item found
40031		for ( var i=0, ien=inst.length ; i<ien ; i++ ) {
40032			if ( inst[i].length > 0 ) {
40033				// Assign the first element to the first item in the instance
40034				// and truncate the instance and context
40035				inst[0] = inst[i];
40036				inst[0].length = 1;
40037				inst.length = 1;
40038				inst.context = [ inst.context[i] ];
40039	
40040				return inst;
40041			}
40042		}
40043	
40044		// Not found - return an empty instance
40045		inst.length = 0;
40046		return inst;
40047	};
40048	
40049	
40050	var _selector_row_indexes = function ( settings, opts )
40051	{
40052		var
40053			i, ien, tmp, a=[],
40054			displayFiltered = settings.aiDisplay,
40055			displayMaster = settings.aiDisplayMaster;
40056	
40057		var
40058			search = opts.search,  // none, applied, removed
40059			order  = opts.order,   // applied, current, index (original - compatibility with 1.9)
40060			page   = opts.page;    // all, current
40061	
40062		if ( _fnDataSource( settings ) == 'ssp' ) {
40063			// In server-side processing mode, most options are irrelevant since
40064			// rows not shown don't exist and the index order is the applied order
40065			// Removed is a special case - for consistency just return an empty
40066			// array
40067			return search === 'removed' ?
40068				[] :
40069				_range( 0, displayMaster.length );
40070		}
40071		else if ( page == 'current' ) {
40072			// Current page implies that order=current and filter=applied, since it is
40073			// fairly senseless otherwise, regardless of what order and search actually
40074			// are
40075			for ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {
40076				a.push( displayFiltered[i] );
40077			}
40078		}
40079		else if ( order == 'current' || order == 'applied' ) {
40080			if ( search == 'none') {
40081				a = displayMaster.slice();
40082			}
40083			else if ( search == 'applied' ) {
40084				a = displayFiltered.slice();
40085			}
40086			else if ( search == 'removed' ) {
40087				// O(n+m) solution by creating a hash map
40088				var displayFilteredMap = {};
40089	
40090				for ( var i=0, ien=displayFiltered.length ; i<ien ; i++ ) {
40091					displayFilteredMap[displayFiltered[i]] = null;
40092				}
40093	
40094				a = $.map( displayMaster, function (el) {
40095					return ! displayFilteredMap.hasOwnProperty(el) ?
40096						el :
40097						null;
40098				} );
40099			}
40100		}
40101		else if ( order == 'index' || order == 'original' ) {
40102			for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
40103				if ( search == 'none' ) {
40104					a.push( i );
40105				}
40106				else { // applied | removed
40107					tmp = $.inArray( i, displayFiltered );
40108	
40109					if ((tmp === -1 && search == 'removed') ||
40110						(tmp >= 0   && search == 'applied') )
40111					{
40112						a.push( i );
40113					}
40114				}
40115			}
40116		}
40117	
40118		return a;
40119	};
40120	
40121	
40122	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
40123	 * Rows
40124	 *
40125	 * {}          - no selector - use all available rows
40126	 * {integer}   - row aoData index
40127	 * {node}      - TR node
40128	 * {string}    - jQuery selector to apply to the TR elements
40129	 * {array}     - jQuery array of nodes, or simply an array of TR nodes
40130	 *
40131	 */
40132	var __row_selector = function ( settings, selector, opts )
40133	{
40134		var rows;
40135		var run = function ( sel ) {
40136			var selInt = _intVal( sel );
40137			var i, ien;
40138			var aoData = settings.aoData;
40139	
40140			// Short cut - selector is a number and no options provided (default is
40141			// all records, so no need to check if the index is in there, since it
40142			// must be - dev error if the index doesn't exist).
40143			if ( selInt !== null && ! opts ) {
40144				return [ selInt ];
40145			}
40146	
40147			if ( ! rows ) {
40148				rows = _selector_row_indexes( settings, opts );
40149			}
40150	
40151			if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {
40152				// Selector - integer
40153				return [ selInt ];
40154			}
40155			else if ( sel === null || sel === undefined || sel === '' ) {
40156				// Selector - none
40157				return rows;
40158			}
40159	
40160			// Selector - function
40161			if ( typeof sel === 'function' ) {
40162				return $.map( rows, function (idx) {
40163					var row = aoData[ idx ];
40164					return sel( idx, row._aData, row.nTr ) ? idx : null;
40165				} );
40166			}
40167	
40168			// Selector - node
40169			if ( sel.nodeName ) {
40170				var rowIdx = sel._DT_RowIndex;  // Property added by DT for fast lookup
40171				var cellIdx = sel._DT_CellIndex;
40172	
40173				if ( rowIdx !== undefined ) {
40174					// Make sure that the row is actually still present in the table
40175					return aoData[ rowIdx ] && aoData[ rowIdx ].nTr === sel ?
40176						[ rowIdx ] :
40177						[];
40178				}
40179				else if ( cellIdx ) {
40180					return aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel.parentNode ?
40181						[ cellIdx.row ] :
40182						[];
40183				}
40184				else {
40185					var host = $(sel).closest('*[data-dt-row]');
40186					return host.length ?
40187						[ host.data('dt-row') ] :
40188						[];
40189				}
40190			}
40191	
40192			// ID selector. Want to always be able to select rows by id, regardless
40193			// of if the tr element has been created or not, so can't rely upon
40194			// jQuery here - hence a custom implementation. This does not match
40195			// Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything,
40196			// but to select it using a CSS selector engine (like Sizzle or
40197			// querySelect) it would need to need to be escaped for some characters.
40198			// DataTables simplifies this for row selectors since you can select
40199			// only a row. A # indicates an id any anything that follows is the id -
40200			// unescaped.
40201			if ( typeof sel === 'string' && sel.charAt(0) === '#' ) {
40202				// get row index from id
40203				var rowObj = settings.aIds[ sel.replace( /^#/, '' ) ];
40204				if ( rowObj !== undefined ) {
40205					return [ rowObj.idx ];
40206				}
40207	
40208				// need to fall through to jQuery in case there is DOM id that
40209				// matches
40210			}
40211			
40212			// Get nodes in the order from the `rows` array with null values removed
40213			var nodes = _removeEmpty(
40214				_pluck_order( settings.aoData, rows, 'nTr' )
40215			);
40216	
40217			// Selector - jQuery selector string, array of nodes or jQuery object/
40218			// As jQuery's .filter() allows jQuery objects to be passed in filter,
40219			// it also allows arrays, so this will cope with all three options
40220			return $(nodes)
40221				.filter( sel )
40222				.map( function () {
40223					return this._DT_RowIndex;
40224				} )
40225				.toArray();
40226		};
40227	
40228		return _selector_run( 'row', selector, run, settings, opts );
40229	};
40230	
40231	
40232	_api_register( 'rows()', function ( selector, opts ) {
40233		// argument shifting
40234		if ( selector === undefined ) {
40235			selector = '';
40236		}
40237		else if ( $.isPlainObject( selector ) ) {
40238			opts = selector;
40239			selector = '';
40240		}
40241	
40242		opts = _selector_opts( opts );
40243	
40244		var inst = this.iterator( 'table', function ( settings ) {
40245			return __row_selector( settings, selector, opts );
40246		}, 1 );
40247	
40248		// Want argument shifting here and in __row_selector?
40249		inst.selector.rows = selector;
40250		inst.selector.opts = opts;
40251	
40252		return inst;
40253	} );
40254	
40255	_api_register( 'rows().nodes()', function () {
40256		return this.iterator( 'row', function ( settings, row ) {
40257			return settings.aoData[ row ].nTr || undefined;
40258		}, 1 );
40259	} );
40260	
40261	_api_register( 'rows().data()', function () {
40262		return this.iterator( true, 'rows', function ( settings, rows ) {
40263			return _pluck_order( settings.aoData, rows, '_aData' );
40264		}, 1 );
40265	} );
40266	
40267	_api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {
40268		return this.iterator( 'row', function ( settings, row ) {
40269			var r = settings.aoData[ row ];
40270			return type === 'search' ? r._aFilterData : r._aSortData;
40271		}, 1 );
40272	} );
40273	
40274	_api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {
40275		return this.iterator( 'row', function ( settings, row ) {
40276			_fnInvalidate( settings, row, src );
40277		} );
40278	} );
40279	
40280	_api_registerPlural( 'rows().indexes()', 'row().index()', function () {
40281		return this.iterator( 'row', function ( settings, row ) {
40282			return row;
40283		}, 1 );
40284	} );
40285	
40286	_api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) {
40287		var a = [];
40288		var context = this.context;
40289	
40290		// `iterator` will drop undefined values, but in this case we want them
40291		for ( var i=0, ien=context.length ; i<ien ; i++ ) {
40292			for ( var j=0, jen=this[i].length ; j<jen ; j++ ) {
40293				var id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData );
40294				a.push( (hash === true ? '#' : '' )+ id );
40295			}
40296		}
40297	
40298		return new _Api( context, a );
40299	} );
40300	
40301	_api_registerPlural( 'rows().remove()', 'row().remove()', function () {
40302		var that = this;
40303	
40304		this.iterator( 'row', function ( settings, row, thatIdx ) {
40305			var data = settings.aoData;
40306			var rowData = data[ row ];
40307			var i, ien, j, jen;
40308			var loopRow, loopCells;
40309	
40310			data.splice( row, 1 );
40311	
40312			// Update the cached indexes
40313			for ( i=0, ien=data.length ; i<ien ; i++ ) {
40314				loopRow = data[i];
40315				loopCells = loopRow.anCells;
40316	
40317				// Rows
40318				if ( loopRow.nTr !== null ) {
40319					loopRow.nTr._DT_RowIndex = i;
40320				}
40321	
40322				// Cells
40323				if ( loopCells !== null ) {
40324					for ( j=0, jen=loopCells.length ; j<jen ; j++ ) {
40325						loopCells[j]._DT_CellIndex.row = i;
40326					}
40327				}
40328			}
40329	
40330			// Delete from the display arrays
40331			_fnDeleteIndex( settings.aiDisplayMaster, row );
40332			_fnDeleteIndex( settings.aiDisplay, row );
40333			_fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes
40334	
40335			// For server-side processing tables - subtract the deleted row from the count
40336			if ( settings._iRecordsDisplay > 0 ) {
40337				settings._iRecordsDisplay--;
40338			}
40339	
40340			// Check for an 'overflow' they case for displaying the table
40341			_fnLengthOverflow( settings );
40342	
40343			// Remove the row's ID reference if there is one
40344			var id = settings.rowIdFn( rowData._aData );
40345			if ( id !== undefined ) {
40346				delete settings.aIds[ id ];
40347			}
40348		} );
40349	
40350		this.iterator( 'table', function ( settings ) {
40351			for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
40352				settings.aoData[i].idx = i;
40353			}
40354		} );
40355	
40356		return this;
40357	} );
40358	
40359	
40360	_api_register( 'rows.add()', function ( rows ) {
40361		var newRows = this.iterator( 'table', function ( settings ) {
40362				var row, i, ien;
40363				var out = [];
40364	
40365				for ( i=0, ien=rows.length ; i<ien ; i++ ) {
40366					row = rows[i];
40367	
40368					if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
40369						out.push( _fnAddTr( settings, row )[0] );
40370					}
40371					else {
40372						out.push( _fnAddData( settings, row ) );
40373					}
40374				}
40375	
40376				return out;
40377			}, 1 );
40378	
40379		// Return an Api.rows() extended instance, so rows().nodes() etc can be used
40380		var modRows = this.rows( -1 );
40381		modRows.pop();
40382		$.merge( modRows, newRows );
40383	
40384		return modRows;
40385	} );
40386	
40387	
40388	
40389	
40390	
40391	/**
40392	 *
40393	 */
40394	_api_register( 'row()', function ( selector, opts ) {
40395		return _selector_first( this.rows( selector, opts ) );
40396	} );
40397	
40398	
40399	_api_register( 'row().data()', function ( data ) {
40400		var ctx = this.context;
40401	
40402		if ( data === undefined ) {
40403			// Get
40404			return ctx.length && this.length ?
40405				ctx[0].aoData[ this[0] ]._aData :
40406				undefined;
40407		}
40408	
40409		// Set
40410		var row = ctx[0].aoData[ this[0] ];
40411		row._aData = data;
40412	
40413		// If the DOM has an id, and the data source is an array
40414		if ( Array.isArray( data ) && row.nTr && row.nTr.id ) {
40415			_fnSetObjectDataFn( ctx[0].rowId )( data, row.nTr.id );
40416		}
40417	
40418		// Automatically invalidate
40419		_fnInvalidate( ctx[0], this[0], 'data' );
40420	
40421		return this;
40422	} );
40423	
40424	
40425	_api_register( 'row().node()', function () {
40426		var ctx = this.context;
40427	
40428		return ctx.length && this.length ?
40429			ctx[0].aoData[ this[0] ].nTr || null :
40430			null;
40431	} );
40432	
40433	
40434	_api_register( 'row.add()', function ( row ) {
40435		// Allow a jQuery object to be passed in - only a single row is added from
40436		// it though - the first element in the set
40437		if ( row instanceof $ && row.length ) {
40438			row = row[0];
40439		}
40440	
40441		var rows = this.iterator( 'table', function ( settings ) {
40442			if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
40443				return _fnAddTr( settings, row )[0];
40444			}
40445			return _fnAddData( settings, row );
40446		} );
40447	
40448		// Return an Api.rows() extended instance, with the newly added row selected
40449		return this.row( rows[0] );
40450	} );
40451	
40452	
40453	$(document).on('plugin-init.dt', function (e, context) {
40454		var api = new _Api( context );
40455		var namespace = 'on-plugin-init';
40456		var stateSaveParamsEvent = 'stateSaveParams.' + namespace;
40457		var destroyEvent = 'destroy. ' + namespace;
40458	
40459		api.on( stateSaveParamsEvent, function ( e, settings, d ) {
40460			// This could be more compact with the API, but it is a lot faster as a simple
40461			// internal loop
40462			var idFn = settings.rowIdFn;
40463			var data = settings.aoData;
40464			var ids = [];
40465	
40466			for (var i=0 ; i<data.length ; i++) {
40467				if (data[i]._detailsShow) {
40468					ids.push( '#' + idFn(data[i]._aData) );
40469				}
40470			}
40471	
40472			d.childRows = ids;
40473		});
40474	
40475		api.on( destroyEvent, function () {
40476			api.off(stateSaveParamsEvent + ' ' + destroyEvent);
40477		});
40478	
40479		var loaded = api.state.loaded();
40480	
40481		if ( loaded && loaded.childRows ) {
40482			api
40483				.rows( $.map(loaded.childRows, function (id){
40484					return id.replace(/:/g, '\\:')
40485				}) )
40486				.every( function () {
40487					_fnCallbackFire( context, null, 'requestChild', [ this ] )
40488				});
40489		}
40490	});
40491	
40492	var __details_add = function ( ctx, row, data, klass )
40493	{
40494		// Convert to array of TR elements
40495		var rows = [];
40496		var addRow = function ( r, k ) {
40497			// Recursion to allow for arrays of jQuery objects
40498			if ( Array.isArray( r ) || r instanceof $ ) {
40499				for ( var i=0, ien=r.length ; i<ien ; i++ ) {
40500					addRow( r[i], k );
40501				}
40502				return;
40503			}
40504	
40505			// If we get a TR element, then just add it directly - up to the dev
40506			// to add the correct number of columns etc
40507			if ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {
40508				rows.push( r );
40509			}
40510			else {
40511				// Otherwise create a row with a wrapper
40512				var created = $('<tr><td></td></tr>').addClass( k );
40513				$('td', created)
40514					.addClass( k )
40515					.html( r )
40516					[0].colSpan = _fnVisbleColumns( ctx );
40517	
40518				rows.push( created[0] );
40519			}
40520		};
40521	
40522		addRow( data, klass );
40523	
40524		if ( row._details ) {
40525			row._details.detach();
40526		}
40527	
40528		row._details = $(rows);
40529	
40530		// If the children were already shown, that state should be retained
40531		if ( row._detailsShow ) {
40532			row._details.insertAfter( row.nTr );
40533		}
40534	};
40535	
40536	
40537	// Make state saving of child row details async to allow them to be batch processed
40538	var __details_state = DataTable.util.throttle(
40539		function (ctx) {
40540			_fnSaveState( ctx[0] )
40541		},
40542		500
40543	);
40544	
40545	
40546	var __details_remove = function ( api, idx )
40547	{
40548		var ctx = api.context;
40549	
40550		if ( ctx.length ) {
40551			var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];
40552	
40553			if ( row && row._details ) {
40554				row._details.remove();
40555	
40556				row._detailsShow = undefined;
40557				row._details = undefined;
40558				$( row.nTr ).removeClass( 'dt-hasChild' );
40559				__details_state( ctx );
40560			}
40561		}
40562	};
40563	
40564	
40565	var __details_display = function ( api, show ) {
40566		var ctx = api.context;
40567	
40568		if ( ctx.length && api.length ) {
40569			var row = ctx[0].aoData[ api[0] ];
40570	
40571			if ( row._details ) {
40572				row._detailsShow = show;
40573	
40574				if ( show ) {
40575					row._details.insertAfter( row.nTr );
40576					$( row.nTr ).addClass( 'dt-hasChild' );
40577				}
40578				else {
40579					row._details.detach();
40580					$( row.nTr ).removeClass( 'dt-hasChild' );
40581				}
40582	
40583				_fnCallbackFire( ctx[0], null, 'childRow', [ show, api.row( api[0] ) ] )
40584	
40585				__details_events( ctx[0] );
40586				__details_state( ctx );
40587			}
40588		}
40589	};
40590	
40591	
40592	var __details_events = function ( settings )
40593	{
40594		var api = new _Api( settings );
40595		var namespace = '.dt.DT_details';
40596		var drawEvent = 'draw'+namespace;
40597		var colvisEvent = 'column-sizing'+namespace;
40598		var destroyEvent = 'destroy'+namespace;
40599		var data = settings.aoData;
40600	
40601		api.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );
40602	
40603		if ( _pluck( data, '_details' ).length > 0 ) {
40604			// On each draw, insert the required elements into the document
40605			api.on( drawEvent, function ( e, ctx ) {
40606				if ( settings !== ctx ) {
40607					return;
40608				}
40609	
40610				api.rows( {page:'current'} ).eq(0).each( function (idx) {
40611					// Internal data grab
40612					var row = data[ idx ];
40613	
40614					if ( row._detailsShow ) {
40615						row._details.insertAfter( row.nTr );
40616					}
40617				} );
40618			} );
40619	
40620			// Column visibility change - update the colspan
40621			api.on( colvisEvent, function ( e, ctx, idx, vis ) {
40622				if ( settings !== ctx ) {
40623					return;
40624				}
40625	
40626				// Update the colspan for the details rows (note, only if it already has
40627				// a colspan)
40628				var row, visible = _fnVisbleColumns( ctx );
40629	
40630				for ( var i=0, ien=data.length ; i<ien ; i++ ) {
40631					row = data[i];
40632	
40633					if ( row._details ) {
40634						row._details.children('td[colspan]').attr('colspan', visible );
40635					}
40636				}
40637			} );
40638	
40639			// Table destroyed - nuke any child rows
40640			api.on( destroyEvent, function ( e, ctx ) {
40641				if ( settings !== ctx ) {
40642					return;
40643				}
40644	
40645				for ( var i=0, ien=data.length ; i<ien ; i++ ) {
40646					if ( data[i]._details ) {
40647						__details_remove( api, i );
40648					}
40649				}
40650			} );
40651		}
40652	};
40653	
40654	// Strings for the method names to help minification
40655	var _emp = '';
40656	var _child_obj = _emp+'row().child';
40657	var _child_mth = _child_obj+'()';
40658	
40659	// data can be:
40660	//  tr
40661	//  string
40662	//  jQuery or array of any of the above
40663	_api_register( _child_mth, function ( data, klass ) {
40664		var ctx = this.context;
40665	
40666		if ( data === undefined ) {
40667			// get
40668			return ctx.length && this.length ?
40669				ctx[0].aoData[ this[0] ]._details :
40670				undefined;
40671		}
40672		else if ( data === true ) {
40673			// show
40674			this.child.show();
40675		}
40676		else if ( data === false ) {
40677			// remove
40678			__details_remove( this );
40679		}
40680		else if ( ctx.length && this.length ) {
40681			// set
40682			__details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );
40683		}
40684	
40685		return this;
40686	} );
40687	
40688	
40689	_api_register( [
40690		_child_obj+'.show()',
40691		_child_mth+'.show()' // only when `child()` was called with parameters (without
40692	], function ( show ) {   // it returns an object and this method is not executed)
40693		__details_display( this, true );
40694		return this;
40695	} );
40696	
40697	
40698	_api_register( [
40699		_child_obj+'.hide()',
40700		_child_mth+'.hide()' // only when `child()` was called with parameters (without
40701	], function () {         // it returns an object and this method is not executed)
40702		__details_display( this, false );
40703		return this;
40704	} );
40705	
40706	
40707	_api_register( [
40708		_child_obj+'.remove()',
40709		_child_mth+'.remove()' // only when `child()` was called with parameters (without
40710	], function () {           // it returns an object and this method is not executed)
40711		__details_remove( this );
40712		return this;
40713	} );
40714	
40715	
40716	_api_register( _child_obj+'.isShown()', function () {
40717		var ctx = this.context;
40718	
40719		if ( ctx.length && this.length ) {
40720			// _detailsShown as false or undefined will fall through to return false
40721			return ctx[0].aoData[ this[0] ]._detailsShow || false;
40722		}
40723		return false;
40724	} );
40725	
40726	
40727	
40728	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
40729	 * Columns
40730	 *
40731	 * {integer}           - column index (>=0 count from left, <0 count from right)
40732	 * "{integer}:visIdx"  - visible column index (i.e. translate to column index)  (>=0 count from left, <0 count from right)
40733	 * "{integer}:visible" - alias for {integer}:visIdx  (>=0 count from left, <0 count from right)
40734	 * "{string}:name"     - column name
40735	 * "{string}"          - jQuery selector on column header nodes
40736	 *
40737	 */
40738	
40739	// can be an array of these items, comma separated list, or an array of comma
40740	// separated lists
40741	
40742	var __re_column_selector = /^([^:]+):(name|visIdx|visible)$/;
40743	
40744	
40745	// r1 and r2 are redundant - but it means that the parameters match for the
40746	// iterator callback in columns().data()
40747	var __columnData = function ( settings, column, r1, r2, rows ) {
40748		var a = [];
40749		for ( var row=0, ien=rows.length ; row<ien ; row++ ) {
40750			a.push( _fnGetCellData( settings, rows[row], column ) );
40751		}
40752		return a;
40753	};
40754	
40755	
40756	var __column_selector = function ( settings, selector, opts )
40757	{
40758		var
40759			columns = settings.aoColumns,
40760			names = _pluck( columns, 'sName' ),
40761			nodes = _pluck( columns, 'nTh' );
40762	
40763		var run = function ( s ) {
40764			var selInt = _intVal( s );
40765	
40766			// Selector - all
40767			if ( s === '' ) {
40768				return _range( columns.length );
40769			}
40770	
40771			// Selector - index
40772			if ( selInt !== null ) {
40773				return [ selInt >= 0 ?
40774					selInt : // Count from left
40775					columns.length + selInt // Count from right (+ because its a negative value)
40776				];
40777			}
40778	
40779			// Selector = function
40780			if ( typeof s === 'function' ) {
40781				var rows = _selector_row_indexes( settings, opts );
40782	
40783				return $.map( columns, function (col, idx) {
40784					return s(
40785							idx,
40786							__columnData( settings, idx, 0, 0, rows ),
40787							nodes[ idx ]
40788						) ? idx : null;
40789				} );
40790			}
40791	
40792			// jQuery or string selector
40793			var match = typeof s === 'string' ?
40794				s.match( __re_column_selector ) :
40795				'';
40796	
40797			if ( match ) {
40798				switch( match[2] ) {
40799					case 'visIdx':
40800					case 'visible':
40801						var idx = parseInt( match[1], 10 );
40802						// Visible index given, convert to column index
40803						if ( idx < 0 ) {
40804							// Counting from the right
40805							var visColumns = $.map( columns, function (col,i) {
40806								return col.bVisible ? i : null;
40807							} );
40808							return [ visColumns[ visColumns.length + idx ] ];
40809						}
40810						// Counting from the left
40811						return [ _fnVisibleToColumnIndex( settings, idx ) ];
40812	
40813					case 'name':
40814						// match by name. `names` is column index complete and in order
40815						return $.map( names, function (name, i) {
40816							return name === match[1] ? i : null;
40817						} );
40818	
40819					default:
40820						return [];
40821				}
40822			}
40823	
40824			// Cell in the table body
40825			if ( s.nodeName && s._DT_CellIndex ) {
40826				return [ s._DT_CellIndex.column ];
40827			}
40828	
40829			// jQuery selector on the TH elements for the columns
40830			var jqResult = $( nodes )
40831				.filter( s )
40832				.map( function () {
40833					return $.inArray( this, nodes ); // `nodes` is column index complete and in order
40834				} )
40835				.toArray();
40836	
40837			if ( jqResult.length || ! s.nodeName ) {
40838				return jqResult;
40839			}
40840	
40841			// Otherwise a node which might have a `dt-column` data attribute, or be
40842			// a child or such an element
40843			var host = $(s).closest('*[data-dt-column]');
40844			return host.length ?
40845				[ host.data('dt-column') ] :
40846				[];
40847		};
40848	
40849		return _selector_run( 'column', selector, run, settings, opts );
40850	};
40851	
40852	
40853	var __setColumnVis = function ( settings, column, vis ) {
40854		var
40855			cols = settings.aoColumns,
40856			col  = cols[ column ],
40857			data = settings.aoData,
40858			row, cells, i, ien, tr;
40859	
40860		// Get
40861		if ( vis === undefined ) {
40862			return col.bVisible;
40863		}
40864	
40865		// Set
40866		// No change
40867		if ( col.bVisible === vis ) {
40868			return;
40869		}
40870	
40871		if ( vis ) {
40872			// Insert column
40873			// Need to decide if we should use appendChild or insertBefore
40874			var insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 );
40875	
40876			for ( i=0, ien=data.length ; i<ien ; i++ ) {
40877				tr = data[i].nTr;
40878				cells = data[i].anCells;
40879	
40880				if ( tr ) {
40881					// insertBefore can act like appendChild if 2nd arg is null
40882					tr.insertBefore( cells[ column ], cells[ insertBefore ] || null );
40883				}
40884			}
40885		}
40886		else {
40887			// Remove column
40888			$( _pluck( settings.aoData, 'anCells', column ) ).detach();
40889		}
40890	
40891		// Common actions
40892		col.bVisible = vis;
40893	};
40894	
40895	
40896	_api_register( 'columns()', function ( selector, opts ) {
40897		// argument shifting
40898		if ( selector === undefined ) {
40899			selector = '';
40900		}
40901		else if ( $.isPlainObject( selector ) ) {
40902			opts = selector;
40903			selector = '';
40904		}
40905	
40906		opts = _selector_opts( opts );
40907	
40908		var inst = this.iterator( 'table', function ( settings ) {
40909			return __column_selector( settings, selector, opts );
40910		}, 1 );
40911	
40912		// Want argument shifting here and in _row_selector?
40913		inst.selector.cols = selector;
40914		inst.selector.opts = opts;
40915	
40916		return inst;
40917	} );
40918	
40919	_api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) {
40920		return this.iterator( 'column', function ( settings, column ) {
40921			return settings.aoColumns[column].nTh;
40922		}, 1 );
40923	} );
40924	
40925	_api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) {
40926		return this.iterator( 'column', function ( settings, column ) {
40927			return settings.aoColumns[column].nTf;
40928		}, 1 );
40929	} );
40930	
40931	_api_registerPlural( 'columns().data()', 'column().data()', function () {
40932		return this.iterator( 'column-rows', __columnData, 1 );
40933	} );
40934	
40935	_api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {
40936		return this.iterator( 'column', function ( settings, column ) {
40937			return settings.aoColumns[column].mData;
40938		}, 1 );
40939	} );
40940	
40941	_api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {
40942		return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
40943			return _pluck_order( settings.aoData, rows,
40944				type === 'search' ? '_aFilterData' : '_aSortData', column
40945			);
40946		}, 1 );
40947	} );
40948	
40949	_api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {
40950		return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
40951			return _pluck_order( settings.aoData, rows, 'anCells', column ) ;
40952		}, 1 );
40953	} );
40954	
40955	_api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
40956		var that = this;
40957		var ret = this.iterator( 'column', function ( settings, column ) {
40958			if ( vis === undefined ) {
40959				return settings.aoColumns[ column ].bVisible;
40960			} // else
40961			__setColumnVis( settings, column, vis );
40962		} );
40963	
40964		// Group the column visibility changes
40965		if ( vis !== undefined ) {
40966			this.iterator( 'table', function ( settings ) {
40967				// Redraw the header after changes
40968				_fnDrawHead( settings, settings.aoHeader );
40969				_fnDrawHead( settings, settings.aoFooter );
40970		
40971				// Update colspan for no records display. Child rows and extensions will use their own
40972				// listeners to do this - only need to update the empty table item here
40973				if ( ! settings.aiDisplay.length ) {
40974					$(settings.nTBody).find('td[colspan]').attr('colspan', _fnVisbleColumns(settings));
40975				}
40976		
40977				_fnSaveState( settings );
40978	
40979				// Second loop once the first is done for events
40980				that.iterator( 'column', function ( settings, column ) {
40981					_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, calc] );
40982				} );
40983	
40984				if ( calc === undefined || calc ) {
40985					that.columns.adjust();
40986				}
40987			});
40988		}
40989	
40990		return ret;
40991	} );
40992	
40993	_api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {
40994		return this.iterator( 'column', function ( settings, column ) {
40995			return type === 'visible' ?
40996				_fnColumnIndexToVisible( settings, column ) :
40997				column;
40998		}, 1 );
40999	} );
41000	
41001	_api_register( 'columns.adjust()', function () {
41002		return this.iterator( 'table', function ( settings ) {
41003			_fnAdjustColumnSizing( settings );
41004		}, 1 );
41005	} );
41006	
41007	_api_register( 'column.index()', function ( type, idx ) {
41008		if ( this.context.length !== 0 ) {
41009			var ctx = this.context[0];
41010	
41011			if ( type === 'fromVisible' || type === 'toData' ) {
41012				return _fnVisibleToColumnIndex( ctx, idx );
41013			}
41014			else if ( type === 'fromData' || type === 'toVisible' ) {
41015				return _fnColumnIndexToVisible( ctx, idx );
41016			}
41017		}
41018	} );
41019	
41020	_api_register( 'column()', function ( selector, opts ) {
41021		return _selector_first( this.columns( selector, opts ) );
41022	} );
41023	
41024	var __cell_selector = function ( settings, selector, opts )
41025	{
41026		var data = settings.aoData;
41027		var rows = _selector_row_indexes( settings, opts );
41028		var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
41029		var allCells = $(_flatten( [], cells ));
41030		var row;
41031		var columns = settings.aoColumns.length;
41032		var a, i, ien, j, o, host;
41033	
41034		var run = function ( s ) {
41035			var fnSelector = typeof s === 'function';
41036	
41037			if ( s === null || s === undefined || fnSelector ) {
41038				// All cells and function selectors
41039				a = [];
41040	
41041				for ( i=0, ien=rows.length ; i<ien ; i++ ) {
41042					row = rows[i];
41043	
41044					for ( j=0 ; j<columns ; j++ ) {
41045						o = {
41046							row: row,
41047							column: j
41048						};
41049	
41050						if ( fnSelector ) {
41051							// Selector - function
41052							host = data[ row ];
41053	
41054							if ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {
41055								a.push( o );
41056							}
41057						}
41058						else {
41059							// Selector - all
41060							a.push( o );
41061						}
41062					}
41063				}
41064	
41065				return a;
41066			}
41067			
41068			// Selector - index
41069			if ( $.isPlainObject( s ) ) {
41070				// Valid cell index and its in the array of selectable rows
41071				return s.column !== undefined && s.row !== undefined && $.inArray( s.row, rows ) !== -1 ?
41072					[s] :
41073					[];
41074			}
41075	
41076			// Selector - jQuery filtered cells
41077			var jqResult = allCells
41078				.filter( s )
41079				.map( function (i, el) {
41080					return { // use a new object, in case someone changes the values
41081						row:    el._DT_CellIndex.row,
41082						column: el._DT_CellIndex.column
41083	 				};
41084				} )
41085				.toArray();
41086	
41087			if ( jqResult.length || ! s.nodeName ) {
41088				return jqResult;
41089			}
41090	
41091			// Otherwise the selector is a node, and there is one last option - the
41092			// element might be a child of an element which has dt-row and dt-column
41093			// data attributes
41094			host = $(s).closest('*[data-dt-row]');
41095			return host.length ?
41096				[ {
41097					row: host.data('dt-row'),
41098					column: host.data('dt-column')
41099				} ] :
41100				[];
41101		};
41102	
41103		return _selector_run( 'cell', selector, run, settings, opts );
41104	};
41105	
41106	
41107	
41108	
41109	_api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {
41110		// Argument shifting
41111		if ( $.isPlainObject( rowSelector ) ) {
41112			// Indexes
41113			if ( rowSelector.row === undefined ) {
41114				// Selector options in first parameter
41115				opts = rowSelector;
41116				rowSelector = null;
41117			}
41118			else {
41119				// Cell index objects in first parameter
41120				opts = columnSelector;
41121				columnSelector = null;
41122			}
41123		}
41124		if ( $.isPlainObject( columnSelector ) ) {
41125			opts = columnSelector;
41126			columnSelector = null;
41127		}
41128	
41129		// Cell selector
41130		if ( columnSelector === null || columnSelector === undefined ) {
41131			return this.iterator( 'table', function ( settings ) {
41132				return __cell_selector( settings, rowSelector, _selector_opts( opts ) );
41133			} );
41134		}
41135	
41136		// The default built in options need to apply to row and columns
41137		var internalOpts = opts ? {
41138			page: opts.page,
41139			order: opts.order,
41140			search: opts.search
41141		} : {};
41142	
41143		// Row + column selector
41144		var columns = this.columns( columnSelector, internalOpts );
41145		var rows = this.rows( rowSelector, internalOpts );
41146		var i, ien, j, jen;
41147	
41148		var cellsNoOpts = this.iterator( 'table', function ( settings, idx ) {
41149			var a = [];
41150	
41151			for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
41152				for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {
41153					a.push( {
41154						row:    rows[idx][i],
41155						column: columns[idx][j]
41156					} );
41157				}
41158			}
41159	
41160			return a;
41161		}, 1 );
41162	
41163		// There is currently only one extension which uses a cell selector extension
41164		// It is a _major_ performance drag to run this if it isn't needed, so this is
41165		// an extension specific check at the moment
41166		var cells = opts && opts.selected ?
41167			this.cells( cellsNoOpts, opts ) :
41168			cellsNoOpts;
41169	
41170		$.extend( cells.selector, {
41171			cols: columnSelector,
41172			rows: rowSelector,
41173			opts: opts
41174		} );
41175	
41176		return cells;
41177	} );
41178	
41179	
41180	_api_registerPlural( 'cells().nodes()', 'cell().node()', function () {
41181		return this.iterator( 'cell', function ( settings, row, column ) {
41182			var data = settings.aoData[ row ];
41183	
41184			return data && data.anCells ?
41185				data.anCells[ column ] :
41186				undefined;
41187		}, 1 );
41188	} );
41189	
41190	
41191	_api_register( 'cells().data()', function () {
41192		return this.iterator( 'cell', function ( settings, row, column ) {
41193			return _fnGetCellData( settings, row, column );
41194		}, 1 );
41195	} );
41196	
41197	
41198	_api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {
41199		type = type === 'search' ? '_aFilterData' : '_aSortData';
41200	
41201		return this.iterator( 'cell', function ( settings, row, column ) {
41202			return settings.aoData[ row ][ type ][ column ];
41203		}, 1 );
41204	} );
41205	
41206	
41207	_api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {
41208		return this.iterator( 'cell', function ( settings, row, column ) {
41209			return _fnGetCellData( settings, row, column, type );
41210		}, 1 );
41211	} );
41212	
41213	
41214	_api_registerPlural( 'cells().indexes()', 'cell().index()', function () {
41215		return this.iterator( 'cell', function ( settings, row, column ) {
41216			return {
41217				row: row,
41218				column: column,
41219				columnVisible: _fnColumnIndexToVisible( settings, column )
41220			};
41221		}, 1 );
41222	} );
41223	
41224	
41225	_api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {
41226		return this.iterator( 'cell', function ( settings, row, column ) {
41227			_fnInvalidate( settings, row, src, column );
41228		} );
41229	} );
41230	
41231	
41232	
41233	_api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {
41234		return _selector_first( this.cells( rowSelector, columnSelector, opts ) );
41235	} );
41236	
41237	
41238	_api_register( 'cell().data()', function ( data ) {
41239		var ctx = this.context;
41240		var cell = this[0];
41241	
41242		if ( data === undefined ) {
41243			// Get
41244			return ctx.length && cell.length ?
41245				_fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :
41246				undefined;
41247		}
41248	
41249		// Set
41250		_fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );
41251		_fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );
41252	
41253		return this;
41254	} );
41255	
41256	
41257	
41258	/**
41259	 * Get current ordering (sorting) that has been applied to the table.
41260	 *
41261	 * @returns {array} 2D array containing the sorting information for the first
41262	 *   table in the current context. Each element in the parent array represents
41263	 *   a column being sorted upon (i.e. multi-sorting with two columns would have
41264	 *   2 inner arrays). The inner arrays may have 2 or 3 elements. The first is
41265	 *   the column index that the sorting condition applies to, the second is the
41266	 *   direction of the sort (`desc` or `asc`) and, optionally, the third is the
41267	 *   index of the sorting order from the `column.sorting` initialisation array.
41268	 *//**
41269	 * Set the ordering for the table.
41270	 *
41271	 * @param {integer} order Column index to sort upon.
41272	 * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)
41273	 * @returns {DataTables.Api} this
41274	 *//**
41275	 * Set the ordering for the table.
41276	 *
41277	 * @param {array} order 1D array of sorting information to be applied.
41278	 * @param {array} [...] Optional additional sorting conditions
41279	 * @returns {DataTables.Api} this
41280	 *//**
41281	 * Set the ordering for the table.
41282	 *
41283	 * @param {array} order 2D array of sorting information to be applied.
41284	 * @returns {DataTables.Api} this
41285	 */
41286	_api_register( 'order()', function ( order, dir ) {
41287		var ctx = this.context;
41288	
41289		if ( order === undefined ) {
41290			// get
41291			return ctx.length !== 0 ?
41292				ctx[0].aaSorting :
41293				undefined;
41294		}
41295	
41296		// set
41297		if ( typeof order === 'number' ) {
41298			// Simple column / direction passed in
41299			order = [ [ order, dir ] ];
41300		}
41301		else if ( order.length && ! Array.isArray( order[0] ) ) {
41302			// Arguments passed in (list of 1D arrays)
41303			order = Array.prototype.slice.call( arguments );
41304		}
41305		// otherwise a 2D array was passed in
41306	
41307		return this.iterator( 'table', function ( settings ) {
41308			settings.aaSorting = order.slice();
41309		} );
41310	} );
41311	
41312	
41313	/**
41314	 * Attach a sort listener to an element for a given column
41315	 *
41316	 * @param {node|jQuery|string} node Identifier for the element(s) to attach the
41317	 *   listener to. This can take the form of a single DOM node, a jQuery
41318	 *   collection of nodes or a jQuery selector which will identify the node(s).
41319	 * @param {integer} column the column that a click on this node will sort on
41320	 * @param {function} [callback] callback function when sort is run
41321	 * @returns {DataTables.Api} this
41322	 */
41323	_api_register( 'order.listener()', function ( node, column, callback ) {
41324		return this.iterator( 'table', function ( settings ) {
41325			_fnSortAttachListener( settings, node, column, callback );
41326		} );
41327	} );
41328	
41329	
41330	_api_register( 'order.fixed()', function ( set ) {
41331		if ( ! set ) {
41332			var ctx = this.context;
41333			var fixed = ctx.length ?
41334				ctx[0].aaSortingFixed :
41335				undefined;
41336	
41337			return Array.isArray( fixed ) ?
41338				{ pre: fixed } :
41339				fixed;
41340		}
41341	
41342		return this.iterator( 'table', function ( settings ) {
41343			settings.aaSortingFixed = $.extend( true, {}, set );
41344		} );
41345	} );
41346	
41347	
41348	// Order by the selected column(s)
41349	_api_register( [
41350		'columns().order()',
41351		'column().order()'
41352	], function ( dir ) {
41353		var that = this;
41354	
41355		return this.iterator( 'table', function ( settings, i ) {
41356			var sort = [];
41357	
41358			$.each( that[i], function (j, col) {
41359				sort.push( [ col, dir ] );
41360			} );
41361	
41362			settings.aaSorting = sort;
41363		} );
41364	} );
41365	
41366	
41367	
41368	_api_register( 'search()', function ( input, regex, smart, caseInsen ) {
41369		var ctx = this.context;
41370	
41371		if ( input === undefined ) {
41372			// get
41373			return ctx.length !== 0 ?
41374				ctx[0].oPreviousSearch.sSearch :
41375				undefined;
41376		}
41377	
41378		// set
41379		return this.iterator( 'table', function ( settings ) {
41380			if ( ! settings.oFeatures.bFilter ) {
41381				return;
41382			}
41383	
41384			_fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
41385				"sSearch": input+"",
41386				"bRegex":  regex === null ? false : regex,
41387				"bSmart":  smart === null ? true  : smart,
41388				"bCaseInsensitive": caseInsen === null ? true : caseInsen
41389			} ), 1 );
41390		} );
41391	} );
41392	
41393	
41394	_api_registerPlural(
41395		'columns().search()',
41396		'column().search()',
41397		function ( input, regex, smart, caseInsen ) {
41398			return this.iterator( 'column', function ( settings, column ) {
41399				var preSearch = settings.aoPreSearchCols;
41400	
41401				if ( input === undefined ) {
41402					// get
41403					return preSearch[ column ].sSearch;
41404				}
41405	
41406				// set
41407				if ( ! settings.oFeatures.bFilter ) {
41408					return;
41409				}
41410	
41411				$.extend( preSearch[ column ], {
41412					"sSearch": input+"",
41413					"bRegex":  regex === null ? false : regex,
41414					"bSmart":  smart === null ? true  : smart,
41415					"bCaseInsensitive": caseInsen === null ? true : caseInsen
41416				} );
41417	
41418				_fnFilterComplete( settings, settings.oPreviousSearch, 1 );
41419			} );
41420		}
41421	);
41422	
41423	/*
41424	 * State API methods
41425	 */
41426	
41427	_api_register( 'state()', function () {
41428		return this.context.length ?
41429			this.context[0].oSavedState :
41430			null;
41431	} );
41432	
41433	
41434	_api_register( 'state.clear()', function () {
41435		return this.iterator( 'table', function ( settings ) {
41436			// Save an empty object
41437			settings.fnStateSaveCallback.call( settings.oInstance, settings, {} );
41438		} );
41439	} );
41440	
41441	
41442	_api_register( 'state.loaded()', function () {
41443		return this.context.length ?
41444			this.context[0].oLoadedState :
41445			null;
41446	} );
41447	
41448	
41449	_api_register( 'state.save()', function () {
41450		return this.iterator( 'table', function ( settings ) {
41451			_fnSaveState( settings );
41452		} );
41453	} );
41454	
41455	
41456	
41457	/**
41458	 * Set the jQuery or window object to be used by DataTables
41459	 *
41460	 * @param {*} module Library / container object
41461	 * @param {string} [type] Library or container type `lib`, `win` or `datetime`.
41462	 *   If not provided, automatic detection is attempted.
41463	 */
41464	DataTable.use = function (module, type) {
41465		if (type === 'lib' || module.fn) {
41466			$ = module;
41467		}
41468		else if (type == 'win' || module.document) {
41469			window = module;
41470			document = module.document;
41471		}
41472		else if (type === 'datetime' || module.type === 'DateTime') {
41473			DataTable.DateTime = module;
41474		}
41475	}
41476	
41477	/**
41478	 * CommonJS factory function pass through. This will check if the arguments
41479	 * given are a window object or a jQuery object. If so they are set
41480	 * accordingly.
41481	 * @param {*} root Window
41482	 * @param {*} jq jQUery
41483	 * @returns {boolean} Indicator
41484	 */
41485	DataTable.factory = function (root, jq) {
41486		var is = false;
41487	
41488		// Test if the first parameter is a window object
41489		if (root && root.document) {
41490			window = root;
41491			document = root.document;
41492		}
41493	
41494		// Test if the second parameter is a jQuery object
41495		if (jq && jq.fn && jq.fn.jquery) {
41496			$ = jq;
41497			is = true;
41498		}
41499	
41500		return is;
41501	}
41502	
41503	/**
41504	 * Provide a common method for plug-ins to check the version of DataTables being
41505	 * used, in order to ensure compatibility.
41506	 *
41507	 *  @param {string} version Version string to check for, in the format "X.Y.Z".
41508	 *    Note that the formats "X" and "X.Y" are also acceptable.
41509	 *  @returns {boolean} true if this version of DataTables is greater or equal to
41510	 *    the required version, or false if this version of DataTales is not
41511	 *    suitable
41512	 *  @static
41513	 *  @dtopt API-Static
41514	 *
41515	 *  @example
41516	 *    alert( $.fn.dataTable.versionCheck( '1.9.0' ) );
41517	 */
41518	DataTable.versionCheck = DataTable.fnVersionCheck = function( version )
41519	{
41520		var aThis = DataTable.version.split('.');
41521		var aThat = version.split('.');
41522		var iThis, iThat;
41523	
41524		for ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {
41525			iThis = parseInt( aThis[i], 10 ) || 0;
41526			iThat = parseInt( aThat[i], 10 ) || 0;
41527	
41528			// Parts are the same, keep comparing
41529			if (iThis === iThat) {
41530				continue;
41531			}
41532	
41533			// Parts are different, return immediately
41534			return iThis > iThat;
41535		}
41536	
41537		return true;
41538	};
41539	
41540	
41541	/**
41542	 * Check if a `<table>` node is a DataTable table already or not.
41543	 *
41544	 *  @param {node|jquery|string} table Table node, jQuery object or jQuery
41545	 *      selector for the table to test. Note that if more than more than one
41546	 *      table is passed on, only the first will be checked
41547	 *  @returns {boolean} true the table given is a DataTable, or false otherwise
41548	 *  @static
41549	 *  @dtopt API-Static
41550	 *
41551	 *  @example
41552	 *    if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {
41553	 *      $('#example').dataTable();
41554	 *    }
41555	 */
41556	DataTable.isDataTable = DataTable.fnIsDataTable = function ( table )
41557	{
41558		var t = $(table).get(0);
41559		var is = false;
41560	
41561		if ( table instanceof DataTable.Api ) {
41562			return true;
41563		}
41564	
41565		$.each( DataTable.settings, function (i, o) {
41566			var head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;
41567			var foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;
41568	
41569			if ( o.nTable === t || head === t || foot === t ) {
41570				is = true;
41571			}
41572		} );
41573	
41574		return is;
41575	};
41576	
41577	
41578	/**
41579	 * Get all DataTable tables that have been initialised - optionally you can
41580	 * select to get only currently visible tables.
41581	 *
41582	 *  @param {boolean} [visible=false] Flag to indicate if you want all (default)
41583	 *    or visible tables only.
41584	 *  @returns {array} Array of `table` nodes (not DataTable instances) which are
41585	 *    DataTables
41586	 *  @static
41587	 *  @dtopt API-Static
41588	 *
41589	 *  @example
41590	 *    $.each( $.fn.dataTable.tables(true), function () {
41591	 *      $(table).DataTable().columns.adjust();
41592	 *    } );
41593	 */
41594	DataTable.tables = DataTable.fnTables = function ( visible )
41595	{
41596		var api = false;
41597	
41598		if ( $.isPlainObject( visible ) ) {
41599			api = visible.api;
41600			visible = visible.visible;
41601		}
41602	
41603		var a = $.map( DataTable.settings, function (o) {
41604			if ( !visible || (visible && $(o.nTable).is(':visible')) ) {
41605				return o.nTable;
41606			}
41607		} );
41608	
41609		return api ?
41610			new _Api( a ) :
41611			a;
41612	};
41613	
41614	
41615	/**
41616	 * Convert from camel case parameters to Hungarian notation. This is made public
41617	 * for the extensions to provide the same ability as DataTables core to accept
41618	 * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase
41619	 * parameters.
41620	 *
41621	 *  @param {object} src The model object which holds all parameters that can be
41622	 *    mapped.
41623	 *  @param {object} user The object to convert from camel case to Hungarian.
41624	 *  @param {boolean} force When set to `true`, properties which already have a
41625	 *    Hungarian value in the `user` object will be overwritten. Otherwise they
41626	 *    won't be.
41627	 */
41628	DataTable.camelToHungarian = _fnCamelToHungarian;
41629	
41630	
41631	
41632	/**
41633	 *
41634	 */
41635	_api_register( '$()', function ( selector, opts ) {
41636		var
41637			rows   = this.rows( opts ).nodes(), // Get all rows
41638			jqRows = $(rows);
41639	
41640		return $( [].concat(
41641			jqRows.filter( selector ).toArray(),
41642			jqRows.find( selector ).toArray()
41643		) );
41644	} );
41645	
41646	
41647	// jQuery functions to operate on the tables
41648	$.each( [ 'on', 'one', 'off' ], function (i, key) {
41649		_api_register( key+'()', function ( /* event, handler */ ) {
41650			var args = Array.prototype.slice.call(arguments);
41651	
41652			// Add the `dt` namespace automatically if it isn't already present
41653			args[0] = $.map( args[0].split( /\s/ ), function ( e ) {
41654				return ! e.match(/\.dt\b/) ?
41655					e+'.dt' :
41656					e;
41657				} ).join( ' ' );
41658	
41659			var inst = $( this.tables().nodes() );
41660			inst[key].apply( inst, args );
41661			return this;
41662		} );
41663	} );
41664	
41665	
41666	_api_register( 'clear()', function () {
41667		return this.iterator( 'table', function ( settings ) {
41668			_fnClearTable( settings );
41669		} );
41670	} );
41671	
41672	
41673	_api_register( 'settings()', function () {
41674		return new _Api( this.context, this.context );
41675	} );
41676	
41677	
41678	_api_register( 'init()', function () {
41679		var ctx = this.context;
41680		return ctx.length ? ctx[0].oInit : null;
41681	} );
41682	
41683	
41684	_api_register( 'data()', function () {
41685		return this.iterator( 'table', function ( settings ) {
41686			return _pluck( settings.aoData, '_aData' );
41687		} ).flatten();
41688	} );
41689	
41690	
41691	_api_register( 'destroy()', function ( remove ) {
41692		remove = remove || false;
41693	
41694		return this.iterator( 'table', function ( settings ) {
41695			var classes   = settings.oClasses;
41696			var table     = settings.nTable;
41697			var tbody     = settings.nTBody;
41698			var thead     = settings.nTHead;
41699			var tfoot     = settings.nTFoot;
41700			var jqTable   = $(table);
41701			var jqTbody   = $(tbody);
41702			var jqWrapper = $(settings.nTableWrapper);
41703			var rows      = $.map( settings.aoData, function (r) { return r.nTr; } );
41704			var i, ien;
41705	
41706			// Flag to note that the table is currently being destroyed - no action
41707			// should be taken
41708			settings.bDestroying = true;
41709	
41710			// Fire off the destroy callbacks for plug-ins etc
41711			_fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] );
41712	
41713			// If not being removed from the document, make all columns visible
41714			if ( ! remove ) {
41715				new _Api( settings ).columns().visible( true );
41716			}
41717	
41718			// Blitz all `DT` namespaced events (these are internal events, the
41719			// lowercase, `dt` events are user subscribed and they are responsible
41720			// for removing them
41721			jqWrapper.off('.DT').find(':not(tbody *)').off('.DT');
41722			$(window).off('.DT-'+settings.sInstance);
41723	
41724			// When scrolling we had to break the table up - restore it
41725			if ( table != thead.parentNode ) {
41726				jqTable.children('thead').detach();
41727				jqTable.append( thead );
41728			}
41729	
41730			if ( tfoot && table != tfoot.parentNode ) {
41731				jqTable.children('tfoot').detach();
41732				jqTable.append( tfoot );
41733			}
41734	
41735			settings.aaSorting = [];
41736			settings.aaSortingFixed = [];
41737			_fnSortingClasses( settings );
41738	
41739			$( rows ).removeClass( settings.asStripeClasses.join(' ') );
41740	
41741			$('th, td', thead).removeClass( classes.sSortable+' '+
41742				classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
41743			);
41744	
41745			// Add the TR elements back into the table in their original order
41746			jqTbody.children().detach();
41747			jqTbody.append( rows );
41748	
41749			var orig = settings.nTableWrapper.parentNode;
41750	
41751			// Remove the DataTables generated nodes, events and classes
41752			var removedMethod = remove ? 'remove' : 'detach';
41753			jqTable[ removedMethod ]();
41754			jqWrapper[ removedMethod ]();
41755	
41756			// If we need to reattach the table to the document
41757			if ( ! remove && orig ) {
41758				// insertBefore acts like appendChild if !arg[1]
41759				orig.insertBefore( table, settings.nTableReinsertBefore );
41760	
41761				// Restore the width of the original table - was read from the style property,
41762				// so we can restore directly to that
41763				jqTable
41764					.css( 'width', settings.sDestroyWidth )
41765					.removeClass( classes.sTable );
41766	
41767				// If the were originally stripe classes - then we add them back here.
41768				// Note this is not fool proof (for example if not all rows had stripe
41769				// classes - but it's a good effort without getting carried away
41770				ien = settings.asDestroyStripes.length;
41771	
41772				if ( ien ) {
41773					jqTbody.children().each( function (i) {
41774						$(this).addClass( settings.asDestroyStripes[i % ien] );
41775					} );
41776				}
41777			}
41778	
41779			/* Remove the settings object from the settings array */
41780			var idx = $.inArray( settings, DataTable.settings );
41781			if ( idx !== -1 ) {
41782				DataTable.settings.splice( idx, 1 );
41783			}
41784		} );
41785	} );
41786	
41787	
41788	// Add the `every()` method for rows, columns and cells in a compact form
41789	$.each( [ 'column', 'row', 'cell' ], function ( i, type ) {
41790		_api_register( type+'s().every()', function ( fn ) {
41791			var opts = this.selector.opts;
41792			var api = this;
41793	
41794			return this.iterator( type, function ( settings, arg1, arg2, arg3, arg4 ) {
41795				// Rows and columns:
41796				//  arg1 - index
41797				//  arg2 - table counter
41798				//  arg3 - loop counter
41799				//  arg4 - undefined
41800				// Cells:
41801				//  arg1 - row index
41802				//  arg2 - column index
41803				//  arg3 - table counter
41804				//  arg4 - loop counter
41805				fn.call(
41806					api[ type ](
41807						arg1,
41808						type==='cell' ? arg2 : opts,
41809						type==='cell' ? opts : undefined
41810					),
41811					arg1, arg2, arg3, arg4
41812				);
41813			} );
41814		} );
41815	} );
41816	
41817	
41818	// i18n method for extensions to be able to use the language object from the
41819	// DataTable
41820	_api_register( 'i18n()', function ( token, def, plural ) {
41821		var ctx = this.context[0];
41822		var resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );
41823	
41824		if ( resolved === undefined ) {
41825			resolved = def;
41826		}
41827	
41828		if ( plural !== undefined && $.isPlainObject( resolved ) ) {
41829			resolved = resolved[ plural ] !== undefined ?
41830				resolved[ plural ] :
41831				resolved._;
41832		}
41833	
41834		return typeof resolved === 'string'
41835			? resolved.replace( '%d', plural ) // nb: plural might be undefined,
41836			: resolved;
41837	} );	
41838	/**
41839	 * Version string for plug-ins to check compatibility. Allowed format is
41840	 * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
41841	 * only for non-release builds. See http
41841s://semver.org/ for more information.
41842	 *  @member
41843	 *  @type string
41844	 *  @default Version number
41845	 */
41846	DataTable.version = "1.13.7
vendor: 17,667 bytes, lines 41846-42422
41846";
41847	
41848	/**
41849	 * Private data store, containing all of the settings objects that are
41850	 * created for the tables on a given page.
41851	 *
41852	 * Note that the `DataTable.settings` object is aliased to
41853	 * `jQuery.fn.dataTableExt` through which it may be accessed and
41854	 * manipulated, or `jQuery.fn.dataTable.settings`.
41855	 *  @member
41856	 *  @type array
41857	 *  @default []
41858	 *  @private
41859	 */
41860	DataTable.settings = [];
41861	
41862	/**
41863	 * Object models container, for the various models that DataTables has
41864	 * available to it. These models define the objects that are used to hold
41865	 * the active state and configuration of the table.
41866	 *  @namespace
41867	 */
41868	DataTable.models = {};
41869	
41870	
41871	
41872	/**
41873	 * Template object for the way in which DataTables holds information about
41874	 * search information for the global filter and individual column filters.
41875	 *  @namespace
41876	 */
41877	DataTable.models.oSearch = {
41878		/**
41879		 * Flag to indicate if the filtering should be case insensitive or not
41880		 *  @type boolean
41881		 *  @default true
41882		 */
41883		"bCaseInsensitive": true,
41884	
41885		/**
41886		 * Applied search term
41887		 *  @type string
41888		 *  @default <i>Empty string</i>
41889		 */
41890		"sSearch": "",
41891	
41892		/**
41893		 * Flag to indicate if the search term should be interpreted as a
41894		 * regular expression (true) or not (false) and therefore and special
41895		 * regex characters escaped.
41896		 *  @type boolean
41897		 *  @default false
41898		 */
41899		"bRegex": false,
41900	
41901		/**
41902		 * Flag to indicate if DataTables is to use its smart filtering or not.
41903		 *  @type boolean
41904		 *  @default true
41905		 */
41906		"bSmart": true,
41907	
41908		/**
41909		 * Flag to indicate if DataTables should only trigger a search when
41910		 * the return key is pressed.
41911		 *  @type boolean
41912		 *  @default false
41913		 */
41914		"return": false
41915	};
41916	
41917	
41918	
41919	
41920	/**
41921	 * Template object for the way in which DataTables holds information about
41922	 * each individual row. This is the object format used for the settings
41923	 * aoData array.
41924	 *  @namespace
41925	 */
41926	DataTable.models.oRow = {
41927		/**
41928		 * TR element for the row
41929		 *  @type node
41930		 *  @default null
41931		 */
41932		"nTr": null,
41933	
41934		/**
41935		 * Array of TD elements for each row. This is null until the row has been
41936		 * created.
41937		 *  @type array nodes
41938		 *  @default []
41939		 */
41940		"anCells": null,
41941	
41942		/**
41943		 * Data object from the original data source for the row. This is either
41944		 * an array if using the traditional form of DataTables, or an object if
41945		 * using mData options. The exact type will depend on the passed in
41946		 * data from the data source, or will be an array if using DOM a data
41947		 * source.
41948		 *  @type array|object
41949		 *  @default []
41950		 */
41951		"_aData": [],
41952	
41953		/**
41954		 * Sorting data cache - this array is ostensibly the same length as the
41955		 * number of columns (although each index is generated only as it is
41956		 * needed), and holds the data that is used for sorting each column in the
41957		 * row. We do this cache generation at the start of the sort in order that
41958		 * the formatting of the sort data need be done only once for each cell
41959		 * per sort. This array should not be read from or written to by anything
41960		 * other than the master sorting methods.
41961		 *  @type array
41962		 *  @default null
41963		 *  @private
41964		 */
41965		"_aSortData": null,
41966	
41967		/**
41968		 * Per cell filtering data cache. As per the sort data cache, used to
41969		 * increase the performance of the filtering in DataTables
41970		 *  @type array
41971		 *  @default null
41972		 *  @private
41973		 */
41974		"_aFilterData": null,
41975	
41976		/**
41977		 * Filtering data cache. This is the same as the cell filtering cache, but
41978		 * in this case a string rather than an array. This is easily computed with
41979		 * a join on `_aFilterData`, but is provided as a cache so the join isn't
41980		 * needed on every search (memory traded for performance)
41981		 *  @type array
41982		 *  @default null
41983		 *  @private
41984		 */
41985		"_sFilterRow": null,
41986	
41987		/**
41988		 * Cache of the class name that DataTables has applied to the row, so we
41989		 * can quickly look at this variable rather than needing to do a DOM check
41990		 * on className for the nTr property.
41991		 *  @type string
41992		 *  @default <i>Empty string</i>
41993		 *  @private
41994		 */
41995		"_sRowStripe": "",
41996	
41997		/**
41998		 * Denote if the original data source was from the DOM, or the data source
41999		 * object. This is used for invalidating data, so DataTables can
42000		 * automatically read data from the original source, unless uninstructed
42001		 * otherwise.
42002		 *  @type string
42003		 *  @default null
42004		 *  @private
42005		 */
42006		"src": null,
42007	
42008		/**
42009		 * Index in the aoData array. This saves an indexOf lookup when we have the
42010		 * object, but want to know the index
42011		 *  @type integer
42012		 *  @default -1
42013		 *  @private
42014		 */
42015		"idx": -1
42016	};
42017	
42018	
42019	/**
42020	 * Template object for the column information object in DataTables. This object
42021	 * is held in the settings aoColumns array and contains all the information that
42022	 * DataTables needs about each individual column.
42023	 *
42024	 * Note that this object is related to {@link DataTable.defaults.column}
42025	 * but this one is the internal data store for DataTables's cache of columns.
42026	 * It should NOT be manipulated outside of DataTables. Any configuration should
42027	 * be done through the initialisation options.
42028	 *  @namespace
42029	 */
42030	DataTable.models.oColumn = {
42031		/**
42032		 * Column index. This could be worked out on-the-fly with $.inArray, but it
42033		 * is faster to just hold it as a variable
42034		 *  @type integer
42035		 *  @default null
42036		 */
42037		"idx": null,
42038	
42039		/**
42040		 * A list of the columns that sorting should occur on when this column
42041		 * is sorted. That this property is an array allows multi-column sorting
42042		 * to be defined for a column (for example first name / last name columns
42043		 * would benefit from this). The values are integers pointing to the
42044		 * columns to be sorted on (typically it will be a single integer pointing
42045		 * at itself, but that doesn't need to be the case).
42046		 *  @type array
42047		 */
42048		"aDataSort": null,
42049	
42050		/**
42051		 * Define the sorting directions that are applied to the column, in sequence
42052		 * as the column is repeatedly sorted upon - i.e. the first value is used
42053		 * as the sorting direction when the column if first sorted (clicked on).
42054		 * Sort it again (click again) and it will move on to the next index.
42055		 * Repeat until loop.
42056		 *  @type array
42057		 */
42058		"asSorting": null,
42059	
42060		/**
42061		 * Flag to indicate if the column is searchable, and thus should be included
42062		 * in the filtering or not.
42063		 *  @type boolean
42064		 */
42065		"bSearchable": null,
42066	
42067		/**
42068		 * Flag to indicate if the column is sortable or not.
42069		 *  @type boolean
42070		 */
42071		"bSortable": null,
42072	
42073		/**
42074		 * Flag to indicate if the column is currently visible in the table or not
42075		 *  @type boolean
42076		 */
42077		"bVisible": null,
42078	
42079		/**
42080		 * Store for manual type assignment using the `column.type` option. This
42081		 * is held in store so we can manipulate the column's `sType` property.
42082		 *  @type string
42083		 *  @default null
42084		 *  @private
42085		 */
42086		"_sManualType": null,
42087	
42088		/**
42089		 * Flag to indicate if HTML5 data attributes should be used as the data
42090		 * source for filtering or sorting. True is either are.
42091		 *  @type boolean
42092		 *  @default false
42093		 *  @private
42094		 */
42095		"_bAttrSrc": false,
42096	
42097		/**
42098		 * Developer definable function that is called whenever a cell is created (Ajax source,
42099		 * etc) or processed for input (DOM source). This can be used as a compliment to mRender
42100		 * allowing you to modify the DOM element (add background colour for example) when the
42101		 * element is available.
42102		 *  @type function
42103		 *  @param {element} nTd The TD node that has been created
42104		 *  @param {*} sData The Data for the cell
42105		 *  @param {array|object} oData The data for the whole row
42106		 *  @param {int} iRow The row index for the aoData data store
42107		 *  @default null
42108		 */
42109		"fnCreatedCell": null,
42110	
42111		/**
42112		 * Function to get data from a cell in a column. You should <b>never</b>
42113		 * access data directly through _aData internally in DataTables - always use
42114		 * the method attached to this property. It allows mData to function as
42115		 * required. This function is automatically assigned by the column
42116		 * initialisation method
42117		 *  @type function
42118		 *  @param {array|object} oData The data array/object for the array
42119		 *    (i.e. aoData[]._aData)
42120		 *  @param {string} sSpecific The specific data type you want to get -
42121		 *    'display', 'type' 'filter' 'sort'
42122		 *  @returns {*} The data for the cell from the given row's data
42123		 *  @default null
42124		 */
42125		"fnGetData": null,
42126	
42127		/**
42128		 * Function to set data for a cell in the column. You should <b>never</b>
42129		 * set the data directly to _aData internally in DataTables - always use
42130		 * this method. It allows mData to function as required. This function
42131		 * is automatically assigned by the column initialisation method
42132		 *  @type function
42133		 *  @param {array|object} oData The data array/object for the array
42134		 *    (i.e. aoData[]._aData)
42135		 *  @param {*} sValue Value to set
42136		 *  @default null
42137		 */
42138		"fnSetData": null,
42139	
42140		/**
42141		 * Property to read the value for the cells in the column from the data
42142		 * source array / object. If null, then the default content is used, if a
42143		 * function is given then the return from the function is used.
42144		 *  @type function|int|string|null
42145		 *  @default null
42146		 */
42147		"mData": null,
42148	
42149		/**
42150		 * Partner property to mData which is used (only when defined) to get
42151		 * the data - i.e. it is basically the same as mData, but without the
42152		 * 'set' option, and also the data fed to it is the result from mData.
42153		 * This is the rendering method to match the data method of mData.
42154		 *  @type function|int|string|null
42155		 *  @default null
42156		 */
42157		"mRender": null,
42158	
42159		/**
42160		 * Unique header TH/TD element for this column - this is what the sorting
42161		 * listener is attached to (if sorting is enabled.)
42162		 *  @type node
42163		 *  @default null
42164		 */
42165		"nTh": null,
42166	
42167		/**
42168		 * Unique footer TH/TD element for this column (if there is one). Not used
42169		 * in DataTables as such, but can be used for plug-ins to reference the
42170		 * footer for each column.
42171		 *  @type node
42172		 *  @default null
42173		 */
42174		"nTf": null,
42175	
42176		/**
42177		 * The class to apply to all TD elements in the table's TBODY for the column
42178		 *  @type string
42179		 *  @default null
42180		 */
42181		"sClass": null,
42182	
42183		/**
42184		 * When DataTables calculates the column widths to assign to each column,
42185		 * it finds the longest string in each column and then constructs a
42186		 * temporary table and reads the widths from that. The problem with this
42187		 * is that "mmm" is much wider then "iiii", but the latter is a longer
42188		 * string - thus the calculation can go wrong (doing it properly and putting
42189		 * it into an DOM object and measuring that is horribly(!) slow). Thus as
42190		 * a "work around" we provide this option. It will append its value to the
42191		 * text that is found to be the longest string for the column - i.e. padding.
42192		 *  @type string
42193		 */
42194		"sContentPadding": null,
42195	
42196		/**
42197		 * Allows a default value to be given for a column's data, and will be used
42198		 * whenever a null data source is encountered (this can be because mData
42199		 * is set to null, or because the data source itself is null).
42200		 *  @type string
42201		 *  @default null
42202		 */
42203		"sDefaultContent": null,
42204	
42205		/**
42206		 * Name for the column, allowing reference to the column by name as well as
42207		 * by index (needs a lookup to work by name).
42208		 *  @type string
42209		 */
42210		"sName": null,
42211	
42212		/**
42213		 * Custom sorting data type - defines which of the available plug-ins in
42214		 * afnSortData the custom sorting will use - if any is defined.
42215		 *  @type string
42216		 *  @default std
42217		 */
42218		"sSortDataType": 'std',
42219	
42220		/**
42221		 * Class to be applied to the header element when sorting on this column
42222		 *  @type string
42223		 *  @default null
42224		 */
42225		"sSortingClass": null,
42226	
42227		/**
42228		 * Class to be applied to the header element when sorting on this column -
42229		 * when jQuery UI theming is used.
42230		 *  @type string
42231		 *  @default null
42232		 */
42233		"sSortingClassJUI": null,
42234	
42235		/**
42236		 * Title of the column - what is seen in the TH element (nTh).
42237		 *  @type string
42238		 */
42239		"sTitle": null,
42240	
42241		/**
42242		 * Column sorting and filtering type
42243		 *  @type string
42244		 *  @default null
42245		 */
42246		"sType": null,
42247	
42248		/**
42249		 * Width of the column
42250		 *  @type string
42251		 *  @default null
42252		 */
42253		"sWidth": null,
42254	
42255		/**
42256		 * Width of the column when it was first "encountered"
42257		 *  @type string
42258		 *  @default null
42259		 */
42260		"sWidthOrig": null
42261	};
42262	
42263	
42264	/*
42265	 * Developer note: The properties of the object below are given in Hungarian
42266	 * notation, that was used as the interface for DataTables prior to v1.10, however
42267	 * from v1.10 onwards the primary interface is camel case. In order to avoid
42268	 * breaking backwards compatibility utterly with this change, the Hungarian
42269	 * version is still, internally the primary interface, but is is not documented
42270	 * - hence the @name tags in each doc comment. This allows a Javascript function
42271	 * to create a map from Hungarian notation to camel case (going the other direction
42272	 * would require each property to be listed, which would add around 3K to the size
42273	 * of DataTables, while this method is about a 0.5K hit).
42274	 *
42275	 * Ultimately this does pave the way for Hungarian notation to be dropped
42276	 * completely, but that is a massive amount of work and will break current
42277	 * installs (therefore is on-hold until v2).
42278	 */
42279	
42280	/**
42281	 * Initialisation options that can be given to DataTables at initialisation
42282	 * time.
42283	 *  @namespace
42284	 */
42285	DataTable.defaults = {
42286		/**
42287		 * An array of data to use for the table, passed in at initialisation which
42288		 * will be used in preference to any data which is already in the DOM. This is
42289		 * particularly useful for constructing tables purely in Javascript, for
42290		 * example with a custom Ajax call.
42291		 *  @type array
42292		 *  @default null
42293		 *
42294		 *  @dtopt Option
42295		 *  @name DataTable.defaults.data
42296		 *
42297		 *  @example
42298		 *    // Using a 2D array data source
42299		 *    $(document).ready( function () {
42300		 *      $('#example').dataTable( {
42301		 *        "data": [
42302		 *          ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
42303		 *          ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
42304		 *        ],
42305		 *        "columns": [
42306		 *          { "title": "Engine" },
42307		 *          { "title": "Browser" },
42308		 *          { "title": "Platform" },
42309		 *          { "title": "Version" },
42310		 *          { "title": "Grade" }
42311		 *        ]
42312		 *      } );
42313		 *    } );
42314		 *
42315		 *  @example
42316		 *    // Using an array of objects as a data source (`data`)
42317		 *    $(document).ready( function () {
42318		 *      $('#example').dataTable( {
42319		 *        "data": [
42320		 *          {
42321		 *            "engine":   "Trident",
42322		 *            "browser":  "Internet Explorer 4.0",
42323		 *            "platform": "Win 95+",
42324		 *            "version":  4,
42325		 *            "grade":    "X"
42326		 *          },
42327		 *          {
42328		 *            "engine":   "Trident",
42329		 *            "browser":  "Internet Explorer 5.0",
42330		 *            "platform": "Win 95+",
42331		 *            "version":  5,
42332		 *            "grade":    "C"
42333		 *          }
42334		 *        ],
42335		 *        "columns": [
42336		 *          { "title": "Engine",   "data": "engine" },
42337		 *          { "title": "Browser",  "data": "browser" },
42338		 *          { "title": "Platform", "data": "platform" },
42339		 *          { "title": "Version",  "data": "version" },
42340		 *          { "title": "Grade",    "data": "grade" }
42341		 *        ]
42342		 *      } );
42343		 *    } );
42344		 */
42345		"aaData": null,
42346	
42347	
42348		/**
42349		 * If ordering is enabled, then DataTables will perform a first pass sort on
42350		 * initialisation. You can define which column(s) the sort is performed
42351		 * upon, and the sorting direction, with this variable. The `sorting` array
42352		 * should contain an array for each column to be sorted initially containing
42353		 * the column's index and a direction string ('asc' or 'desc').
42354		 *  @type array
42355		 *  @default [[0,'asc']]
42356		 *
42357		 *  @dtopt Option
42358		 *  @name DataTable.defaults.order
42359		 *
42360		 *  @example
42361		 *    // Sort by 3rd column first, and then 4th column
42362		 *    $(document).ready( function() {
42363		 *      $('#example').dataTable( {
42364		 *        "order": [[2,'asc'], [3,'desc']]
42365		 *      } );
42366		 *    } );
42367		 *
42368		 *    // No initial sorting
42369		 *    $(document).ready( function() {
42370		 *      $('#example').dataTable( {
42371		 *        "order": []
42372		 *      } );
42373		 *    } );
42374		 */
42375		"aaSorting": [[0,'asc']],
42376	
42377	
42378		/**
42379		 * This parameter is basically identical to the `sorting` parameter, but
42380		 * cannot be overridden by user interaction with the table. What this means
42381		 * is that you could have a column (visible or hidden) which the sorting
42382		 * will always be forced on first - any sorting after that (from the user)
42383		 * will then be performed as required. This can be useful for grouping rows
42384		 * together.
42385		 *  @type array
42386		 *  @default null
42387		 *
42388		 *  @dtopt Option
42389		 *  @name DataTable.defaults.orderFixed
42390		 *
42391		 *  @example
42392		 *    $(document).ready( function() {
42393		 *      $('#example').dataTable( {
42394		 *        "orderFixed": [[0,'asc']]
42395		 *      } );
42396		 *    } )
42397		 */
42398		"aaSortingFixed": [],
42399	
42400	
42401		/**
42402		 * DataTables can be instructed to load data to display in the table from a
42403		 * Ajax source. This option defines how that Ajax call is made and where to.
42404		 *
42405		 * The `ajax` property has three different modes of operation, depending on
42406		 * how it is defined. These are:
42407		 *
42408		 * * `string` - Set the URL from where the data should be loaded from.
42409		 * * `object` - Define properties for `jQuery.ajax`.
42410		 * * `function` - Custom data get function
42411		 *
42412		 * `string`
42413		 * --------
42414		 *
42415		 * As a string, the `ajax` property simply defines the URL from which
42416		 * DataTables will load data.
42417		 *
42418		 * `object`
42419		 * --------
42420		 *
42421		 * As an object, the parameters in the object are passed to
42422		 * [jQuery.ajax](http
42422s
vendor: 54,865 bytes, lines 42422-44130
42422://api.jquery.com/jQuery.ajax/) allowing fine control
42423		 * of the Ajax request. DataTables has a number of default parameters which
42424		 * you can override using this option. Please refer to the jQuery
42425		 * documentation for a full description of the options available, although
42426		 * the following parameters provide additional options in DataTables or
42427		 * require special consideration:
42428		 *
42429		 * * `data` - As with jQuery, `data` can be provided as an object, but it
42430		 *   can also be used as a function to manipulate the data DataTables sends
42431		 *   to the server. The function takes a single parameter, an object of
42432		 *   parameters with the values that DataTables has readied for sending. An
42433		 *   object may be returned which will be merged into the DataTables
42434		 *   defaults, or you can add the items to the object that was passed in and
42435		 *   not return anything from the function. This supersedes `fnServerParams`
42436		 *   from DataTables 1.9-.
42437		 *
42438		 * * `dataSrc` - By default DataTables will look for the property `data` (or
42439		 *   `aaData` for compatibility with DataTables 1.9-) when obtaining data
42440		 *   from an Ajax source or for server-side processing - this parameter
42441		 *   allows that property to be changed. You can use Javascript dotted
42442		 *   object notation to get a data source for multiple levels of nesting, or
42443		 *   it my be used as a function. As a function it takes a single parameter,
42444		 *   the JSON returned from the server, which can be manipulated as
42445		 *   required, with the returned value being that used by DataTables as the
42446		 *   data source for the table. This supersedes `sAjaxDataProp` from
42447		 *   DataTables 1.9-.
42448		 *
42449		 * * `success` - Should not be overridden it is used internally in
42450		 *   DataTables. To manipulate / transform the data returned by the server
42451		 *   use `ajax.dataSrc`, or use `ajax` as a function (see below).
42452		 *
42453		 * `function`
42454		 * ----------
42455		 *
42456		 * As a function, making the Ajax call is left up to yourself allowing
42457		 * complete control of the Ajax request. Indeed, if desired, a method other
42458		 * than Ajax could be used to obtain the required data, such as Web storage
42459		 * or an AIR database.
42460		 *
42461		 * The function is given four parameters and no return is required. The
42462		 * parameters are:
42463		 *
42464		 * 1. _object_ - Data to send to the server
42465		 * 2. _function_ - Callback function that must be executed when the required
42466		 *    data has been obtained. That data should be passed into the callback
42467		 *    as the only parameter
42468		 * 3. _object_ - DataTables settings object for the table
42469		 *
42470		 * Note that this supersedes `fnServerData` from DataTables 1.9-.
42471		 *
42472		 *  @type string|object|function
42473		 *  @default null
42474		 *
42475		 *  @dtopt Option
42476		 *  @name DataTable.defaults.ajax
42477		 *  @since 1.10.0
42478		 *
42479		 * @example
42480		 *   // Get JSON data from a file via Ajax.
42481		 *   // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default).
42482		 *   $('#example').dataTable( {
42483		 *     "ajax": "data.json"
42484		 *   } );
42485		 *
42486		 * @example
42487		 *   // Get JSON data from a file via Ajax, using `dataSrc` to change
42488		 *   // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`)
42489		 *   $('#example').dataTable( {
42490		 *     "ajax": {
42491		 *       "url": "data.json",
42492		 *       "dataSrc": "tableData"
42493		 *     }
42494		 *   } );
42495		 *
42496		 * @example
42497		 *   // Get JSON data from a file via Ajax, using `dataSrc` to read data
42498		 *   // from a plain array rather than an array in an object
42499		 *   $('#example').dataTable( {
42500		 *     "ajax": {
42501		 *       "url": "data.json",
42502		 *       "dataSrc": ""
42503		 *     }
42504		 *   } );
42505		 *
42506		 * @example
42507		 *   // Manipulate the data returned from the server - add a link to data
42508		 *   // (note this can, should, be done using `render` for the column - this
42509		 *   // is just a simple example of how the data can be manipulated).
42510		 *   $('#example').dataTable( {
42511		 *     "ajax": {
42512		 *       "url": "data.json",
42513		 *       "dataSrc": function ( json ) {
42514		 *         for ( var i=0, ien=json.length ; i<ien ; i++ ) {
42515		 *           json[i][0] = '<a href="/message/'+json[i][0]+'>View message</a>';
42516		 *         }
42517		 *         return json;
42518		 *       }
42519		 *     }
42520		 *   } );
42521		 *
42522		 * @example
42523		 *   // Add data to the request
42524		 *   $('#example').dataTable( {
42525		 *     "ajax": {
42526		 *       "url": "data.json",
42527		 *       "data": function ( d ) {
42528		 *         return {
42529		 *           "extra_search": $('#extra').val()
42530		 *         };
42531		 *       }
42532		 *     }
42533		 *   } );
42534		 *
42535		 * @example
42536		 *   // Send request as POST
42537		 *   $('#example').dataTable( {
42538		 *     "ajax": {
42539		 *       "url": "data.json",
42540		 *       "type": "POST"
42541		 *     }
42542		 *   } );
42543		 *
42544		 * @example
42545		 *   // Get the data from localStorage (could interface with a form for
42546		 *   // adding, editing and removing rows).
42547		 *   $('#example').dataTable( {
42548		 *     "ajax": function (data, callback, settings) {
42549		 *       callback(
42550		 *         JSON.parse( localStorage.getItem('dataTablesData') )
42551		 *       );
42552		 *     }
42553		 *   } );
42554		 */
42555		"ajax": null,
42556	
42557	
42558		/**
42559		 * This parameter allows you to readily specify the entries in the length drop
42560		 * down menu that DataTables shows when pagination is enabled. It can be
42561		 * either a 1D array of options which will be used for both the displayed
42562		 * option and the value, or a 2D array which will use the array in the first
42563		 * position as the value, and the array in the second position as the
42564		 * displayed options (useful for language strings such as 'All').
42565		 *
42566		 * Note that the `pageLength` property will be automatically set to the
42567		 * first value given in this array, unless `pageLength` is also provided.
42568		 *  @type array
42569		 *  @default [ 10, 25, 50, 100 ]
42570		 *
42571		 *  @dtopt Option
42572		 *  @name DataTable.defaults.lengthMenu
42573		 *
42574		 *  @example
42575		 *    $(document).ready( function() {
42576		 *      $('#example').dataTable( {
42577		 *        "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
42578		 *      } );
42579		 *    } );
42580		 */
42581		"aLengthMenu": [ 10, 25, 50, 100 ],
42582	
42583	
42584		/**
42585		 * The `columns` option in the initialisation parameter allows you to define
42586		 * details about the way individual columns behave. For a full list of
42587		 * column options that can be set, please see
42588		 * {@link DataTable.defaults.column}. Note that if you use `columns` to
42589		 * define your columns, you must have an entry in the array for every single
42590		 * column that you have in your table (these can be null if you don't which
42591		 * to specify any options).
42592		 *  @member
42593		 *
42594		 *  @name DataTable.defaults.column
42595		 */
42596		"aoColumns": null,
42597	
42598		/**
42599		 * Very similar to `columns`, `columnDefs` allows you to target a specific
42600		 * column, multiple columns, or all columns, using the `targets` property of
42601		 * each object in the array. This allows great flexibility when creating
42602		 * tables, as the `columnDefs` arrays can be of any length, targeting the
42603		 * columns you specifically want. `columnDefs` may use any of the column
42604		 * options available: {@link DataTable.defaults.column}, but it _must_
42605		 * have `targets` defined in each object in the array. Values in the `targets`
42606		 * array may be:
42607		 *   <ul>
42608		 *     <li>a string - class name will be matched on the TH for the column</li>
42609		 *     <li>0 or a positive integer - column index counting from the left</li>
42610		 *     <li>a negative integer - column index counting from the right</li>
42611		 *     <li>the string "_all" - all columns (i.e. assign a default)</li>
42612		 *   </ul>
42613		 *  @member
42614		 *
42615		 *  @name DataTable.defaults.columnDefs
42616		 */
42617		"aoColumnDefs": null,
42618	
42619	
42620		/**
42621		 * Basically the same as `search`, this parameter defines the individual column
42622		 * filtering state at initialisation time. The array must be of the same size
42623		 * as the number of columns, and each element be an object with the parameters
42624		 * `search` and `escapeRegex` (the latter is optional). 'null' is also
42625		 * accepted and the default will be used.
42626		 *  @type array
42627		 *  @default []
42628		 *
42629		 *  @dtopt Option
42630		 *  @name DataTable.defaults.searchCols
42631		 *
42632		 *  @example
42633		 *    $(document).ready( function() {
42634		 *      $('#example').dataTable( {
42635		 *        "searchCols": [
42636		 *          null,
42637		 *          { "search": "My filter" },
42638		 *          null,
42639		 *          { "search": "^[0-9]", "escapeRegex": false }
42640		 *        ]
42641		 *      } );
42642		 *    } )
42643		 */
42644		"aoSearchCols": [],
42645	
42646	
42647		/**
42648		 * An array of CSS classes that should be applied to displayed rows. This
42649		 * array may be of any length, and DataTables will apply each class
42650		 * sequentially, looping when required.
42651		 *  @type array
42652		 *  @default null <i>Will take the values determined by the `oClasses.stripe*`
42653		 *    options</i>
42654		 *
42655		 *  @dtopt Option
42656		 *  @name DataTable.defaults.stripeClasses
42657		 *
42658		 *  @example
42659		 *    $(document).ready( function() {
42660		 *      $('#example').dataTable( {
42661		 *        "stripeClasses": [ 'strip1', 'strip2', 'strip3' ]
42662		 *      } );
42663		 *    } )
42664		 */
42665		"asStripeClasses": null,
42666	
42667	
42668		/**
42669		 * Enable or disable automatic column width calculation. This can be disabled
42670		 * as an optimisation (it takes some time to calculate the widths) if the
42671		 * tables widths are passed in using `columns`.
42672		 *  @type boolean
42673		 *  @default true
42674		 *
42675		 *  @dtopt Features
42676		 *  @name DataTable.defaults.autoWidth
42677		 *
42678		 *  @example
42679		 *    $(document).ready( function () {
42680		 *      $('#example').dataTable( {
42681		 *        "autoWidth": false
42682		 *      } );
42683		 *    } );
42684		 */
42685		"bAutoWidth": true,
42686	
42687	
42688		/**
42689		 * Deferred rendering can provide DataTables with a huge speed boost when you
42690		 * are using an Ajax or JS data source for the table. This option, when set to
42691		 * true, will cause DataTables to defer the creation of the table elements for
42692		 * each row until they are needed for a draw - saving a significant amount of
42693		 * time.
42694		 *  @type boolean
42695		 *  @default false
42696		 *
42697		 *  @dtopt Features
42698		 *  @name DataTable.defaults.deferRender
42699		 *
42700		 *  @example
42701		 *    $(document).ready( function() {
42702		 *      $('#example').dataTable( {
42703		 *        "ajax": "sources/arrays.txt",
42704		 *        "deferRender": true
42705		 *      } );
42706		 *    } );
42707		 */
42708		"bDeferRender": false,
42709	
42710	
42711		/**
42712		 * Replace a DataTable which matches the given selector and replace it with
42713		 * one which has the properties of the new initialisation object passed. If no
42714		 * table matches the selector, then the new DataTable will be constructed as
42715		 * per normal.
42716		 *  @type boolean
42717		 *  @default false
42718		 *
42719		 *  @dtopt Options
42720		 *  @name DataTable.defaults.destroy
42721		 *
42722		 *  @example
42723		 *    $(document).ready( function() {
42724		 *      $('#example').dataTable( {
42725		 *        "srollY": "200px",
42726		 *        "paginate": false
42727		 *      } );
42728		 *
42729		 *      // Some time later....
42730		 *      $('#example').dataTable( {
42731		 *        "filter": false,
42732		 *        "destroy": true
42733		 *      } );
42734		 *    } );
42735		 */
42736		"bDestroy": false,
42737	
42738	
42739		/**
42740		 * Enable or disable filtering of data. Filtering in DataTables is "smart" in
42741		 * that it allows the end user to input multiple words (space separated) and
42742		 * will match a row containing those words, even if not in the order that was
42743		 * specified (this allow matching across multiple columns). Note that if you
42744		 * wish to use filtering in DataTables this must remain 'true' - to remove the
42745		 * default filtering input box and retain filtering abilities, please use
42746		 * {@link DataTable.defaults.dom}.
42747		 *  @type boolean
42748		 *  @default true
42749		 *
42750		 *  @dtopt Features
42751		 *  @name DataTable.defaults.searching
42752		 *
42753		 *  @example
42754		 *    $(document).ready( function () {
42755		 *      $('#example').dataTable( {
42756		 *        "searching": false
42757		 *      } );
42758		 *    } );
42759		 */
42760		"bFilter": true,
42761	
42762	
42763		/**
42764		 * Enable or disable the table information display. This shows information
42765		 * about the data that is currently visible on the page, including information
42766		 * about filtered data if that action is being performed.
42767		 *  @type boolean
42768		 *  @default true
42769		 *
42770		 *  @dtopt Features
42771		 *  @name DataTable.defaults.info
42772		 *
42773		 *  @example
42774		 *    $(document).ready( function () {
42775		 *      $('#example').dataTable( {
42776		 *        "info": false
42777		 *      } );
42778		 *    } );
42779		 */
42780		"bInfo": true,
42781	
42782	
42783		/**
42784		 * Allows the end user to select the size of a formatted page from a select
42785		 * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).
42786		 *  @type boolean
42787		 *  @default true
42788		 *
42789		 *  @dtopt Features
42790		 *  @name DataTable.defaults.lengthChange
42791		 *
42792		 *  @example
42793		 *    $(document).ready( function () {
42794		 *      $('#example').dataTable( {
42795		 *        "lengthChange": false
42796		 *      } );
42797		 *    } );
42798		 */
42799		"bLengthChange": true,
42800	
42801	
42802		/**
42803		 * Enable or disable pagination.
42804		 *  @type boolean
42805		 *  @default true
42806		 *
42807		 *  @dtopt Features
42808		 *  @name DataTable.defaults.paging
42809		 *
42810		 *  @example
42811		 *    $(document).ready( function () {
42812		 *      $('#example').dataTable( {
42813		 *        "paging": false
42814		 *      } );
42815		 *    } );
42816		 */
42817		"bPaginate": true,
42818	
42819	
42820		/**
42821		 * Enable or disable the display of a 'processing' indicator when the table is
42822		 * being processed (e.g. a sort). This is particularly useful for tables with
42823		 * large amounts of data where it can take a noticeable amount of time to sort
42824		 * the entries.
42825		 *  @type boolean
42826		 *  @default false
42827		 *
42828		 *  @dtopt Features
42829		 *  @name DataTable.defaults.processing
42830		 *
42831		 *  @example
42832		 *    $(document).ready( function () {
42833		 *      $('#example').dataTable( {
42834		 *        "processing": true
42835		 *      } );
42836		 *    } );
42837		 */
42838		"bProcessing": false,
42839	
42840	
42841		/**
42842		 * Retrieve the DataTables object for the given selector. Note that if the
42843		 * table has already been initialised, this parameter will cause DataTables
42844		 * to simply return the object that has already been set up - it will not take
42845		 * account of any changes you might have made to the initialisation object
42846		 * passed to DataTables (setting this parameter to true is an acknowledgement
42847		 * that you understand this). `destroy` can be used to reinitialise a table if
42848		 * you need.
42849		 *  @type boolean
42850		 *  @default false
42851		 *
42852		 *  @dtopt Options
42853		 *  @name DataTable.defaults.retrieve
42854		 *
42855		 *  @example
42856		 *    $(document).ready( function() {
42857		 *      initTable();
42858		 *      tableActions();
42859		 *    } );
42860		 *
42861		 *    function initTable ()
42862		 *    {
42863		 *      return $('#example').dataTable( {
42864		 *        "scrollY": "200px",
42865		 *        "paginate": false,
42866		 *        "retrieve": true
42867		 *      } );
42868		 *    }
42869		 *
42870		 *    function tableActions ()
42871		 *    {
42872		 *      var table = initTable();
42873		 *      // perform API operations with oTable
42874		 *    }
42875		 */
42876		"bRetrieve": false,
42877	
42878	
42879		/**
42880		 * When vertical (y) scrolling is enabled, DataTables will force the height of
42881		 * the table's viewport to the given height at all times (useful for layout).
42882		 * However, this can look odd when filtering data down to a small data set,
42883		 * and the footer is left "floating" further down. This parameter (when
42884		 * enabled) will cause DataTables to collapse the table's viewport down when
42885		 * the result set will fit within the given Y height.
42886		 *  @type boolean
42887		 *  @default false
42888		 *
42889		 *  @dtopt Options
42890		 *  @name DataTable.defaults.scrollCollapse
42891		 *
42892		 *  @example
42893		 *    $(document).ready( function() {
42894		 *      $('#example').dataTable( {
42895		 *        "scrollY": "200",
42896		 *        "scrollCollapse": true
42897		 *      } );
42898		 *    } );
42899		 */
42900		"bScrollCollapse": false,
42901	
42902	
42903		/**
42904		 * Configure DataTables to use server-side processing. Note that the
42905		 * `ajax` parameter must also be given in order to give DataTables a
42906		 * source to obtain the required data for each draw.
42907		 *  @type boolean
42908		 *  @default false
42909		 *
42910		 *  @dtopt Features
42911		 *  @dtopt Server-side
42912		 *  @name DataTable.defaults.serverSide
42913		 *
42914		 *  @example
42915		 *    $(document).ready( function () {
42916		 *      $('#example').dataTable( {
42917		 *        "serverSide": true,
42918		 *        "ajax": "xhr.php"
42919		 *      } );
42920		 *    } );
42921		 */
42922		"bServerSide": false,
42923	
42924	
42925		/**
42926		 * Enable or disable sorting of columns. Sorting of individual columns can be
42927		 * disabled by the `sortable` option for each column.
42928		 *  @type boolean
42929		 *  @default true
42930		 *
42931		 *  @dtopt Features
42932		 *  @name DataTable.defaults.ordering
42933		 *
42934		 *  @example
42935		 *    $(document).ready( function () {
42936		 *      $('#example').dataTable( {
42937		 *        "ordering": false
42938		 *      } );
42939		 *    } );
42940		 */
42941		"bSort": true,
42942	
42943	
42944		/**
42945		 * Enable or display DataTables' ability to sort multiple columns at the
42946		 * same time (activated by shift-click by the user).
42947		 *  @type boolean
42948		 *  @default true
42949		 *
42950		 *  @dtopt Options
42951		 *  @name DataTable.defaults.orderMulti
42952		 *
42953		 *  @example
42954		 *    // Disable multiple column sorting ability
42955		 *    $(document).ready( function () {
42956		 *      $('#example').dataTable( {
42957		 *        "orderMulti": false
42958		 *      } );
42959		 *    } );
42960		 */
42961		"bSortMulti": true,
42962	
42963	
42964		/**
42965		 * Allows control over whether DataTables should use the top (true) unique
42966		 * cell that is found for a single column, or the bottom (false - default).
42967		 * This is useful when using complex headers.
42968		 *  @type boolean
42969		 *  @default false
42970		 *
42971		 *  @dtopt Options
42972		 *  @name DataTable.defaults.orderCellsTop
42973		 *
42974		 *  @example
42975		 *    $(document).ready( function() {
42976		 *      $('#example').dataTable( {
42977		 *        "orderCellsTop": true
42978		 *      } );
42979		 *    } );
42980		 */
42981		"bSortCellsTop": false,
42982	
42983	
42984		/**
42985		 * Enable or disable the addition of the classes `sorting\_1`, `sorting\_2` and
42986		 * `sorting\_3` to the columns which are currently being sorted on. This is
42987		 * presented as a feature switch as it can increase processing time (while
42988		 * classes are removed and added) so for large data sets you might want to
42989		 * turn this off.
42990		 *  @type boolean
42991		 *  @default true
42992		 *
42993		 *  @dtopt Features
42994		 *  @name DataTable.defaults.orderClasses
42995		 *
42996		 *  @example
42997		 *    $(document).ready( function () {
42998		 *      $('#example').dataTable( {
42999		 *        "orderClasses": false
43000		 *      } );
43001		 *    } );
43002		 */
43003		"bSortClasses": true,
43004	
43005	
43006		/**
43007		 * Enable or disable state saving. When enabled HTML5 `localStorage` will be
43008		 * used to save table display information such as pagination information,
43009		 * display length, filtering and sorting. As such when the end user reloads
43010		 * the page the display display will match what thy had previously set up.
43011		 *
43012		 * Due to the use of `localStorage` the default state saving is not supported
43013		 * in IE6 or 7. If state saving is required in those browsers, use
43014		 * `stateSaveCallback` to provide a storage solution such as cookies.
43015		 *  @type boolean
43016		 *  @default false
43017		 *
43018		 *  @dtopt Features
43019		 *  @name DataTable.defaults.stateSave
43020		 *
43021		 *  @example
43022		 *    $(document).ready( function () {
43023		 *      $('#example').dataTable( {
43024		 *        "stateSave": true
43025		 *      } );
43026		 *    } );
43027		 */
43028		"bStateSave": false,
43029	
43030	
43031		/**
43032		 * This function is called when a TR element is created (and all TD child
43033		 * elements have been inserted), or registered if using a DOM source, allowing
43034		 * manipulation of the TR element (adding classes etc).
43035		 *  @type function
43036		 *  @param {node} row "TR" element for the current row
43037		 *  @param {array} data Raw data array for this row
43038		 *  @param {int} dataIndex The index of this row in the internal aoData array
43039		 *
43040		 *  @dtopt Callbacks
43041		 *  @name DataTable.defaults.createdRow
43042		 *
43043		 *  @example
43044		 *    $(document).ready( function() {
43045		 *      $('#example').dataTable( {
43046		 *        "createdRow": function( row, data, dataIndex ) {
43047		 *          // Bold the grade for all 'A' grade browsers
43048		 *          if ( data[4] == "A" )
43049		 *          {
43050		 *            $('td:eq(4)', row).html( '<b>A</b>' );
43051		 *          }
43052		 *        }
43053		 *      } );
43054		 *    } );
43055		 */
43056		"fnCreatedRow": null,
43057	
43058	
43059		/**
43060		 * This function is called on every 'draw' event, and allows you to
43061		 * dynamically modify any aspect you want about the created DOM.
43062		 *  @type function
43063		 *  @param {object} settings DataTables settings object
43064		 *
43065		 *  @dtopt Callbacks
43066		 *  @name DataTable.defaults.drawCallback
43067		 *
43068		 *  @example
43069		 *    $(document).ready( function() {
43070		 *      $('#example').dataTable( {
43071		 *        "drawCallback": function( settings ) {
43072		 *          alert( 'DataTables has redrawn the table' );
43073		 *        }
43074		 *      } );
43075		 *    } );
43076		 */
43077		"fnDrawCallback": null,
43078	
43079	
43080		/**
43081		 * Identical to fnHeaderCallback() but for the table footer this function
43082		 * allows you to modify the table footer on every 'draw' event.
43083		 *  @type function
43084		 *  @param {node} foot "TR" element for the footer
43085		 *  @param {array} data Full table data (as derived from the original HTML)
43086		 *  @param {int} start Index for the current display starting point in the
43087		 *    display array
43088		 *  @param {int} end Index for the current display ending point in the
43089		 *    display array
43090		 *  @param {array int} display Index array to translate the visual position
43091		 *    to the full data array
43092		 *
43093		 *  @dtopt Callbacks
43094		 *  @name DataTable.defaults.footerCallback
43095		 *
43096		 *  @example
43097		 *    $(document).ready( function() {
43098		 *      $('#example').dataTable( {
43099		 *        "footerCallback": function( tfoot, data, start, end, display ) {
43100		 *          tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start;
43101		 *        }
43102		 *      } );
43103		 *    } )
43104		 */
43105		"fnFooterCallback": null,
43106	
43107	
43108		/**
43109		 * When rendering large numbers in the information element for the table
43110		 * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
43111		 * to have a comma separator for the 'thousands' units (e.g. 1 million is
43112		 * rendered as "1,000,000") to help readability for the end user. This
43113		 * function will override the default method DataTables uses.
43114		 *  @type function
43115		 *  @member
43116		 *  @param {int} toFormat number to be formatted
43117		 *  @returns {string} formatted string for DataTables to show the number
43118		 *
43119		 *  @dtopt Callbacks
43120		 *  @name DataTable.defaults.formatNumber
43121		 *
43122		 *  @example
43123		 *    // Format a number using a single quote for the separator (note that
43124		 *    // this can also be done with the language.thousands option)
43125		 *    $(document).ready( function() {
43126		 *      $('#example').dataTable( {
43127		 *        "formatNumber": function ( toFormat ) {
43128		 *          return toFormat.toString().replace(
43129		 *            /\B(?=(\d{3})+(?!\d))/g, "'"
43130		 *          );
43131		 *        };
43132		 *      } );
43133		 *    } );
43134		 */
43135		"fnFormatNumber": function ( toFormat ) {
43136			return toFormat.toString().replace(
43137				/\B(?=(\d{3})+(?!\d))/g,
43138				this.oLanguage.sThousands
43139			);
43140		},
43141	
43142	
43143		/**
43144		 * This function is called on every 'draw' event, and allows you to
43145		 * dynamically modify the header row. This can be used to calculate and
43146		 * display useful information about the table.
43147		 *  @type function
43148		 *  @param {node} head "TR" element for the header
43149		 *  @param {array} data Full table data (as derived from the original HTML)
43150		 *  @param {int} start Index for the current display starting point in the
43151		 *    display array
43152		 *  @param {int} end Index for the current display ending point in the
43153		 *    display array
43154		 *  @param {array int} display Index array to translate the visual position
43155		 *    to the full data array
43156		 *
43157		 *  @dtopt Callbacks
43158		 *  @name DataTable.defaults.headerCallback
43159		 *
43160		 *  @example
43161		 *    $(document).ready( function() {
43162		 *      $('#example').dataTable( {
43163		 *        "fheaderCallback": function( head, data, start, end, display ) {
43164		 *          head.getElementsByTagName('th')[0].innerHTML = "Displaying "+(end-start)+" records";
43165		 *        }
43166		 *      } );
43167		 *    } )
43168		 */
43169		"fnHeaderCallback": null,
43170	
43171	
43172		/**
43173		 * The information element can be used to convey information about the current
43174		 * state of the table. Although the internationalisation options presented by
43175		 * DataTables are quite capable of dealing with most customisations, there may
43176		 * be times where you wish to customise the string further. This callback
43177		 * allows you to do exactly that.
43178		 *  @type function
43179		 *  @param {object} oSettings DataTables settings object
43180		 *  @param {int} start Starting position in data for the draw
43181		 *  @param {int} end End position in data for the draw
43182		 *  @param {int} max Total number of rows in the table (regardless of
43183		 *    filtering)
43184		 *  @param {int} total Total number of rows in the data set, after filtering
43185		 *  @param {string} pre The string that DataTables has formatted using it's
43186		 *    own rules
43187		 *  @returns {string} The string to be displayed in the information element.
43188		 *
43189		 *  @dtopt Callbacks
43190		 *  @name DataTable.defaults.infoCallback
43191		 *
43192		 *  @example
43193		 *    $('#example').dataTable( {
43194		 *      "infoCallback": function( settings, start, end, max, total, pre ) {
43195		 *        return start +" to "+ end;
43196		 *      }
43197		 *    } );
43198		 */
43199		"fnInfoCallback": null,
43200	
43201	
43202		/**
43203		 * Called when the table has been initialised. Normally DataTables will
43204		 * initialise sequentially and there will be no need for this function,
43205		 * however, this does not hold true when using external language information
43206		 * since that is obtained using an async XHR call.
43207		 *  @type function
43208		 *  @param {object} settings DataTables settings object
43209		 *  @param {object} json The JSON object request from the server - only
43210		 *    present if client-side Ajax sourced data is used
43211		 *
43212		 *  @dtopt Callbacks
43213		 *  @name DataTable.defaults.initComplete
43214		 *
43215		 *  @example
43216		 *    $(document).ready( function() {
43217		 *      $('#example').dataTable( {
43218		 *        "initComplete": function(settings, json) {
43219		 *          alert( 'DataTables has finished its initialisation.' );
43220		 *        }
43221		 *      } );
43222		 *    } )
43223		 */
43224		"fnInitComplete": null,
43225	
43226	
43227		/**
43228		 * Called at the very start of each table draw and can be used to cancel the
43229		 * draw by returning false, any other return (including undefined) results in
43230		 * the full draw occurring).
43231		 *  @type function
43232		 *  @param {object} settings DataTables settings object
43233		 *  @returns {boolean} False will cancel the draw, anything else (including no
43234		 *    return) will allow it to complete.
43235		 *
43236		 *  @dtopt Callbacks
43237		 *  @name DataTable.defaults.preDrawCallback
43238		 *
43239		 *  @example
43240		 *    $(document).ready( function() {
43241		 *      $('#example').dataTable( {
43242		 *        "preDrawCallback": function( settings ) {
43243		 *          if ( $('#test').val() == 1 ) {
43244		 *            return false;
43245		 *          }
43246		 *        }
43247		 *      } );
43248		 *    } );
43249		 */
43250		"fnPreDrawCallback": null,
43251	
43252	
43253		/**
43254		 * This function allows you to 'post process' each row after it have been
43255		 * generated for each table draw, but before it is rendered on screen. This
43256		 * function might be used for setting the row class name etc.
43257		 *  @type function
43258		 *  @param {node} row "TR" element for the current row
43259		 *  @param {array} data Raw data array for this row
43260		 *  @param {int} displayIndex The display index for the current table draw
43261		 *  @param {int} displayIndexFull The index of the data in the full list of
43262		 *    rows (after filtering)
43263		 *
43264		 *  @dtopt Callbacks
43265		 *  @name DataTable.defaults.rowCallback
43266		 *
43267		 *  @example
43268		 *    $(document).ready( function() {
43269		 *      $('#example').dataTable( {
43270		 *        "rowCallback": function( row, data, displayIndex, displayIndexFull ) {
43271		 *          // Bold the grade for all 'A' grade browsers
43272		 *          if ( data[4] == "A" ) {
43273		 *            $('td:eq(4)', row).html( '<b>A</b>' );
43274		 *          }
43275		 *        }
43276		 *      } );
43277		 *    } );
43278		 */
43279		"fnRowCallback": null,
43280	
43281	
43282		/**
43283		 * __Deprecated__ The functionality provided by this parameter has now been
43284		 * superseded by that provided through `ajax`, which should be used instead.
43285		 *
43286		 * This parameter allows you to override the default function which obtains
43287		 * the data from the server so something more suitable for your application.
43288		 * For example you could use POST data, or pull information from a Gears or
43289		 * AIR database.
43290		 *  @type function
43291		 *  @member
43292		 *  @param {string} source HTTP source to obtain the data from (`ajax`)
43293		 *  @param {array} data A key/value pair object containing the data to send
43294		 *    to the server
43295		 *  @param {function} callback to be called on completion of the data get
43296		 *    process that will draw the data on the page.
43297		 *  @param {object} settings DataTables settings object
43298		 *
43299		 *  @dtopt Callbacks
43300		 *  @dtopt Server-side
43301		 *  @name DataTable.defaults.serverData
43302		 *
43303		 *  @deprecated 1.10. Please use `ajax` for this functionality now.
43304		 */
43305		"fnServerData": null,
43306	
43307	
43308		/**
43309		 * __Deprecated__ The functionality provided by this parameter has now been
43310		 * superseded by that provided through `ajax`, which should be used instead.
43311		 *
43312		 *  It is often useful to send extra data to the server when making an Ajax
43313		 * request - for example custom filtering information, and this callback
43314		 * function makes it trivial to send extra information to the server. The
43315		 * passed in parameter is the data set that has been constructed by
43316		 * DataTables, and you can add to this or modify it as you require.
43317		 *  @type function
43318		 *  @param {array} data Data array (array of objects which are name/value
43319		 *    pairs) that has been constructed by DataTables and will be sent to the
43320		 *    server. In the case of Ajax sourced data with server-side processing
43321		 *    this will be an empty array, for server-side processing there will be a
43322		 *    significant number of parameters!
43323		 *  @returns {undefined} Ensure that you modify the data array passed in,
43324		 *    as this is passed by reference.
43325		 *
43326		 *  @dtopt Callbacks
43327		 *  @dtopt Server-side
43328		 *  @name DataTable.defaults.serverParams
43329		 *
43330		 *  @deprecated 1.10. Please use `ajax` for this functionality now.
43331		 */
43332		"fnServerParams": null,
43333	
43334	
43335		/**
43336		 * Load the table state. With this function you can define from where, and how, the
43337		 * state of a table is loaded. By default DataTables will load from `localStorage`
43338		 * but you might wish to use a server-side database or cookies.
43339		 *  @type function
43340		 *  @member
43341		 *  @param {object} settings DataTables settings object
43342		 *  @param {object} callback Callback that can be executed when done. It
43343		 *    should be passed the loaded state object.
43344		 *  @return {object} The DataTables state object to be loaded
43345		 *
43346		 *  @dtopt Callbacks
43347		 *  @name DataTable.defaults.stateLoadCallback
43348		 *
43349		 *  @example
43350		 *    $(document).ready( function() {
43351		 *      $('#example').dataTable( {
43352		 *        "stateSave": true,
43353		 *        "stateLoadCallback": function (settings, callback) {
43354		 *          $.ajax( {
43355		 *            "url": "/state_load",
43356		 *            "dataType": "json",
43357		 *            "success": function (json) {
43358		 *              callback( json );
43359		 *            }
43360		 *          } );
43361		 *        }
43362		 *      } );
43363		 *    } );
43364		 */
43365		"fnStateLoadCallback": function ( settings ) {
43366			try {
43367				return JSON.parse(
43368					(settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(
43369						'DataTables_'+settings.sInstance+'_'+location.pathname
43370					)
43371				);
43372			} catch (e) {
43373				return {};
43374			}
43375		},
43376	
43377	
43378		/**
43379		 * Callback which allows modification of the saved state prior to loading that state.
43380		 * This callback is called when the table is loading state from the stored data, but
43381		 * prior to the settings object being modified by the saved state. Note that for
43382		 * plug-in authors, you should use the `stateLoadParams` event to load parameters for
43383		 * a plug-in.
43384		 *  @type function
43385		 *  @param {object} settings DataTables settings object
43386		 *  @param {object} data The state object that is to be loaded
43387		 *
43388		 *  @dtopt Callbacks
43389		 *  @name DataTable.defaults.stateLoadParams
43390		 *
43391		 *  @example
43392		 *    // Remove a saved filter, so filtering is never loaded
43393		 *    $(document).ready( function() {
43394		 *      $('#example').dataTable( {
43395		 *        "stateSave": true,
43396		 *        "stateLoadParams": function (settings, data) {
43397		 *          data.oSearch.sSearch = "";
43398		 *        }
43399		 *      } );
43400		 *    } );
43401		 *
43402		 *  @example
43403		 *    // Disallow state loading by returning false
43404		 *    $(document).ready( function() {
43405		 *      $('#example').dataTable( {
43406		 *        "stateSave": true,
43407		 *        "stateLoadParams": function (settings, data) {
43408		 *          return false;
43409		 *        }
43410		 *      } );
43411		 *    } );
43412		 */
43413		"fnStateLoadParams": null,
43414	
43415	
43416		/**
43417		 * Callback that is called when the state has been loaded from the state saving method
43418		 * and the DataTables settings object has been modified as a result of the loaded state.
43419		 *  @type function
43420		 *  @param {object} settings DataTables settings object
43421		 *  @param {object} data The state object that was loaded
43422		 *
43423		 *  @dtopt Callbacks
43424		 *  @name DataTable.defaults.stateLoaded
43425		 *
43426		 *  @example
43427		 *    // Show an alert with the filtering value that was saved
43428		 *    $(document).ready( function() {
43429		 *      $('#example').dataTable( {
43430		 *        "stateSave": true,
43431		 *        "stateLoaded": function (settings, data) {
43432		 *          alert( 'Saved filter was: '+data.oSearch.sSearch );
43433		 *        }
43434		 *      } );
43435		 *    } );
43436		 */
43437		"fnStateLoaded": null,
43438	
43439	
43440		/**
43441		 * Save the table state. This function allows you to define where and how the state
43442		 * information for the table is stored By default DataTables will use `localStorage`
43443		 * but you might wish to use a server-side database or cookies.
43444		 *  @type function
43445		 *  @member
43446		 *  @param {object} settings DataTables settings object
43447		 *  @param {object} data The state object to be saved
43448		 *
43449		 *  @dtopt Callbacks
43450		 *  @name DataTable.defaults.stateSaveCallback
43451		 *
43452		 *  @example
43453		 *    $(document).ready( function() {
43454		 *      $('#example').dataTable( {
43455		 *        "stateSave": true,
43456		 *        "stateSaveCallback": function (settings, data) {
43457		 *          // Send an Ajax request to the server with the state object
43458		 *          $.ajax( {
43459		 *            "url": "/state_save",
43460		 *            "data": data,
43461		 *            "dataType": "json",
43462		 *            "method": "POST"
43463		 *            "success": function () {}
43464		 *          } );
43465		 *        }
43466		 *      } );
43467		 *    } );
43468		 */
43469		"fnStateSaveCallback": function ( settings, data ) {
43470			try {
43471				(settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(
43472					'DataTables_'+settings.sInstance+'_'+location.pathname,
43473					JSON.stringify( data )
43474				);
43475			} catch (e) {}
43476		},
43477	
43478	
43479		/**
43480		 * Callback which allows modification of the state to be saved. Called when the table
43481		 * has changed state a new state save is required. This method allows modification of
43482		 * the state saving object prior to actually doing the save, including addition or
43483		 * other state properties or modification. Note that for plug-in authors, you should
43484		 * use the `stateSaveParams` event to save parameters for a plug-in.
43485		 *  @type function
43486		 *  @param {object} settings DataTables settings object
43487		 *  @param {object} data The state object to be saved
43488		 *
43489		 *  @dtopt Callbacks
43490		 *  @name DataTable.defaults.stateSaveParams
43491		 *
43492		 *  @example
43493		 *    // Remove a saved filter, so filtering is never saved
43494		 *    $(document).ready( function() {
43495		 *      $('#example').dataTable( {
43496		 *        "stateSave": true,
43497		 *        "stateSaveParams": function (settings, data) {
43498		 *          data.oSearch.sSearch = "";
43499		 *        }
43500		 *      } );
43501		 *    } );
43502		 */
43503		"fnStateSaveParams": null,
43504	
43505	
43506		/**
43507		 * Duration for which the saved state information is considered valid. After this period
43508		 * has elapsed the state will be returned to the default.
43509		 * Value is given in seconds.
43510		 *  @type int
43511		 *  @default 7200 <i>(2 hours)</i>
43512		 *
43513		 *  @dtopt Options
43514		 *  @name DataTable.defaults.stateDuration
43515		 *
43516		 *  @example
43517		 *    $(document).ready( function() {
43518		 *      $('#example').dataTable( {
43519		 *        "stateDuration": 60*60*24; // 1 day
43520		 *      } );
43521		 *    } )
43522		 */
43523		"iStateDuration": 7200,
43524	
43525	
43526		/**
43527		 * When enabled DataTables will not make a request to the server for the first
43528		 * page draw - rather it will use the data already on the page (no sorting etc
43529		 * will be applied to it), thus saving on an XHR at load time. `deferLoading`
43530		 * is used to indicate that deferred loading is required, but it is also used
43531		 * to tell DataTables how many records there are in the full table (allowing
43532		 * the information element and pagination to be displayed correctly). In the case
43533		 * where a filtering is applied to the table on initial load, this can be
43534		 * indicated by giving the parameter as an array, where the first element is
43535		 * the number of records available after filtering and the second element is the
43536		 * number of records without filtering (allowing the table information element
43537		 * to be shown correctly).
43538		 *  @type int | array
43539		 *  @default null
43540		 *
43541		 *  @dtopt Options
43542		 *  @name DataTable.defaults.deferLoading
43543		 *
43544		 *  @example
43545		 *    // 57 records available in the table, no filtering applied
43546		 *    $(document).ready( function() {
43547		 *      $('#example').dataTable( {
43548		 *        "serverSide": true,
43549		 *        "ajax": "scripts/server_processing.php",
43550		 *        "deferLoading": 57
43551		 *      } );
43552		 *    } );
43553		 *
43554		 *  @example
43555		 *    // 57 records after filtering, 100 without filtering (an initial filter applied)
43556		 *    $(document).ready( function() {
43557		 *      $('#example').dataTable( {
43558		 *        "serverSide": true,
43559		 *        "ajax": "scripts/server_processing.php",
43560		 *        "deferLoading": [ 57, 100 ],
43561		 *        "search": {
43562		 *          "search": "my_filter"
43563		 *        }
43564		 *      } );
43565		 *    } );
43566		 */
43567		"iDeferLoading": null,
43568	
43569	
43570		/**
43571		 * Number of rows to display on a single page when using pagination. If
43572		 * feature enabled (`lengthChange`) then the end user will be able to override
43573		 * this to a custom setting using a pop-up menu.
43574		 *  @type int
43575		 *  @default 10
43576		 *
43577		 *  @dtopt Options
43578		 *  @name DataTable.defaults.pageLength
43579		 *
43580		 *  @example
43581		 *    $(document).ready( function() {
43582		 *      $('#example').dataTable( {
43583		 *        "pageLength": 50
43584		 *      } );
43585		 *    } )
43586		 */
43587		"iDisplayLength": 10,
43588	
43589	
43590		/**
43591		 * Define the starting point for data display when using DataTables with
43592		 * pagination. Note that this parameter is the number of records, rather than
43593		 * the page number, so if you have 10 records per page and want to start on
43594		 * the third page, it should be "20".
43595		 *  @type int
43596		 *  @default 0
43597		 *
43598		 *  @dtopt Options
43599		 *  @name DataTable.defaults.displayStart
43600		 *
43601		 *  @example
43602		 *    $(document).ready( function() {
43603		 *      $('#example').dataTable( {
43604		 *        "displayStart": 20
43605		 *      } );
43606		 *    } )
43607		 */
43608		"iDisplayStart": 0,
43609	
43610	
43611		/**
43612		 * By default DataTables allows keyboard navigation of the table (sorting, paging,
43613		 * and filtering) by adding a `tabindex` attribute to the required elements. This
43614		 * allows you to tab through the controls and press the enter key to activate them.
43615		 * The tabindex is default 0, meaning that the tab follows the flow of the document.
43616		 * You can overrule this using this parameter if you wish. Use a value of -1 to
43617		 * disable built-in keyboard navigation.
43618		 *  @type int
43619		 *  @default 0
43620		 *
43621		 *  @dtopt Options
43622		 *  @name DataTable.defaults.tabIndex
43623		 *
43624		 *  @example
43625		 *    $(document).ready( function() {
43626		 *      $('#example').dataTable( {
43627		 *        "tabIndex": 1
43628		 *      } );
43629		 *    } );
43630		 */
43631		"iTabIndex": 0,
43632	
43633	
43634		/**
43635		 * Classes that DataTables assigns to the various components and features
43636		 * that it adds to the HTML table. This allows classes to be configured
43637		 * during initialisation in addition to through the static
43638		 * {@link DataTable.ext.oStdClasses} object).
43639		 *  @namespace
43640		 *  @name DataTable.defaults.classes
43641		 */
43642		"oClasses": {},
43643	
43644	
43645		/**
43646		 * All strings that DataTables uses in the user interface that it creates
43647		 * are defined in this object, allowing you to modified them individually or
43648		 * completely replace them all as required.
43649		 *  @namespace
43650		 *  @name DataTable.defaults.language
43651		 */
43652		"oLanguage": {
43653			/**
43654			 * Strings that are used for WAI-ARIA labels and controls only (these are not
43655			 * actually visible on the page, but will be read by screenreaders, and thus
43656			 * must be internationalised as well).
43657			 *  @namespace
43658			 *  @name DataTable.defaults.language.aria
43659			 */
43660			"oAria": {
43661				/**
43662				 * ARIA label that is added to the table headers when the column may be
43663				 * sorted ascending by activing the column (click or return when focused).
43664				 * Note that the column header is prefixed to this string.
43665				 *  @type string
43666				 *  @default : activate to sort column ascending
43667				 *
43668				 *  @dtopt Language
43669				 *  @name DataTable.defaults.language.aria.sortAscending
43670				 *
43671				 *  @example
43672				 *    $(document).ready( function() {
43673				 *      $('#example').dataTable( {
43674				 *        "language": {
43675				 *          "aria": {
43676				 *            "sortAscending": " - click/return to sort ascending"
43677				 *          }
43678				 *        }
43679				 *      } );
43680				 *    } );
43681				 */
43682				"sSortAscending": ": activate to sort column ascending",
43683	
43684				/**
43685				 * ARIA label that is added to the table headers when the column may be
43686				 * sorted descending by activing the column (click or return when focused).
43687				 * Note that the column header is prefixed to this string.
43688				 *  @type string
43689				 *  @default : activate to sort column ascending
43690				 *
43691				 *  @dtopt Language
43692				 *  @name DataTable.defaults.language.aria.sortDescending
43693				 *
43694				 *  @example
43695				 *    $(document).ready( function() {
43696				 *      $('#example').dataTable( {
43697				 *        "language": {
43698				 *          "aria": {
43699				 *            "sortDescending": " - click/return to sort descending"
43700				 *          }
43701				 *        }
43702				 *      } );
43703				 *    } );
43704				 */
43705				"sSortDescending": ": activate to sort column descending"
43706			},
43707	
43708			/**
43709			 * Pagination string used by DataTables for the built-in pagination
43710			 * control types.
43711			 *  @namespace
43712			 *  @name DataTable.defaults.language.paginate
43713			 */
43714			"oPaginate": {
43715				/**
43716				 * Text to use when using the 'full_numbers' type of pagination for the
43717				 * button to take the user to the first page.
43718				 *  @type string
43719				 *  @default First
43720				 *
43721				 *  @dtopt Language
43722				 *  @name DataTable.defaults.language.paginate.first
43723				 *
43724				 *  @example
43725				 *    $(document).ready( function() {
43726				 *      $('#example').dataTable( {
43727				 *        "language": {
43728				 *          "paginate": {
43729				 *            "first": "First page"
43730				 *          }
43731				 *        }
43732				 *      } );
43733				 *    } );
43734				 */
43735				"sFirst": "First",
43736	
43737	
43738				/**
43739				 * Text to use when using the 'full_numbers' type of pagination for the
43740				 * button to take the user to the last page.
43741				 *  @type string
43742				 *  @default Last
43743				 *
43744				 *  @dtopt Language
43745				 *  @name DataTable.defaults.language.paginate.last
43746				 *
43747				 *  @example
43748				 *    $(document).ready( function() {
43749				 *      $('#example').dataTable( {
43750				 *        "language": {
43751				 *          "paginate": {
43752				 *            "last": "Last page"
43753				 *          }
43754				 *        }
43755				 *      } );
43756				 *    } );
43757				 */
43758				"sLast": "Last",
43759	
43760	
43761				/**
43762				 * Text to use for the 'next' pagination button (to take the user to the
43763				 * next page).
43764				 *  @type string
43765				 *  @default Next
43766				 *
43767				 *  @dtopt Language
43768				 *  @name DataTable.defaults.language.paginate.next
43769				 *
43770				 *  @example
43771				 *    $(document).ready( function() {
43772				 *      $('#example').dataTable( {
43773				 *        "language": {
43774				 *          "paginate": {
43775				 *            "next": "Next page"
43776				 *          }
43777				 *        }
43778				 *      } );
43779				 *    } );
43780				 */
43781				"sNext": "Next",
43782	
43783	
43784				/**
43785				 * Text to use for the 'previous' pagination button (to take the user to
43786				 * the previous page).
43787				 *  @type string
43788				 *  @default Previous
43789				 *
43790				 *  @dtopt Language
43791				 *  @name DataTable.defaults.language.paginate.previous
43792				 *
43793				 *  @example
43794				 *    $(document).ready( function() {
43795				 *      $('#example').dataTable( {
43796				 *        "language": {
43797				 *          "paginate": {
43798				 *            "previous": "Previous page"
43799				 *          }
43800				 *        }
43801				 *      } );
43802				 *    } );
43803				 */
43804				"sPrevious": "Previous"
43805			},
43806	
43807			/**
43808			 * This string is shown in preference to `zeroRecords` when the table is
43809			 * empty of data (regardless of filtering). Note that this is an optional
43810			 * parameter - if it is not given, the value of `zeroRecords` will be used
43811			 * instead (either the default or given value).
43812			 *  @type string
43813			 *  @default No data available in table
43814			 *
43815			 *  @dtopt Language
43816			 *  @name DataTable.defaults.language.emptyTable
43817			 *
43818			 *  @example
43819			 *    $(document).ready( function() {
43820			 *      $('#example').dataTable( {
43821			 *        "language": {
43822			 *          "emptyTable": "No data available in table"
43823			 *        }
43824			 *      } );
43825			 *    } );
43826			 */
43827			"sEmptyTable": "No data available in table",
43828	
43829	
43830			/**
43831			 * This string gives information to the end user about the information
43832			 * that is current on display on the page. The following tokens can be
43833			 * used in the string and will be dynamically replaced as the table
43834			 * display updates. This tokens can be placed anywhere in the string, or
43835			 * removed as needed by the language requires:
43836			 *
43837			 * * `\_START\_` - Display index of the first record on the current page
43838			 * * `\_END\_` - Display index of the last record on the current page
43839			 * * `\_TOTAL\_` - Number of records in the table after filtering
43840			 * * `\_MAX\_` - Number of records in the table without filtering
43841			 * * `\_PAGE\_` - Current page number
43842			 * * `\_PAGES\_` - Total number of pages of data in the table
43843			 *
43844			 *  @type string
43845			 *  @default Showing _START_ to _END_ of _TOTAL_ entries
43846			 *
43847			 *  @dtopt Language
43848			 *  @name DataTable.defaults.language.info
43849			 *
43850			 *  @example
43851			 *    $(document).ready( function() {
43852			 *      $('#example').dataTable( {
43853			 *        "language": {
43854			 *          "info": "Showing page _PAGE_ of _PAGES_"
43855			 *        }
43856			 *      } );
43857			 *    } );
43858			 */
43859			"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
43860	
43861	
43862			/**
43863			 * Display information string for when the table is empty. Typically the
43864			 * format of this string should match `info`.
43865			 *  @type string
43866			 *  @default Showing 0 to 0 of 0 entries
43867			 *
43868			 *  @dtopt Language
43869			 *  @name DataTable.defaults.language.infoEmpty
43870			 *
43871			 *  @example
43872			 *    $(document).ready( function() {
43873			 *      $('#example').dataTable( {
43874			 *        "language": {
43875			 *          "infoEmpty": "No entries to show"
43876			 *        }
43877			 *      } );
43878			 *    } );
43879			 */
43880			"sInfoEmpty": "Showing 0 to 0 of 0 entries",
43881	
43882	
43883			/**
43884			 * When a user filters the information in a table, this string is appended
43885			 * to the information (`info`) to give an idea of how strong the filtering
43886			 * is. The variable _MAX_ is dynamically updated.
43887			 *  @type string
43888			 *  @default (filtered from _MAX_ total entries)
43889			 *
43890			 *  @dtopt Language
43891			 *  @name DataTable.defaults.language.infoFiltered
43892			 *
43893			 *  @example
43894			 *    $(document).ready( function() {
43895			 *      $('#example').dataTable( {
43896			 *        "language": {
43897			 *          "infoFiltered": " - filtering from _MAX_ records"
43898			 *        }
43899			 *      } );
43900			 *    } );
43901			 */
43902			"sInfoFiltered": "(filtered from _MAX_ total entries)",
43903	
43904	
43905			/**
43906			 * If can be useful to append extra information to the info string at times,
43907			 * and this variable does exactly that. This information will be appended to
43908			 * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are
43909			 * being used) at all times.
43910			 *  @type string
43911			 *  @default <i>Empty string</i>
43912			 *
43913			 *  @dtopt Language
43914			 *  @name DataTable.defaults.language.infoPostFix
43915			 *
43916			 *  @example
43917			 *    $(document).ready( function() {
43918			 *      $('#example').dataTable( {
43919			 *        "language": {
43920			 *          "infoPostFix": "All records shown are derived from real information."
43921			 *        }
43922			 *      } );
43923			 *    } );
43924			 */
43925			"sInfoPostFix": "",
43926	
43927	
43928			/**
43929			 * This decimal place operator is a little different from the other
43930			 * language options since DataTables doesn't output floating point
43931			 * numbers, so it won't ever use this for display of a number. Rather,
43932			 * what this parameter does is modify the sort methods of the table so
43933			 * that numbers which are in a format which has a character other than
43934			 * a period (`.`) as a decimal place will be sorted numerically.
43935			 *
43936			 * Note that numbers with different decimal places cannot be shown in
43937			 * the same table and still be sortable, the table must be consistent.
43938			 * However, multiple different tables on the page can use different
43939			 * decimal place characters.
43940			 *  @type string
43941			 *  @default 
43942			 *
43943			 *  @dtopt Language
43944			 *  @name DataTable.defaults.language.decimal
43945			 *
43946			 *  @example
43947			 *    $(document).ready( function() {
43948			 *      $('#example').dataTable( {
43949			 *        "language": {
43950			 *          "decimal": ","
43951			 *          "thousands": "."
43952			 *        }
43953			 *      } );
43954			 *    } );
43955			 */
43956			"sDecimal": "",
43957	
43958	
43959			/**
43960			 * DataTables has a build in number formatter (`formatNumber`) which is
43961			 * used to format large numbers that are used in the table information.
43962			 * By default a comma is used, but this can be trivially changed to any
43963			 * character you wish with this parameter.
43964			 *  @type string
43965			 *  @default ,
43966			 *
43967			 *  @dtopt Language
43968			 *  @name DataTable.defaults.language.thousands
43969			 *
43970			 *  @example
43971			 *    $(document).ready( function() {
43972			 *      $('#example').dataTable( {
43973			 *        "language": {
43974			 *          "thousands": "'"
43975			 *        }
43976			 *      } );
43977			 *    } );
43978			 */
43979			"sThousands": ",",
43980	
43981	
43982			/**
43983			 * Detail the action that will be taken when the drop down menu for the
43984			 * pagination length option is changed. The '_MENU_' variable is replaced
43985			 * with a default select list of 10, 25, 50 and 100, and can be replaced
43986			 * with a custom select box if required.
43987			 *  @type string
43988			 *  @default Show _MENU_ entries
43989			 *
43990			 *  @dtopt Language
43991			 *  @name DataTable.defaults.language.lengthMenu
43992			 *
43993			 *  @example
43994			 *    // Language change only
43995			 *    $(document).ready( function() {
43996			 *      $('#example').dataTable( {
43997			 *        "language": {
43998			 *          "lengthMenu": "Display _MENU_ records"
43999			 *        }
44000			 *      } );
44001			 *    } );
44002			 *
44003			 *  @example
44004			 *    // Language and options change
44005			 *    $(document).ready( function() {
44006			 *      $('#example').dataTable( {
44007			 *        "language": {
44008			 *          "lengthMenu": 'Display <select>'+
44009			 *            '<option value="10">10</option>'+
44010			 *            '<option value="20">20</option>'+
44011			 *            '<option value="30">30</option>'+
44012			 *            '<option value="40">40</option>'+
44013			 *            '<option value="50">50</option>'+
44014			 *            '<option value="-1">All</option>'+
44015			 *            '</select> records'
44016			 *        }
44017			 *      } );
44018			 *    } );
44019			 */
44020			"sLengthMenu": "Show _MENU_ entries",
44021	
44022	
44023			/**
44024			 * When using Ajax sourced data and during the first draw when DataTables is
44025			 * gathering the data, this message is shown in an empty row in the table to
44026			 * indicate to the end user the the data is being loaded. Note that this
44027			 * parameter is not used when loading data by server-side processing, just
44028			 * Ajax sourced data with client-side processing.
44029			 *  @type string
44030			 *  @default Loading...
44031			 *
44032			 *  @dtopt Language
44033			 *  @name DataTable.defaults.language.loadingRecords
44034			 *
44035			 *  @example
44036			 *    $(document).ready( function() {
44037			 *      $('#example').dataTable( {
44038			 *        "language": {
44039			 *          "loadingRecords": "Please wait - loading..."
44040			 *        }
44041			 *      } );
44042			 *    } );
44043			 */
44044			"sLoadingRecords": "Loading...",
44045	
44046	
44047			/**
44048			 * Text which is displayed when the table is processing a user action
44049			 * (usually a sort command or similar).
44050			 *  @type string
44051			 *
44052			 *  @dtopt Language
44053			 *  @name DataTable.defaults.language.processing
44054			 *
44055			 *  @example
44056			 *    $(document).ready( function() {
44057			 *      $('#example').dataTable( {
44058			 *        "language": {
44059			 *          "processing": "DataTables is currently busy"
44060			 *        }
44061			 *      } );
44062			 *    } );
44063			 */
44064			"sProcessing": "",
44065	
44066	
44067			/**
44068			 * Details the actions that will be taken when the user types into the
44069			 * filtering input text box. The variable "_INPUT_", if used in the string,
44070			 * is replaced with the HTML text box for the filtering input allowing
44071			 * control over where it appears in the string. If "_INPUT_" is not given
44072			 * then the input box is appended to the string automatically.
44073			 *  @type string
44074			 *  @default Search:
44075			 *
44076			 *  @dtopt Language
44077			 *  @name DataTable.defaults.language.search
44078			 *
44079			 *  @example
44080			 *    // Input text box will be appended at the end automatically
44081			 *    $(document).ready( function() {
44082			 *      $('#example').dataTable( {
44083			 *        "language": {
44084			 *          "search": "Filter records:"
44085			 *        }
44086			 *      } );
44087			 *    } );
44088			 *
44089			 *  @example
44090			 *    // Specify where the filter should appear
44091			 *    $(document).ready( function() {
44092			 *      $('#example').dataTable( {
44093			 *        "language": {
44094			 *          "search": "Apply filter _INPUT_ to table"
44095			 *        }
44096			 *      } );
44097			 *    } );
44098			 */
44099			"sSearch": "Search:",
44100	
44101	
44102			/**
44103			 * Assign a `placeholder` attribute to the search `input` element
44104			 *  @type string
44105			 *  @default 
44106			 *
44107			 *  @dtopt Language
44108			 *  @name DataTable.defaults.language.searchPlaceholder
44109			 */
44110			"sSearchPlaceholder": "",
44111	
44112	
44113			/**
44114			 * All of the language information can be stored in a file on the
44115			 * server-side, which DataTables will look up if this parameter is passed.
44116			 * It must store the URL of the language file, which is in a JSON format,
44117			 * and the object has the same properties as the oLanguage object in the
44118			 * initialiser object (i.e. the above parameters). Please refer to one of
44119			 * the example language files to see how this works in action.
44120			 *  @type string
44121			 *  @default <i>Empty string - i.e. disabled</i>
44122			 *
44123			 *  @dtopt Language
44124			 *  @name DataTable.defaults.language.url
44125			 *
44126			 *  @example
44127			 *    $(document).ready( function() {
44128			 *      $('#example').dataTable( {
44129			 *        "language": {
44130			 *          "url": "http
44130s
vendor: 83,377 bytes, lines 44130-46911
44130://www.sprymedia.co.uk/dataTables/lang.txt"
44131			 *        }
44132			 *      } );
44133			 *    } );
44134			 */
44135			"sUrl": "",
44136	
44137	
44138			/**
44139			 * Text shown inside the table records when the is no information to be
44140			 * displayed after filtering. `emptyTable` is shown when there is simply no
44141			 * information in the table at all (regardless of filtering).
44142			 *  @type string
44143			 *  @default No matching records found
44144			 *
44145			 *  @dtopt Language
44146			 *  @name DataTable.defaults.language.zeroRecords
44147			 *
44148			 *  @example
44149			 *    $(document).ready( function() {
44150			 *      $('#example').dataTable( {
44151			 *        "language": {
44152			 *          "zeroRecords": "No records to display"
44153			 *        }
44154			 *      } );
44155			 *    } );
44156			 */
44157			"sZeroRecords": "No matching records found"
44158		},
44159	
44160	
44161		/**
44162		 * This parameter allows you to have define the global filtering state at
44163		 * initialisation time. As an object the `search` parameter must be
44164		 * defined, but all other parameters are optional. When `regex` is true,
44165		 * the search string will be treated as a regular expression, when false
44166		 * (default) it will be treated as a straight string. When `smart`
44167		 * DataTables will use it's smart filtering methods (to word match at
44168		 * any point in the data), when false this will not be done.
44169		 *  @namespace
44170		 *  @extends DataTable.models.oSearch
44171		 *
44172		 *  @dtopt Options
44173		 *  @name DataTable.defaults.search
44174		 *
44175		 *  @example
44176		 *    $(document).ready( function() {
44177		 *      $('#example').dataTable( {
44178		 *        "search": {"search": "Initial search"}
44179		 *      } );
44180		 *    } )
44181		 */
44182		"oSearch": $.extend( {}, DataTable.models.oSearch ),
44183	
44184	
44185		/**
44186		 * __Deprecated__ The functionality provided by this parameter has now been
44187		 * superseded by that provided through `ajax`, which should be used instead.
44188		 *
44189		 * By default DataTables will look for the property `data` (or `aaData` for
44190		 * compatibility with DataTables 1.9-) when obtaining data from an Ajax
44191		 * source or for server-side processing - this parameter allows that
44192		 * property to be changed. You can use Javascript dotted object notation to
44193		 * get a data source for multiple levels of nesting.
44194		 *  @type string
44195		 *  @default data
44196		 *
44197		 *  @dtopt Options
44198		 *  @dtopt Server-side
44199		 *  @name DataTable.defaults.ajaxDataProp
44200		 *
44201		 *  @deprecated 1.10. Please use `ajax` for this functionality now.
44202		 */
44203		"sAjaxDataProp": "data",
44204	
44205	
44206		/**
44207		 * __Deprecated__ The functionality provided by this parameter has now been
44208		 * superseded by that provided through `ajax`, which should be used instead.
44209		 *
44210		 * You can instruct DataTables to load data from an external
44211		 * source using this parameter (use aData if you want to pass data in you
44212		 * already have). Simply provide a url a JSON object can be obtained from.
44213		 *  @type string
44214		 *  @default null
44215		 *
44216		 *  @dtopt Options
44217		 *  @dtopt Server-side
44218		 *  @name DataTable.defaults.ajaxSource
44219		 *
44220		 *  @deprecated 1.10. Please use `ajax` for this functionality now.
44221		 */
44222		"sAjaxSource": null,
44223	
44224	
44225		/**
44226		 * This initialisation variable allows you to specify exactly where in the
44227		 * DOM you want DataTables to inject the various controls it adds to the page
44228		 * (for example you might want the pagination controls at the top of the
44229		 * table). DIV elements (with or without a custom class) can also be added to
44230		 * aid styling. The follow syntax is used:
44231		 *   <ul>
44232		 *     <li>The following options are allowed:
44233		 *       <ul>
44234		 *         <li>'l' - Length changing</li>
44235		 *         <li>'f' - Filtering input</li>
44236		 *         <li>'t' - The table!</li>
44237		 *         <li>'i' - Information</li>
44238		 *         <li>'p' - Pagination</li>
44239		 *         <li>'r' - pRocessing</li>
44240		 *       </ul>
44241		 *     </li>
44242		 *     <li>The following constants are allowed:
44243		 *       <ul>
44244		 *         <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
44245		 *         <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
44246		 *       </ul>
44247		 *     </li>
44248		 *     <li>The following syntax is expected:
44249		 *       <ul>
44250		 *         <li>'&lt;' and '&gt;' - div elements</li>
44251		 *         <li>'&lt;"class" and '&gt;' - div with a class</li>
44252		 *         <li>'&lt;"#id" and '&gt;' - div with an ID</li>
44253		 *       </ul>
44254		 *     </li>
44255		 *     <li>Examples:
44256		 *       <ul>
44257		 *         <li>'&lt;"wrapper"flipt&gt;'</li>
44258		 *         <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
44259		 *       </ul>
44260		 *     </li>
44261		 *   </ul>
44262		 *  @type string
44263		 *  @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b>
44264		 *    <"H"lfr>t<"F"ip> <i>(when `jQueryUI` is true)</i>
44265		 *
44266		 *  @dtopt Options
44267		 *  @name DataTable.defaults.dom
44268		 *
44269		 *  @example
44270		 *    $(document).ready( function() {
44271		 *      $('#example').dataTable( {
44272		 *        "dom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
44273		 *      } );
44274		 *    } );
44275		 */
44276		"sDom": "lfrtip",
44277	
44278	
44279		/**
44280		 * Search delay option. This will throttle full table searches that use the
44281		 * DataTables provided search input element (it does not effect calls to
44282		 * `dt-api search()`, providing a delay before the search is made.
44283		 *  @type integer
44284		 *  @default 0
44285		 *
44286		 *  @dtopt Options
44287		 *  @name DataTable.defaults.searchDelay
44288		 *
44289		 *  @example
44290		 *    $(document).ready( function() {
44291		 *      $('#example').dataTable( {
44292		 *        "searchDelay": 200
44293		 *      } );
44294		 *    } )
44295		 */
44296		"searchDelay": null,
44297	
44298	
44299		/**
44300		 * DataTables features six different built-in options for the buttons to
44301		 * display for pagination control:
44302		 *
44303		 * * `numbers` - Page number buttons only
44304		 * * `simple` - 'Previous' and 'Next' buttons only
44305		 * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
44306		 * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons
44307		 * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
44308		 * * `first_last_numbers` - 'First' and 'Last' buttons, plus page numbers
44309		 *  
44310		 * Further methods can be added using {@link DataTable.ext.oPagination}.
44311		 *  @type string
44312		 *  @default simple_numbers
44313		 *
44314		 *  @dtopt Options
44315		 *  @name DataTable.defaults.pagingType
44316		 *
44317		 *  @example
44318		 *    $(document).ready( function() {
44319		 *      $('#example').dataTable( {
44320		 *        "pagingType": "full_numbers"
44321		 *      } );
44322		 *    } )
44323		 */
44324		"sPaginationType": "simple_numbers",
44325	
44326	
44327		/**
44328		 * Enable horizontal scrolling. When a table is too wide to fit into a
44329		 * certain layout, or you have a large number of columns in the table, you
44330		 * can enable x-scrolling to show the table in a viewport, which can be
44331		 * scrolled. This property can be `true` which will allow the table to
44332		 * scroll horizontally when needed, or any CSS unit, or a number (in which
44333		 * case it will be treated as a pixel measurement). Setting as simply `true`
44334		 * is recommended.
44335		 *  @type boolean|string
44336		 *  @default <i>blank string - i.e. disabled</i>
44337		 *
44338		 *  @dtopt Features
44339		 *  @name DataTable.defaults.scrollX
44340		 *
44341		 *  @example
44342		 *    $(document).ready( function() {
44343		 *      $('#example').dataTable( {
44344		 *        "scrollX": true,
44345		 *        "scrollCollapse": true
44346		 *      } );
44347		 *    } );
44348		 */
44349		"sScrollX": "",
44350	
44351	
44352		/**
44353		 * This property can be used to force a DataTable to use more width than it
44354		 * might otherwise do when x-scrolling is enabled. For example if you have a
44355		 * table which requires to be well spaced, this parameter is useful for
44356		 * "over-sizing" the table, and thus forcing scrolling. This property can by
44357		 * any CSS unit, or a number (in which case it will be treated as a pixel
44358		 * measurement).
44359		 *  @type string
44360		 *  @default <i>blank string - i.e. disabled</i>
44361		 *
44362		 *  @dtopt Options
44363		 *  @name DataTable.defaults.scrollXInner
44364		 *
44365		 *  @example
44366		 *    $(document).ready( function() {
44367		 *      $('#example').dataTable( {
44368		 *        "scrollX": "100%",
44369		 *        "scrollXInner": "110%"
44370		 *      } );
44371		 *    } );
44372		 */
44373		"sScrollXInner": "",
44374	
44375	
44376		/**
44377		 * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
44378		 * to the given height, and enable scrolling for any data which overflows the
44379		 * current viewport. This can be used as an alternative to paging to display
44380		 * a lot of data in a small area (although paging and scrolling can both be
44381		 * enabled at the same time). This property can be any CSS unit, or a number
44382		 * (in which case it will be treated as a pixel measurement).
44383		 *  @type string
44384		 *  @default <i>blank string - i.e. disabled</i>
44385		 *
44386		 *  @dtopt Features
44387		 *  @name DataTable.defaults.scrollY
44388		 *
44389		 *  @example
44390		 *    $(document).ready( function() {
44391		 *      $('#example').dataTable( {
44392		 *        "scrollY": "200px",
44393		 *        "paginate": false
44394		 *      } );
44395		 *    } );
44396		 */
44397		"sScrollY": "",
44398	
44399	
44400		/**
44401		 * __Deprecated__ The functionality provided by this parameter has now been
44402		 * superseded by that provided through `ajax`, which should be used instead.
44403		 *
44404		 * Set the HTTP method that is used to make the Ajax call for server-side
44405		 * processing or Ajax sourced data.
44406		 *  @type string
44407		 *  @default GET
44408		 *
44409		 *  @dtopt Options
44410		 *  @dtopt Server-side
44411		 *  @name DataTable.defaults.serverMethod
44412		 *
44413		 *  @deprecated 1.10. Please use `ajax` for this functionality now.
44414		 */
44415		"sServerMethod": "GET",
44416	
44417	
44418		/**
44419		 * DataTables makes use of renderers when displaying HTML elements for
44420		 * a table. These renderers can be added or modified by plug-ins to
44421		 * generate suitable mark-up for a site. For example the Bootstrap
44422		 * integration plug-in for DataTables uses a paging button renderer to
44423		 * display pagination buttons in the mark-up required by Bootstrap.
44424		 *
44425		 * For further information about the renderers available see
44426		 * DataTable.ext.renderer
44427		 *  @type string|object
44428		 *  @default null
44429		 *
44430		 *  @name DataTable.defaults.renderer
44431		 *
44432		 */
44433		"renderer": null,
44434	
44435	
44436		/**
44437		 * Set the data property name that DataTables should use to get a row's id
44438		 * to set as the `id` property in the node.
44439		 *  @type string
44440		 *  @default DT_RowId
44441		 *
44442		 *  @name DataTable.defaults.rowId
44443		 */
44444		"rowId": "DT_RowId"
44445	};
44446	
44447	_fnHungarianMap( DataTable.defaults );
44448	
44449	
44450	
44451	/*
44452	 * Developer note - See note in model.defaults.js about the use of Hungarian
44453	 * notation and camel case.
44454	 */
44455	
44456	/**
44457	 * Column options that can be given to DataTables at initialisation time.
44458	 *  @namespace
44459	 */
44460	DataTable.defaults.column = {
44461		/**
44462		 * Define which column(s) an order will occur on for this column. This
44463		 * allows a column's ordering to take multiple columns into account when
44464		 * doing a sort or use the data from a different column. For example first
44465		 * name / last name columns make sense to do a multi-column sort over the
44466		 * two columns.
44467		 *  @type array|int
44468		 *  @default null <i>Takes the value of the column index automatically</i>
44469		 *
44470		 *  @name DataTable.defaults.column.orderData
44471		 *  @dtopt Columns
44472		 *
44473		 *  @example
44474		 *    // Using `columnDefs`
44475		 *    $(document).ready( function() {
44476		 *      $('#example').dataTable( {
44477		 *        "columnDefs": [
44478		 *          { "orderData": [ 0, 1 ], "targets": [ 0 ] },
44479		 *          { "orderData": [ 1, 0 ], "targets": [ 1 ] },
44480		 *          { "orderData": 2, "targets": [ 2 ] }
44481		 *        ]
44482		 *      } );
44483		 *    } );
44484		 *
44485		 *  @example
44486		 *    // Using `columns`
44487		 *    $(document).ready( function() {
44488		 *      $('#example').dataTable( {
44489		 *        "columns": [
44490		 *          { "orderData": [ 0, 1 ] },
44491		 *          { "orderData": [ 1, 0 ] },
44492		 *          { "orderData": 2 },
44493		 *          null,
44494		 *          null
44495		 *        ]
44496		 *      } );
44497		 *    } );
44498		 */
44499		"aDataSort": null,
44500		"iDataSort": -1,
44501	
44502	
44503		/**
44504		 * You can control the default ordering direction, and even alter the
44505		 * behaviour of the sort handler (i.e. only allow ascending ordering etc)
44506		 * using this parameter.
44507		 *  @type array
44508		 *  @default [ 'asc', 'desc' ]
44509		 *
44510		 *  @name DataTable.defaults.column.orderSequence
44511		 *  @dtopt Columns
44512		 *
44513		 *  @example
44514		 *    // Using `columnDefs`
44515		 *    $(document).ready( function() {
44516		 *      $('#example').dataTable( {
44517		 *        "columnDefs": [
44518		 *          { "orderSequence": [ "asc" ], "targets": [ 1 ] },
44519		 *          { "orderSequence": [ "desc", "asc", "asc" ], "targets": [ 2 ] },
44520		 *          { "orderSequence": [ "desc" ], "targets": [ 3 ] }
44521		 *        ]
44522		 *      } );
44523		 *    } );
44524		 *
44525		 *  @example
44526		 *    // Using `columns`
44527		 *    $(document).ready( function() {
44528		 *      $('#example').dataTable( {
44529		 *        "columns": [
44530		 *          null,
44531		 *          { "orderSequence": [ "asc" ] },
44532		 *          { "orderSequence": [ "desc", "asc", "asc" ] },
44533		 *          { "orderSequence": [ "desc" ] },
44534		 *          null
44535		 *        ]
44536		 *      } );
44537		 *    } );
44538		 */
44539		"asSorting": [ 'asc', 'desc' ],
44540	
44541	
44542		/**
44543		 * Enable or disable filtering on the data in this column.
44544		 *  @type boolean
44545		 *  @default true
44546		 *
44547		 *  @name DataTable.defaults.column.searchable
44548		 *  @dtopt Columns
44549		 *
44550		 *  @example
44551		 *    // Using `columnDefs`
44552		 *    $(document).ready( function() {
44553		 *      $('#example').dataTable( {
44554		 *        "columnDefs": [
44555		 *          { "searchable": false, "targets": [ 0 ] }
44556		 *        ] } );
44557		 *    } );
44558		 *
44559		 *  @example
44560		 *    // Using `columns`
44561		 *    $(document).ready( function() {
44562		 *      $('#example').dataTable( {
44563		 *        "columns": [
44564		 *          { "searchable": false },
44565		 *          null,
44566		 *          null,
44567		 *          null,
44568		 *          null
44569		 *        ] } );
44570		 *    } );
44571		 */
44572		"bSearchable": true,
44573	
44574	
44575		/**
44576		 * Enable or disable ordering on this column.
44577		 *  @type boolean
44578		 *  @default true
44579		 *
44580		 *  @name DataTable.defaults.column.orderable
44581		 *  @dtopt Columns
44582		 *
44583		 *  @example
44584		 *    // Using `columnDefs`
44585		 *    $(document).ready( function() {
44586		 *      $('#example').dataTable( {
44587		 *        "columnDefs": [
44588		 *          { "orderable": false, "targets": [ 0 ] }
44589		 *        ] } );
44590		 *    } );
44591		 *
44592		 *  @example
44593		 *    // Using `columns`
44594		 *    $(document).ready( function() {
44595		 *      $('#example').dataTable( {
44596		 *        "columns": [
44597		 *          { "orderable": false },
44598		 *          null,
44599		 *          null,
44600		 *          null,
44601		 *          null
44602		 *        ] } );
44603		 *    } );
44604		 */
44605		"bSortable": true,
44606	
44607	
44608		/**
44609		 * Enable or disable the display of this column.
44610		 *  @type boolean
44611		 *  @default true
44612		 *
44613		 *  @name DataTable.defaults.column.visible
44614		 *  @dtopt Columns
44615		 *
44616		 *  @example
44617		 *    // Using `columnDefs`
44618		 *    $(document).ready( function() {
44619		 *      $('#example').dataTable( {
44620		 *        "columnDefs": [
44621		 *          { "visible": false, "targets": [ 0 ] }
44622		 *        ] } );
44623		 *    } );
44624		 *
44625		 *  @example
44626		 *    // Using `columns`
44627		 *    $(document).ready( function() {
44628		 *      $('#example').dataTable( {
44629		 *        "columns": [
44630		 *          { "visible": false },
44631		 *          null,
44632		 *          null,
44633		 *          null,
44634		 *          null
44635		 *        ] } );
44636		 *    } );
44637		 */
44638		"bVisible": true,
44639	
44640	
44641		/**
44642		 * Developer definable function that is called whenever a cell is created (Ajax source,
44643		 * etc) or processed for input (DOM source). This can be used as a compliment to mRender
44644		 * allowing you to modify the DOM element (add background colour for example) when the
44645		 * element is available.
44646		 *  @type function
44647		 *  @param {element} td The TD node that has been created
44648		 *  @param {*} cellData The Data for the cell
44649		 *  @param {array|object} rowData The data for the whole row
44650		 *  @param {int} row The row index for the aoData data store
44651		 *  @param {int} col The column index for aoColumns
44652		 *
44653		 *  @name DataTable.defaults.column.createdCell
44654		 *  @dtopt Columns
44655		 *
44656		 *  @example
44657		 *    $(document).ready( function() {
44658		 *      $('#example').dataTable( {
44659		 *        "columnDefs": [ {
44660		 *          "targets": [3],
44661		 *          "createdCell": function (td, cellData, rowData, row, col) {
44662		 *            if ( cellData == "1.7" ) {
44663		 *              $(td).css('color', 'blue')
44664		 *            }
44665		 *          }
44666		 *        } ]
44667		 *      });
44668		 *    } );
44669		 */
44670		"fnCreatedCell": null,
44671	
44672	
44673		/**
44674		 * This parameter has been replaced by `data` in DataTables to ensure naming
44675		 * consistency. `dataProp` can still be used, as there is backwards
44676		 * compatibility in DataTables for this option, but it is strongly
44677		 * recommended that you use `data` in preference to `dataProp`.
44678		 *  @name DataTable.defaults.column.dataProp
44679		 */
44680	
44681	
44682		/**
44683		 * This property can be used to read data from any data source property,
44684		 * including deeply nested objects / properties. `data` can be given in a
44685		 * number of different ways which effect its behaviour:
44686		 *
44687		 * * `integer` - treated as an array index for the data source. This is the
44688		 *   default that DataTables uses (incrementally increased for each column).
44689		 * * `string` - read an object property from the data source. There are
44690		 *   three 'special' options that can be used in the string to alter how
44691		 *   DataTables reads the data from the source object:
44692		 *    * `.` - Dotted Javascript notation. Just as you use a `.` in
44693		 *      Javascript to read from nested objects, so to can the options
44694		 *      specified in `data`. For example: `browser.version` or
44695		 *      `browser.name`. If your object parameter name contains a period, use
44696		 *      `\\` to escape it - i.e. `first\\.name`.
44697		 *    * `[]` - Array notation. DataTables can automatically combine data
44698		 *      from and array source, joining the data with the characters provided
44699		 *      between the two brackets. For example: `name[, ]` would provide a
44700		 *      comma-space separated list from the source array. If no characters
44701		 *      are provided between the brackets, the original array source is
44702		 *      returned.
44703		 *    * `()` - Function notation. Adding `()` to the end of a parameter will
44704		 *      execute a function of the name given. For example: `browser()` for a
44705		 *      simple function on the data source, `browser.version()` for a
44706		 *      function in a nested property or even `browser().version` to get an
44707		 *      object property if the function called returns an object. Note that
44708		 *      function notation is recommended for use in `render` rather than
44709		 *      `data` as it is much simpler to use as a renderer.
44710		 * * `null` - use the original data source for the row rather than plucking
44711		 *   data directly from it. This action has effects on two other
44712		 *   initialisation options:
44713		 *    * `defaultContent` - When null is given as the `data` option and
44714		 *      `defaultContent` is specified for the column, the value defined by
44715		 *      `defaultContent` will be used for the cell.
44716		 *    * `render` - When null is used for the `data` option and the `render`
44717		 *      option is specified for the column, the whole data source for the
44718		 *      row is used for the renderer.
44719		 * * `function` - the function given will be executed whenever DataTables
44720		 *   needs to set or get the data for a cell in the column. The function
44721		 *   takes three parameters:
44722		 *    * Parameters:
44723		 *      * `{array|object}` The data source for the row
44724		 *      * `{string}` The type call data requested - this will be 'set' when
44725		 *        setting data or 'filter', 'display', 'type', 'sort' or undefined
44726		 *        when gathering data. Note that when `undefined` is given for the
44727		 *        type DataTables expects to get the raw data for the object back<
44728		 *      * `{*}` Data to set when the second parameter is 'set'.
44729		 *    * Return:
44730		 *      * The return value from the function is not required when 'set' is
44731		 *        the type of call, but otherwise the return is what will be used
44732		 *        for the data requested.
44733		 *
44734		 * Note that `data` is a getter and setter option. If you just require
44735		 * formatting of data for output, you will likely want to use `render` which
44736		 * is simply a getter and thus simpler to use.
44737		 *
44738		 * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The
44739		 * name change reflects the flexibility of this property and is consistent
44740		 * with the naming of mRender. If 'mDataProp' is given, then it will still
44741		 * be used by DataTables, as it automatically maps the old name to the new
44742		 * if required.
44743		 *
44744		 *  @type string|int|function|null
44745		 *  @default null <i>Use automatically calculated column index</i>
44746		 *
44747		 *  @name DataTable.defaults.column.data
44748		 *  @dtopt Columns
44749		 *
44750		 *  @example
44751		 *    // Read table data from objects
44752		 *    // JSON structure for each row:
44753		 *    //   {
44754		 *    //      "engine": {value},
44755		 *    //      "browser": {value},
44756		 *    //      "platform": {value},
44757		 *    //      "version": {value},
44758		 *    //      "grade": {value}
44759		 *    //   }
44760		 *    $(document).ready( function() {
44761		 *      $('#example').dataTable( {
44762		 *        "ajaxSource": "sources/objects.txt",
44763		 *        "columns": [
44764		 *          { "data": "engine" },
44765		 *          { "data": "browser" },
44766		 *          { "data": "platform" },
44767		 *          { "data": "version" },
44768		 *          { "data": "grade" }
44769		 *        ]
44770		 *      } );
44771		 *    } );
44772		 *
44773		 *  @example
44774		 *    // Read information from deeply nested objects
44775		 *    // JSON structure for each row:
44776		 *    //   {
44777		 *    //      "engine": {value},
44778		 *    //      "browser": {value},
44779		 *    //      "platform": {
44780		 *    //         "inner": {value}
44781		 *    //      },
44782		 *    //      "details": [
44783		 *    //         {value}, {value}
44784		 *    //      ]
44785		 *    //   }
44786		 *    $(document).ready( function() {
44787		 *      $('#example').dataTable( {
44788		 *        "ajaxSource": "sources/deep.txt",
44789		 *        "columns": [
44790		 *          { "data": "engine" },
44791		 *          { "data": "browser" },
44792		 *          { "data": "platform.inner" },
44793		 *          { "data": "details.0" },
44794		 *          { "data": "details.1" }
44795		 *        ]
44796		 *      } );
44797		 *    } );
44798		 *
44799		 *  @example
44800		 *    // Using `data` as a function to provide different information for
44801		 *    // sorting, filtering and display. In this case, currency (price)
44802		 *    $(document).ready( function() {
44803		 *      $('#example').dataTable( {
44804		 *        "columnDefs": [ {
44805		 *          "targets": [ 0 ],
44806		 *          "data": function ( source, type, val ) {
44807		 *            if (type === 'set') {
44808		 *              source.price = val;
44809		 *              // Store the computed display and filter values for efficiency
44810		 *              source.price_display = val=="" ? "" : "$"+numberFormat(val);
44811		 *              source.price_filter  = val=="" ? "" : "$"+numberFormat(val)+" "+val;
44812		 *              return;
44813		 *            }
44814		 *            else if (type === 'display') {
44815		 *              return source.price_display;
44816		 *            }
44817		 *            else if (type === 'filter') {
44818		 *              return source.price_filter;
44819		 *            }
44820		 *            // 'sort', 'type' and undefined all just use the integer
44821		 *            return source.price;
44822		 *          }
44823		 *        } ]
44824		 *      } );
44825		 *    } );
44826		 *
44827		 *  @example
44828		 *    // Using default content
44829		 *    $(document).ready( function() {
44830		 *      $('#example').dataTable( {
44831		 *        "columnDefs": [ {
44832		 *          "targets": [ 0 ],
44833		 *          "data": null,
44834		 *          "defaultContent": "Click to edit"
44835		 *        } ]
44836		 *      } );
44837		 *    } );
44838		 *
44839		 *  @example
44840		 *    // Using array notation - outputting a list from an array
44841		 *    $(document).ready( function() {
44842		 *      $('#example').dataTable( {
44843		 *        "columnDefs": [ {
44844		 *          "targets": [ 0 ],
44845		 *          "data": "name[, ]"
44846		 *        } ]
44847		 *      } );
44848		 *    } );
44849		 *
44850		 */
44851		"mData": null,
44852	
44853	
44854		/**
44855		 * This property is the rendering partner to `data` and it is suggested that
44856		 * when you want to manipulate data for display (including filtering,
44857		 * sorting etc) without altering the underlying data for the table, use this
44858		 * property. `render` can be considered to be the the read only companion to
44859		 * `data` which is read / write (then as such more complex). Like `data`
44860		 * this option can be given in a number of different ways to effect its
44861		 * behaviour:
44862		 *
44863		 * * `integer` - treated as an array index for the data source. This is the
44864		 *   default that DataTables uses (incrementally increased for each column).
44865		 * * `string` - read an object property from the data source. There are
44866		 *   three 'special' options that can be used in the string to alter how
44867		 *   DataTables reads the data from the source object:
44868		 *    * `.` - Dotted Javascript notation. Just as you use a `.` in
44869		 *      Javascript to read from nested objects, so to can the options
44870		 *      specified in `data`. For example: `browser.version` or
44871		 *      `browser.name`. If your object parameter name contains a period, use
44872		 *      `\\` to escape it - i.e. `first\\.name`.
44873		 *    * `[]` - Array notation. DataTables can automatically combine data
44874		 *      from and array source, joining the data with the characters provided
44875		 *      between the two brackets. For example: `name[, ]` would provide a
44876		 *      comma-space separated list from the source array. If no characters
44877		 *      are provided between the brackets, the original array source is
44878		 *      returned.
44879		 *    * `()` - Function notation. Adding `()` to the end of a parameter will
44880		 *      execute a function of the name given. For example: `browser()` for a
44881		 *      simple function on the data source, `browser.version()` for a
44882		 *      function in a nested property or even `browser().version` to get an
44883		 *      object property if the function called returns an object.
44884		 * * `object` - use different data for the different data types requested by
44885		 *   DataTables ('filter', 'display', 'type' or 'sort'). The property names
44886		 *   of the object is the data type the property refers to and the value can
44887		 *   defined using an integer, string or function using the same rules as
44888		 *   `render` normally does. Note that an `_` option _must_ be specified.
44889		 *   This is the default value to use if you haven't specified a value for
44890		 *   the data type requested by DataTables.
44891		 * * `function` - the function given will be executed whenever DataTables
44892		 *   needs to set or get the data for a cell in the column. The function
44893		 *   takes three parameters:
44894		 *    * Parameters:
44895		 *      * {array|object} The data source for the row (based on `data`)
44896		 *      * {string} The type call data requested - this will be 'filter',
44897		 *        'display', 'type' or 'sort'.
44898		 *      * {array|object} The full data source for the row (not based on
44899		 *        `data`)
44900		 *    * Return:
44901		 *      * The return value from the function is what will be used for the
44902		 *        data requested.
44903		 *
44904		 *  @type string|int|function|object|null
44905		 *  @default null Use the data source value.
44906		 *
44907		 *  @name DataTable.defaults.column.render
44908		 *  @dtopt Columns
44909		 *
44910		 *  @example
44911		 *    // Create a comma separated list from an array of objects
44912		 *    $(document).ready( function() {
44913		 *      $('#example').dataTable( {
44914		 *        "ajaxSource": "sources/deep.txt",
44915		 *        "columns": [
44916		 *          { "data": "engine" },
44917		 *          { "data": "browser" },
44918		 *          {
44919		 *            "data": "platform",
44920		 *            "render": "[, ].name"
44921		 *          }
44922		 *        ]
44923		 *      } );
44924		 *    } );
44925		 *
44926		 *  @example
44927		 *    // Execute a function to obtain data
44928		 *    $(document).ready( function() {
44929		 *      $('#example').dataTable( {
44930		 *        "columnDefs": [ {
44931		 *          "targets": [ 0 ],
44932		 *          "data": null, // Use the full data source object for the renderer's source
44933		 *          "render": "browserName()"
44934		 *        } ]
44935		 *      } );
44936		 *    } );
44937		 *
44938		 *  @example
44939		 *    // As an object, extracting different data for the different types
44940		 *    // This would be used with a data source such as:
44941		 *    //   { "phone": 5552368, "phone_filter": "5552368 555-2368", "phone_display": "555-2368" }
44942		 *    // Here the `phone` integer is used for sorting and type detection, while `phone_filter`
44943		 *    // (which has both forms) is used for filtering for if a user inputs either format, while
44944		 *    // the formatted phone number is the one that is shown in the table.
44945		 *    $(document).ready( function() {
44946		 *      $('#example').dataTable( {
44947		 *        "columnDefs": [ {
44948		 *          "targets": [ 0 ],
44949		 *          "data": null, // Use the full data source object for the renderer's source
44950		 *          "render": {
44951		 *            "_": "phone",
44952		 *            "filter": "phone_filter",
44953		 *            "display": "phone_display"
44954		 *          }
44955		 *        } ]
44956		 *      } );
44957		 *    } );
44958		 *
44959		 *  @example
44960		 *    // Use as a function to create a link from the data source
44961		 *    $(document).ready( function() {
44962		 *      $('#example').dataTable( {
44963		 *        "columnDefs": [ {
44964		 *          "targets": [ 0 ],
44965		 *          "data": "download_link",
44966		 *          "render": function ( data, type, full ) {
44967		 *            return '<a href="'+data+'">Download</a>';
44968		 *          }
44969		 *        } ]
44970		 *      } );
44971		 *    } );
44972		 */
44973		"mRender": null,
44974	
44975	
44976		/**
44977		 * Change the cell type created for the column - either TD cells or TH cells. This
44978		 * can be useful as TH cells have semantic meaning in the table body, allowing them
44979		 * to act as a header for a row (you may wish to add scope='row' to the TH elements).
44980		 *  @type string
44981		 *  @default td
44982		 *
44983		 *  @name DataTable.defaults.column.cellType
44984		 *  @dtopt Columns
44985		 *
44986		 *  @example
44987		 *    // Make the first column use TH cells
44988		 *    $(document).ready( function() {
44989		 *      $('#example').dataTable( {
44990		 *        "columnDefs": [ {
44991		 *          "targets": [ 0 ],
44992		 *          "cellType": "th"
44993		 *        } ]
44994		 *      } );
44995		 *    } );
44996		 */
44997		"sCellType": "td",
44998	
44999	
45000		/**
45001		 * Class to give to each cell in this column.
45002		 *  @type string
45003		 *  @default <i>Empty string</i>
45004		 *
45005		 *  @name DataTable.defaults.column.class
45006		 *  @dtopt Columns
45007		 *
45008		 *  @example
45009		 *    // Using `columnDefs`
45010		 *    $(document).ready( function() {
45011		 *      $('#example').dataTable( {
45012		 *        "columnDefs": [
45013		 *          { "class": "my_class", "targets": [ 0 ] }
45014		 *        ]
45015		 *      } );
45016		 *    } );
45017		 *
45018		 *  @example
45019		 *    // Using `columns`
45020		 *    $(document).ready( function() {
45021		 *      $('#example').dataTable( {
45022		 *        "columns": [
45023		 *          { "class": "my_class" },
45024		 *          null,
45025		 *          null,
45026		 *          null,
45027		 *          null
45028		 *        ]
45029		 *      } );
45030		 *    } );
45031		 */
45032		"sClass": "",
45033	
45034		/**
45035		 * When DataTables calculates the column widths to assign to each column,
45036		 * it finds the longest string in each column and then constructs a
45037		 * temporary table and reads the widths from that. The problem with this
45038		 * is that "mmm" is much wider then "iiii", but the latter is a longer
45039		 * string - thus the calculation can go wrong (doing it properly and putting
45040		 * it into an DOM object and measuring that is horribly(!) slow). Thus as
45041		 * a "work around" we provide this option. It will append its value to the
45042		 * text that is found to be the longest string for the column - i.e. padding.
45043		 * Generally you shouldn't need this!
45044		 *  @type string
45045		 *  @default <i>Empty string<i>
45046		 *
45047		 *  @name DataTable.defaults.column.contentPadding
45048		 *  @dtopt Columns
45049		 *
45050		 *  @example
45051		 *    // Using `columns`
45052		 *    $(document).ready( function() {
45053		 *      $('#example').dataTable( {
45054		 *        "columns": [
45055		 *          null,
45056		 *          null,
45057		 *          null,
45058		 *          {
45059		 *            "contentPadding": "mmm"
45060		 *          }
45061		 *        ]
45062		 *      } );
45063		 *    } );
45064		 */
45065		"sContentPadding": "",
45066	
45067	
45068		/**
45069		 * Allows a default value to be given for a column's data, and will be used
45070		 * whenever a null data source is encountered (this can be because `data`
45071		 * is set to null, or because the data source itself is null).
45072		 *  @type string
45073		 *  @default null
45074		 *
45075		 *  @name DataTable.defaults.column.defaultContent
45076		 *  @dtopt Columns
45077		 *
45078		 *  @example
45079		 *    // Using `columnDefs`
45080		 *    $(document).ready( function() {
45081		 *      $('#example').dataTable( {
45082		 *        "columnDefs": [
45083		 *          {
45084		 *            "data": null,
45085		 *            "defaultContent": "Edit",
45086		 *            "targets": [ -1 ]
45087		 *          }
45088		 *        ]
45089		 *      } );
45090		 *    } );
45091		 *
45092		 *  @example
45093		 *    // Using `columns`
45094		 *    $(document).ready( function() {
45095		 *      $('#example').dataTable( {
45096		 *        "columns": [
45097		 *          null,
45098		 *          null,
45099		 *          null,
45100		 *          {
45101		 *            "data": null,
45102		 *            "defaultContent": "Edit"
45103		 *          }
45104		 *        ]
45105		 *      } );
45106		 *    } );
45107		 */
45108		"sDefaultContent": null,
45109	
45110	
45111		/**
45112		 * This parameter is only used in DataTables' server-side processing. It can
45113		 * be exceptionally useful to know what columns are being displayed on the
45114		 * client side, and to map these to database fields. When defined, the names
45115		 * also allow DataTables to reorder information from the server if it comes
45116		 * back in an unexpected order (i.e. if you switch your columns around on the
45117		 * client-side, your server-side code does not also need updating).
45118		 *  @type string
45119		 *  @default <i>Empty string</i>
45120		 *
45121		 *  @name DataTable.defaults.column.name
45122		 *  @dtopt Columns
45123		 *
45124		 *  @example
45125		 *    // Using `columnDefs`
45126		 *    $(document).ready( function() {
45127		 *      $('#example').dataTable( {
45128		 *        "columnDefs": [
45129		 *          { "name": "engine", "targets": [ 0 ] },
45130		 *          { "name": "browser", "targets": [ 1 ] },
45131		 *          { "name": "platform", "targets": [ 2 ] },
45132		 *          { "name": "version", "targets": [ 3 ] },
45133		 *          { "name": "grade", "targets": [ 4 ] }
45134		 *        ]
45135		 *      } );
45136		 *    } );
45137		 *
45138		 *  @example
45139		 *    // Using `columns`
45140		 *    $(document).ready( function() {
45141		 *      $('#example').dataTable( {
45142		 *        "columns": [
45143		 *          { "name": "engine" },
45144		 *          { "name": "browser" },
45145		 *          { "name": "platform" },
45146		 *          { "name": "version" },
45147		 *          { "name": "grade" }
45148		 *        ]
45149		 *      } );
45150		 *    } );
45151		 */
45152		"sName": "",
45153	
45154	
45155		/**
45156		 * Defines a data source type for the ordering which can be used to read
45157		 * real-time information from the table (updating the internally cached
45158		 * version) prior to ordering. This allows ordering to occur on user
45159		 * editable elements such as form inputs.
45160		 *  @type string
45161		 *  @default std
45162		 *
45163		 *  @name DataTable.defaults.column.orderDataType
45164		 *  @dtopt Columns
45165		 *
45166		 *  @example
45167		 *    // Using `columnDefs`
45168		 *    $(document).ready( function() {
45169		 *      $('#example').dataTable( {
45170		 *        "columnDefs": [
45171		 *          { "orderDataType": "dom-text", "targets": [ 2, 3 ] },
45172		 *          { "type": "numeric", "targets": [ 3 ] },
45173		 *          { "orderDataType": "dom-select", "targets": [ 4 ] },
45174		 *          { "orderDataType": "dom-checkbox", "targets": [ 5 ] }
45175		 *        ]
45176		 *      } );
45177		 *    } );
45178		 *
45179		 *  @example
45180		 *    // Using `columns`
45181		 *    $(document).ready( function() {
45182		 *      $('#example').dataTable( {
45183		 *        "columns": [
45184		 *          null,
45185		 *          null,
45186		 *          { "orderDataType": "dom-text" },
45187		 *          { "orderDataType": "dom-text", "type": "numeric" },
45188		 *          { "orderDataType": "dom-select" },
45189		 *          { "orderDataType": "dom-checkbox" }
45190		 *        ]
45191		 *      } );
45192		 *    } );
45193		 */
45194		"sSortDataType": "std",
45195	
45196	
45197		/**
45198		 * The title of this column.
45199		 *  @type string
45200		 *  @default null <i>Derived from the 'TH' value for this column in the
45201		 *    original HTML table.</i>
45202		 *
45203		 *  @name DataTable.defaults.column.title
45204		 *  @dtopt Columns
45205		 *
45206		 *  @example
45207		 *    // Using `columnDefs`
45208		 *    $(document).ready( function() {
45209		 *      $('#example').dataTable( {
45210		 *        "columnDefs": [
45211		 *          { "title": "My column title", "targets": [ 0 ] }
45212		 *        ]
45213		 *      } );
45214		 *    } );
45215		 *
45216		 *  @example
45217		 *    // Using `columns`
45218		 *    $(document).ready( function() {
45219		 *      $('#example').dataTable( {
45220		 *        "columns": [
45221		 *          { "title": "My column title" },
45222		 *          null,
45223		 *          null,
45224		 *          null,
45225		 *          null
45226		 *        ]
45227		 *      } );
45228		 *    } );
45229		 */
45230		"sTitle": null,
45231	
45232	
45233		/**
45234		 * The type allows you to specify how the data for this column will be
45235		 * ordered. Four types (string, numeric, date and html (which will strip
45236		 * HTML tags before ordering)) are currently available. Note that only date
45237		 * formats understood by Javascript's Date() object will be accepted as type
45238		 * date. For example: "Mar 26, 2008 5:03 PM". May take the values: 'string',
45239		 * 'numeric', 'date' or 'html' (by default). Further types can be adding
45240		 * through plug-ins.
45241		 *  @type string
45242		 *  @default null <i>Auto-detected from raw data</i>
45243		 *
45244		 *  @name DataTable.defaults.column.type
45245		 *  @dtopt Columns
45246		 *
45247		 *  @example
45248		 *    // Using `columnDefs`
45249		 *    $(document).ready( function() {
45250		 *      $('#example').dataTable( {
45251		 *        "columnDefs": [
45252		 *          { "type": "html", "targets": [ 0 ] }
45253		 *        ]
45254		 *      } );
45255		 *    } );
45256		 *
45257		 *  @example
45258		 *    // Using `columns`
45259		 *    $(document).ready( function() {
45260		 *      $('#example').dataTable( {
45261		 *        "columns": [
45262		 *          { "type": "html" },
45263		 *          null,
45264		 *          null,
45265		 *          null,
45266		 *          null
45267		 *        ]
45268		 *      } );
45269		 *    } );
45270		 */
45271		"sType": null,
45272	
45273	
45274		/**
45275		 * Defining the width of the column, this parameter may take any CSS value
45276		 * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not
45277		 * been given a specific width through this interface ensuring that the table
45278		 * remains readable.
45279		 *  @type string
45280		 *  @default null <i>Automatic</i>
45281		 *
45282		 *  @name DataTable.defaults.column.width
45283		 *  @dtopt Columns
45284		 *
45285		 *  @example
45286		 *    // Using `columnDefs`
45287		 *    $(document).ready( function() {
45288		 *      $('#example').dataTable( {
45289		 *        "columnDefs": [
45290		 *          { "width": "20%", "targets": [ 0 ] }
45291		 *        ]
45292		 *      } );
45293		 *    } );
45294		 *
45295		 *  @example
45296		 *    // Using `columns`
45297		 *    $(document).ready( function() {
45298		 *      $('#example').dataTable( {
45299		 *        "columns": [
45300		 *          { "width": "20%" },
45301		 *          null,
45302		 *          null,
45303		 *          null,
45304		 *          null
45305		 *        ]
45306		 *      } );
45307		 *    } );
45308		 */
45309		"sWidth": null
45310	};
45311	
45312	_fnHungarianMap( DataTable.defaults.column );
45313	
45314	
45315	
45316	/**
45317	 * DataTables settings object - this holds all the information needed for a
45318	 * given table, including configuration, data and current application of the
45319	 * table options. DataTables does not have a single instance for each DataTable
45320	 * with the settings attached to that instance, but rather instances of the
45321	 * DataTable "class" are created on-the-fly as needed (typically by a
45322	 * $().dataTable() call) and the settings object is then applied to that
45323	 * instance.
45324	 *
45325	 * Note that this object is related to {@link DataTable.defaults} but this
45326	 * one is the internal data store for DataTables's cache of columns. It should
45327	 * NOT be manipulated outside of DataTables. Any configuration should be done
45328	 * through the initialisation options.
45329	 *  @namespace
45330	 *  @todo Really should attach the settings object to individual instances so we
45331	 *    don't need to create new instances on each $().dataTable() call (if the
45332	 *    table already exists). It would also save passing oSettings around and
45333	 *    into every single function. However, this is a very significant
45334	 *    architecture change for DataTables and will almost certainly break
45335	 *    backwards compatibility with older installations. This is something that
45336	 *    will be done in 2.0.
45337	 */
45338	DataTable.models.oSettings = {
45339		/**
45340		 * Primary features of DataTables and their enablement state.
45341		 *  @namespace
45342		 */
45343		"oFeatures": {
45344	
45345			/**
45346			 * Flag to say if DataTables should automatically try to calculate the
45347			 * optimum table and columns widths (true) or not (false).
45348			 * Note that this parameter will be set by the initialisation routine. To
45349			 * set a default use {@link DataTable.defaults}.
45350			 *  @type boolean
45351			 */
45352			"bAutoWidth": null,
45353	
45354			/**
45355			 * Delay the creation of TR and TD elements until they are actually
45356			 * needed by a driven page draw. This can give a significant speed
45357			 * increase for Ajax source and Javascript source data, but makes no
45358			 * difference at all for DOM and server-side processing tables.
45359			 * Note that this parameter will be set by the initialisation routine. To
45360			 * set a default use {@link DataTable.defaults}.
45361			 *  @type boolean
45362			 */
45363			"bDeferRender": null,
45364	
45365			/**
45366			 * Enable filtering on the table or not. Note that if this is disabled
45367			 * then there is no filtering at all on the table, including fnFilter.
45368			 * To just remove the filtering input use sDom and remove the 'f' option.
45369			 * Note that this parameter will be set by the initialisation routine. To
45370			 * set a default use {@link DataTable.defaults}.
45371			 *  @type boolean
45372			 */
45373			"bFilter": null,
45374	
45375			/**
45376			 * Table information element (the 'Showing x of y records' div) enable
45377			 * flag.
45378			 * Note that this parameter will be set by the initialisation routine. To
45379			 * set a default use {@link DataTable.defaults}.
45380			 *  @type boolean
45381			 */
45382			"bInfo": null,
45383	
45384			/**
45385			 * Present a user control allowing the end user to change the page size
45386			 * when pagination is enabled.
45387			 * Note that this parameter will be set by the initialisation routine. To
45388			 * set a default use {@link DataTable.defaults}.
45389			 *  @type boolean
45390			 */
45391			"bLengthChange": null,
45392	
45393			/**
45394			 * Pagination enabled or not. Note that if this is disabled then length
45395			 * changing must also be disabled.
45396			 * Note that this parameter will be set by the initialisation routine. To
45397			 * set a default use {@link DataTable.defaults}.
45398			 *  @type boolean
45399			 */
45400			"bPaginate": null,
45401	
45402			/**
45403			 * Processing indicator enable flag whenever DataTables is enacting a
45404			 * user request - typically an Ajax request for server-side processing.
45405			 * Note that this parameter will be set by the initialisation routine. To
45406			 * set a default use {@link DataTable.defaults}.
45407			 *  @type boolean
45408			 */
45409			"bProcessing": null,
45410	
45411			/**
45412			 * Server-side processing enabled flag - when enabled DataTables will
45413			 * get all data from the server for every draw - there is no filtering,
45414			 * sorting or paging done on the client-side.
45415			 * Note that this parameter will be set by the initialisation routine. To
45416			 * set a default use {@link DataTable.defaults}.
45417			 *  @type boolean
45418			 */
45419			"bServerSide": null,
45420	
45421			/**
45422			 * Sorting enablement flag.
45423			 * Note that this parameter will be set by the initialisation routine. To
45424			 * set a default use {@link DataTable.defaults}.
45425			 *  @type boolean
45426			 */
45427			"bSort": null,
45428	
45429			/**
45430			 * Multi-column sorting
45431			 * Note that this parameter will be set by the initialisation routine. To
45432			 * set a default use {@link DataTable.defaults}.
45433			 *  @type boolean
45434			 */
45435			"bSortMulti": null,
45436	
45437			/**
45438			 * Apply a class to the columns which are being sorted to provide a
45439			 * visual highlight or not. This can slow things down when enabled since
45440			 * there is a lot of DOM interaction.
45441			 * Note that this parameter will be set by the initialisation routine. To
45442			 * set a default use {@link DataTable.defaults}.
45443			 *  @type boolean
45444			 */
45445			"bSortClasses": null,
45446	
45447			/**
45448			 * State saving enablement flag.
45449			 * Note that this parameter will be set by the initialisation routine. To
45450			 * set a default use {@link DataTable.defaults}.
45451			 *  @type boolean
45452			 */
45453			"bStateSave": null
45454		},
45455	
45456	
45457		/**
45458		 * Scrolling settings for a table.
45459		 *  @namespace
45460		 */
45461		"oScroll": {
45462			/**
45463			 * When the table is shorter in height than sScrollY, collapse the
45464			 * table container down to the height of the table (when true).
45465			 * Note that this parameter will be set by the initialisation routine. To
45466			 * set a default use {@link DataTable.defaults}.
45467			 *  @type boolean
45468			 */
45469			"bCollapse": null,
45470	
45471			/**
45472			 * Width of the scrollbar for the web-browser's platform. Calculated
45473			 * during table initialisation.
45474			 *  @type int
45475			 *  @default 0
45476			 */
45477			"iBarWidth": 0,
45478	
45479			/**
45480			 * Viewport width for horizontal scrolling. Horizontal scrolling is
45481			 * disabled if an empty string.
45482			 * Note that this parameter will be set by the initialisation routine. To
45483			 * set a default use {@link DataTable.defaults}.
45484			 *  @type string
45485			 */
45486			"sX": null,
45487	
45488			/**
45489			 * Width to expand the table to when using x-scrolling. Typically you
45490			 * should not need to use this.
45491			 * Note that this parameter will be set by the initialisation routine. To
45492			 * set a default use {@link DataTable.defaults}.
45493			 *  @type string
45494			 *  @deprecated
45495			 */
45496			"sXInner": null,
45497	
45498			/**
45499			 * Viewport height for vertical scrolling. Vertical scrolling is disabled
45500			 * if an empty string.
45501			 * Note that this parameter will be set by the initialisation routine. To
45502			 * set a default use {@link DataTable.defaults}.
45503			 *  @type string
45504			 */
45505			"sY": null
45506		},
45507	
45508		/**
45509		 * Language information for the table.
45510		 *  @namespace
45511		 *  @extends DataTable.defaults.oLanguage
45512		 */
45513		"oLanguage": {
45514			/**
45515			 * Information callback function. See
45516			 * {@link DataTable.defaults.fnInfoCallback}
45517			 *  @type function
45518			 *  @default null
45519			 */
45520			"fnInfoCallback": null
45521		},
45522	
45523		/**
45524		 * Browser support parameters
45525		 *  @namespace
45526		 */
45527		"oBrowser": {
45528			/**
45529			 * Indicate if the browser incorrectly calculates width:100% inside a
45530			 * scrolling element (IE6/7)
45531			 *  @type boolean
45532			 *  @default false
45533			 */
45534			"bScrollOversize": false,
45535	
45536			/**
45537			 * Determine if the vertical scrollbar is on the right or left of the
45538			 * scrolling container - needed for rtl language layout, although not
45539			 * all browsers move the scrollbar (Safari).
45540			 *  @type boolean
45541			 *  @default false
45542			 */
45543			"bScrollbarLeft": false,
45544	
45545			/**
45546			 * Flag for if `getBoundingClientRect` is fully supported or not
45547			 *  @type boolean
45548			 *  @default false
45549			 */
45550			"bBounding": false,
45551	
45552			/**
45553			 * Browser scrollbar width
45554			 *  @type integer
45555			 *  @default 0
45556			 */
45557			"barWidth": 0
45558		},
45559	
45560	
45561		"ajax": null,
45562	
45563	
45564		/**
45565		 * Array referencing the nodes which are used for the features. The
45566		 * parameters of this object match what is allowed by sDom - i.e.
45567		 *   <ul>
45568		 *     <li>'l' - Length changing</li>
45569		 *     <li>'f' - Filtering input</li>
45570		 *     <li>'t' - The table!</li>
45571		 *     <li>'i' - Information</li>
45572		 *     <li>'p' - Pagination</li>
45573		 *     <li>'r' - pRocessing</li>
45574		 *   </ul>
45575		 *  @type array
45576		 *  @default []
45577		 */
45578		"aanFeatures": [],
45579	
45580		/**
45581		 * Store data information - see {@link DataTable.models.oRow} for detailed
45582		 * information.
45583		 *  @type array
45584		 *  @default []
45585		 */
45586		"aoData": [],
45587	
45588		/**
45589		 * Array of indexes which are in the current display (after filtering etc)
45590		 *  @type array
45591		 *  @default []
45592		 */
45593		"aiDisplay": [],
45594	
45595		/**
45596		 * Array of indexes for display - no filtering
45597		 *  @type array
45598		 *  @default []
45599		 */
45600		"aiDisplayMaster": [],
45601	
45602		/**
45603		 * Map of row ids to data indexes
45604		 *  @type object
45605		 *  @default {}
45606		 */
45607		"aIds": {},
45608	
45609		/**
45610		 * Store information about each column that is in use
45611		 *  @type array
45612		 *  @default []
45613		 */
45614		"aoColumns": [],
45615	
45616		/**
45617		 * Store information about the table's header
45618		 *  @type array
45619		 *  @default []
45620		 */
45621		"aoHeader": [],
45622	
45623		/**
45624		 * Store information about the table's footer
45625		 *  @type array
45626		 *  @default []
45627		 */
45628		"aoFooter": [],
45629	
45630		/**
45631		 * Store the applied global search information in case we want to force a
45632		 * research or compare the old search to a new one.
45633		 * Note that this parameter will be set by the initialisation routine. To
45634		 * set a default use {@link DataTable.defaults}.
45635		 *  @namespace
45636		 *  @extends DataTable.models.oSearch
45637		 */
45638		"oPreviousSearch": {},
45639	
45640		/**
45641		 * Store the applied search for each column - see
45642		 * {@link DataTable.models.oSearch} for the format that is used for the
45643		 * filtering information for each column.
45644		 *  @type array
45645		 *  @default []
45646		 */
45647		"aoPreSearchCols": [],
45648	
45649		/**
45650		 * Sorting that is applied to the table. Note that the inner arrays are
45651		 * used in the following manner:
45652		 * <ul>
45653		 *   <li>Index 0 - column number</li>
45654		 *   <li>Index 1 - current sorting direction</li>
45655		 * </ul>
45656		 * Note that this parameter will be set by the initialisation routine. To
45657		 * set a default use {@link DataTable.defaults}.
45658		 *  @type array
45659		 *  @todo These inner arrays should really be objects
45660		 */
45661		"aaSorting": null,
45662	
45663		/**
45664		 * Sorting that is always applied to the table (i.e. prefixed in front of
45665		 * aaSorting).
45666		 * Note that this parameter will be set by the initialisation routine. To
45667		 * set a default use {@link DataTable.defaults}.
45668		 *  @type array
45669		 *  @default []
45670		 */
45671		"aaSortingFixed": [],
45672	
45673		/**
45674		 * Classes to use for the striping of a table.
45675		 * Note that this parameter will be set by the initialisation routine. To
45676		 * set a default use {@link DataTable.defaults}.
45677		 *  @type array
45678		 *  @default []
45679		 */
45680		"asStripeClasses": null,
45681	
45682		/**
45683		 * If restoring a table - we should restore its striping classes as well
45684		 *  @type array
45685		 *  @default []
45686		 */
45687		"asDestroyStripes": [],
45688	
45689		/**
45690		 * If restoring a table - we should restore its width
45691		 *  @type int
45692		 *  @default 0
45693		 */
45694		"sDestroyWidth": 0,
45695	
45696		/**
45697		 * Callback functions array for every time a row is inserted (i.e. on a draw).
45698		 *  @type array
45699		 *  @default []
45700		 */
45701		"aoRowCallback": [],
45702	
45703		/**
45704		 * Callback functions for the header on each draw.
45705		 *  @type array
45706		 *  @default []
45707		 */
45708		"aoHeaderCallback": [],
45709	
45710		/**
45711		 * Callback function for the footer on each draw.
45712		 *  @type array
45713		 *  @default []
45714		 */
45715		"aoFooterCallback": [],
45716	
45717		/**
45718		 * Array of callback functions for draw callback functions
45719		 *  @type array
45720		 *  @default []
45721		 */
45722		"aoDrawCallback": [],
45723	
45724		/**
45725		 * Array of callback functions for row created function
45726		 *  @type array
45727		 *  @default []
45728		 */
45729		"aoRowCreatedCallback": [],
45730	
45731		/**
45732		 * Callback functions for just before the table is redrawn. A return of
45733		 * false will be used to cancel the draw.
45734		 *  @type array
45735		 *  @default []
45736		 */
45737		"aoPreDrawCallback": [],
45738	
45739		/**
45740		 * Callback functions for when the table has been initialised.
45741		 *  @type array
45742		 *  @default []
45743		 */
45744		"aoInitComplete": [],
45745	
45746	
45747		/**
45748		 * Callbacks for modifying the settings to be stored for state saving, prior to
45749		 * saving state.
45750		 *  @type array
45751		 *  @default []
45752		 */
45753		"aoStateSaveParams": [],
45754	
45755		/**
45756		 * Callbacks for modifying the settings that have been stored for state saving
45757		 * prior to using the stored values to restore the state.
45758		 *  @type array
45759		 *  @default []
45760		 */
45761		"aoStateLoadParams": [],
45762	
45763		/**
45764		 * Callbacks for operating on the settings object once the saved state has been
45765		 * loaded
45766		 *  @type array
45767		 *  @default []
45768		 */
45769		"aoStateLoaded": [],
45770	
45771		/**
45772		 * Cache the table ID for quick access
45773		 *  @type string
45774		 *  @default <i>Empty string</i>
45775		 */
45776		"sTableId": "",
45777	
45778		/**
45779		 * The TABLE node for the main table
45780		 *  @type node
45781		 *  @default null
45782		 */
45783		"nTable": null,
45784	
45785		/**
45786		 * Permanent ref to the thead element
45787		 *  @type node
45788		 *  @default null
45789		 */
45790		"nTHead": null,
45791	
45792		/**
45793		 * Permanent ref to the tfoot element - if it exists
45794		 *  @type node
45795		 *  @default null
45796		 */
45797		"nTFoot": null,
45798	
45799		/**
45800		 * Permanent ref to the tbody element
45801		 *  @type node
45802		 *  @default null
45803		 */
45804		"nTBody": null,
45805	
45806		/**
45807		 * Cache the wrapper node (contains all DataTables controlled elements)
45808		 *  @type node
45809		 *  @default null
45810		 */
45811		"nTableWrapper": null,
45812	
45813		/**
45814		 * Indicate if when using server-side processing the loading of data
45815		 * should be deferred until the second draw.
45816		 * Note that this parameter will be set by the initialisation routine. To
45817		 * set a default use {@link DataTable.defaults}.
45818		 *  @type boolean
45819		 *  @default false
45820		 */
45821		"bDeferLoading": false,
45822	
45823		/**
45824		 * Indicate if all required information has been read in
45825		 *  @type boolean
45826		 *  @default false
45827		 */
45828		"bInitialised": false,
45829	
45830		/**
45831		 * Information about open rows. Each object in the array has the parameters
45832		 * 'nTr' and 'nParent'
45833		 *  @type array
45834		 *  @default []
45835		 */
45836		"aoOpenRows": [],
45837	
45838		/**
45839		 * Dictate the positioning of DataTables' control elements - see
45840		 * {@link DataTable.model.oInit.sDom}.
45841		 * Note that this parameter will be set by the initialisation routine. To
45842		 * set a default use {@link DataTable.defaults}.
45843		 *  @type string
45844		 *  @default null
45845		 */
45846		"sDom": null,
45847	
45848		/**
45849		 * Search delay (in mS)
45850		 *  @type integer
45851		 *  @default null
45852		 */
45853		"searchDelay": null,
45854	
45855		/**
45856		 * Which type of pagination should be used.
45857		 * Note that this parameter will be set by the initialisation routine. To
45858		 * set a default use {@link DataTable.defaults}.
45859		 *  @type string
45860		 *  @default two_button
45861		 */
45862		"sPaginationType": "two_button",
45863	
45864		/**
45865		 * The state duration (for `stateSave`) in seconds.
45866		 * Note that this parameter will be set by the initialisation routine. To
45867		 * set a default use {@link DataTable.defaults}.
45868		 *  @type int
45869		 *  @default 0
45870		 */
45871		"iStateDuration": 0,
45872	
45873		/**
45874		 * Array of callback functions for state saving. Each array element is an
45875		 * object with the following parameters:
45876		 *   <ul>
45877		 *     <li>function:fn - function to call. Takes two parameters, oSettings
45878		 *       and the JSON string to save that has been thus far created. Returns
45879		 *       a JSON string to be inserted into a json object
45880		 *       (i.e. '"param": [ 0, 1, 2]')</li>
45881		 *     <li>string:sName - name of callback</li>
45882		 *   </ul>
45883		 *  @type array
45884		 *  @default []
45885		 */
45886		"aoStateSave": [],
45887	
45888		/**
45889		 * Array of callback functions for state loading. Each array element is an
45890		 * object with the following parameters:
45891		 *   <ul>
45892		 *     <li>function:fn - function to call. Takes two parameters, oSettings
45893		 *       and the object stored. May return false to cancel state loading</li>
45894		 *     <li>string:sName - name of callback</li>
45895		 *   </ul>
45896		 *  @type array
45897		 *  @default []
45898		 */
45899		"aoStateLoad": [],
45900	
45901		/**
45902		 * State that was saved. Useful for back reference
45903		 *  @type object
45904		 *  @default null
45905		 */
45906		"oSavedState": null,
45907	
45908		/**
45909		 * State that was loaded. Useful for back reference
45910		 *  @type object
45911		 *  @default null
45912		 */
45913		"oLoadedState": null,
45914	
45915		/**
45916		 * Source url for AJAX data for the table.
45917		 * Note that this parameter will be set by the initialisation routine. To
45918		 * set a default use {@link DataTable.defaults}.
45919		 *  @type string
45920		 *  @default null
45921		 */
45922		"sAjaxSource": null,
45923	
45924		/**
45925		 * Property from a given object from which to read the table data from. This
45926		 * can be an empty string (when not server-side processing), in which case
45927		 * it is  assumed an an array is given directly.
45928		 * Note that this parameter will be set by the initialisation routine. To
45929		 * set a default use {@link DataTable.defaults}.
45930		 *  @type string
45931		 */
45932		"sAjaxDataProp": null,
45933	
45934		/**
45935		 * The last jQuery XHR object that was used for server-side data gathering.
45936		 * This can be used for working with the XHR information in one of the
45937		 * callbacks
45938		 *  @type object
45939		 *  @default null
45940		 */
45941		"jqXHR": null,
45942	
45943		/**
45944		 * JSON returned from the server in the last Ajax request
45945		 *  @type object
45946		 *  @default undefined
45947		 */
45948		"json": undefined,
45949	
45950		/**
45951		 * Data submitted as part of the last Ajax request
45952		 *  @type object
45953		 *  @default undefined
45954		 */
45955		"oAjaxData": undefined,
45956	
45957		/**
45958		 * Function to get the server-side data.
45959		 * Note that this parameter will be set by the initialisation routine. To
45960		 * set a default use {@link DataTable.defaults}.
45961		 *  @type function
45962		 */
45963		"fnServerData": null,
45964	
45965		/**
45966		 * Functions which are called prior to sending an Ajax request so extra
45967		 * parameters can easily be sent to the server
45968		 *  @type array
45969		 *  @default []
45970		 */
45971		"aoServerParams": [],
45972	
45973		/**
45974		 * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
45975		 * required).
45976		 * Note that this parameter will be set by the initialisation routine. To
45977		 * set a default use {@link DataTable.defaults}.
45978		 *  @type string
45979		 */
45980		"sServerMethod": null,
45981	
45982		/**
45983		 * Format numbers for display.
45984		 * Note that this parameter will be set by the initialisation routine. To
45985		 * set a default use {@link DataTable.defaults}.
45986		 *  @type function
45987		 */
45988		"fnFormatNumber": null,
45989	
45990		/**
45991		 * List of options that can be used for the user selectable length menu.
45992		 * Note that this parameter will be set by the initialisation routine. To
45993		 * set a default use {@link DataTable.defaults}.
45994		 *  @type array
45995		 *  @default []
45996		 */
45997		"aLengthMenu": null,
45998	
45999		/**
46000		 * Counter for the draws that the table does. Also used as a tracker for
46001		 * server-side processing
46002		 *  @type int
46003		 *  @default 0
46004		 */
46005		"iDraw": 0,
46006	
46007		/**
46008		 * Indicate if a redraw is being done - useful for Ajax
46009		 *  @type boolean
46010		 *  @default false
46011		 */
46012		"bDrawing": false,
46013	
46014		/**
46015		 * Draw index (iDraw) of the last error when parsing the returned data
46016		 *  @type int
46017		 *  @default -1
46018		 */
46019		"iDrawError": -1,
46020	
46021		/**
46022		 * Paging display length
46023		 *  @type int
46024		 *  @default 10
46025		 */
46026		"_iDisplayLength": 10,
46027	
46028		/**
46029		 * Paging start point - aiDisplay index
46030		 *  @type int
46031		 *  @default 0
46032		 */
46033		"_iDisplayStart": 0,
46034	
46035		/**
46036		 * Server-side processing - number of records in the result set
46037		 * (i.e. before filtering), Use fnRecordsTotal rather than
46038		 * this property to get the value of the number of records, regardless of
46039		 * the server-side processing setting.
46040		 *  @type int
46041		 *  @default 0
46042		 *  @private
46043		 */
46044		"_iRecordsTotal": 0,
46045	
46046		/**
46047		 * Server-side processing - number of records in the current display set
46048		 * (i.e. after filtering). Use fnRecordsDisplay rather than
46049		 * this property to get the value of the number of records, regardless of
46050		 * the server-side processing setting.
46051		 *  @type boolean
46052		 *  @default 0
46053		 *  @private
46054		 */
46055		"_iRecordsDisplay": 0,
46056	
46057		/**
46058		 * The classes to use for the table
46059		 *  @type object
46060		 *  @default {}
46061		 */
46062		"oClasses": {},
46063	
46064		/**
46065		 * Flag attached to the settings object so you can check in the draw
46066		 * callback if filtering has been done in the draw. Deprecated in favour of
46067		 * events.
46068		 *  @type boolean
46069		 *  @default false
46070		 *  @deprecated
46071		 */
46072		"bFiltered": false,
46073	
46074		/**
46075		 * Flag attached to the settings object so you can check in the draw
46076		 * callback if sorting has been done in the draw. Deprecated in favour of
46077		 * events.
46078		 *  @type boolean
46079		 *  @default false
46080		 *  @deprecated
46081		 */
46082		"bSorted": false,
46083	
46084		/**
46085		 * Indicate that if multiple rows are in the header and there is more than
46086		 * one unique cell per column, if the top one (true) or bottom one (false)
46087		 * should be used for sorting / title by DataTables.
46088		 * Note that this parameter will be set by the initialisation routine. To
46089		 * set a default use {@link DataTable.defaults}.
46090		 *  @type boolean
46091		 */
46092		"bSortCellsTop": null,
46093	
46094		/**
46095		 * Initialisation object that is used for the table
46096		 *  @type object
46097		 *  @default null
46098		 */
46099		"oInit": null,
46100	
46101		/**
46102		 * Destroy callback functions - for plug-ins to attach themselves to the
46103		 * destroy so they can clean up markup and events.
46104		 *  @type array
46105		 *  @default []
46106		 */
46107		"aoDestroyCallback": [],
46108	
46109	
46110		/**
46111		 * Get the number of records in the current record set, before filtering
46112		 *  @type function
46113		 */
46114		"fnRecordsTotal": function ()
46115		{
46116			return _fnDataSource( this ) == 'ssp' ?
46117				this._iRecordsTotal * 1 :
46118				this.aiDisplayMaster.length;
46119		},
46120	
46121		/**
46122		 * Get the number of records in the current record set, after filtering
46123		 *  @type function
46124		 */
46125		"fnRecordsDisplay": function ()
46126		{
46127			return _fnDataSource( this ) == 'ssp' ?
46128				this._iRecordsDisplay * 1 :
46129				this.aiDisplay.length;
46130		},
46131	
46132		/**
46133		 * Get the display end point - aiDisplay index
46134		 *  @type function
46135		 */
46136		"fnDisplayEnd": function ()
46137		{
46138			var
46139				len      = this._iDisplayLength,
46140				start    = this._iDisplayStart,
46141				calc     = start + len,
46142				records  = this.aiDisplay.length,
46143				features = this.oFeatures,
46144				paginate = features.bPaginate;
46145	
46146			if ( features.bServerSide ) {
46147				return paginate === false || len === -1 ?
46148					start + records :
46149					Math.min( start+len, this._iRecordsDisplay );
46150			}
46151			else {
46152				return ! paginate || calc>records || len===-1 ?
46153					records :
46154					calc;
46155			}
46156		},
46157	
46158		/**
46159		 * The DataTables object for this table
46160		 *  @type object
46161		 *  @default null
46162		 */
46163		"oInstance": null,
46164	
46165		/**
46166		 * Unique identifier for each instance of the DataTables object. If there
46167		 * is an ID on the table node, then it takes that value, otherwise an
46168		 * incrementing internal counter is used.
46169		 *  @type string
46170		 *  @default null
46171		 */
46172		"sInstance": null,
46173	
46174		/**
46175		 * tabindex attribute value that is added to DataTables control elements, allowing
46176		 * keyboard navigation of the table and its controls.
46177		 */
46178		"iTabIndex": 0,
46179	
46180		/**
46181		 * DIV container for the footer scrolling table if scrolling
46182		 */
46183		"nScrollHead": null,
46184	
46185		/**
46186		 * DIV container for the footer scrolling table if scrolling
46187		 */
46188		"nScrollFoot": null,
46189	
46190		/**
46191		 * Last applied sort
46192		 *  @type array
46193		 *  @default []
46194		 */
46195		"aLastSort": [],
46196	
46197		/**
46198		 * Stored plug-in instances
46199		 *  @type object
46200		 *  @default {}
46201		 */
46202		"oPlugins": {},
46203	
46204		/**
46205		 * Function used to get a row's id from the row's data
46206		 *  @type function
46207		 *  @default null
46208		 */
46209		"rowIdFn": null,
46210	
46211		/**
46212		 * Data location where to store a row's id
46213		 *  @type string
46214		 *  @default null
46215		 */
46216		"rowId": null
46217	};
46218	
46219	/**
46220	 * Extension object for DataTables that is used to provide all extension
46221	 * options.
46222	 *
46223	 * Note that the `DataTable.ext` object is available through
46224	 * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is
46225	 * also aliased to `jQuery.fn.dataTableExt` for historic reasons.
46226	 *  @namespace
46227	 *  @extends DataTable.models.ext
46228	 */
46229	
46230	
46231	/**
46232	 * DataTables extensions
46233	 * 
46234	 * This namespace acts as a collection area for plug-ins that can be used to
46235	 * extend DataTables capabilities. Indeed many of the build in methods
46236	 * use this method to provide their own capabilities (sorting methods for
46237	 * example).
46238	 *
46239	 * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy
46240	 * reasons
46241	 *
46242	 *  @namespace
46243	 */
46244	DataTable.ext = _ext = {
46245		/**
46246		 * Buttons. For use with the Buttons extension for DataTables. This is
46247		 * defined here so other extensions can define buttons regardless of load
46248		 * order. It is _not_ used by DataTables core.
46249		 *
46250		 *  @type object
46251		 *  @default {}
46252		 */
46253		buttons: {},
46254	
46255	
46256		/**
46257		 * Element class names
46258		 *
46259		 *  @type object
46260		 *  @default {}
46261		 */
46262		classes: {},
46263	
46264	
46265		/**
46266		 * DataTables build type (expanded by the download builder)
46267		 *
46268		 *  @type string
46269		 */
46270		builder: "-source-",
46271	
46272	
46273		/**
46274		 * Error reporting.
46275		 * 
46276		 * How should DataTables report an error. Can take the value 'alert',
46277		 * 'throw', 'none' or a function.
46278		 *
46279		 *  @type string|function
46280		 *  @default alert
46281		 */
46282		errMode: "alert",
46283	
46284	
46285		/**
46286		 * Feature plug-ins.
46287		 * 
46288		 * This is an array of objects which describe the feature plug-ins that are
46289		 * available to DataTables. These feature plug-ins are then available for
46290		 * use through the `dom` initialisation option.
46291		 * 
46292		 * Each feature plug-in is described by an object which must have the
46293		 * following properties:
46294		 * 
46295		 * * `fnInit` - function that is used to initialise the plug-in,
46296		 * * `cFeature` - a character so the feature can be enabled by the `dom`
46297		 *   instillation option. This is case sensitive.
46298		 *
46299		 * The `fnInit` function has the following input parameters:
46300		 *
46301		 * 1. `{object}` DataTables settings object: see
46302		 *    {@link DataTable.models.oSettings}
46303		 *
46304		 * And the following return is expected:
46305		 * 
46306		 * * {node|null} The element which contains your feature. Note that the
46307		 *   return may also be void if your plug-in does not require to inject any
46308		 *   DOM elements into DataTables control (`dom`) - for example this might
46309		 *   be useful when developing a plug-in which allows table control via
46310		 *   keyboard entry
46311		 *
46312		 *  @type array
46313		 *
46314		 *  @example
46315		 *    $.fn.dataTable.ext.features.push( {
46316		 *      "fnInit": function( oSettings ) {
46317		 *        return new TableTools( { "oDTSettings": oSettings } );
46318		 *      },
46319		 *      "cFeature": "T"
46320		 *    } );
46321		 */
46322		feature: [],
46323	
46324	
46325		/**
46326		 * Row searching.
46327		 * 
46328		 * This method of searching is complimentary to the default type based
46329		 * searching, and a lot more comprehensive as it allows you complete control
46330		 * over the searching logic. Each element in this array is a function
46331		 * (parameters described below) that is called for every row in the table,
46332		 * and your logic decides if it should be included in the searching data set
46333		 * or not.
46334		 *
46335		 * Searching functions have the following input parameters:
46336		 *
46337		 * 1. `{object}` DataTables settings object: see
46338		 *    {@link DataTable.models.oSettings}
46339		 * 2. `{array|object}` Data for the row to be processed (same as the
46340		 *    original format that was passed in as the data source, or an array
46341		 *    from a DOM data source
46342		 * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which
46343		 *    can be useful to retrieve the `TR` element if you need DOM interaction.
46344		 *
46345		 * And the following return is expected:
46346		 *
46347		 * * {boolean} Include the row in the searched result set (true) or not
46348		 *   (false)
46349		 *
46350		 * Note that as with the main search ability in DataTables, technically this
46351		 * is "filtering", since it is subtractive. However, for consistency in
46352		 * naming we call it searching here.
46353		 *
46354		 *  @type array
46355		 *  @default []
46356		 *
46357		 *  @example
46358		 *    // The following example shows custom search being applied to the
46359		 *    // fourth column (i.e. the data[3] index) based on two input values
46360		 *    // from the end-user, matching the data in a certain range.
46361		 *    $.fn.dataTable.ext.search.push(
46362		 *      function( settings, data, dataIndex ) {
46363		 *        var min = document.getElementById('min').value * 1;
46364		 *        var max = document.getElementById('max').value * 1;
46365		 *        var version = data[3] == "-" ? 0 : data[3]*1;
46366		 *
46367		 *        if ( min == "" && max == "" ) {
46368		 *          return true;
46369		 *        }
46370		 *        else if ( min == "" && version < max ) {
46371		 *          return true;
46372		 *        }
46373		 *        else if ( min < version && "" == max ) {
46374		 *          return true;
46375		 *        }
46376		 *        else if ( min < version && version < max ) {
46377		 *          return true;
46378		 *        }
46379		 *        return false;
46380		 *      }
46381		 *    );
46382		 */
46383		search: [],
46384	
46385	
46386		/**
46387		 * Selector extensions
46388		 *
46389		 * The `selector` option can be used to extend the options available for the
46390		 * selector modifier options (`selector-modifier` object data type) that
46391		 * each of the three built in selector types offer (row, column and cell +
46392		 * their plural counterparts). For example the Select extension uses this
46393		 * mechanism to provide an option to select only rows, columns and cells
46394		 * that have been marked as selected by the end user (`{selected: true}`),
46395		 * which can be used in conjunction with the existing built in selector
46396		 * options.
46397		 *
46398		 * Each property is an array to which functions can be pushed. The functions
46399		 * take three attributes:
46400		 *
46401		 * * Settings object for the host table
46402		 * * Options object (`selector-modifier` object type)
46403		 * * Array of selected item indexes
46404		 *
46405		 * The return is an array of the resulting item indexes after the custom
46406		 * selector has been applied.
46407		 *
46408		 *  @type object
46409		 */
46410		selector: {
46411			cell: [],
46412			column: [],
46413			row: []
46414		},
46415	
46416	
46417		/**
46418		 * Internal functions, exposed for used in plug-ins.
46419		 * 
46420		 * Please note that you should not need to use the internal methods for
46421		 * anything other than a plug-in (and even then, try to avoid if possible).
46422		 * The internal function may change between releases.
46423		 *
46424		 *  @type object
46425		 *  @default {}
46426		 */
46427		internal: {},
46428	
46429	
46430		/**
46431		 * Legacy configuration options. Enable and disable legacy options that
46432		 * are available in DataTables.
46433		 *
46434		 *  @type object
46435		 */
46436		legacy: {
46437			/**
46438			 * Enable / disable DataTables 1.9 compatible server-side processing
46439			 * requests
46440			 *
46441			 *  @type boolean
46442			 *  @default null
46443			 */
46444			ajax: null
46445		},
46446	
46447	
46448		/**
46449		 * Pagination plug-in methods.
46450		 * 
46451		 * Each entry in this object is a function and defines which buttons should
46452		 * be shown by the pagination rendering method that is used for the table:
46453		 * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the
46454		 * buttons are displayed in the document, while the functions here tell it
46455		 * what buttons to display. This is done by returning an array of button
46456		 * descriptions (what each button will do).
46457		 *
46458		 * Pagination types (the four built in options and any additional plug-in
46459		 * options defined here) can be used through the `paginationType`
46460		 * initialisation parameter.
46461		 *
46462		 * The functions defined take two parameters:
46463		 *
46464		 * 1. `{int} page` The current page index
46465		 * 2. `{int} pages` The number of pages in the table
46466		 *
46467		 * Each function is expected to return an array where each element of the
46468		 * array can be one of:
46469		 *
46470		 * * `first` - Jump to first page when activated
46471		 * * `last` - Jump to last page when activated
46472		 * * `previous` - Show previous page when activated
46473		 * * `next` - Show next page when activated
46474		 * * `{int}` - Show page of the index given
46475		 * * `{array}` - A nested array containing the above elements to add a
46476		 *   containing 'DIV' element (might be useful for styling).
46477		 *
46478		 * Note that DataTables v1.9- used this object slightly differently whereby
46479		 * an object with two functions would be defined for each plug-in. That
46480		 * ability is still supported by DataTables 1.10+ to provide backwards
46481		 * compatibility, but this option of use is now decremented and no longer
46482		 * documented in DataTables 1.10+.
46483		 *
46484		 *  @type object
46485		 *  @default {}
46486		 *
46487		 *  @example
46488		 *    // Show previous, next and current page buttons only
46489		 *    $.fn.dataTableExt.oPagination.current = function ( page, pages ) {
46490		 *      return [ 'previous', page, 'next' ];
46491		 *    };
46492		 */
46493		pager: {},
46494	
46495	
46496		renderer: {
46497			pageButton: {},
46498			header: {}
46499		},
46500	
46501	
46502		/**
46503		 * Ordering plug-ins - custom data source
46504		 * 
46505		 * The extension options for ordering of data available here is complimentary
46506		 * to the default type based ordering that DataTables typically uses. It
46507		 * allows much greater control over the the data that is being used to
46508		 * order a column, but is necessarily therefore more complex.
46509		 * 
46510		 * This type of ordering is useful if you want to do ordering based on data
46511		 * live from the DOM (for example the contents of an 'input' element) rather
46512		 * than just the static string that DataTables knows of.
46513		 * 
46514		 * The way these plug-ins work is that you create an array of the values you
46515		 * wish to be ordering for the column in question and then return that
46516		 * array. The data in the array much be in the index order of the rows in
46517		 * the table (not the currently ordering order!). Which order data gathering
46518		 * function is run here depends on the `dt-init columns.orderDataType`
46519		 * parameter that is used for the column (if any).
46520		 *
46521		 * The functions defined take two parameters:
46522		 *
46523		 * 1. `{object}` DataTables settings object: see
46524		 *    {@link DataTable.models.oSettings}
46525		 * 2. `{int}` Target column index
46526		 *
46527		 * Each function is expected to return an array:
46528		 *
46529		 * * `{array}` Data for the column to be ordering upon
46530		 *
46531		 *  @type array
46532		 *
46533		 *  @example
46534		 *    // Ordering using `input` node values
46535		 *    $.fn.dataTable.ext.order['dom-text'] = function  ( settings, col )
46536		 *    {
46537		 *      return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
46538		 *        return $('input', td).val();
46539		 *      } );
46540		 *    }
46541		 */
46542		order: {},
46543	
46544	
46545		/**
46546		 * Type based plug-ins.
46547		 *
46548		 * Each column in DataTables has a type assigned to it, either by automatic
46549		 * detection or by direct assignment using the `type` option for the column.
46550		 * The type of a column will effect how it is ordering and search (plug-ins
46551		 * can also make use of the column type if required).
46552		 *
46553		 * @namespace
46554		 */
46555		type: {
46556			/**
46557			 * Type detection functions.
46558			 *
46559			 * The functions defined in this object are used to automatically detect
46560			 * a column's type, making initialisation of DataTables super easy, even
46561			 * when complex data is in the table.
46562			 *
46563			 * The functions defined take two parameters:
46564			 *
46565		     *  1. `{*}` Data from the column cell to be analysed
46566		     *  2. `{settings}` DataTables settings object. This can be used to
46567		     *     perform context specific type detection - for example detection
46568		     *     based on language settings such as using a comma for a decimal
46569		     *     place. Generally speaking the options from the settings will not
46570		     *     be required
46571			 *
46572			 * Each function is expected to return:
46573			 *
46574			 * * `{string|null}` Data type detected, or null if unknown (and thus
46575			 *   pass it on to the other type detection functions.
46576			 *
46577			 *  @type array
46578			 *
46579			 *  @example
46580			 *    // Currency type detection plug-in:
46581			 *    $.fn.dataTable.ext.type.detect.push(
46582			 *      function ( data, settings ) {
46583			 *        // Check the numeric part
46584			 *        if ( ! data.substring(1).match(/[0-9]/) ) {
46585			 *          return null;
46586			 *        }
46587			 *
46588			 *        // Check prefixed by currency
46589			 *        if ( data.charAt(0) == '$' || data.charAt(0) == '&pound;' ) {
46590			 *          return 'currency';
46591			 *        }
46592			 *        return null;
46593			 *      }
46594			 *    );
46595			 */
46596			detect: [],
46597	
46598	
46599			/**
46600			 * Type based search formatting.
46601			 *
46602			 * The type based searching functions can be used to pre-format the
46603			 * data to be search on. For example, it can be used to strip HTML
46604			 * tags or to de-format telephone numbers for numeric only searching.
46605			 *
46606			 * Note that is a search is not defined for a column of a given type,
46607			 * no search formatting will be performed.
46608			 * 
46609			 * Pre-processing of searching data plug-ins - When you assign the sType
46610			 * for a column (or have it automatically detected for you by DataTables
46611			 * or a type detection plug-in), you will typically be using this for
46612			 * custom sorting, but it can also be used to provide custom searching
46613			 * by allowing you to pre-processing the data and returning the data in
46614			 * the format that should be searched upon. This is done by adding
46615			 * functions this object with a parameter name which matches the sType
46616			 * for that target column. This is the corollary of <i>afnSortData</i>
46617			 * for searching data.
46618			 *
46619			 * The functions defined take a single parameter:
46620			 *
46621		     *  1. `{*}` Data from the column cell to be prepared for searching
46622			 *
46623			 * Each function is expected to return:
46624			 *
46625			 * * `{string|null}` Formatted string that will be used for the searching.
46626			 *
46627			 *  @type object
46628			 *  @default {}
46629			 *
46630			 *  @example
46631			 *    $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {
46632			 *      return d.replace(/\n/g," ").replace( /<.*?>/g, "" );
46633			 *    }
46634			 */
46635			search: {},
46636	
46637	
46638			/**
46639			 * Type based ordering.
46640			 *
46641			 * The column type tells DataTables what ordering to apply to the table
46642			 * when a column is sorted upon. The order for each type that is defined,
46643			 * is defined by the functions available in this object.
46644			 *
46645			 * Each ordering option can be described by three properties added to
46646			 * this object:
46647			 *
46648			 * * `{type}-pre` - Pre-formatting function
46649			 * * `{type}-asc` - Ascending order function
46650			 * * `{type}-desc` - Descending order function
46651			 *
46652			 * All three can be used together, only `{type}-pre` or only
46653			 * `{type}-asc` and `{type}-desc` together. It is generally recommended
46654			 * that only `{type}-pre` is used, as this provides the optimal
46655			 * implementation in terms of speed, although the others are provided
46656			 * for compatibility with existing Javascript sort functions.
46657			 *
46658			 * `{type}-pre`: Functions defined take a single parameter:
46659			 *
46660		     *  1. `{*}` Data from the column cell to be prepared for ordering
46661			 *
46662			 * And return:
46663			 *
46664			 * * `{*}` Data to be sorted upon
46665			 *
46666			 * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort
46667			 * functions, taking two parameters:
46668			 *
46669		     *  1. `{*}` Data to compare to the second parameter
46670		     *  2. `{*}` Data to compare to the first parameter
46671			 *
46672			 * And returning:
46673			 *
46674			 * * `{*}` Ordering match: <0 if first parameter should be sorted lower
46675			 *   than the second parameter, ===0 if the two parameters are equal and
46676			 *   >0 if the first parameter should be sorted height than the second
46677			 *   parameter.
46678			 * 
46679			 *  @type object
46680			 *  @default {}
46681			 *
46682			 *  @example
46683			 *    // Numeric ordering of formatted numbers with a pre-formatter
46684			 *    $.extend( $.fn.dataTable.ext.type.order, {
46685			 *      "string-pre": function(x) {
46686			 *        a = (a === "-" || a === "") ? 0 : a.replace( /[^\d\-\.]/g, "" );
46687			 *        return parseFloat( a );
46688			 *      }
46689			 *    } );
46690			 *
46691			 *  @example
46692			 *    // Case-sensitive string ordering, with no pre-formatting method
46693			 *    $.extend( $.fn.dataTable.ext.order, {
46694			 *      "string-case-asc": function(x,y) {
46695			 *        return ((x < y) ? -1 : ((x > y) ? 1 : 0));
46696			 *      },
46697			 *      "string-case-desc": function(x,y) {
46698			 *        return ((x < y) ? 1 : ((x > y) ? -1 : 0));
46699			 *      }
46700			 *    } );
46701			 */
46702			order: {}
46703		},
46704	
46705		/**
46706		 * Unique DataTables instance counter
46707		 *
46708		 * @type int
46709		 * @private
46710		 */
46711		_unique: 0,
46712	
46713	
46714		//
46715		// Depreciated
46716		// The following properties are retained for backwards compatibility only.
46717		// The should not be used in new projects and will be removed in a future
46718		// version
46719		//
46720	
46721		/**
46722		 * Version check function.
46723		 *  @type function
46724		 *  @depreciated Since 1.10
46725		 */
46726		fnVersionCheck: DataTable.fnVersionCheck,
46727	
46728	
46729		/**
46730		 * Index for what 'this' index API functions should use
46731		 *  @type int
46732		 *  @deprecated Since v1.10
46733		 */
46734		iApiIndex: 0,
46735	
46736	
46737		/**
46738		 * jQuery UI class container
46739		 *  @type object
46740		 *  @deprecated Since v1.10
46741		 */
46742		oJUIClasses: {},
46743	
46744	
46745		/**
46746		 * Software version
46747		 *  @type string
46748		 *  @deprecated Since v1.10
46749		 */
46750		sVersion: DataTable.version
46751	};
46752	
46753	
46754	//
46755	// Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts
46756	//
46757	$.extend( _ext, {
46758		afnFiltering: _ext.search,
46759		aTypes:       _ext.type.detect,
46760		ofnSearch:    _ext.type.search,
46761		oSort:        _ext.type.order,
46762		afnSortData:  _ext.order,
46763		aoFeatures:   _ext.feature,
46764		oApi:         _ext.internal,
46765		oStdClasses:  _ext.classes,
46766		oPagination:  _ext.pager
46767	} );
46768	
46769	
46770	$.extend( DataTable.ext.classes, {
46771		"sTable": "dataTable",
46772		"sNoFooter": "no-footer",
46773	
46774		/* Paging buttons */
46775		"sPageButton": "paginate_button",
46776		"sPageButtonActive": "current",
46777		"sPageButtonDisabled": "disabled",
46778	
46779		/* Striping classes */
46780		"sStripeOdd": "odd",
46781		"sStripeEven": "even",
46782	
46783		/* Empty row */
46784		"sRowEmpty": "dataTables_empty",
46785	
46786		/* Features */
46787		"sWrapper": "dataTables_wrapper",
46788		"sFilter": "dataTables_filter",
46789		"sInfo": "dataTables_info",
46790		"sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
46791		"sLength": "dataTables_length",
46792		"sProcessing": "dataTables_processing",
46793	
46794		/* Sorting */
46795		"sSortAsc": "sorting_asc",
46796		"sSortDesc": "sorting_desc",
46797		"sSortable": "sorting", /* Sortable in both directions */
46798		"sSortableAsc": "sorting_desc_disabled",
46799		"sSortableDesc": "sorting_asc_disabled",
46800		"sSortableNone": "sorting_disabled",
46801		"sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
46802	
46803		/* Filtering */
46804		"sFilterInput": "",
46805	
46806		/* Page length */
46807		"sLengthSelect": "",
46808	
46809		/* Scrolling */
46810		"sScrollWrapper": "dataTables_scroll",
46811		"sScrollHead": "dataTables_scrollHead",
46812		"sScrollHeadInner": "dataTables_scrollHeadInner",
46813		"sScrollBody": "dataTables_scrollBody",
46814		"sScrollFoot": "dataTables_scrollFoot",
46815		"sScrollFootInner": "dataTables_scrollFootInner",
46816	
46817		/* Misc */
46818		"sHeaderTH": "",
46819		"sFooterTH": "",
46820	
46821		// Deprecated
46822		"sSortJUIAsc": "",
46823		"sSortJUIDesc": "",
46824		"sSortJUI": "",
46825		"sSortJUIAscAllowed": "",
46826		"sSortJUIDescAllowed": "",
46827		"sSortJUIWrapper": "",
46828		"sSortIcon": "",
46829		"sJUIHeader": "",
46830		"sJUIFooter": ""
46831	} );
46832	
46833	
46834	var extPagination = DataTable.ext.pager;
46835	
46836	function _numbers ( page, pages ) {
46837		var
46838			numbers = [],
46839			buttons = extPagination.numbers_length,
46840			half = Math.floor( buttons / 2 ),
46841			i = 1;
46842	
46843		if ( pages <= buttons ) {
46844			numbers = _range( 0, pages );
46845		}
46846		else if ( page <= half ) {
46847			numbers = _range( 0, buttons-2 );
46848			numbers.push( 'ellipsis' );
46849			numbers.push( pages-1 );
46850		}
46851		else if ( page >= pages - 1 - half ) {
46852			numbers = _range( pages-(buttons-2), pages );
46853			numbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6
46854			numbers.splice( 0, 0, 0 );
46855		}
46856		else {
46857			numbers = _range( page-half+2, page+half-1 );
46858			numbers.push( 'ellipsis' );
46859			numbers.push( pages-1 );
46860			numbers.splice( 0, 0, 'ellipsis' );
46861			numbers.splice( 0, 0, 0 );
46862		}
46863	
46864		numbers.DT_el = 'span';
46865		return numbers;
46866	}
46867	
46868	
46869	$.extend( extPagination, {
46870		simple: function ( page, pages ) {
46871			return [ 'previous', 'next' ];
46872		},
46873	
46874		full: function ( page, pages ) {
46875			return [  'first', 'previous', 'next', 'last' ];
46876		},
46877	
46878		numbers: function ( page, pages ) {
46879			return [ _numbers(page, pages) ];
46880		},
46881	
46882		simple_numbers: function ( page, pages ) {
46883			return [ 'previous', _numbers(page, pages), 'next' ];
46884		},
46885	
46886		full_numbers: function ( page, pages ) {
46887			return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];
46888		},
46889		
46890		first_last_numbers: function (page, pages) {
46891	 		return ['first', _numbers(page, pages), 'last'];
46892	 	},
46893	
46894		// For testing and plug-ins to use
46895		_numbers: _numbers,
46896	
46897		// Number of number buttons (including ellipsis) to show. _Must be odd!_
46898		numbers_length: 7
46899	} );
46900	
46901	
46902	$.extend( true, DataTable.ext.renderer, {
46903		pageButton: {
46904			_: function ( settings, host, idx, buttons, page, pages ) {
46905				var classes = settings.oClasses;
46906				var lang = settings.oLanguage.oPaginate;
46907				var aria = settings.oLanguage.oAria.paginate || {};
46908				var btnDisplay, btnClass;
46909	
46910				var attach = function( container, buttons ) {
46911					var i, ien, node, button
46911;
46912					var disabledClass = classes.sPageButtonDisabled;
46913					var clickHandler = function ( e ) {
46914						_fnPageChange( settings, e.data.action, true );
46915					};
46916	
46917					for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
46918						button = buttons[i];
46919	
46920						if ( Array.isArray( button ) ) {
46921							var inner = $( '<'+(button.DT_el || 'div')+'/>' )
46922								.appendTo( container );
46923							attach( inner, button );
46924						}
46925						else {
46926							var disabled = false;
46927	
46928							btnDisplay = null;
46929							btnClass = button;
46930	
46931							switch ( button ) {
46932								case 'ellipsis':
46933									container.append('<span class="ellipsis">&#x2026;</span>');
46934									break;
46935	
46936								case 'first':
46937									btnDisplay = lang.sFirst;
46938	
46939									if ( page === 0 ) {
46940										disabled = true;
46941									}
46942									break;
46943	
46944								case 'previous':
46945									btnDisplay = lang.sPrevious;
46946	
46947									if ( page === 0 ) {
46948										disabled = true;
46949									}
46950									break;
46951	
46952								case 'next':
46953									btnDisplay = lang.sNext;
46954	
46955									if ( pages === 0 || page === pages-1 ) {
46956										disabled = true;
46957									}
46958									break;
46959	
46960								case 'last':
46961									btnDisplay = lang.sLast;
46962	
46963									if ( pages === 0 || page === pages-1 ) {
46964										disabled = true;
46965									}
46966									break;
46967	
46968								default:
46969									btnDisplay = settings.fnFormatNumber( button + 1 );
46970									btnClass = page === button ?
46971										classes.sPageButtonActive : '';
46972									break;
46973							}
46974	
46975							if ( btnDisplay !== null ) {
46976								var tag = settings.oInit.pagingTag || 'a';
46977	
46978								if (disabled) {
46979									btnClass += ' ' + disabledClass;
46980								}
46981	
46982								node = $('<'+tag+'>', {
46983										'class': classes.sPageButton+' '+btnClass,
46984										'aria-controls': settings.sTableId,
46985										'aria-disabled': disabled ? 'true' : null,
46986										'aria-label': aria[ button ],
46987										'role': 'link',
46988										'aria-current': btnClass === classes.sPageButtonActive ? 'page' : null,
46989										'data-dt-idx': button,
46990										'tabindex': disabled ? -1 : settings.iTabIndex,
46991										'id': idx === 0 && typeof button === 'string' ?
46992											settings.sTableId +'_'+ button :
46993											null
46994									} )
46995									.html( btnDisplay )
46996									.appendTo( container );
46997	
46998								_fnBindAction(
46999									node, {action: button}, clickHandler
47000								);
47001							}
47002						}
47003					}
47004				};
47005	
47006				// IE9 throws an 'unknown error' if document.activeElement is used
47007				// inside an iframe or frame. Try / catch the error. Not good for
47008				// accessibility, but neither are frames.
47009				var activeEl;
47010	
47011				try {
47012					// Because this approach is destroying and recreating the paging
47013					// elements, focus is lost on the select button which is bad for
47014					// accessibility. So we want to restore focus once the draw has
47015					// completed
47016					activeEl = $(host).find(document.activeElement).data('dt-idx');
47017				}
47018				catch (e) {}
47019	
47020				attach( $(host).empty(), buttons );
47021	
47022				if ( activeEl !== undefined ) {
47023					$(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
47024				}
47025			}
47026		}
47027	} );
47028	
47029	
47030	
47031	// Built in type detection. See model.ext.aTypes for information about
47032	// what is required from this methods.
47033	$.extend( DataTable.ext.type.detect, [
vendor: 4,436 bytes, lines 47034-47207
47034		// Plain numbers - first since V8 detects some plain numbers as dates
47035		// e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...).
47036		function ( d, settings )
47037		{
47038			var decimal = settings.oLanguage.sDecimal;
47039			return _isNumber( d, decimal ) ? 'num'+decimal : null;
47040		},
47041	
47042		// Dates (only those recognised by the browser's Date.parse)
47043		function ( d, settings )
47044		{
47045			// V8 tries _very_ hard to make a string passed into `Date.parse()`
47046			// valid, so we need to use a regex to restrict date formats. Use a
47047			// plug-in for anything other than ISO8601 style strings
47048			if ( d && !(d instanceof Date) && ! _re_date.test(d) ) {
47049				return null;
47050			}
47051			var parsed = Date.parse(d);
47052			return (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null;
47053		},
47054	
47055		// Formatted numbers
47056		function ( d, settings )
47057		{
47058			var decimal = settings.oLanguage.sDecimal;
47059			return _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null;
47060		},
47061	
47062		// HTML numeric
47063		function ( d, settings )
47064		{
47065			var decimal = settings.oLanguage.sDecimal;
47066			return _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null;
47067		},
47068	
47069		// HTML numeric, formatted
47070		function ( d, settings )
47071		{
47072			var decimal = settings.oLanguage.sDecimal;
47073			return _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null;
47074		},
47075	
47076		// HTML (this is strict checking - there must be html)
47077		function ( d, settings )
47078		{
47079			return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ?
47080				'html' : null;
47081		}
47082	] );
47083	
47084	
47085	
47086	// Filter formatting functions. See model.ext.ofnSearch for information about
47087	// what is required from these methods.
47088	// 
47089	// Note that additional search methods are added for the html numbers and
47090	// html formatted numbers by `_addNumericSort()` when we know what the decimal
47091	// place is
47092	
47093	
47094	$.extend( DataTable.ext.type.search, {
47095		html: function ( data ) {
47096			return _empty(data) ?
47097				data :
47098				typeof data === 'string' ?
47099					data
47100						.replace( _re_new_lines, " " )
47101						.replace( _re_html, "" ) :
47102					'';
47103		},
47104	
47105		string: function ( data ) {
47106			return _empty(data) ?
47107				data :
47108				typeof data === 'string' ?
47109					data.replace( _re_new_lines, " " ) :
47110					data;
47111		}
47112	} );
47113	
47114	
47115	
47116	var __numericReplace = function ( d, decimalPlace, re1, re2 ) {
47117		if ( d !== 0 && (!d || d === '-') ) {
47118			return -Infinity;
47119		}
47120		
47121		var type = typeof d;
47122	
47123		if (type === 'number' || type === 'bigint') {
47124			return d;
47125		}
47126	
47127		// If a decimal place other than `.` is used, it needs to be given to the
47128		// function so we can detect it and replace with a `.` which is the only
47129		// decimal place Javascript recognises - it is not locale aware.
47130		if ( decimalPlace ) {
47131			d = _numToDecimal( d, decimalPlace );
47132		}
47133	
47134		if ( d.replace ) {
47135			if ( re1 ) {
47136				d = d.replace( re1, '' );
47137			}
47138	
47139			if ( re2 ) {
47140				d = d.replace( re2, '' );
47141			}
47142		}
47143	
47144		return d * 1;
47145	};
47146	
47147	
47148	// Add the numeric 'deformatting' functions for sorting and search. This is done
47149	// in a function to provide an easy ability for the language options to add
47150	// additional methods if a non-period decimal place is used.
47151	function _addNumericSort ( decimalPlace ) {
47152		$.each(
47153			{
47154				// Plain numbers
47155				"num": function ( d ) {
47156					return __numericReplace( d, decimalPlace );
47157				},
47158	
47159				// Formatted numbers
47160				"num-fmt": function ( d ) {
47161					return __numericReplace( d, decimalPlace, _re_formatted_numeric );
47162				},
47163	
47164				// HTML numeric
47165				"html-num": function ( d ) {
47166					return __numericReplace( d, decimalPlace, _re_html );
47167				},
47168	
47169				// HTML numeric, formatted
47170				"html-num-fmt": function ( d ) {
47171					return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );
47172				}
47173			},
47174			function ( key, fn ) {
47175				// Add the ordering method
47176				_ext.type.order[ key+decimalPlace+'-pre' ] = fn;
47177	
47178				// For HTML types add a search formatter that will strip the HTML
47179				if ( key.match(/^html\-/) ) {
47180					_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;
47181				}
47182			}
47183		);
47184	}
47185	
47186	
47187	// Default sort methods
47188	$.extend( _ext.type.order, {
47189		// Dates
47190		"date-pre": function ( d ) {
47191			var ts = Date.parse( d );
47192			return isNaN(ts) ? -Infinity : ts;
47193		},
47194	
47195		// html
47196		"html-pre": function ( a ) {
47197			return _empty(a) ?
47198				'' :
47199				a.replace ?
47200					a.replace( /<.*?>/g, "" ).toLowerCase() :
47201					a+'';
47202		},
47203	
47204		// string
47205		"string-pre": function ( a ) {
47206			// This is a little complex, but faster than always calling toString,
47207			// https
vendor: 15,860 bytes, lines 47207-47775
47207://jsperf.com/tostring-v-check
47208			return _empty(a) ?
47209				'' :
47210				typeof a === 'string' ?
47211					a.toLowerCase() :
47212					! a.toString ?
47213						'' :
47214						a.toString();
47215		},
47216	
47217		// string-asc and -desc are retained only for compatibility with the old
47218		// sort methods
47219		"string-asc": function ( x, y ) {
47220			return ((x < y) ? -1 : ((x > y) ? 1 : 0));
47221		},
47222	
47223		"string-desc": function ( x, y ) {
47224			return ((x < y) ? 1 : ((x > y) ? -1 : 0));
47225		}
47226	} );
47227	
47228	
47229	// Numeric sorting types - order doesn't matter here
47230	_addNumericSort( '' );
47231	
47232	
47233	$.extend( true, DataTable.ext.renderer, {
47234		header: {
47235			_: function ( settings, cell, column, classes ) {
47236				// No additional mark-up required
47237				// Attach a sort listener to update on sort - note that using the
47238				// `DT` namespace will allow the event to be removed automatically
47239				// on destroy, while the `dt` namespaced event is the one we are
47240				// listening for
47241				$(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
47242					if ( settings !== ctx ) { // need to check this this is the host
47243						return;               // table, not a nested one
47244					}
47245	
47246					var colIdx = column.idx;
47247	
47248					cell
47249						.removeClass(
47250							classes.sSortAsc +' '+
47251							classes.sSortDesc
47252						)
47253						.addClass( columns[ colIdx ] == 'asc' ?
47254							classes.sSortAsc : columns[ colIdx ] == 'desc' ?
47255								classes.sSortDesc :
47256								column.sSortingClass
47257						);
47258				} );
47259			},
47260	
47261			jqueryui: function ( settings, cell, column, classes ) {
47262				$('<div/>')
47263					.addClass( classes.sSortJUIWrapper )
47264					.append( cell.contents() )
47265					.append( $('<span/>')
47266						.addClass( classes.sSortIcon+' '+column.sSortingClassJUI )
47267					)
47268					.appendTo( cell );
47269	
47270				// Attach a sort listener to update on sort
47271				$(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
47272					if ( settings !== ctx ) {
47273						return;
47274					}
47275	
47276					var colIdx = column.idx;
47277	
47278					cell
47279						.removeClass( classes.sSortAsc +" "+classes.sSortDesc )
47280						.addClass( columns[ colIdx ] == 'asc' ?
47281							classes.sSortAsc : columns[ colIdx ] == 'desc' ?
47282								classes.sSortDesc :
47283								column.sSortingClass
47284						);
47285	
47286					cell
47287						.find( 'span.'+classes.sSortIcon )
47288						.removeClass(
47289							classes.sSortJUIAsc +" "+
47290							classes.sSortJUIDesc +" "+
47291							classes.sSortJUI +" "+
47292							classes.sSortJUIAscAllowed +" "+
47293							classes.sSortJUIDescAllowed
47294						)
47295						.addClass( columns[ colIdx ] == 'asc' ?
47296							classes.sSortJUIAsc : columns[ colIdx ] == 'desc' ?
47297								classes.sSortJUIDesc :
47298								column.sSortingClassJUI
47299						);
47300				} );
47301			}
47302		}
47303	} );
47304	
47305	/*
47306	 * Public helper functions. These aren't used internally by DataTables, or
47307	 * called by any of the options passed into DataTables, but they can be used
47308	 * externally by developers working with DataTables. They are helper functions
47309	 * to make working with DataTables a little bit easier.
47310	 */
47311	
47312	var __htmlEscapeEntities = function ( d ) {
47313		if (Array.isArray(d)) {
47314			d = d.join(',');
47315		}
47316	
47317		return typeof d === 'string' ?
47318			d
47319				.replace(/&/g, '&amp;')
47320				.replace(/</g, '&lt;')
47321				.replace(/>/g, '&gt;')
47322				.replace(/"/g, '&quot;') :
47323			d;
47324	};
47325	
47326	// Common logic for moment, luxon or a date action
47327	function __mld( dt, momentFn, luxonFn, dateFn, arg1 ) {
47328		if (window.moment) {
47329			return dt[momentFn]( arg1 );
47330		}
47331		else if (window.luxon) {
47332			return dt[luxonFn]( arg1 );
47333		}
47334		
47335		return dateFn ? dt[dateFn]( arg1 ) : dt;
47336	}
47337	
47338	
47339	var __mlWarning = false;
47340	function __mldObj (d, format, locale) {
47341		var dt;
47342	
47343		if (window.moment) {
47344			dt = window.moment.utc( d, format, locale, true );
47345	
47346			if (! dt.isValid()) {
47347				return null;
47348			}
47349		}
47350		else if (window.luxon) {
47351			dt = format && typeof d === 'string'
47352				? window.luxon.DateTime.fromFormat( d, format )
47353				: window.luxon.DateTime.fromISO( d );
47354	
47355			if (! dt.isValid) {
47356				return null;
47357			}
47358	
47359			dt.setLocale(locale);
47360		}
47361		else if (! format) {
47362			// No format given, must be ISO
47363			dt = new Date(d);
47364		}
47365		else {
47366			if (! __mlWarning) {
47367				alert('DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17');
47368			}
47369	
47370			__mlWarning = true;
47371		}
47372	
47373		return dt;
47374	}
47375	
47376	// Wrapper for date, datetime and time which all operate the same way with the exception of
47377	// the output string for auto locale support
47378	function __mlHelper (localeString) {
47379		return function ( from, to, locale, def ) {
47380			// Luxon and Moment support
47381			// Argument shifting
47382			if ( arguments.length === 0 ) {
47383				locale = 'en';
47384				to = null; // means toLocaleString
47385				from = null; // means iso8601
47386			}
47387			else if ( arguments.length === 1 ) {
47388				locale = 'en';
47389				to = from;
47390				from = null;
47391			}
47392			else if ( arguments.length === 2 ) {
47393				locale = to;
47394				to = from;
47395				from = null;
47396			}
47397	
47398			var typeName = 'datetime-' + to;
47399	
47400			// Add type detection and sorting specific to this date format - we need to be able to identify
47401			// date type columns as such, rather than as numbers in extensions. Hence the need for this.
47402			if (! DataTable.ext.type.order[typeName]) {
47403				// The renderer will give the value to type detect as the type!
47404				DataTable.ext.type.detect.unshift(function (d) {
47405					return d === typeName ? typeName : false;
47406				});
47407	
47408				// The renderer gives us Moment, Luxon or Date obects for the sorting, all of which have a
47409				// `valueOf` which gives milliseconds epoch
47410				DataTable.ext.type.order[typeName + '-asc'] = function (a, b) {
47411					var x = a.valueOf();
47412					var y = b.valueOf();
47413	
47414					return x === y
47415						? 0
47416						: x < y
47417							? -1
47418							: 1;
47419				}
47420	
47421				DataTable.ext.type.order[typeName + '-desc'] = function (a, b) {
47422					var x = a.valueOf();
47423					var y = b.valueOf();
47424	
47425					return x === y
47426						? 0
47427						: x > y
47428							? -1
47429							: 1;
47430				}
47431			}
47432		
47433			return function ( d, type ) {
47434				// Allow for a default value
47435				if (d === null || d === undefined) {
47436					if (def === '--now') {
47437						// We treat everything as UTC further down, so no changes are
47438						// made, as such need to get the local date / time as if it were
47439						// UTC
47440						var local = new Date();
47441						d = new Date( Date.UTC(
47442							local.getFullYear(), local.getMonth(), local.getDate(),
47443							local.getHours(), local.getMinutes(), local.getSeconds()
47444						) );
47445					}
47446					else {
47447						d = '';
47448					}
47449				}
47450	
47451				if (type === 'type') {
47452					// Typing uses the type name for fast matching
47453					return typeName;
47454				}
47455	
47456				if (d === '') {
47457					return type !== 'sort'
47458						? ''
47459						: __mldObj('0000-01-01 00:00:00', null, locale);
47460				}
47461	
47462				// Shortcut. If `from` and `to` are the same, we are using the renderer to
47463				// format for ordering, not display - its already in the display format.
47464				if ( to !== null && from === to && type !== 'sort' && type !== 'type' && ! (d instanceof Date) ) {
47465					return d;
47466				}
47467	
47468				var dt = __mldObj(d, from, locale);
47469	
47470				if (dt === null) {
47471					return d;
47472				}
47473	
47474				if (type === 'sort') {
47475					return dt;
47476				}
47477				
47478				var formatted = to === null
47479					? __mld(dt, 'toDate', 'toJSDate', '')[localeString]()
47480					: __mld(dt, 'format', 'toFormat', 'toISOString', to);
47481	
47482				// XSS protection
47483				return type === 'display' ?
47484					__htmlEscapeEntities( formatted ) :
47485					formatted;
47486			};
47487		}
47488	}
47489	
47490	// Based on locale, determine standard number formatting
47491	// Fallback for legacy browsers is US English
47492	var __thousands = ',';
47493	var __decimal = '.';
47494	
47495	if (window.Intl !== undefined) {
47496		try {
47497			var num = new Intl.NumberFormat().formatToParts(100000.1);
47498		
47499			for (var i=0 ; i<num.length ; i++) {
47500				if (num[i].type === 'group') {
47501					__thousands = num[i].value;
47502				}
47503				else if (num[i].type === 'decimal') {
47504					__decimal = num[i].value;
47505				}
47506			}
47507		}
47508		catch (e) {
47509			// noop
47510		}
47511	}
47512	
47513	// Formatted date time detection - use by declaring the formats you are going to use
47514	DataTable.datetime = function ( format, locale ) {
47515		var typeName = 'datetime-detect-' + format;
47516	
47517		if (! locale) {
47518			locale = 'en';
47519		}
47520	
47521		if (! DataTable.ext.type.order[typeName]) {
47522			DataTable.ext.type.detect.unshift(function (d) {
47523				var dt = __mldObj(d, format, locale);
47524				return d === '' || dt ? typeName : false;
47525			});
47526	
47527			DataTable.ext.type.order[typeName + '-pre'] = function (d) {
47528				return __mldObj(d, format, locale) || 0;
47529			}
47530		}
47531	}
47532	
47533	/**
47534	 * Helpers for `columns.render`.
47535	 *
47536	 * The options defined here can be used with the `columns.render` initialisation
47537	 * option to provide a display renderer. The following functions are defined:
47538	 *
47539	 * * `number` - Will format numeric data (defined by `columns.data`) for
47540	 *   display, retaining the original unformatted data for sorting and filtering.
47541	 *   It takes 5 parameters:
47542	 *   * `string` - Thousands grouping separator
47543	 *   * `string` - Decimal point indicator
47544	 *   * `integer` - Number of decimal points to show
47545	 *   * `string` (optional) - Prefix.
47546	 *   * `string` (optional) - Postfix (/suffix).
47547	 * * `text` - Escape HTML to help prevent XSS attacks. It has no optional
47548	 *   parameters.
47549	 *
47550	 * @example
47551	 *   // Column definition using the number renderer
47552	 *   {
47553	 *     data: "salary",
47554	 *     render: $.fn.dataTable.render.number( '\'', '.', 0, '$' )
47555	 *   }
47556	 *
47557	 * @namespace
47558	 */
47559	DataTable.render = {
47560		date: __mlHelper('toLocaleDateString'),
47561		datetime: __mlHelper('toLocaleString'),
47562		time: __mlHelper('toLocaleTimeString'),
47563		number: function ( thousands, decimal, precision, prefix, postfix ) {
47564			// Auto locale detection
47565			if (thousands === null || thousands === undefined) {
47566				thousands = __thousands;
47567			}
47568	
47569			if (decimal === null || decimal === undefined) {
47570				decimal = __decimal;
47571			}
47572	
47573			return {
47574				display: function ( d ) {
47575					if ( typeof d !== 'number' && typeof d !== 'string' ) {
47576						return d;
47577					}
47578	
47579					if (d === '' || d === null) {
47580						return d;
47581					}
47582	
47583					var negative = d < 0 ? '-' : '';
47584					var flo = parseFloat( d );
47585	
47586					// If NaN then there isn't much formatting that we can do - just
47587					// return immediately, escaping any HTML (this was supposed to
47588					// be a number after all)
47589					if ( isNaN( flo ) ) {
47590						return __htmlEscapeEntities( d );
47591					}
47592	
47593					flo = flo.toFixed( precision );
47594					d = Math.abs( flo );
47595	
47596					var intPart = parseInt( d, 10 );
47597					var floatPart = precision ?
47598						decimal+(d - intPart).toFixed( precision ).substring( 2 ):
47599						'';
47600	
47601					// If zero, then can't have a negative prefix
47602					if (intPart === 0 && parseFloat(floatPart) === 0) {
47603						negative = '';
47604					}
47605	
47606					return negative + (prefix||'') +
47607						intPart.toString().replace(
47608							/\B(?=(\d{3})+(?!\d))/g, thousands
47609						) +
47610						floatPart +
47611						(postfix||'');
47612				}
47613			};
47614		},
47615	
47616		text: function () {
47617			return {
47618				display: __htmlEscapeEntities,
47619				filter: __htmlEscapeEntities
47620			};
47621		}
47622	};
47623	
47624	
47625	/*
47626	 * This is really a good bit rubbish this method of exposing the internal methods
47627	 * publicly... - To be fixed in 2.0 using methods on the prototype
47628	 */
47629	
47630	
47631	/**
47632	 * Create a wrapper function for exporting an internal functions to an external API.
47633	 *  @param {string} fn API function name
47634	 *  @returns {function} wrapped function
47635	 *  @memberof DataTable#internal
47636	 */
47637	function _fnExternApiFunc (fn)
47638	{
47639		return function() {
47640			var args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat(
47641				Array.prototype.slice.call(arguments)
47642			);
47643			return DataTable.ext.internal[fn].apply( this, args );
47644		};
47645	}
47646	
47647	
47648	/**
47649	 * Reference to internal functions for use by plug-in developers. Note that
47650	 * these methods are references to internal functions and are considered to be
47651	 * private. If you use these methods, be aware that they are liable to change
47652	 * between versions.
47653	 *  @namespace
47654	 */
47655	$.extend( DataTable.ext.internal, {
47656		_fnExternApiFunc: _fnExternApiFunc,
47657		_fnBuildAjax: _fnBuildAjax,
47658		_fnAjaxUpdate: _fnAjaxUpdate,
47659		_fnAjaxParameters: _fnAjaxParameters,
47660		_fnAjaxUpdateDraw: _fnAjaxUpdateDraw,
47661		_fnAjaxDataSrc: _fnAjaxDataSrc,
47662		_fnAddColumn: _fnAddColumn,
47663		_fnColumnOptions: _fnColumnOptions,
47664		_fnAdjustColumnSizing: _fnAdjustColumnSizing,
47665		_fnVisibleToColumnIndex: _fnVisibleToColumnIndex,
47666		_fnColumnIndexToVisible: _fnColumnIndexToVisible,
47667		_fnVisbleColumns: _fnVisbleColumns,
47668		_fnGetColumns: _fnGetColumns,
47669		_fnColumnTypes: _fnColumnTypes,
47670		_fnApplyColumnDefs: _fnApplyColumnDefs,
47671		_fnHungarianMap: _fnHungarianMap,
47672		_fnCamelToHungarian: _fnCamelToHungarian,
47673		_fnLanguageCompat: _fnLanguageCompat,
47674		_fnBrowserDetect: _fnBrowserDetect,
47675		_fnAddData: _fnAddData,
47676		_fnAddTr: _fnAddTr,
47677		_fnNodeToDataIndex: _fnNodeToDataIndex,
47678		_fnNodeToColumnIndex: _fnNodeToColumnIndex,
47679		_fnGetCellData: _fnGetCellData,
47680		_fnSetCellData: _fnSetCellData,
47681		_fnSplitObjNotation: _fnSplitObjNotation,
47682		_fnGetObjectDataFn: _fnGetObjectDataFn,
47683		_fnSetObjectDataFn: _fnSetObjectDataFn,
47684		_fnGetDataMaster: _fnGetDataMaster,
47685		_fnClearTable: _fnClearTable,
47686		_fnDeleteIndex: _fnDeleteIndex,
47687		_fnInvalidate: _fnInvalidate,
47688		_fnGetRowElements: _fnGetRowElements,
47689		_fnCreateTr: _fnCreateTr,
47690		_fnBuildHead: _fnBuildHead,
47691		_fnDrawHead: _fnDrawHead,
47692		_fnDraw: _fnDraw,
47693		_fnReDraw: _fnReDraw,
47694		_fnAddOptionsHtml: _fnAddOptionsHtml,
47695		_fnDetectHeader: _fnDetectHeader,
47696		_fnGetUniqueThs: _fnGetUniqueThs,
47697		_fnFeatureHtmlFilter: _fnFeatureHtmlFilter,
47698		_fnFilterComplete: _fnFilterComplete,
47699		_fnFilterCustom: _fnFilterCustom,
47700		_fnFilterColumn: _fnFilterColumn,
47701		_fnFilter: _fnFilter,
47702		_fnFilterCreateSearch: _fnFilterCreateSearch,
47703		_fnEscapeRegex: _fnEscapeRegex,
47704		_fnFilterData: _fnFilterData,
47705		_fnFeatureHtmlInfo: _fnFeatureHtmlInfo,
47706		_fnUpdateInfo: _fnUpdateInfo,
47707		_fnInfoMacros: _fnInfoMacros,
47708		_fnInitialise: _fnInitialise,
47709		_fnInitComplete: _fnInitComplete,
47710		_fnLengthChange: _fnLengthChange,
47711		_fnFeatureHtmlLength: _fnFeatureHtmlLength,
47712		_fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate,
47713		_fnPageChange: _fnPageChange,
47714		_fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing,
47715		_fnProcessingDisplay: _fnProcessingDisplay,
47716		_fnFeatureHtmlTable: _fnFeatureHtmlTable,
47717		_fnScrollDraw: _fnScrollDraw,
47718		_fnApplyToChildren: _fnApplyToChildren,
47719		_fnCalculateColumnWidths: _fnCalculateColumnWidths,
47720		_fnThrottle: _fnThrottle,
47721		_fnConvertToWidth: _fnConvertToWidth,
47722		_fnGetWidestNode: _fnGetWidestNode,
47723		_fnGetMaxLenString: _fnGetMaxLenString,
47724		_fnStringToCss: _fnStringToCss,
47725		_fnSortFlatten: _fnSortFlatten,
47726		_fnSort: _fnSort,
47727		_fnSortAria: _fnSortAria,
47728		_fnSortListener: _fnSortListener,
47729		_fnSortAttachListener: _fnSortAttachListener,
47730		_fnSortingClasses: _fnSortingClasses,
47731		_fnSortData: _fnSortData,
47732		_fnSaveState: _fnSaveState,
47733		_fnLoadState: _fnLoadState,
47734		_fnImplementState: _fnImplementState,
47735		_fnSettingsFromNode: _fnSettingsFromNode,
47736		_fnLog: _fnLog,
47737		_fnMap: _fnMap,
47738		_fnBindAction: _fnBindAction,
47739		_fnCallbackReg: _fnCallbackReg,
47740		_fnCallbackFire: _fnCallbackFire,
47741		_fnLengthOverflow: _fnLengthOverflow,
47742		_fnRenderer: _fnRenderer,
47743		_fnDataSource: _fnDataSource,
47744		_fnRowAttributes: _fnRowAttributes,
47745		_fnExtend: _fnExtend,
47746		_fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant
47747		                                // in 1.10, so this dead-end function is
47748		                                // added to prevent errors
47749	} );
47750	
47751	
47752	// jQuery access
47753	$.fn.dataTable = DataTable;
47754	
47755	// Provide access to the host jQuery object (circular reference)
47756	DataTable.$ = $;
47757	
47758	// Legacy aliases
47759	$.fn.dataTableSettings = DataTable.settings;
47760	$.fn.dataTableExt = DataTable.ext;
47761	
47762	// With a capital `D` we return a DataTables API instance rather than a
47763	// jQuery object
47764	$.fn.DataTable = function ( opts ) {
47765		return $(this).dataTable( opts ).api();
47766	};
47767	
47768	// All properties that are available to $.fn.dataTable should also be
47769	// available on $.fn.DataTable
47770	$.each( DataTable, function ( prop, val ) {
47771		$.fn.DataTable[ prop ] = val;
47772	} );
47773
47774	return DataTable;
47775}));
47776
47777;/*! DataTables Bootstrap 4 integration
47778 * ©2011-2017 SpryMedia Ltd - datatables.net/license
47779 */
47780
47781/**
47782 * DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
47783 * DataTables 1.10 or newer.
47784 *
47785 * This file sets the defaults and adds options to DataTables to style its
47786 * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
47787 * for further information.
47788 */
47789(function( factory ){
47790	if ( typeof define === 'function' && define.amd ) {
47791		// AMD
47792		define( ['jquery', 'datatables.net'], function ( $ ) {
47793			return factory( $, window, document );
47794		} );
47795	}
47796	else if ( typeof exports === 'object' ) {
47797		// CommonJS
47798		module.exports = function (root, $) {
47799			if ( ! root ) {
47800				root = window;
47801			}
47802
47803			if ( ! $ || ! $.fn.dataTable ) {
47804				// Require DataTables, which attaches to jQuery, including
47805				// jQuery if needed and have a $ property so we can access the
47806				// jQuery object that is used
47807				$ = require('datatables.net')(root, $).$;
47808			}
47809
47810			return factory( $, root, root.document );
47811		};
47812	}
47813	else {
47814		// Browser
47815		factory( jQuery, window, document );
47816	}
47817}(function( $, window, document, undefined ) {
47818'use strict';
47819var DataTable = $.fn.dataTable;
47820
47821
47822/* Set the defaults for DataTables initialisation */
47823$.extend( true, DataTable.defaults, {
47824	dom:
47825		"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
47826		"<'row'<'col-sm-12'tr>>" +
47827		"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
47828	renderer: 'bootstrap'
47829} );
47830
47831
47832/* Default class modification */
47833$.extend( DataTable.ext.classes, {
47834	sWrapper:      "dataTables_wrapper dt-bootstrap4",
47835	sFilterInput:  "form-control form-control-sm",
47836	sLengthSelect: "custom-select custom-select-sm form-control form-control-sm",
47837	sProcessing:   "dataTables_processing card",
47838	sPageButton:   "paginate_button page-item"
47839} );
47840
47841
47842/* Bootstrap paging button renderer */
47843DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
47844	var api     = new DataTable.Api( settings );
47845	var classes = settings.oClasses;
47846	var lang    = settings.oLanguage.oPaginate;
47847	var aria = settings.oLanguage.oAria.paginate || {};
47848	var btnDisplay, btnClass, counter=0;
47849
47850	var attach = function( container, buttons ) {
47851		var i, ien, node, button;
47852		var clickHandler = function ( e ) {
47853			e.preventDefault();
47854			if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
47855				api.page( e.data.action ).draw( 'page' );
47856			}
47857		};
47858
47859		for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
47860			button = buttons[i];
47861
47862			if ( Array.isArray( button ) ) {
47863				attach( container, button );
47864			}
47865			else {
47866				btnDisplay = '';
47867				btnClass = '';
47868
47869				switch ( button ) {
47870					case 'ellipsis':
47871						btnDisplay = '&#x2026;';
47872						btnClass = 'disabled';
47873						break;
47874
47875					case 'first':
47876						btnDisplay = lang.sFirst;
47877						btnClass = button + (page > 0 ?
47878							'' : ' disabled');
47879						break;
47880
47881					case 'previous':
47882						btnDisplay = lang.sPrevious;
47883						btnClass = button + (page > 0 ?
47884							'' : ' disabled');
47885						break;
47886
47887					case 'next':
47888						btnDisplay = lang.sNext;
47889						btnClass = button + (page < pages-1 ?
47890							'' : ' disabled');
47891						break;
47892
47893					case 'last':
47894						btnDisplay = lang.sLast;
47895						btnClass = button + (page < pages-1 ?
47896							'' : ' disabled');
47897						break;
47898
47899					default:
47900						btnDisplay = button + 1;
47901						btnClass = page === button ?
47902							'active' : '';
47903						break;
47904				}
47905
47906				if ( btnDisplay ) {
47907					node = $('<li>', {
47908							'class': classes.sPageButton+' '+btnClass,
47909							'id': idx === 0 && typeof button === 'string' ?
47910								settings.sTableId +'_'+ button :
47911								null
47912						} )
47913						.append( $('<a>', {
47914								'href': '#',
47915								'aria-controls': settings.sTableId,
47916								'aria-label': aria[ button ],
47917								'data-dt-idx': counter,
47918								'tabindex': settings.iTabIndex,
47919								'class': 'page-link'
47920							} )
47921							.html( btnDisplay )
47922						)
47923						.appendTo( container );
47924
47925					settings.oApi._fnBindAction(
47926						node, {action: button}, clickHandler
47927					);
47928
47929					counter++;
47930				}
47931			}
47932		}
47933	};
47934
47935	// IE9 throws an 'unknown error' if document.activeElement is used
47936	// inside an iframe or frame. 
47937	var activeEl;
47938
47939	try {
47940		// Because this approach is destroying and recreating the paging
47941		// elements, focus is lost on the select button which is bad for
47942		// accessibility. So we want to restore focus once the draw has
47943		// completed
47944		activeEl = $(host).find(document.activeElement).data('dt-idx');
47945	}
47946	catch (e) {}
47947
47948	attach(
47949		$(host).empty().html('<ul class="pagination"/>').children('ul'),
47950		buttons
47951	);
47952
47953	if ( activeEl !== undefined ) {
47954		$(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
47955	}
47956};
47957
47958
47959return DataTable;
47960}));
47961
47962;/*! Bootstrap 4 styling wrapper for ColReorder
47963 * ©2018 SpryMedia Ltd - datatables.net/license
47964 */
47965
47966(function( factory ){
47967	if ( typeof define === 'function' && define.amd ) {
47968		// AMD
47969		define( ['jquery', 'datatables.net-bs4', 'datatables.net-colreorder'], function ( $ ) {
47970			return factory( $, window, document );
47971		} );
47972	}
47973	else if ( typeof exports === 'object' ) {
47974		// CommonJS
47975		module.exports = function (root, $) {
47976			if ( ! root ) {
47977				root = window;
47978			}
47979
47980			if ( ! $ || ! $.fn.dataTable ) {
47981				$ = require('datatables.net-bs4')(root, $).$;
47982			}
47983
47984			if ( ! $.fn.dataTable.ColReorder ) {
47985				require('datatables.net-colreorder')(root, $);
47986			}
47987
47988			return factory( $, root, root.document );
47989		};
47990	}
47991	else {
47992		// Browser
47993		factory( jQuery, window, document );
47994	}
47995}(function( $, window, document, undefined ) {
47996
47997return $.fn.dataTable;
47998
47999}));
48000;/*! Bootstrap 4 styling wrapper for FixedColumns
48001 * ©2018 SpryMedia Ltd - datatables.net/license
48002 */
48003
48004(function( factory ){
48005	if ( typeof define === 'function' && define.amd ) {
48006		// AMD
48007		define( ['jquery', 'datatables.net-bs4', 'datatables.net-fixedcolumns'], function ( $ ) {
48008			return factory( $, window, document );
48009		} );
48010	}
48011	else if ( typeof exports === 'object' ) {
48012		// CommonJS
48013		module.exports = function (root, $) {
48014			if ( ! root ) {
48015				root = window;
48016			}
48017
48018			if ( ! $ || ! $.fn.dataTable ) {
48019				$ = require('datatables.net-bs4')(root, $).$;
48020			}
48021
48022			if ( ! $.fn.dataTable.FixedColumns ) {
48023				require('datatables.net-fixedcolumns')(root, $);
48024			}
48025
48026			return factory( $, root, root.document );
48027		};
48028	}
48029	else {
48030		// Browser
48031		factory( jQuery, window, document );
48032	}
48033}(function( $, window, document, undefined ) {
48034
48035return $.fn.dataTable;
48036
48037}));
48038;/*! Bootstrap 4 styling wrapper for FixedHeader
48039 * ©2018 SpryMedia Ltd - datatables.net/license
48040 */
48041
48042(function( factory ){
48043	if ( typeof define === 'function' && define.amd ) {
48044		// AMD
48045		define( ['jquery', 'datatables.net-bs4', 'datatables.net-fixedheader'], function ( $ ) {
48046			return factory( $, window, document );
48047		} );
48048	}
48049	else if ( typeof exports === 'object' ) {
48050		// CommonJS
48051		module.exports = function (root, $) {
48052			if ( ! root ) {
48053				root = window;
48054			}
48055
48056			if ( ! $ || ! $.fn.dataTable ) {
48057				$ = require('datatables.net-bs4')(root, $).$;
48058			}
48059
48060			if ( ! $.fn.dataTable.FixedHeader ) {
48061				require('datatables.net-fixedheader')(root, $);
48062			}
48063
48064			return factory( $, root, root.document );
48065		};
48066	}
48067	else {
48068		// Browser
48069		factory( jQuery, window, document );
48070	}
48071}(function( $, window, document, undefined ) {
48072
48073return $.fn.dataTable;
48074
48075}));
48076;/*! Bootstrap 4 styling wrapper for Scroller
48077 * ©2018 SpryMedia Ltd - datatables.net/license
48078 */
48079
48080(function( factory ){
48081	if ( typeof define === 'function' && define.amd ) {
48082		// AMD
48083		define( ['jquery', 'datatables.net-bs4', 'datatables.net-scroller'], function ( $ ) {
48084			return factory( $, window, document );
48085		} );
48086	}
48087	else if ( typeof exports === 'object' ) {
48088		// CommonJS
48089		module.exports = function (root, $) {
48090			if ( ! root ) {
48091				root = window;
48092			}
48093
48094			if ( ! $ || ! $.fn.dataTable ) {
48095				$ = require('datatables.net-bs4')(root, $).$;
48096			}
48097
48098			if ( ! $.fn.dataTable.Scroller ) {
48099				require('datatables.net-scroller')(root, $);
48100			}
48101
48102			return factory( $, root, root.document );
48103		};
48104	}
48105	else {
48106		// Browser
48107		factory( jQuery, window, document );
48108	}
48109}(function( $, window, document, undefined ) {
48110
48111return $.fn.dataTable;
48112
48113}));
48114;/*! Bootstrap 4 styling wrapper for Select
48115 * ©2018 SpryMedia Ltd - datatables.net/license
48116 */
48117
48118(function( factory ){
48119	if ( typeof define === 'function' && define.amd ) {
48120		// AMD
48121		define( ['jquery', 'datatables.net-bs4', 'datatables.net-select'], function ( $ ) {
48122			return factory( $, window, document );
48123		} );
48124	}
48125	else if ( typeof exports === 'object' ) {
48126		// CommonJS
48127		module.exports = function (root, $) {
48128			if ( ! root ) {
48129				root = window;
48130			}
48131
48132			if ( ! $ || ! $.fn.dataTable ) {
48133				$ = require('datatables.net-bs4')(root, $).$;
48134			}
48135
48136			if ( ! $.fn.dataTable.select ) {
48137				require('datatables.net-select')(root, $);
48138			}
48139
48140			return factory( $, root, root.document );
48141		};
48142	}
48143	else {
48144		// Browser
48145		factory( jQuery, window, document );
48146	}
48147}(function( $, window, document, undefined ) {
48148
48149return $.fn.dataTable;
48150
48151}));
48152;
vendor: 119,260 bytes, lines 48152-51399
48152/*!
48153 * Bootstrap-select v1.13.18 (https://developer.snapappointments.com/bootstrap-select)
48154 *
48155 * Copyright 2012-2020 SnapAppointments, LLC
48156 * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
48157 */
48158
48159(function (root, factory) {
48160  if (root === undefined && window !== undefined) root = window;
48161  if (typeof define === 'function' && define.amd) {
48162    // AMD. Register as an anonymous module unless amdModuleId is set
48163    define(["jquery"], function (a0) {
48164      return (factory(a0));
48165    });
48166  } else if (typeof module === 'object' && module.exports) {
48167    // Node. Does not work with strict CommonJS, but
48168    // only CommonJS-like environments that support module.exports,
48169    // like Node.
48170    module.exports = factory(require("jquery"));
48171  } else {
48172    factory(root["jQuery"]);
48173  }
48174}(this, function (jQuery) {
48175
48176(function ($) {
48177  'use strict';
48178
48179  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
48180
48181  var uriAttrs = [
48182    'background',
48183    'cite',
48184    'href',
48185    'itemtype',
48186    'longdesc',
48187    'poster',
48188    'src',
48189    'xlink:href'
48190  ];
48191
48192  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
48193
48194  var DefaultWhitelist = {
48195    // Global attributes allowed on any supplied element below.
48196    '*': ['class', 'dir', 'id', 'lang', 'role', 'tabindex', 'style', ARIA_ATTRIBUTE_PATTERN],
48197    a: ['target', 'href', 'title', 'rel'],
48198    area: [],
48199    b: [],
48200    br: [],
48201    col: [],
48202    code: [],
48203    div: [],
48204    em: [],
48205    hr: [],
48206    h1: [],
48207    h2: [],
48208    h3: [],
48209    h4: [],
48210    h5: [],
48211    h6: [],
48212    i: [],
48213    img: ['src', 'alt', 'title', 'width', 'height'],
48214    li: [],
48215    ol: [],
48216    p: [],
48217    pre: [],
48218    s: [],
48219    small: [],
48220    span: [],
48221    sub: [],
48222    sup: [],
48223    strong: [],
48224    u: [],
48225    ul: []
48226  }
48227
48228  /**
48229   * A pattern that recognizes a commonly useful subset of URLs that are safe.
48230   *
48231   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
48232   */
48233  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
48234
48235  /**
48236   * A pattern that matches safe data URLs. Only matches image, video and audio types.
48237   *
48238   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
48239   */
48240  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
48241
48242  function allowedAttribute (attr, allowedAttributeList) {
48243    var attrName = attr.nodeName.toLowerCase()
48244
48245    if ($.inArray(attrName, allowedAttributeList) !== -1) {
48246      if ($.inArray(attrName, uriAttrs) !== -1) {
48247        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
48248      }
48249
48250      return true
48251    }
48252
48253    var regExp = $(allowedAttributeList).filter(function (index, value) {
48254      return value instanceof RegExp
48255    })
48256
48257    // Check if a regular expression validates the attribute.
48258    for (var i = 0, l = regExp.length; i < l; i++) {
48259      if (attrName.match(regExp[i])) {
48260        return true
48261      }
48262    }
48263
48264    return false
48265  }
48266
48267  function sanitizeHtml (unsafeElements, whiteList, sanitizeFn) {
48268    if (sanitizeFn && typeof sanitizeFn === 'function') {
48269      return sanitizeFn(unsafeElements);
48270    }
48271
48272    var whitelistKeys = Object.keys(whiteList);
48273
48274    for (var i = 0, len = unsafeElements.length; i < len; i++) {
48275      var elements = unsafeElements[i].querySelectorAll('*');
48276
48277      for (var j = 0, len2 = elements.length; j < len2; j++) {
48278        var el = elements[j];
48279        var elName = el.nodeName.toLowerCase();
48280
48281        if (whitelistKeys.indexOf(elName) === -1) {
48282          el.parentNode.removeChild(el);
48283
48284          continue;
48285        }
48286
48287        var attributeList = [].slice.call(el.attributes);
48288        var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
48289
48290        for (var k = 0, len3 = attributeList.length; k < len3; k++) {
48291          var attr = attributeList[k];
48292
48293          if (!allowedAttribute(attr, whitelistedAttributes)) {
48294            el.removeAttribute(attr.nodeName);
48295          }
48296        }
48297      }
48298    }
48299  }
48300
48301  // Polyfill for browsers with no classList support
48302  // Remove in v2
48303  if (!('classList' in document.createElement('_'))) {
48304    (function (view) {
48305      if (!('Element' in view)) return;
48306
48307      var classListProp = 'classList',
48308          protoProp = 'prototype',
48309          elemCtrProto = view.Element[protoProp],
48310          objCtr = Object,
48311          classListGetter = function () {
48312            var $elem = $(this);
48313
48314            return {
48315              add: function (classes) {
48316                classes = Array.prototype.slice.call(arguments).join(' ');
48317                return $elem.addClass(classes);
48318              },
48319              remove: function (classes) {
48320                classes = Array.prototype.slice.call(arguments).join(' ');
48321                return $elem.removeClass(classes);
48322              },
48323              toggle: function (classes, force) {
48324                return $elem.toggleClass(classes, force);
48325              },
48326              contains: function (classes) {
48327                return $elem.hasClass(classes);
48328              }
48329            }
48330          };
48331
48332      if (objCtr.defineProperty) {
48333        var classListPropDesc = {
48334          get: classListGetter,
48335          enumerable: true,
48336          configurable: true
48337        };
48338        try {
48339          objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
48340        } catch (ex) { // IE 8 doesn't support enumerable:true
48341          // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
48342          // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
48343          if (ex.number === undefined || ex.number === -0x7FF5EC54) {
48344            classListPropDesc.enumerable = false;
48345            objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
48346          }
48347        }
48348      } else if (objCtr[protoProp].__defineGetter__) {
48349        elemCtrProto.__defineGetter__(classListProp, classListGetter);
48350      }
48351    }(window));
48352  }
48353
48354  var testElement = document.createElement('_');
48355
48356  testElement.classList.add('c1', 'c2');
48357
48358  if (!testElement.classList.contains('c2')) {
48359    var _add = DOMTokenList.prototype.add,
48360        _remove = DOMTokenList.prototype.remove;
48361
48362    DOMTokenList.prototype.add = function () {
48363      Array.prototype.forEach.call(arguments, _add.bind(this));
48364    }
48365
48366    DOMTokenList.prototype.remove = function () {
48367      Array.prototype.forEach.call(arguments, _remove.bind(this));
48368    }
48369  }
48370
48371  testElement.classList.toggle('c3', false);
48372
48373  // Polyfill for IE 10 and Firefox <24, where classList.toggle does not
48374  // support the second argument.
48375  if (testElement.classList.contains('c3')) {
48376    var _toggle = DOMTokenList.prototype.toggle;
48377
48378    DOMTokenList.prototype.toggle = function (token, force) {
48379      if (1 in arguments && !this.contains(token) === !force) {
48380        return force;
48381      } else {
48382        return _toggle.call(this, token);
48383      }
48384    };
48385  }
48386
48387  testElement = null;
48388
48389  // shallow array comparison
48390  function isEqual (array1, array2) {
48391    return array1.length === array2.length && array1.every(function (element, index) {
48392      return element === array2[index];
48393    });
48394  };
48395
48396  // <editor-fold desc="Shims">
48397  if (!String.prototype.startsWith) {
48398    (function () {
48399      'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
48400      var defineProperty = (function () {
48401        // IE 8 only supports `Object.defineProperty` on DOM elements
48402        try {
48403          var object = {};
48404          var $defineProperty = Object.defineProperty;
48405          var result = $defineProperty(object, object, object) && $defineProperty;
48406        } catch (error) {
48407        }
48408        return result;
48409      }());
48410      var toString = {}.toString;
48411      var startsWith = function (search) {
48412        if (this == null) {
48413          throw new TypeError();
48414        }
48415        var string = String(this);
48416        if (search && toString.call(search) == '[object RegExp]') {
48417          throw new TypeError();
48418        }
48419        var stringLength = string.length;
48420        var searchString = String(search);
48421        var searchLength = searchString.length;
48422        var position = arguments.length > 1 ? arguments[1] : undefined;
48423        // `ToInteger`
48424        var pos = position ? Number(position) : 0;
48425        if (pos != pos) { // better `isNaN`
48426          pos = 0;
48427        }
48428        var start = Math.min(Math.max(pos, 0), stringLength);
48429        // Avoid the `indexOf` call if no match is possible
48430        if (searchLength + start > stringLength) {
48431          return false;
48432        }
48433        var index = -1;
48434        while (++index < searchLength) {
48435          if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
48436            return false;
48437          }
48438        }
48439        return true;
48440      };
48441      if (defineProperty) {
48442        defineProperty(String.prototype, 'startsWith', {
48443          'value': startsWith,
48444          'configurable': true,
48445          'writable': true
48446        });
48447      } else {
48448        String.prototype.startsWith = startsWith;
48449      }
48450    }());
48451  }
48452
48453  if (!Object.keys) {
48454    Object.keys = function (
48455      o, // object
48456      k, // key
48457      r  // result array
48458    ) {
48459      // initialize object and result
48460      r = [];
48461      // iterate over object keys
48462      for (k in o) {
48463        // fill result array with non-prototypical keys
48464        r.hasOwnProperty.call(o, k) && r.push(k);
48465      }
48466      // return result
48467      return r;
48468    };
48469  }
48470
48471  if (HTMLSelectElement && !HTMLSelectElement.prototype.hasOwnProperty('selectedOptions')) {
48472    Object.defineProperty(HTMLSelectElement.prototype, 'selectedOptions', {
48473      get: function () {
48474        return this.querySelectorAll(':checked');
48475      }
48476    });
48477  }
48478
48479  function getSelectedOptions (select, ignoreDisabled) {
48480    var selectedOptions = select.selectedOptions,
48481        options = [],
48482        opt;
48483
48484    if (ignoreDisabled) {
48485      for (var i = 0, len = selectedOptions.length; i < len; i++) {
48486        opt = selectedOptions[i];
48487
48488        if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
48489          options.push(opt);
48490        }
48491      }
48492
48493      return options;
48494    }
48495
48496    return selectedOptions;
48497  }
48498
48499  // much faster than $.val()
48500  function getSelectValues (select, selectedOptions) {
48501    var value = [],
48502        options = selectedOptions || select.selectedOptions,
48503        opt;
48504
48505    for (var i = 0, len = options.length; i < len; i++) {
48506      opt = options[i];
48507
48508      if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
48509        value.push(opt.value);
48510      }
48511    }
48512
48513    if (!select.multiple) {
48514      return !value.length ? null : value[0];
48515    }
48516
48517    return value;
48518  }
48519
48520  // set data-selected on select element if the value has been programmatically selected
48521  // prior to initialization of bootstrap-select
48522  // * consider removing or replacing an alternative method *
48523  var valHooks = {
48524    useDefault: false,
48525    _set: $.valHooks.select.set
48526  };
48527
48528  $.valHooks.select.set = function (elem, value) {
48529    if (value && !valHooks.useDefault) $(elem).data('selected', true);
48530
48531    return valHooks._set.apply(this, arguments);
48532  };
48533
48534  var changedArguments = null;
48535
48536  var EventIsSupported = (function () {
48537    try {
48538      new Event('change');
48539      return true;
48540    } catch (e) {
48541      return false;
48542    }
48543  })();
48544
48545  $.fn.triggerNative = function (eventName) {
48546    var el = this[0],
48547        event;
48548
48549    if (el.dispatchEvent) { // for modern browsers & IE9+
48550      if (EventIsSupported) {
48551        // For modern browsers
48552        event = new Event(eventName, {
48553          bubbles: true
48554        });
48555      } else {
48556        // For IE since it doesn't support Event constructor
48557        event = document.createEvent('Event');
48558        event.initEvent(eventName, true, false);
48559      }
48560
48561      el.dispatchEvent(event);
48562    } else if (el.fireEvent) { // for IE8
48563      event = document.createEventObject();
48564      event.eventType = eventName;
48565      el.fireEvent('on' + eventName, event);
48566    } else {
48567      // fall back to jQuery.trigger
48568      this.trigger(eventName);
48569    }
48570  };
48571  // </editor-fold>
48572
48573  function stringSearch (li, searchString, method, normalize) {
48574    var stringTypes = [
48575          'display',
48576          'subtext',
48577          'tokens'
48578        ],
48579        searchSuccess = false;
48580
48581    for (var i = 0; i < stringTypes.length; i++) {
48582      var stringType = stringTypes[i],
48583          string = li[stringType];
48584
48585      if (string) {
48586        string = string.toString();
48587
48588        // Strip HTML tags. This isn't perfect, but it's much faster than any other method
48589        if (stringType === 'display') {
48590          string = string.replace(/<[^>]+>/g, '');
48591        }
48592
48593        if (normalize) string = normalizeToBase(string);
48594        string = string.toUpperCase();
48595
48596        if (method === 'contains') {
48597          searchSuccess = string.indexOf(searchString) >= 0;
48598        } else {
48599          searchSuccess = string.startsWith(searchString);
48600        }
48601
48602        if (searchSuccess) break;
48603      }
48604    }
48605
48606    return searchSuccess;
48607  }
48608
48609  function toInteger (value) {
48610    return parseInt(value, 10) || 0;
48611  }
48612
48613  // Borrowed from Lodash (_.deburr)
48614  /** Used to map Latin Unicode letters to basic Latin letters. */
48615  var deburredLetters = {
48616    // Latin-1 Supplement block.
48617    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
48618    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
48619    '\xc7': 'C',  '\xe7': 'c',
48620    '\xd0': 'D',  '\xf0': 'd',
48621    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
48622    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
48623    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
48624    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
48625    '\xd1': 'N',  '\xf1': 'n',
48626    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
48627    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
48628    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
48629    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
48630    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
48631    '\xc6': 'Ae', '\xe6': 'ae',
48632    '\xde': 'Th', '\xfe': 'th',
48633    '\xdf': 'ss',
48634    // Latin Extended-A block.
48635    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
48636    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
48637    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
48638    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
48639    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
48640    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
48641    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
48642    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
48643    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
48644    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
48645    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
48646    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
48647    '\u0134': 'J',  '\u0135': 'j',
48648    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
48649    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
48650    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
48651    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
48652    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
48653    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
48654    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
48655    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
48656    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
48657    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
48658    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
48659    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
48660    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
48661    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
48662    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
48663    '\u0174': 'W',  '\u0175': 'w',
48664    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
48665    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
48666    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
48667    '\u0132': 'IJ', '\u0133': 'ij',
48668    '\u0152': 'Oe', '\u0153': 'oe',
48669    '\u0149': "'n", '\u017f': 's'
48670  };
48671
48672  /** Used to match Latin Unicode letters (excluding mathematical operators). */
48673  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
48674
48675  /** Used to compose unicode character classes. */
48676  var rsComboMarksRange = '\\u0300-\\u036f',
48677      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
48678      rsComboSymbolsRange = '\\u20d0-\\u20ff',
48679      rsComboMarksExtendedRange = '\\u1ab0-\\u1aff',
48680      rsComboMarksSupplementRange = '\\u1dc0-\\u1dff',
48681      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange;
48682
48683  /** Used to compose unicode capture groups. */
48684  var rsCombo = '[' + rsComboRange + ']';
48685
48686  /**
48687   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
48688   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
48689   */
48690  var reComboMark = RegExp(rsCombo, 'g');
48691
48692  function deburrLetter (key) {
48693    return deburredLetters[key];
48694  };
48695
48696  function normalizeToBase (string) {
48697    string = string.toString();
48698    return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
48699  }
48700
48701  // List of HTML entities for escaping.
48702  var escapeMap = {
48703    '&': '&amp;',
48704    '<': '&lt;',
48705    '>': '&gt;',
48706    '"': '&quot;',
48707    "'": '&#x27;',
48708    '`': '&#x60;'
48709  };
48710
48711  // Functions for escaping and unescaping strings to/from HTML interpolation.
48712  var createEscaper = function (map) {
48713    var escaper = function (match) {
48714      return map[match];
48715    };
48716    // Regexes for identifying a key that needs to be escaped.
48717    var source = '(?:' + Object.keys(map).join('|') + ')';
48718    var testRegexp = RegExp(source);
48719    var replaceRegexp = RegExp(source, 'g');
48720    return function (string) {
48721      string = string == null ? '' : '' + string;
48722      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
48723    };
48724  };
48725
48726  var htmlEscape = createEscaper(escapeMap);
48727
48728  /**
48729   * ------------------------------------------------------------------------
48730   * Constants
48731   * ------------------------------------------------------------------------
48732   */
48733
48734  var keyCodeMap = {
48735    32: ' ',
48736    48: '0',
48737    49: '1',
48738    50: '2',
48739    51: '3',
48740    52: '4',
48741    53: '5',
48742    54: '6',
48743    55: '7',
48744    56: '8',
48745    57: '9',
48746    59: ';',
48747    65: 'A',
48748    66: 'B',
48749    67: 'C',
48750    68: 'D',
48751    69: 'E',
48752    70: 'F',
48753    71: 'G',
48754    72: 'H',
48755    73: 'I',
48756    74: 'J',
48757    75: 'K',
48758    76: 'L',
48759    77: 'M',
48760    78: 'N',
48761    79: 'O',
48762    80: 'P',
48763    81: 'Q',
48764    82: 'R',
48765    83: 'S',
48766    84: 'T',
48767    85: 'U',
48768    86: 'V',
48769    87: 'W',
48770    88: 'X',
48771    89: 'Y',
48772    90: 'Z',
48773    96: '0',
48774    97: '1',
48775    98: '2',
48776    99: '3',
48777    100: '4',
48778    101: '5',
48779    102: '6',
48780    103: '7',
48781    104: '8',
48782    105: '9'
48783  };
48784
48785  var keyCodes = {
48786    ESCAPE: 27, // KeyboardEvent.which value for Escape (Esc) key
48787    ENTER: 13, // KeyboardEvent.which value for Enter key
48788    SPACE: 32, // KeyboardEvent.which value for space key
48789    TAB: 9, // KeyboardEvent.which value for tab key
48790    ARROW_UP: 38, // KeyboardEvent.which value for up arrow key
48791    ARROW_DOWN: 40 // KeyboardEvent.which value for down arrow key
48792  }
48793
48794  var version = {
48795    success: false,
48796    major: '3'
48797  };
48798
48799  try {
48800    version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.');
48801    version.major = version.full[0];
48802    version.success = true;
48803  } catch (err) {
48804    // do nothing
48805  }
48806
48807  var selectId = 0;
48808
48809  var EVENT_KEY = '.bs.select';
48810
48811  var classNames = {
48812    DISABLED: 'disabled',
48813    DIVIDER: 'divider',
48814    SHOW: 'open',
48815    DROPUP: 'dropup',
48816    MENU: 'dropdown-menu',
48817    MENURIGHT: 'dropdown-menu-right',
48818    MENULEFT: 'dropdown-menu-left',
48819    // to-do: replace with more advanced template/customization options
48820    BUTTONCLASS: 'btn-default',
48821    POPOVERHEADER: 'popover-title',
48822    ICONBASE: 'glyphicon',
48823    TICKICON: 'glyphicon-ok'
48824  }
48825
48826  var Selector = {
48827    MENU: '.' + classNames.MENU
48828  }
48829
48830  var elementTemplates = {
48831    div: document.createElement('div'),
48832    span: document.createElement('span'),
48833    i: document.createElement('i'),
48834    subtext: document.createElement('small'),
48835    a: document.createElement('a'),
48836    li: document.createElement('li'),
48837    whitespace: document.createTextNode('\u00A0'),
48838    fragment: document.createDocumentFragment()
48839  }
48840
48841  elementTemplates.noResults = elementTemplates.li.cloneNode(false);
48842  elementTemplates.noResults.className = 'no-results';
48843
48844  elementTemplates.a.setAttribute('role', 'option');
48845  elementTemplates.a.className = 'dropdown-item';
48846
48847  elementTemplates.subtext.className = 'text-muted';
48848
48849  elementTemplates.text = elementTemplates.span.cloneNode(false);
48850  elementTemplates.text.className = 'text';
48851
48852  elementTemplates.checkMark = elementTemplates.span.cloneNode(false);
48853
48854  var REGEXP_ARROW = new RegExp(keyCodes.ARROW_UP + '|' + keyCodes.ARROW_DOWN);
48855  var REGEXP_TAB_OR_ESCAPE = new RegExp('^' + keyCodes.TAB + '$|' + keyCodes.ESCAPE);
48856
48857  var generateOption = {
48858    li: function (content, classes, optgroup) {
48859      var li = elementTemplates.li.cloneNode(false);
48860
48861      if (content) {
48862        if (content.nodeType === 1 || content.nodeType === 11) {
48863          li.appendChild(content);
48864        } else {
48865          li.innerHTML = content;
48866        }
48867      }
48868
48869      if (typeof classes !== 'undefined' && classes !== '') li.className = classes;
48870      if (typeof optgroup !== 'undefined' && optgroup !== null) li.classList.add('optgroup-' + optgroup);
48871
48872      return li;
48873    },
48874
48875    a: function (text, classes, inline) {
48876      var a = elementTemplates.a.cloneNode(true);
48877
48878      if (text) {
48879        if (text.nodeType === 11) {
48880          a.appendChild(text);
48881        } else {
48882          a.insertAdjacentHTML('beforeend', text);
48883        }
48884      }
48885
48886      if (typeof classes !== 'undefined' && classes !== '') a.classList.add.apply(a.classList, classes.split(/\s+/));
48887      if (inline) a.setAttribute('style', inline);
48888
48889      return a;
48890    },
48891
48892    text: function (options, useFragment) {
48893      var textElement = elementTemplates.text.cloneNode(false),
48894          subtextElement,
48895          iconElement;
48896
48897      if (options.content) {
48898        textElement.innerHTML = options.content;
48899      } else {
48900        textElement.textContent = options.text;
48901
48902        if (options.icon) {
48903          var whitespace = elementTemplates.whitespace.cloneNode(false);
48904
48905          // need to use <i> for icons in the button to prevent a breaking change
48906          // note: switch to span in next major release
48907          iconElement = (useFragment === true ? elementTemplates.i : elementTemplates.span).cloneNode(false);
48908          iconElement.className = this.options.iconBase + ' ' + options.icon;
48909
48910          elementTemplates.fragment.appendChild(iconElement);
48911          elementTemplates.fragment.appendChild(whitespace);
48912        }
48913
48914        if (options.subtext) {
48915          subtextElement = elementTemplates.subtext.cloneNode(false);
48916          subtextElement.textContent = options.subtext;
48917          textElement.appendChild(subtextElement);
48918        }
48919      }
48920
48921      if (useFragment === true) {
48922        while (textElement.childNodes.length > 0) {
48923          elementTemplates.fragment.appendChild(textElement.childNodes[0]);
48924        }
48925      } else {
48926        elementTemplates.fragment.appendChild(textElement);
48927      }
48928
48929      return elementTemplates.fragment;
48930    },
48931
48932    label: function (options) {
48933      var textElement = elementTemplates.text.cloneNode(false),
48934          subtextElement,
48935          iconElement;
48936
48937      textElement.innerHTML = options.display;
48938
48939      if (options.icon) {
48940        var whitespace = elementTemplates.whitespace.cloneNode(false);
48941
48942        iconElement = elementTemplates.span.cloneNode(false);
48943        iconElement.className = this.options.iconBase + ' ' + options.icon;
48944
48945        elementTemplates.fragment.appendChild(iconElement);
48946        elementTemplates.fragment.appendChild(whitespace);
48947      }
48948
48949      if (options.subtext) {
48950        subtextElement = elementTemplates.subtext.cloneNode(false);
48951        subtextElement.textContent = options.subtext;
48952        textElement.appendChild(subtextElement);
48953      }
48954
48955      elementTemplates.fragment.appendChild(textElement);
48956
48957      return elementTemplates.fragment;
48958    }
48959  }
48960
48961  function showNoResults (searchMatch, searchValue) {
48962    if (!searchMatch.length) {
48963      elementTemplates.noResults.innerHTML = this.options.noneResultsText.replace('{0}', '"' + htmlEscape(searchValue) + '"');
48964      this.$menuInner[0].firstChild.appendChild(elementTemplates.noResults);
48965    }
48966  }
48967
48968  var Selectpicker = function (element, options) {
48969    var that = this;
48970
48971    // bootstrap-select has been initialized - revert valHooks.select.set back to its original function
48972    if (!valHooks.useDefault) {
48973      $.valHooks.select.set = valHooks._set;
48974      valHooks.useDefault = true;
48975    }
48976
48977    this.$element = $(element);
48978    this.$newElement = null;
48979    this.$button = null;
48980    this.$menu = null;
48981    this.options = options;
48982    this.selectpicker = {
48983      main: {},
48984      search: {},
48985      current: {}, // current changes if a search is in progress
48986      view: {},
48987      isSearching: false,
48988      keydown: {
48989        keyHistory: '',
48990        resetKeyHistory: {
48991          start: function () {
48992            return setTimeout(function () {
48993              that.selectpicker.keydown.keyHistory = '';
48994            }, 800);
48995          }
48996        }
48997      }
48998    };
48999
49000    this.sizeInfo = {};
49001
49002    // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a
49003    // data-attribute)
49004    if (this.options.title === null) {
49005      this.options.title = this.$element.attr('title');
49006    }
49007
49008    // Format window padding
49009    var winPad = this.options.windowPadding;
49010    if (typeof winPad === 'number') {
49011      this.options.windowPadding = [winPad, winPad, winPad, winPad];
49012    }
49013
49014    // Expose public methods
49015    this.val = Selectpicker.prototype.val;
49016    this.render = Selectpicker.prototype.render;
49017    this.refresh = Selectpicker.prototype.refresh;
49018    this.setStyle = Selectpicker.prototype.setStyle;
49019    this.selectAll = Selectpicker.prototype.selectAll;
49020    this.deselectAll = Selectpicker.prototype.deselectAll;
49021    this.destroy = Selectpicker.prototype.destroy;
49022    this.remove = Selectpicker.prototype.remove;
49023    this.show = Selectpicker.prototype.show;
49024    this.hide = Selectpicker.prototype.hide;
49025
49026    this.init();
49027  };
49028
49029  Selectpicker.VERSION = '1.13.18';
49030
49031  // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
49032  Selectpicker.DEFAULTS = {
49033    noneSelectedText: 'Nothing selected',
49034    noneResultsText: 'No results matched {0}',
49035    countSelectedText: function (numSelected, numTotal) {
49036      return (numSelected == 1) ? '{0} item selected' : '{0} items selected';
49037    },
49038    maxOptionsText: function (numAll, numGroup) {
49039      return [
49040        (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
49041        (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
49042      ];
49043    },
49044    selectAllText: 'Select All',
49045    deselectAllText: 'Deselect All',
49046    doneButton: false,
49047    doneButtonText: 'Close',
49048    multipleSeparator: ', ',
49049    styleBase: 'btn',
49050    style: classNames.BUTTONCLASS,
49051    size: 'auto',
49052    title: null,
49053    selectedTextFormat: 'values',
49054    width: false,
49055    container: false,
49056    hideDisabled: false,
49057    showSubtext: false,
49058    showIcon: true,
49059    showContent: true,
49060    dropupAuto: true,
49061    header: false,
49062    liveSearch: false,
49063    liveSearchPlaceholder: null,
49064    liveSearchNormalize: false,
49065    liveSearchStyle: 'contains',
49066    actionsBox: false,
49067    iconBase: classNames.ICONBASE,
49068    tickIcon: classNames.TICKICON,
49069    showTick: false,
49070    template: {
49071      caret: '<span class="caret"></span>'
49072    },
49073    maxOptions: false,
49074    mobile: false,
49075    selectOnTab: false,
49076    dropdownAlignRight: false,
49077    windowPadding: 0,
49078    virtualScroll: 600,
49079    display: false,
49080    sanitize: true,
49081    sanitizeFn: null,
49082    whiteList: DefaultWhitelist
49083  };
49084
49085  Selectpicker.prototype = {
49086
49087    constructor: Selectpicker,
49088
49089    init: function () {
49090      var that = this,
49091          id = this.$element.attr('id'),
49092          element = this.$element[0],
49093          form = element.form;
49094
49095      selectId++;
49096      this.selectId = 'bs-select-' + selectId;
49097
49098      element.classList.add('bs-select-hidden');
49099
49100      this.multiple = this.$element.prop('multiple');
49101      this.autofocus = this.$element.prop('autofocus');
49102
49103      if (element.classList.contains('show-tick')) {
49104        this.options.showTick = true;
49105      }
49106
49107      this.$newElement = this.createDropdown();
49108      this.buildData();
49109      this.$element
49110        .after(this.$newElement)
49111        .prependTo(this.$newElement);
49112
49113      // ensure select is associated with form element if it got unlinked after moving it inside newElement
49114      if (form && element.form === null) {
49115        if (!form.id) form.id = 'form-' + this.selectId;
49116        element.setAttribute('form', form.id);
49117      }
49118
49119      this.$button = this.$newElement.children('button');
49120      this.$menu = this.$newElement.children(Selector.MENU);
49121      this.$menuInner = this.$menu.children('.inner');
49122      this.$searchbox = this.$menu.find('input');
49123
49124      element.classList.remove('bs-select-hidden');
49125
49126      if (this.options.dropdownAlignRight === true) this.$menu[0].classList.add(classNames.MENURIGHT);
49127
49128      if (typeof id !== 'undefined') {
49129        this.$button.attr('data-id', id);
49130      }
49131
49132      this.checkDisabled();
49133      this.clickListener();
49134
49135      if (this.options.liveSearch) {
49136        this.liveSearchListener();
49137        this.focusedParent = this.$searchbox[0];
49138      } else {
49139        this.focusedParent = this.$menuInner[0];
49140      }
49141
49142      this.setStyle();
49143      this.render();
49144      this.setWidth();
49145      if (this.options.container) {
49146        this.selectPosition();
49147      } else {
49148        this.$element.on('hide' + EVENT_KEY, function () {
49149          if (that.isVirtual()) {
49150            // empty menu on close
49151            var menuInner = that.$menuInner[0],
49152                emptyMenu = menuInner.firstChild.cloneNode(false);
49153
49154            // replace the existing UL with an empty one - this is faster than $.empty() or innerHTML = ''
49155            menuInner.replaceChild(emptyMenu, menuInner.firstChild);
49156            menuInner.scrollTop = 0;
49157          }
49158        });
49159      }
49160      this.$menu.data('this', this);
49161      this.$newElement.data('this', this);
49162      if (this.options.mobile) this.mobile();
49163
49164      this.$newElement.on({
49165        'hide.bs.dropdown': function (e) {
49166          that.$element.trigger('hide' + EVENT_KEY, e);
49167        },
49168        'hidden.bs.dropdown': function (e) {
49169          that.$element.trigger('hidden' + EVENT_KEY, e);
49170        },
49171        'show.bs.dropdown': function (e) {
49172          that.$element.trigger('show' + EVENT_KEY, e);
49173        },
49174        'shown.bs.dropdown': function (e) {
49175          that.$element.trigger('shown' + EVENT_KEY, e);
49176        }
49177      });
49178
49179      if (element.hasAttribute('required')) {
49180        this.$element.on('invalid' + EVENT_KEY, function () {
49181          that.$button[0].classList.add('bs-invalid');
49182
49183          that.$element
49184            .on('shown' + EVENT_KEY + '.invalid', function () {
49185              that.$element
49186                .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
49187                .off('shown' + EVENT_KEY + '.invalid');
49188            })
49189            .on('rendered' + EVENT_KEY, function () {
49190              // if select is no longer invalid, remove the bs-invalid class
49191              if (this.validity.valid) that.$button[0].classList.remove('bs-invalid');
49192              that.$element.off('rendered' + EVENT_KEY);
49193            });
49194
49195          that.$button.on('blur' + EVENT_KEY, function () {
49196            that.$element.trigger('focus').trigger('blur');
49197            that.$button.off('blur' + EVENT_KEY);
49198          });
49199        });
49200      }
49201
49202      setTimeout(function () {
49203        that.buildList();
49204        that.$element.trigger('loaded' + EVENT_KEY);
49205      });
49206    },
49207
49208    createDropdown: function () {
49209      // Options
49210      // If we are multiple or showTick option is set, then add the show-tick class
49211      var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
49212          multiselectable = this.multiple ? ' aria-multiselectable="true"' : '',
49213          inputGroup = '',
49214          autofocus = this.autofocus ? ' autofocus' : '';
49215
49216      if (version.major < 4 && this.$element.parent().hasClass('input-group')) {
49217        inputGroup = ' input-group-btn';
49218      }
49219
49220      // Elements
49221      var drop,
49222          header = '',
49223          searchbox = '',
49224          actionsbox = '',
49225          donebutton = '';
49226
49227      if (this.options.header) {
49228        header =
49229          '<div class="' + classNames.POPOVERHEADER + '">' +
49230            '<button type="button" class="close" aria-hidden="true">&times;</button>' +
49231              this.options.header +
49232          '</div>';
49233      }
49234
49235      if (this.options.liveSearch) {
49236        searchbox =
49237          '<div class="bs-searchbox">' +
49238            '<input type="search" class="form-control" autocomplete="off"' +
49239              (
49240                this.options.liveSearchPlaceholder === null ? ''
49241                :
49242                ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"'
49243              ) +
49244              ' role="combobox" aria-label="Search" aria-controls="' + this.selectId + '" aria-autocomplete="list">' +
49245          '</div>';
49246      }
49247
49248      if (this.multiple && this.options.actionsBox) {
49249        actionsbox =
49250          '<div class="bs-actionsbox">' +
49251            '<div class="btn-group btn-group-sm btn-block">' +
49252              '<button type="button" class="actions-btn bs-select-all btn ' + classNames.BUTTONCLASS + '">' +
49253                this.options.selectAllText +
49254              '</button>' +
49255              '<button type="button" class="actions-btn bs-deselect-all btn ' + classNames.BUTTONCLASS + '">' +
49256                this.options.deselectAllText +
49257              '</button>' +
49258            '</div>' +
49259          '</div>';
49260      }
49261
49262      if (this.multiple && this.options.doneButton) {
49263        donebutton =
49264          '<div class="bs-donebutton">' +
49265            '<div class="btn-group btn-block">' +
49266              '<button type="button" class="btn btn-sm ' + classNames.BUTTONCLASS + '">' +
49267                this.options.doneButtonText +
49268              '</button>' +
49269            '</div>' +
49270          '</div>';
49271      }
49272
49273      drop =
49274        '<div class="dropdown bootstrap-select' + showTick + inputGroup + '">' +
49275          '<button type="button" tabindex="-1" class="' + this.options.styleBase + ' dropdown-toggle" ' + (this.options.display === 'static' ? 'data-display="static"' : '') + 'data-toggle="dropdown"' + autofocus + ' role="combobox" aria-owns="' + this.selectId + '" aria-haspopup="listbox" aria-expanded="false">' +
49276            '<div class="filter-option">' +
49277              '<div class="filter-option-inner">' +
49278                '<div class="filter-option-inner-inner"></div>' +
49279              '</div> ' +
49280            '</div>' +
49281            (
49282              version.major === '4' ? ''
49283              :
49284              '<span class="bs-caret">' +
49285                this.options.template.caret +
49286              '</span>'
49287            ) +
49288          '</button>' +
49289          '<div class="' + classNames.MENU + ' ' + (version.major === '4' ? '' : classNames.SHOW) + '">' +
49290            header +
49291            searchbox +
49292            actionsbox +
49293            '<div class="inner ' + classNames.SHOW + '" role="listbox" id="' + this.selectId + '" tabindex="-1" ' + multiselectable + '>' +
49294                '<ul class="' + classNames.MENU + ' inner ' + (version.major === '4' ? classNames.SHOW : '') + '" role="presentation">' +
49295                '</ul>' +
49296            '</div>' +
49297            donebutton +
49298          '</div>' +
49299        '</div>';
49300
49301      return $(drop);
49302    },
49303
49304    setPositionData: function () {
49305      this.selectpicker.view.canHighlight = [];
49306      this.selectpicker.view.size = 0;
49307      this.selectpicker.view.firstHighlightIndex = false;
49308
49309      for (var i = 0; i < this.selectpicker.current.data.length; i++) {
49310        var li = this.selectpicker.current.data[i],
49311            canHighlight = true;
49312
49313        if (li.type === 'divider') {
49314          canHighlight = false;
49315          li.height = this.sizeInfo.dividerHeight;
49316        } else if (li.type === 'optgroup-label') {
49317          canHighlight = false;
49318          li.height = this.sizeInfo.dropdownHeaderHeight;
49319        } else {
49320          li.height = this.sizeInfo.liHeight;
49321        }
49322
49323        if (li.disabled) canHighlight = false;
49324
49325        this.selectpicker.view.canHighlight.push(canHighlight);
49326
49327        if (canHighlight) {
49328          this.selectpicker.view.size++;
49329          li.posinset = this.selectpicker.view.size;
49330          if (this.selectpicker.view.firstHighlightIndex === false) this.selectpicker.view.firstHighlightIndex = i;
49331        }
49332
49333        li.position = (i === 0 ? 0 : this.selectpicker.current.data[i - 1].position) + li.height;
49334      }
49335    },
49336
49337    isVirtual: function () {
49338      return (this.options.virtualScroll !== false) && (this.selectpicker.main.elements.length >= this.options.virtualScroll) || this.options.virtualScroll === true;
49339    },
49340
49341    createView: function (isSearching, setSize, refresh) {
49342      var that = this,
49343          scrollTop = 0,
49344          active = [],
49345          selected,
49346          prevActive;
49347
49348      this.selectpicker.isSearching = isSearching;
49349      this.selectpicker.current = isSearching ? this.selectpicker.search : this.selectpicker.main;
49350
49351      this.setPositionData();
49352
49353      if (setSize) {
49354        if (refresh) {
49355          scrollTop = this.$menuInner[0].scrollTop;
49356        } else if (!that.multiple) {
49357          var element = that.$element[0],
49358              selectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
49359
49360          if (typeof selectedIndex === 'number' && that.options.size !== false) {
49361            var selectedData = that.selectpicker.main.data[selectedIndex],
49362                position = selectedData && selectedData.position;
49363
49364            if (position) {
49365              scrollTop = position - ((that.sizeInfo.menuInnerHeight + that.sizeInfo.liHeight) / 2);
49366            }
49367          }
49368        }
49369      }
49370
49371      scroll(scrollTop, true);
49372
49373      this.$menuInner.off('scroll.createView').on('scroll.createView', function (e, updateValue) {
49374        if (!that.noScroll) scroll(this.scrollTop, updateValue);
49375        that.noScroll = false;
49376      });
49377
49378      function scroll (scrollTop, init) {
49379        var size = that.selectpicker.current.elements.length,
49380            chunks = [],
49381            chunkSize,
49382            chunkCount,
49383            firstChunk,
49384            lastChunk,
49385            currentChunk,
49386            prevPositions,
49387            positionIsDifferent,
49388            previousElements,
49389            menuIsDifferent = true,
49390            isVirtual = that.isVirtual();
49391
49392        that.selectpicker.view.scrollTop = scrollTop;
49393
49394        chunkSize = Math.ceil(that.sizeInfo.menuInnerHeight / that.sizeInfo.liHeight * 1.5); // number of options in a chunk
49395        chunkCount = Math.round(size / chunkSize) || 1; // number of chunks
49396
49397        for (var i = 0; i < chunkCount; i++) {
49398          var endOfChunk = (i + 1) * chunkSize;
49399
49400          if (i === chunkCount - 1) {
49401            endOfChunk = size;
49402          }
49403
49404          chunks[i] = [
49405            (i) * chunkSize + (!i ? 0 : 1),
49406            endOfChunk
49407          ];
49408
49409          if (!size) break;
49410
49411          if (currentChunk === undefined && scrollTop - 1 <= that.selectpicker.current.data[endOfChunk - 1].position - that.sizeInfo.menuInnerHeight) {
49412            currentChunk = i;
49413          }
49414        }
49415
49416        if (currentChunk === undefined) currentChunk = 0;
49417
49418        prevPositions = [that.selectpicker.view.position0, that.selectpicker.view.position1];
49419
49420        // always display previous, current, and next chunks
49421        firstChunk = Math.max(0, currentChunk - 1);
49422        lastChunk = Math.min(chunkCount - 1, currentChunk + 1);
49423
49424        that.selectpicker.view.position0 = isVirtual === false ? 0 : (Math.max(0, chunks[firstChunk][0]) || 0);
49425        that.selectpicker.view.position1 = isVirtual === false ? size : (Math.min(size, chunks[lastChunk][1]) || 0);
49426
49427        positionIsDifferent = prevPositions[0] !== that.selectpicker.view.position0 || prevPositions[1] !== that.selectpicker.view.position1;
49428
49429        if (that.activeIndex !== undefined) {
49430          prevActive = that.selectpicker.main.elements[that.prevActiveIndex];
49431          active = that.selectpicker.main.elements[that.activeIndex];
49432          selected = that.selectpicker.main.elements[that.selectedIndex];
49433
49434          if (init) {
49435            if (that.activeIndex !== that.selectedIndex) {
49436              that.defocusItem(active);
49437            }
49438            that.activeIndex = undefined;
49439          }
49440
49441          if (that.activeIndex && that.activeIndex !== that.selectedIndex) {
49442            that.defocusItem(selected);
49443          }
49444        }
49445
49446        if (that.prevActiveIndex !== undefined && that.prevActiveIndex !== that.activeIndex && that.prevActiveIndex !== that.selectedIndex) {
49447          that.defocusItem(prevActive);
49448        }
49449
49450        if (init || positionIsDifferent) {
49451          previousElements = that.selectpicker.view.visibleElements ? that.selectpicker.view.visibleElements.slice() : [];
49452
49453          if (isVirtual === false) {
49454            that.selectpicker.view.visibleElements = that.selectpicker.current.elements;
49455          } else {
49456            that.selectpicker.view.visibleElements = that.selectpicker.current.elements.slice(that.selectpicker.view.position0, that.selectpicker.view.position1);
49457          }
49458
49459          that.setOptionStatus();
49460
49461          // if searching, check to make sure the list has actually been updated before updating DOM
49462          // this prevents unnecessary repaints
49463          if (isSearching || (isVirtual === false && init)) menuIsDifferent = !isEqual(previousElements, that.selectpicker.view.visibleElements);
49464
49465          // if virtual scroll is disabled and not searching,
49466          // menu should never need to be updated more than once
49467          if ((init || isVirtual === true) && menuIsDifferent) {
49468            var menuInner = that.$menuInner[0],
49469                menuFragment = document.createDocumentFragment(),
49470                emptyMenu = menuInner.firstChild.cloneNode(false),
49471                marginTop,
49472                marginBottom,
49473                elements = that.selectpicker.view.visibleElements,
49474                toSanitize = [];
49475
49476            // replace the existing UL with an empty one - this is faster than $.empty()
49477            menuInner.replaceChild(emptyMenu, menuInner.firstChild);
49478
49479            for (var i = 0, visibleElementsLen = elements.length; i < visibleElementsLen; i++) {
49480              var element = elements[i],
49481                  elText,
49482                  elementData;
49483
49484              if (that.options.sanitize) {
49485                elText = element.lastChild;
49486
49487                if (elText) {
49488                  elementData = that.selectpicker.current.data[i + that.selectpicker.view.position0];
49489
49490                  if (elementData && elementData.content && !elementData.sanitized) {
49491                    toSanitize.push(elText);
49492                    elementData.sanitized = true;
49493                  }
49494                }
49495              }
49496
49497              menuFragment.appendChild(element);
49498            }
49499
49500            if (that.options.sanitize && toSanitize.length) {
49501              sanitizeHtml(toSanitize, that.options.whiteList, that.options.sanitizeFn);
49502            }
49503
49504            if (isVirtual === true) {
49505              marginTop = (that.selectpicker.view.position0 === 0 ? 0 : that.selectpicker.current.data[that.selectpicker.view.position0 - 1].position);
49506              marginBottom = (that.selectpicker.view.position1 > size - 1 ? 0 : that.selectpicker.current.data[size - 1].position - that.selectpicker.current.data[that.selectpicker.view.position1 - 1].position);
49507
49508              menuInner.firstChild.style.marginTop = marginTop + 'px';
49509              menuInner.firstChild.style.marginBottom = marginBottom + 'px';
49510            } else {
49511              menuInner.firstChild.style.marginTop = 0;
49512              menuInner.firstChild.style.marginBottom = 0;
49513            }
49514
49515            menuInner.firstChild.appendChild(menuFragment);
49516
49517            // if an option is encountered that is wider than the current menu width, update the menu width accordingly
49518            // switch to ResizeObserver with increased browser support
49519            if (isVirtual === true && that.sizeInfo.hasScrollBar) {
49520              var menuInnerInnerWidth = menuInner.firstChild.offsetWidth;
49521
49522              if (init && menuInnerInnerWidth < that.sizeInfo.menuInnerInnerWidth && that.sizeInfo.totalMenuWidth > that.sizeInfo.selectWidth) {
49523                menuInner.firstChild.style.minWidth = that.sizeInfo.menuInnerInnerWidth + 'px';
49524              } else if (menuInnerInnerWidth > that.sizeInfo.menuInnerInnerWidth) {
49525                // set to 0 to get actual width of menu
49526                that.$menu[0].style.minWidth = 0;
49527
49528                var actualMenuWidth = menuInner.firstChild.offsetWidth;
49529
49530                if (actualMenuWidth > that.sizeInfo.menuInnerInnerWidth) {
49531                  that.sizeInfo.menuInnerInnerWidth = actualMenuWidth;
49532                  menuInner.firstChild.style.minWidth = that.sizeInfo.menuInnerInnerWidth + 'px';
49533                }
49534
49535                // reset to default CSS styling
49536                that.$menu[0].style.minWidth = '';
49537              }
49538            }
49539          }
49540        }
49541
49542        that.prevActiveIndex = that.activeIndex;
49543
49544        if (!that.options.liveSearch) {
49545          that.$menuInner.trigger('focus');
49546        } else if (isSearching && init) {
49547          var index = 0,
49548              newActive;
49549
49550          if (!that.selectpicker.view.canHighlight[index]) {
49551            index = 1 + that.selectpicker.view.canHighlight.slice(1).indexOf(true);
49552          }
49553
49554          newActive = that.selectpicker.view.visibleElements[index];
49555
49556          that.defocusItem(that.selectpicker.view.currentActive);
49557
49558          that.activeIndex = (that.selectpicker.current.data[index] || {}).index;
49559
49560          that.focusItem(newActive);
49561        }
49562      }
49563
49564      $(window)
49565        .off('resize' + EVENT_KEY + '.' + this.selectId + '.createView')
49566        .on('resize' + EVENT_KEY + '.' + this.selectId + '.createView', function () {
49567          var isActive = that.$newElement.hasClass(classNames.SHOW);
49568
49569          if (isActive) scroll(that.$menuInner[0].scrollTop);
49570        });
49571    },
49572
49573    focusItem: function (li, liData, noStyle) {
49574      if (li) {
49575        liData = liData || this.selectpicker.main.data[this.activeIndex];
49576        var a = li.firstChild;
49577
49578        if (a) {
49579          a.setAttribute('aria-setsize', this.selectpicker.view.size);
49580          a.setAttribute('aria-posinset', liData.posinset);
49581
49582          if (noStyle !== true) {
49583            this.focusedParent.setAttribute('aria-activedescendant', a.id);
49584            li.classList.add('active');
49585            a.classList.add('active');
49586          }
49587        }
49588      }
49589    },
49590
49591    defocusItem: function (li) {
49592      if (li) {
49593        li.classList.remove('active');
49594        if (li.firstChild) li.firstChild.classList.remove('active');
49595      }
49596    },
49597
49598    setPlaceholder: function () {
49599      var that = this,
49600          updateIndex = false;
49601
49602      if (this.options.title && !this.multiple) {
49603        if (!this.selectpicker.view.titleOption) this.selectpicker.view.titleOption = document.createElement('option');
49604
49605        // this option doesn't create a new <li> element, but does add a new option at the start,
49606        // so startIndex should increase to prevent having to check every option for the bs-title-option class
49607        updateIndex = true;
49608
49609        var element = this.$element[0],
49610            selectTitleOption = false,
49611            titleNotAppended = !this.selectpicker.view.titleOption.parentNode,
49612            selectedIndex = element.selectedIndex,
49613            selectedOption = element.options[selectedIndex],
49614            navigation = window.performance && window.performance.getEntriesByType('navigation'),
49615            // Safari doesn't support getEntriesByType('navigation') - fall back to performance.navigation
49616            isNotBackForward = (navigation && navigation.length) ? navigation[0].type !== 'back_forward' : window.performance.navigation.type !== 2;
49617
49618        if (titleNotAppended) {
49619          // Use native JS to prepend option (faster)
49620          this.selectpicker.view.titleOption.className = 'bs-title-option';
49621          this.selectpicker.view.titleOption.value = '';
49622
49623          // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.
49624          // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs,
49625          // if so, the select will have the data-selected attribute
49626          selectTitleOption = !selectedOption || (selectedIndex === 0 && selectedOption.defaultSelected === false && this.$element.data('selected') === undefined);
49627        }
49628
49629        if (titleNotAppended || this.selectpicker.view.titleOption.index !== 0) {
49630          element.insertBefore(this.selectpicker.view.titleOption, element.firstChild);
49631        }
49632
49633        // Set selected *after* appending to select,
49634        // otherwise the option doesn't get selected in IE
49635        // set using selectedIndex, as setting the selected attr to true here doesn't work in IE11
49636        if (selectTitleOption && isNotBackForward) {
49637          element.selectedIndex = 0;
49638        } else if (document.readyState !== 'complete') {
49639          // if navigation type is back_forward, there's a chance the select will have its value set by BFCache
49640          // wait for that value to be set, then run render again
49641          window.addEventListener('pageshow', function () {
49642            if (that.selectpicker.view.displayedValue !== element.value) that.render();
49643          });
49644        }
49645      }
49646
49647      return updateIndex;
49648    },
49649
49650    buildData: function () {
49651      var optionSelector = ':not([hidden]):not([data-hidden="true"])',
49652          mainData = [],
49653          optID = 0,
49654          startIndex = this.setPlaceholder() ? 1 : 0; // append the titleOption if necessary and skip the first option in the loop
49655
49656      if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
49657
49658      var selectOptions = this.$element[0].querySelectorAll('select > *' + optionSelector);
49659
49660      function addDivider (config) {
49661        var previousData = mainData[mainData.length - 1];
49662
49663        // ensure optgroup doesn't create back-to-back dividers
49664        if (
49665          previousData &&
49666          previousData.type === 'divider' &&
49667          (previousData.optID || config.optID)
49668        ) {
49669          return;
49670        }
49671
49672        config = config || {};
49673        config.type = 'divider';
49674
49675        mainData.push(config);
49676      }
49677
49678      function addOption (option, config) {
49679        config = config || {};
49680
49681        config.divider = option.getAttribute('data-divider') === 'true';
49682
49683        if (config.divider) {
49684          addDivider({
49685            optID: config.optID
49686          });
49687        } else {
49688          var liIndex = mainData.length,
49689              cssText = option.style.cssText,
49690              inlineStyle = cssText ? htmlEscape(cssText) : '',
49691              optionClass = (option.className || '') + (config.optgroupClass || '');
49692
49693          if (config.optID) optionClass = 'opt ' + optionClass;
49694
49695          config.optionClass = optionClass.trim();
49696          config.inlineStyle = inlineStyle;
49697          config.text = option.textContent;
49698
49699          config.content = option.getAttribute('data-content');
49700          config.tokens = option.getAttribute('data-tokens');
49701          config.subtext = option.getAttribute('data-subtext');
49702          config.icon = option.getAttribute('data-icon');
49703
49704          option.liIndex = liIndex;
49705
49706          config.display = config.content || config.text;
49707          config.type = 'option';
49708          config.index = liIndex;
49709          config.option = option;
49710          config.selected = !!option.selected;
49711          config.disabled = config.disabled || !!option.disabled;
49712
49713          mainData.push(config);
49714        }
49715      }
49716
49717      function addOptgroup (index, selectOptions) {
49718        var optgroup = selectOptions[index],
49719            // skip placeholder option
49720            previous = index - 1 < startIndex ? false : selectOptions[index - 1],
49721            next = selectOptions[index + 1],
49722            options = optgroup.querySelectorAll('option' + optionSelector);
49723
49724        if (!options.length) return;
49725
49726        var config = {
49727              display: htmlEscape(optgroup.label),
49728              subtext: optgroup.getAttribute('data-subtext'),
49729              icon: optgroup.getAttribute('data-icon'),
49730              type: 'optgroup-label',
49731              optgroupClass: ' ' + (optgroup.className || '')
49732            },
49733            headerIndex,
49734            lastIndex;
49735
49736        optID++;
49737
49738        if (previous) {
49739          addDivider({ optID: optID });
49740        }
49741
49742        config.optID = optID;
49743
49744        mainData.push(config);
49745
49746        for (var j = 0, len = options.length; j < len; j++) {
49747          var option = options[j];
49748
49749          if (j === 0) {
49750            headerIndex = mainData.length - 1;
49751            lastIndex = headerIndex + len;
49752          }
49753
49754          addOption(option, {
49755            headerIndex: headerIndex,
49756            lastIndex: lastIndex,
49757            optID: config.optID,
49758            optgroupClass: config.optgroupClass,
49759            disabled: optgroup.disabled
49760          });
49761        }
49762
49763        if (next) {
49764          addDivider({ optID: optID });
49765        }
49766      }
49767
49768      for (var len = selectOptions.length, i = startIndex; i < len; i++) {
49769        var item = selectOptions[i];
49770
49771        if (item.tagName !== 'OPTGROUP') {
49772          addOption(item, {});
49773        } else {
49774          addOptgroup(i, selectOptions);
49775        }
49776      }
49777
49778      this.selectpicker.main.data = this.selectpicker.current.data = mainData;
49779    },
49780
49781    buildList: function () {
49782      var that = this,
49783          selectData = this.selectpicker.main.data,
49784          mainElements = [],
49785          widestOptionLength = 0;
49786
49787      if ((that.options.showTick || that.multiple) && !elementTemplates.checkMark.parentNode) {
49788        elementTemplates.checkMark.className = this.options.iconBase + ' ' + that.options.tickIcon + ' check-mark';
49789        elementTemplates.a.appendChild(elementTemplates.checkMark);
49790      }
49791
49792      function buildElement (item) {
49793        var liElement,
49794            combinedLength = 0;
49795
49796        switch (item.type) {
49797          case 'divider':
49798            liElement = generateOption.li(
49799              false,
49800              classNames.DIVIDER,
49801              (item.optID ? item.optID + 'div' : undefined)
49802            );
49803
49804            break;
49805
49806          case 'option':
49807            liElement = generateOption.li(
49808              generateOption.a(
49809                generateOption.text.call(that, item),
49810                item.optionClass,
49811                item.inlineStyle
49812              ),
49813              '',
49814              item.optID
49815            );
49816
49817            if (liElement.firstChild) {
49818              liElement.firstChild.id = that.selectId + '-' + item.index;
49819            }
49820
49821            break;
49822
49823          case 'optgroup-label':
49824            liElement = generateOption.li(
49825              generateOption.label.call(that, item),
49826              'dropdown-header' + item.optgroupClass,
49827              item.optID
49828            );
49829
49830            break;
49831        }
49832
49833        item.element = liElement;
49834        mainElements.push(liElement);
49835
49836        // count the number of characters in the option - not perfect, but should work in most cases
49837        if (item.display) combinedLength += item.display.length;
49838        if (item.subtext) combinedLength += item.subtext.length;
49839        // if there is an icon, ensure this option's width is checked
49840        if (item.icon) combinedLength += 1;
49841
49842        if (combinedLength > widestOptionLength) {
49843          widestOptionLength = combinedLength;
49844
49845          // guess which option is the widest
49846          // use this when calculating menu width
49847          // not perfect, but it's fast, and the width will be updating accordingly when scrolling
49848          that.selectpicker.view.widestOption = mainElements[mainElements.length - 1];
49849        }
49850      }
49851
49852      for (var len = selectData.length, i = 0; i < len; i++) {
49853        var item = selectData[i];
49854
49855        buildElement(item);
49856      }
49857
49858      this.selectpicker.main.elements = this.selectpicker.current.elements = mainElements;
49859    },
49860
49861    findLis: function () {
49862      return this.$menuInner.find('.inner > li');
49863    },
49864
49865    render: function () {
49866      var that = this,
49867          element = this.$element[0],
49868          // ensure titleOption is appended and selected (if necessary) before getting selectedOptions
49869          placeholderSelected = this.setPlaceholder() && element.selectedIndex === 0,
49870          selectedOptions = getSelectedOptions(element, this.options.hideDisabled),
49871          selectedCount = selectedOptions.length,
49872          button = this.$button[0],
49873          buttonInner = button.querySelector('.filter-option-inner-inner'),
49874          multipleSeparator = document.createTextNode(this.options.multipleSeparator),
49875          titleFragment = elementTemplates.fragment.cloneNode(false),
49876          showCount,
49877          countMax,
49878          hasContent = false;
49879
49880      button.classList.toggle('bs-placeholder', that.multiple ? !selectedCount : !getSelectValues(element, selectedOptions));
49881
49882      if (!that.multiple && selectedOptions.length === 1) {
49883        that.selectpicker.view.displayedValue = getSelectValues(element, selectedOptions);
49884      }
49885
49886      if (this.options.selectedTextFormat === 'static') {
49887        titleFragment = generateOption.text.call(this, { text: this.options.title }, true);
49888      } else {
49889        showCount = this.multiple && this.options.selectedTextFormat.indexOf('count') !== -1 && selectedCount > 1;
49890
49891        // determine if the number of selected options will be shown (showCount === true)
49892        if (showCount) {
49893          countMax = this.options.selectedTextFormat.split('>');
49894          showCount = (countMax.length > 1 && selectedCount > countMax[1]) || (countMax.length === 1 && selectedCount >= 2);
49895        }
49896
49897        // only loop through all selected options if the count won't be shown
49898        if (showCount === false) {
49899          if (!placeholderSelected) {
49900            for (var selectedIndex = 0; selectedIndex < selectedCount; selectedIndex++) {
49901              if (selectedIndex < 50) {
49902                var option = selectedOptions[selectedIndex],
49903                    thisData = this.selectpicker.main.data[option.liIndex],
49904                    titleOptions = {};
49905
49906                if (this.multiple && selectedIndex > 0) {
49907                  titleFragment.appendChild(multipleSeparator.cloneNode(false));
49908                }
49909
49910                if (option.title) {
49911                  titleOptions.text = option.title;
49912                } else if (thisData) {
49913                  if (thisData.content && that.options.showContent) {
49914                    titleOptions.content = thisData.content.toString();
49915                    hasContent = true;
49916                  } else {
49917                    if (that.options.showIcon) {
49918                      titleOptions.icon = thisData.icon;
49919                    }
49920                    if (that.options.showSubtext && !that.multiple && thisData.subtext) titleOptions.subtext = ' ' + thisData.subtext;
49921                    titleOptions.text = option.textContent.trim();
49922                  }
49923                }
49924
49925                titleFragment.appendChild(generateOption.text.call(this, titleOptions, true));
49926              } else {
49927                break;
49928              }
49929            }
49930
49931            // add ellipsis
49932            if (selectedCount > 49) {
49933              titleFragment.appendChild(document.createTextNode('...'));
49934            }
49935          }
49936        } else {
49937          var optionSelector = ':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';
49938          if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
49939
49940          // If this is a multiselect, and selectedTextFormat is count, then show 1 of 2 selected, etc.
49941          var totalCount = this.$element[0].querySelectorAll('select > option' + optionSelector + ', optgroup' + optionSelector + ' option' + optionSelector).length,
49942              tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedCount, totalCount) : this.options.countSelectedText;
49943
49944          titleFragment = generateOption.text.call(this, {
49945            text: tr8nText.replace('{0}', selectedCount.toString()).replace('{1}', totalCount.toString())
49946          }, true);
49947        }
49948      }
49949
49950      if (this.options.title == undefined) {
49951        // use .attr to ensure undefined is returned if title attribute is not set
49952        this.options.title = this.$element.attr('title');
49953      }
49954
49955      // If the select doesn't have a title, then use the default, or if nothing is set at all, use noneSelectedText
49956      if (!titleFragment.childNodes.length) {
49957        titleFragment = generateOption.text.call(this, {
49958          text: typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText
49959        }, true);
49960      }
49961
49962      // strip all HTML tags and trim the result, then unescape any escaped tags
49963      button.title = titleFragment.textContent.replace(/<[^>]*>?/g, '').trim();
49964
49965      if (this.options.sanitize && hasContent) {
49966        sanitizeHtml([titleFragment], that.options.whiteList, that.options.sanitizeFn);
49967      }
49968
49969      buttonInner.innerHTML = '';
49970      buttonInner.appendChild(titleFragment);
49971
49972      if (version.major < 4 && this.$newElement[0].classList.contains('bs3-has-addon')) {
49973        var filterExpand = button.querySelector('.filter-expand'),
49974            clone = buttonInner.cloneNode(true);
49975
49976        clone.className = 'filter-expand';
49977
49978        if (filterExpand) {
49979          button.replaceChild(clone, filterExpand);
49980        } else {
49981          button.appendChild(clone);
49982        }
49983      }
49984
49985      this.$element.trigger('rendered' + EVENT_KEY);
49986    },
49987
49988    /**
49989     * @param [style]
49990     * @param [status]
49991     */
49992    setStyle: function (newStyle, status) {
49993      var button = this.$button[0],
49994          newElement = this.$newElement[0],
49995          style = this.options.style.trim(),
49996          buttonClass;
49997
49998      if (this.$element.attr('class')) {
49999        this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
50000      }
50001
50002      if (version.major < 4) {
50003        newElement.classList.add('bs3');
50004
50005        if (newElement.parentNode.classList && newElement.parentNode.classList.contains('input-group') &&
50006            (newElement.previousElementSibling || newElement.nextElementSibling) &&
50007            (newElement.previousElementSibling || newElement.nextElementSibling).classList.contains('input-group-addon')
50008        ) {
50009          newElement.classList.add('bs3-has-addon');
50010        }
50011      }
50012
50013      if (newStyle) {
50014        buttonClass = newStyle.trim();
50015      } else {
50016        buttonClass = style;
50017      }
50018
50019      if (status == 'add') {
50020        if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
50021      } else if (status == 'remove') {
50022        if (buttonClass) button.classList.remove.apply(button.classList, buttonClass.split(' '));
50023      } else {
50024        if (style) button.classList.remove.apply(button.classList, style.split(' '));
50025        if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
50026      }
50027    },
50028
50029    liHeight: function (refresh) {
50030      if (!refresh && (this.options.size === false || Object.keys(this.sizeInfo).length)) return;
50031
50032      var newElement = elementTemplates.div.cloneNode(false),
50033          menu = elementTemplates.div.cloneNode(false),
50034          menuInner = elementTemplates.div.cloneNode(false),
50035          menuInnerInner = document.createElement('ul'),
50036          divider = elementTemplates.li.cloneNode(false),
50037          dropdownHeader = elementTemplates.li.cloneNode(false),
50038          li,
50039          a = elementTemplates.a.cloneNode(false),
50040          text = elementTemplates.span.cloneNode(false),
50041          header = this.options.header && this.$menu.find('.' + classNames.POPOVERHEADER).length > 0 ? this.$menu.find('.' + classNames.POPOVERHEADER)[0].cloneNode(true) : null,
50042          search = this.options.liveSearch ? elementTemplates.div.cloneNode(false) : null,
50043          actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
50044          doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null,
50045          firstOption = this.$element.find('option')[0];
50046
50047      this.sizeInfo.selectWidth = this.$newElement[0].offsetWidth;
50048
50049      text.className = 'text';
50050      a.className = 'dropdown-item ' + (firstOption ? firstOption.className : '');
50051      newElement.className = this.$menu[0].parentNode.className + ' ' + classNames.SHOW;
50052      newElement.style.width = 0; // ensure button width doesn't affect natural width of menu when calculating
50053      if (this.options.width === 'auto') menu.style.minWidth = 0;
50054      menu.className = classNames.MENU + ' ' + classNames.SHOW;
50055      menuInner.className = 'inner ' + classNames.SHOW;
50056      menuInnerInner.className = classNames.MENU + ' inner ' + (version.major === '4' ? classNames.SHOW : '');
50057      divider.className = classNames.DIVIDER;
50058      dropdownHeader.className = 'dropdown-header';
50059
50060      text.appendChild(document.createTextNode('\u200b'));
50061
50062      if (this.selectpicker.current.data.length) {
50063        for (var i = 0; i < this.selectpicker.current.data.length; i++) {
50064          var data = this.selectpicker.current.data[i];
50065          if (data.type === 'option') {
50066            li = data.element;
50067            break;
50068          }
50069        }
50070      } else {
50071        li = elementTemplates.li.cloneNode(false);
50072        a.appendChild(text);
50073        li.appendChild(a);
50074      }
50075
50076      dropdownHeader.appendChild(text.cloneNode(true));
50077
50078      if (this.selectpicker.view.widestOption) {
50079        menuInnerInner.appendChild(this.selectpicker.view.widestOption.cloneNode(true));
50080      }
50081
50082      menuInnerInner.appendChild(li);
50083      menuInnerInner.appendChild(divider);
50084      menuInnerInner.appendChild(dropdownHeader);
50085      if (header) menu.appendChild(header);
50086      if (search) {
50087        var input = document.createElement('input');
50088        search.className = 'bs-searchbox';
50089        input.className = 'form-control';
50090        search.appendChild(input);
50091        menu.appendChild(search);
50092      }
50093      if (actions) menu.appendChild(actions);
50094      menuInner.appendChild(menuInnerInner);
50095      menu.appendChild(menuInner);
50096      if (doneButton) menu.appendChild(doneButton);
50097      newElement.appendChild(menu);
50098
50099      document.body.appendChild(newElement);
50100
50101      var liHeight = li.offsetHeight,
50102          dropdownHeaderHeight = dropdownHeader ? dropdownHeader.offsetHeight : 0,
50103          headerHeight = header ? header.offsetHeight : 0,
50104          searchHeight = search ? search.offsetHeight : 0,
50105          actionsHeight = actions ? actions.offsetHeight : 0,
50106          doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
50107          dividerHeight = $(divider).outerHeight(true),
50108          // fall back to jQuery if getComputedStyle is not supported
50109          menuStyle = window.getComputedStyle ? window.getComputedStyle(menu) : false,
50110          menuWidth = menu.offsetWidth,
50111          $menu = menuStyle ? null : $(menu),
50112          menuPadding = {
50113            vert: toInteger(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
50114                  toInteger(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
50115                  toInteger(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +
50116                  toInteger(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),
50117            horiz: toInteger(menuStyle ? menuStyle.paddingLeft : $menu.css('paddingLeft')) +
50118                  toInteger(menuStyle ? menuStyle.paddingRight : $menu.css('paddingRight')) +
50119                  toInteger(menuStyle ? menuStyle.borderLeftWidth : $menu.css('borderLeftWidth')) +
50120                  toInteger(menuStyle ? menuStyle.borderRightWidth : $menu.css('borderRightWidth'))
50121          },
50122          menuExtras = {
50123            vert: menuPadding.vert +
50124                  toInteger(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +
50125                  toInteger(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2,
50126            horiz: menuPadding.horiz +
50127                  toInteger(menuStyle ? menuStyle.marginLeft : $menu.css('marginLeft')) +
50128                  toInteger(menuStyle ? menuStyle.marginRight : $menu.css('marginRight')) + 2
50129          },
50130          scrollBarWidth;
50131
50132      menuInner.style.overflowY = 'scroll';
50133
50134      scrollBarWidth = menu.offsetWidth - menuWidth;
50135
50136      document.body.removeChild(newElement);
50137
50138      this.sizeInfo.liHeight = liHeight;
50139      this.sizeInfo.dropdownHeaderHeight = dropdownHeaderHeight;
50140      this.sizeInfo.headerHeight = headerHeight;
50141      this.sizeInfo.searchHeight = searchHeight;
50142      this.sizeInfo.actionsHeight = actionsHeight;
50143      this.sizeInfo.doneButtonHeight = doneButtonHeight;
50144      this.sizeInfo.dividerHeight = dividerHeight;
50145      this.sizeInfo.menuPadding = menuPadding;
50146      this.sizeInfo.menuExtras = menuExtras;
50147      this.sizeInfo.menuWidth = menuWidth;
50148      this.sizeInfo.menuInnerInnerWidth = menuWidth - menuPadding.horiz;
50149      this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth;
50150      this.sizeInfo.scrollBarWidth = scrollBarWidth;
50151      this.sizeInfo.selectHeight = this.$newElement[0].offsetHeight;
50152
50153      this.setPositionData();
50154    },
50155
50156    getSelectPosition: function () {
50157      var that = this,
50158          $window = $(window),
50159          pos = that.$newElement.offset(),
50160          $container = $(that.options.container),
50161          containerPos;
50162
50163      if (that.options.container && $container.length && !$container.is('body')) {
50164        containerPos = $container.offset();
50165        containerPos.top += parseInt($container.css('borderTopWidth'));
50166        containerPos.left += parseInt($container.css('borderLeftWidth'));
50167      } else {
50168        containerPos = { top: 0, left: 0 };
50169      }
50170
50171      var winPad = that.options.windowPadding;
50172
50173      this.sizeInfo.selectOffsetTop = pos.top - containerPos.top - $window.scrollTop();
50174      this.sizeInfo.selectOffsetBot = $window.height() - this.sizeInfo.selectOffsetTop - this.sizeInfo.selectHeight - containerPos.top - winPad[2];
50175      this.sizeInfo.selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft();
50176      this.sizeInfo.selectOffsetRight = $window.width() - this.sizeInfo.selectOffsetLeft - this.sizeInfo.selectWidth - containerPos.left - winPad[1];
50177      this.sizeInfo.selectOffsetTop -= winPad[0];
50178      this.sizeInfo.selectOffsetLeft -= winPad[3];
50179    },
50180
50181    setMenuSize: function (isAuto) {
50182      this.getSelectPosition();
50183
50184      var selectWidth = this.sizeInfo.selectWidth,
50185          liHeight = this.sizeInfo.liHeight,
50186          headerHeight = this.sizeInfo.headerHeight,
50187          searchHeight = this.sizeInfo.searchHeight,
50188          actionsHeight = this.sizeInfo.actionsHeight,
50189          doneButtonHeight = this.sizeInfo.doneButtonHeight,
50190          divHeight = this.sizeInfo.dividerHeight,
50191          menuPadding = this.sizeInfo.menuPadding,
50192          menuInnerHeight,
50193          menuHeight,
50194          divLength = 0,
50195          minHeight,
50196          _minHeight,
50197          maxHeight,
50198          menuInnerMinHeight,
50199          estimate,
50200          isDropup;
50201
50202      if (this.options.dropupAuto) {
50203        // Get the estimated height of the menu without scrollbars.
50204        // This is useful for smaller menus, where there might be plenty of room
50205        // below the button without setting dropup, but we can't know
50206        // the exact height of the menu until createView is called later
50207        estimate = liHeight * this.selectpicker.current.elements.length + menuPadding.vert;
50208
50209        isDropup = this.sizeInfo.selectOffsetTop - this.sizeInfo.selectOffsetBot > this.sizeInfo.menuExtras.vert && estimate + this.sizeInfo.menuExtras.vert + 50 > this.sizeInfo.selectOffsetBot;
50210
50211        // ensure dropup doesn't change while searching (so menu doesn't bounce back and forth)
50212        if (this.selectpicker.isSearching === true) {
50213          isDropup = this.selectpicker.dropup;
50214        }
50215
50216        this.$newElement.toggleClass(classNames.DROPUP, isDropup);
50217        this.selectpicker.dropup = isDropup;
50218      }
50219
50220      if (this.options.size === 'auto') {
50221        _minHeight = this.selectpicker.current.elements.length > 3 ? this.sizeInfo.liHeight * 3 + this.sizeInfo.menuExtras.vert - 2 : 0;
50222        menuHeight = this.sizeInfo.selectOffsetBot - this.sizeInfo.menuExtras.vert;
50223        minHeight = _minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
50224        menuInnerMinHeight = Math.max(_minHeight - menuPadding.vert, 0);
50225
50226        if (this.$newElement.hasClass(classNames.DROPUP)) {
50227          menuHeight = this.sizeInfo.selectOffsetTop - this.sizeInfo.menuExtras.vert;
50228        }
50229
50230        maxHeight = menuHeight;
50231        menuInnerHeight = menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert;
50232      } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
50233        for (var i = 0; i < this.options.size; i++) {
50234          if (this.selectpicker.current.data[i].type === 'divider') divLength++;
50235        }
50236
50237        menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;
50238        menuInnerHeight = menuHeight - menuPadding.vert;
50239        maxHeight = menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
50240        minHeight = menuInnerMinHeight = '';
50241      }
50242
50243      this.$menu.css({
50244        'max-height': maxHeight + 'px',
50245        'overflow': 'hidden',
50246        'min-height': minHeight + 'px'
50247      });
50248
50249      this.$menuInner.css({
50250        'max-height': menuInnerHeight + 'px',
50251        'overflow-y': 'auto',
50252        'min-height': menuInnerMinHeight + 'px'
50253      });
50254
50255      // ensure menuInnerHeight is always a positive number to prevent issues calculating chunkSize in createView
50256      this.sizeInfo.menuInnerHeight = Math.max(menuInnerHeight, 1);
50257
50258      if (this.selectpicker.current.data.length && this.selectpicker.current.data[this.selectpicker.current.data.length - 1].position > this.sizeInfo.menuInnerHeight) {
50259        this.sizeInfo.hasScrollBar = true;
50260        this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth + this.sizeInfo.scrollBarWidth;
50261      }
50262
50263      if (this.options.dropdownAlignRight === 'auto') {
50264        this.$menu.toggleClass(classNames.MENURIGHT, this.sizeInfo.selectOffsetLeft > this.sizeInfo.selectOffsetRight && this.sizeInfo.selectOffsetRight < (this.sizeInfo.totalMenuWidth - selectWidth));
50265      }
50266
50267      if (this.dropdown && this.dropdown._popper) this.dropdown._popper.update();
50268    },
50269
50270    setSize: function (refresh) {
50271      this.liHeight(refresh);
50272
50273      if (this.options.header) this.$menu.css('padding-top', 0);
50274
50275      if (this.options.size !== false) {
50276        var that = this,
50277            $window = $(window);
50278
50279        this.setMenuSize();
50280
50281        if (this.options.liveSearch) {
50282          this.$searchbox
50283            .off('input.setMenuSize propertychange.setMenuSize')
50284            .on('input.setMenuSize propertychange.setMenuSize', function () {
50285              return that.setMenuSize();
50286            });
50287        }
50288
50289        if (this.options.size === 'auto') {
50290          $window
50291            .off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize')
50292            .on('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize', function () {
50293              return that.setMenuSize();
50294            });
50295        } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
50296          $window.off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize');
50297        }
50298      }
50299
50300      this.createView(false, true, refresh);
50301    },
50302
50303    setWidth: function () {
50304      var that = this;
50305
50306      if (this.options.width === 'auto') {
50307        requestAnimationFrame(function () {
50308          that.$menu.css('min-width', '0');
50309
50310          that.$element.on('loaded' + EVENT_KEY, function () {
50311            that.liHeight();
50312            that.setMenuSize();
50313
50314            // Get correct width if element is hidden
50315            var $selectClone = that.$newElement.clone().appendTo('body'),
50316                btnWidth = $selectClone.css('width', 'auto').children('button').outerWidth();
50317
50318            $selectClone.remove();
50319
50320            // Set width to whatever's larger, button title or longest option
50321            that.sizeInfo.selectWidth = Math.max(that.sizeInfo.totalMenuWidth, btnWidth);
50322            that.$newElement.css('width', that.sizeInfo.selectWidth + 'px');
50323          });
50324        });
50325      } else if (this.options.width === 'fit') {
50326        // Remove inline min-width so width can be changed from 'auto'
50327        this.$menu.css('min-width', '');
50328        this.$newElement.css('width', '').addClass('fit-width');
50329      } else if (this.options.width) {
50330        // Remove inline min-width so width can be changed from 'auto'
50331        this.$menu.css('min-width', '');
50332        this.$newElement.css('width', this.options.width);
50333      } else {
50334        // Remove inline min-width/width so width can be changed
50335        this.$menu.css('min-width', '');
50336        this.$newElement.css('width', '');
50337      }
50338      // Remove fit-width class if width is changed programmatically
50339      if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
50340        this.$newElement[0].classList.remove('fit-width');
50341      }
50342    },
50343
50344    selectPosition: function () {
50345      this.$bsContainer = $('<div class="bs-container" />');
50346
50347      var that = this,
50348          $container = $(this.options.container),
50349          pos,
50350          containerPos,
50351          actualHeight,
50352          getPlacement = function ($element) {
50353            var containerPosition = {},
50354                // fall back to dropdown's default display setting if display is not manually set
50355                display = that.options.display || (
50356                  // Bootstrap 3 doesn't have $.fn.dropdown.Constructor.Default
50357                  $.fn.dropdown.Constructor.Default ? $.fn.dropdown.Constructor.Default.display
50358                  : false
50359                );
50360
50361            that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass(classNames.DROPUP, $element.hasClass(classNames.DROPUP));
50362            pos = $element.offset();
50363
50364            if (!$container.is('body')) {
50365              containerPos = $container.offset();
50366              containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop();
50367              containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft();
50368            } else {
50369              containerPos = { top: 0, left: 0 };
50370            }
50371
50372            actualHeight = $element.hasClass(classNames.DROPUP) ? 0 : $element[0].offsetHeight;
50373
50374            // Bootstrap 4+ uses Popper for menu positioning
50375            if (version.major < 4 || display === 'static') {
50376              containerPosition.top = pos.top - containerPos.top + actualHeight;
50377              containerPosition.left = pos.left - containerPos.left;
50378            }
50379
50380            containerPosition.width = $element[0].offsetWidth;
50381
50382            that.$bsContainer.css(containerPosition);
50383          };
50384
50385      this.$button.on('click.bs.dropdown.data-api', function () {
50386        if (that.isDisabled()) {
50387          return;
50388        }
50389
50390        getPlacement(that.$newElement);
50391
50392        that.$bsContainer
50393          .appendTo(that.options.container)
50394          .toggleClass(classNames.SHOW, !that.$button.hasClass(classNames.SHOW))
50395          .append(that.$menu);
50396      });
50397
50398      $(window)
50399        .off('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId)
50400        .on('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId, function () {
50401          var isActive = that.$newElement.hasClass(classNames.SHOW);
50402
50403          if (isActive) getPlacement(that.$newElement);
50404        });
50405
50406      this.$element.on('hide' + EVENT_KEY, function () {
50407        that.$menu.data('height', that.$menu.height());
50408        that.$bsContainer.detach();
50409      });
50410    },
50411
50412    setOptionStatus: function (selectedOnly) {
50413      var that = this;
50414
50415      that.noScroll = false;
50416
50417      if (that.selectpicker.view.visibleElements && that.selectpicker.view.visibleElements.length) {
50418        for (var i = 0; i < that.selectpicker.view.visibleElements.length; i++) {
50419          var liData = that.selectpicker.current.data[i + that.selectpicker.view.position0],
50420              option = liData.option;
50421
50422          if (option) {
50423            if (selectedOnly !== true) {
50424              that.setDisabled(
50425                liData.index,
50426                liData.disabled
50427              );
50428            }
50429
50430            that.setSelected(
50431              liData.index,
50432              option.selected
50433            );
50434          }
50435        }
50436      }
50437    },
50438
50439    /**
50440     * @param {number} index - the index of the option that is being changed
50441     * @param {boolean} selected - true if the option is being selected, false if being deselected
50442     */
50443    setSelected: function (index, selected) {
50444      var li = this.selectpicker.main.elements[index],
50445          liData = this.selectpicker.main.data[index],
50446          activeIndexIsSet = this.activeIndex !== undefined,
50447          thisIsActive = this.activeIndex === index,
50448          prevActive,
50449          a,
50450          // if current option is already active
50451          // OR
50452          // if the current option is being selected, it's NOT multiple, and
50453          // activeIndex is undefined:
50454          //  - when the menu is first being opened, OR
50455          //  - after a search has been performed, OR
50456          //  - when retainActive is false when selecting a new option (i.e. index of the newly selected option is not the same as the current activeIndex)
50457          keepActive = thisIsActive || (selected && !this.multiple && !activeIndexIsSet);
50458
50459      liData.selected = selected;
50460
50461      a = li.firstChild;
50462
50463      if (selected) {
50464        this.selectedIndex = index;
50465      }
50466
50467      li.classList.toggle('selected', selected);
50468
50469      if (keepActive) {
50470        this.focusItem(li, liData);
50471        this.selectpicker.view.currentActive = li;
50472        this.activeIndex = index;
50473      } else {
50474        this.defocusItem(li);
50475      }
50476
50477      if (a) {
50478        a.classList.toggle('selected', selected);
50479
50480        if (selected) {
50481          a.setAttribute('aria-selected', true);
50482        } else {
50483          if (this.multiple) {
50484            a.setAttribute('aria-selected', false);
50485          } else {
50486            a.removeAttribute('aria-selected');
50487          }
50488        }
50489      }
50490
50491      if (!keepActive && !activeIndexIsSet && selected && this.prevActiveIndex !== undefined) {
50492        prevActive = this.selectpicker.main.elements[this.prevActiveIndex];
50493
50494        this.defocusItem(prevActive);
50495      }
50496    },
50497
50498    /**
50499     * @param {number} index - the index of the option that is being disabled
50500     * @param {boolean} disabled - true if the option is being disabled, false if being enabled
50501     */
50502    setDisabled: function (index, disabled) {
50503      var li = this.selectpicker.main.elements[index],
50504          a;
50505
50506      this.selectpicker.main.data[index].disabled = disabled;
50507
50508      a = li.firstChild;
50509
50510      li.classList.toggle(classNames.DISABLED, disabled);
50511
50512      if (a) {
50513        if (version.major === '4') a.classList.toggle(classNames.DISABLED, disabled);
50514
50515        if (disabled) {
50516          a.setAttribute('aria-disabled', disabled);
50517          a.setAttribute('tabindex', -1);
50518        } else {
50519          a.removeAttribute('aria-disabled');
50520          a.setAttribute('tabindex', 0);
50521        }
50522      }
50523    },
50524
50525    isDisabled: function () {
50526      return this.$element[0].disabled;
50527    },
50528
50529    checkDisabled: function () {
50530      if (this.isDisabled()) {
50531        this.$newElement[0].classList.add(classNames.DISABLED);
50532        this.$button.addClass(classNames.DISABLED).attr('aria-disabled', true);
50533      } else {
50534        if (this.$button[0].classList.contains(classNames.DISABLED)) {
50535          this.$newElement[0].classList.remove(classNames.DISABLED);
50536          this.$button.removeClass(classNames.DISABLED).attr('aria-disabled', false);
50537        }
50538      }
50539    },
50540
50541    clickListener: function () {
50542      var that = this,
50543          $document = $(document);
50544
50545      $document.data('spaceSelect', false);
50546
50547      this.$button.on('keyup', function (e) {
50548        if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
50549          e.preventDefault();
50550          $document.data('spaceSelect', false);
50551        }
50552      });
50553
50554      this.$newElement.on('show.bs.dropdown', function () {
50555        if (version.major > 3 && !that.dropdown) {
50556          that.dropdown = that.$button.data('bs.dropdown');
50557          that.dropdown._menu = that.$menu[0];
50558        }
50559      });
50560
50561      this.$button.on('click.bs.dropdown.data-api', function () {
50562        if (!that.$newElement.hasClass(classNames.SHOW)) {
50563          that.setSize();
50564        }
50565      });
50566
50567      function setFocus () {
50568        if (that.options.liveSearch) {
50569          that.$searchbox.trigger('focus');
50570        } else {
50571          that.$menuInner.trigger('focus');
50572        }
50573      }
50574
50575      function checkPopperExists () {
50576        if (that.dropdown && that.dropdown._popper && that.dropdown._popper.state.isCreated) {
50577          setFocus();
50578        } else {
50579          requestAnimationFrame(checkPopperExists);
50580        }
50581      }
50582
50583      this.$element.on('shown' + EVENT_KEY, function () {
50584        if (that.$menuInner[0].scrollTop !== that.selectpicker.view.scrollTop) {
50585          that.$menuInner[0].scrollTop = that.selectpicker.view.scrollTop;
50586        }
50587
50588        if (version.major > 3) {
50589          requestAnimationFrame(checkPopperExists);
50590        } else {
50591          setFocus();
50592        }
50593      });
50594
50595      // ensure posinset and setsize are correct before selecting an option via a click
50596      this.$menuInner.on('mouseenter', 'li a', function (e) {
50597        var hoverLi = this.parentElement,
50598            position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
50599            index = Array.prototype.indexOf.call(hoverLi.parentElement.children, hoverLi),
50600            hoverData = that.selectpicker.current.data[index + position0];
50601
50602        that.focusItem(hoverLi, hoverData, true);
50603      });
50604
50605      this.$menuInner.on('click', 'li a', function (e, retainActive) {
50606        var $this = $(this),
50607            element = that.$element[0],
50608            position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
50609            clickedData = that.selectpicker.current.data[$this.parent().index() + position0],
50610            clickedIndex = clickedData.index,
50611            prevValue = getSelectValues(element),
50612            prevIndex = element.selectedIndex,
50613            prevOption = element.options[prevIndex],
50614            triggerChange = true;
50615
50616        // Don't close on multi choice menu
50617        if (that.multiple && that.options.maxOptions !== 1) {
50618          e.stopPropagation();
50619        }
50620
50621        e.preventDefault();
50622
50623        // Don't run if the select is disabled
50624        if (!that.isDisabled() && !$this.parent().hasClass(classNames.DISABLED)) {
50625          var option = clickedData.option,
50626              $option = $(option),
50627              state = option.selected,
50628              $optgroup = $option.parent('optgroup'),
50629              $optgroupOptions = $optgroup.find('option'),
50630              maxOptions = that.options.maxOptions,
50631              maxOptionsGrp = $optgroup.data('maxOptions') || false;
50632
50633          if (clickedIndex === that.activeIndex) retainActive = true;
50634
50635          if (!retainActive) {
50636            that.prevActiveIndex = that.activeIndex;
50637            that.activeIndex = undefined;
50638          }
50639
50640          if (!that.multiple) { // Deselect all others if not multi select box
50641            if (prevOption) prevOption.selected = false;
50642            option.selected = true;
50643            that.setSelected(clickedIndex, true);
50644          } else { // Toggle the one we have chosen if we are multi select.
50645            option.selected = !state;
50646
50647            that.setSelected(clickedIndex, !state);
50648            that.focusedParent.focus();
50649
50650            if (maxOptions !== false || maxOptionsGrp !== false) {
50651              var maxReached = maxOptions < getSelectedOptions(element).length,
50652                  maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
50653
50654              if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
50655                if (maxOptions && maxOptions == 1) {
50656                  element.selectedIndex = -1;
50657                  option.selected = true;
50658                  that.setOptionStatus(true);
50659                } else if (maxOptionsGrp && maxOptionsGrp == 1) {
50660                  for (var i = 0; i < $optgroupOptions.length; i++) {
50661                    var _option = $optgroupOptions[i];
50662                    _option.selected = false;
50663                    that.setSelected(_option.liIndex, false);
50664                  }
50665
50666                  option.selected = true;
50667                  that.setSelected(clickedIndex, true);
50668                } else {
50669                  var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText,
50670                      maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText,
50671                      maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
50672                      maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
50673                      $notify = $('<div class="notify"></div>');
50674                  // If {var} is set in array, replace it
50675                  /** @deprecated */
50676                  if (maxOptionsArr[2]) {
50677                    maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
50678                    maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
50679                  }
50680
50681                  option.selected = false;
50682
50683                  that.$menu.append($notify);
50684
50685                  if (maxOptions && maxReached) {
50686                    $notify.append($('<div>' + maxTxt + '</div>'));
50687                    triggerChange = false;
50688                    that.$element.trigger('maxReached' + EVENT_KEY);
50689                  }
50690
50691                  if (maxOptionsGrp && maxReachedGrp) {
50692                    $notify.append($('<div>' + maxTxtGrp + '</div>'));
50693                    triggerChange = false;
50694                    that.$element.trigger('maxReachedGrp' + EVENT_KEY);
50695                  }
50696
50697                  setTimeout(function () {
50698                    that.setSelected(clickedIndex, false);
50699                  }, 10);
50700
50701                  $notify[0].classList.add('fadeOut');
50702
50703                  setTimeout(function () {
50704                    $notify.remove();
50705                  }, 1050);
50706                }
50707              }
50708            }
50709          }
50710
50711          if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) {
50712            that.$button.trigger('focus');
50713          } else if (that.options.liveSearch) {
50714            that.$searchbox.trigger('focus');
50715          }
50716
50717          // Trigger select 'change'
50718          if (triggerChange) {
50719            if (that.multiple || prevIndex !== element.selectedIndex) {
50720              // $option.prop('selected') is current option state (selected/unselected). prevValue is the value of the select prior to being changed.
50721              changedArguments = [option.index, $option.prop('selected'), prevValue];
50722              that.$element
50723                .triggerNative('change');
50724            }
50725          }
50726        }
50727      });
50728
50729      this.$menu.on('click', 'li.' + classNames.DISABLED + ' a, .' + classNames.POPOVERHEADER + ', .' + classNames.POPOVERHEADER + ' :not(.close)', function (e) {
50730        if (e.currentTarget == this) {
50731          e.preventDefault();
50732          e.stopPropagation();
50733          if (that.options.liveSearch && !$(e.target).hasClass('close')) {
50734            that.$searchbox.trigger('focus');
50735          } else {
50736            that.$button.trigger('focus');
50737          }
50738        }
50739      });
50740
50741      this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
50742        e.preventDefault();
50743        e.stopPropagation();
50744        if (that.options.liveSearch) {
50745          that.$searchbox.trigger('focus');
50746        } else {
50747          that.$button.trigger('focus');
50748        }
50749      });
50750
50751      this.$menu.on('click', '.' + classNames.POPOVERHEADER + ' .close', function () {
50752        that.$button.trigger('click');
50753      });
50754
50755      this.$searchbox.on('click', function (e) {
50756        e.stopPropagation();
50757      });
50758
50759      this.$menu.on('click', '.actions-btn', function (e) {
50760        if (that.options.liveSearch) {
50761          that.$searchbox.trigger('focus');
50762        } else {
50763          that.$button.trigger('focus');
50764        }
50765
50766        e.preventDefault();
50767        e.stopPropagation();
50768
50769        if ($(this).hasClass('bs-select-all')) {
50770          that.selectAll();
50771        } else {
50772          that.deselectAll();
50773        }
50774      });
50775
50776      this.$button
50777        .on('focus' + EVENT_KEY, function (e) {
50778          var tabindex = that.$element[0].getAttribute('tabindex');
50779
50780          // only change when button is actually focused
50781          if (tabindex !== undefined && e.originalEvent && e.originalEvent.isTrusted) {
50782            // apply select element's tabindex to ensure correct order is followed when tabbing to the next element
50783            this.setAttribute('tabindex', tabindex);
50784            // set element's tabindex to -1 to allow for reverse tabbing
50785            that.$element[0].setAttribute('tabindex', -1);
50786            that.selectpicker.view.tabindex = tabindex;
50787          }
50788        })
50789        .on('blur' + EVENT_KEY, function (e) {
50790          // revert everything to original tabindex
50791          if (that.selectpicker.view.tabindex !== undefined && e.originalEvent && e.originalEvent.isTrusted) {
50792            that.$element[0].setAttribute('tabindex', that.selectpicker.view.tabindex);
50793            this.setAttribute('tabindex', -1);
50794            that.selectpicker.view.tabindex = undefined;
50795          }
50796        });
50797
50798      this.$element
50799        .on('change' + EVENT_KEY, function () {
50800          that.render();
50801          that.$element.trigger('changed' + EVENT_KEY, changedArguments);
50802          changedArguments = null;
50803        })
50804        .on('focus' + EVENT_KEY, function () {
50805          if (!that.options.mobile) that.$button[0].focus();
50806        });
50807    },
50808
50809    liveSearchListener: function () {
50810      var that = this;
50811
50812      this.$button.on('click.bs.dropdown.data-api', function () {
50813        if (!!that.$searchbox.val()) {
50814          that.$searchbox.val('');
50815          that.selectpicker.search.previousValue = undefined;
50816        }
50817      });
50818
50819      this.$searchbox.on('click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api', function (e) {
50820        e.stopPropagation();
50821      });
50822
50823      this.$searchbox.on('input propertychange', function () {
50824        var searchValue = that.$searchbox[0].value;
50825
50826        that.selectpicker.search.elements = [];
50827        that.selectpicker.search.data = [];
50828
50829        if (searchValue) {
50830          var i,
50831              searchMatch = [],
50832              q = searchValue.toUpperCase(),
50833              cache = {},
50834              cacheArr = [],
50835              searchStyle = that._searchStyle(),
50836              normalizeSearch = that.options.liveSearchNormalize;
50837
50838          if (normalizeSearch) q = normalizeToBase(q);
50839
50840          for (var i = 0; i < that.selectpicker.main.data.length; i++) {
50841            var li = that.selectpicker.main.data[i];
50842
50843            if (!cache[i]) {
50844              cache[i] = stringSearch(li, q, searchStyle, normalizeSearch);
50845            }
50846
50847            if (cache[i] && li.headerIndex !== undefined && cacheArr.indexOf(li.headerIndex) === -1) {
50848              if (li.headerIndex > 0) {
50849                cache[li.headerIndex - 1] = true;
50850                cacheArr.push(li.headerIndex - 1);
50851              }
50852
50853              cache[li.headerIndex] = true;
50854              cacheArr.push(li.headerIndex);
50855
50856              cache[li.lastIndex + 1] = true;
50857            }
50858
50859            if (cache[i] && li.type !== 'optgroup-label') cacheArr.push(i);
50860          }
50861
50862          for (var i = 0, cacheLen = cacheArr.length; i < cacheLen; i++) {
50863            var index = cacheArr[i],
50864                prevIndex = cacheArr[i - 1],
50865                li = that.selectpicker.main.data[index],
50866                liPrev = that.selectpicker.main.data[prevIndex];
50867
50868            if (li.type !== 'divider' || (li.type === 'divider' && liPrev && liPrev.type !== 'divider' && cacheLen - 1 !== i)) {
50869              that.selectpicker.search.data.push(li);
50870              searchMatch.push(that.selectpicker.main.elements[index]);
50871            }
50872          }
50873
50874          that.activeIndex = undefined;
50875          that.noScroll = true;
50876          that.$menuInner.scrollTop(0);
50877          that.selectpicker.search.elements = searchMatch;
50878          that.createView(true);
50879          showNoResults.call(that, searchMatch, searchValue);
50880        } else if (that.selectpicker.search.previousValue) { // for IE11 (#2402)
50881          that.$menuInner.scrollTop(0);
50882          that.createView(false);
50883        }
50884
50885        that.selectpicker.search.previousValue =  searchValue;
50886      });
50887    },
50888
50889    _searchStyle: function () {
50890      return this.options.liveSearchStyle || 'contains';
50891    },
50892
50893    val: function (value) {
50894      var element = this.$element[0];
50895
50896      if (typeof value !== 'undefined') {
50897        var prevValue = getSelectValues(element);
50898
50899        changedArguments = [null, null, prevValue];
50900
50901        this.$element
50902          .val(value)
50903          .trigger('changed' + EVENT_KEY, changedArguments);
50904
50905        if (this.$newElement.hasClass(classNames.SHOW)) {
50906          if (this.multiple) {
50907            this.setOptionStatus(true);
50908          } else {
50909            var liSelectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
50910
50911            if (typeof liSelectedIndex === 'number') {
50912              this.setSelected(this.selectedIndex, false);
50913              this.setSelected(liSelectedIndex, true);
50914            }
50915          }
50916        }
50917
50918        this.render();
50919
50920        changedArguments = null;
50921
50922        return this.$element;
50923      } else {
50924        return this.$element.val();
50925      }
50926    },
50927
50928    changeAll: function (status) {
50929      if (!this.multiple) return;
50930      if (typeof status === 'undefined') status = true;
50931
50932      var element = this.$element[0],
50933          previousSelected = 0,
50934          currentSelected = 0,
50935          prevValue = getSelectValues(element);
50936
50937      element.classList.add('bs-select-hidden');
50938
50939      for (var i = 0, data = this.selectpicker.current.data, len = data.length; i < len; i++) {
50940        var liData = data[i],
50941            option = liData.option;
50942
50943        if (option && !liData.disabled && liData.type !== 'divider') {
50944          if (liData.selected) previousSelected++;
50945          option.selected = status;
50946          if (status === true) currentSelected++;
50947        }
50948      }
50949
50950      element.classList.remove('bs-select-hidden');
50951
50952      if (previousSelected === currentSelected) return;
50953
50954      this.setOptionStatus();
50955
50956      changedArguments = [null, null, prevValue];
50957
50958      this.$element
50959        .triggerNative('change');
50960    },
50961
50962    selectAll: function () {
50963      return this.changeAll(true);
50964    },
50965
50966    deselectAll: function () {
50967      return this.changeAll(false);
50968    },
50969
50970    toggle: function (e) {
50971      e = e || window.event;
50972
50973      if (e) e.stopPropagation();
50974
50975      this.$button.trigger('click.bs.dropdown.data-api');
50976    },
50977
50978    keydown: function (e) {
50979      var $this = $(this),
50980          isToggle = $this.hasClass('dropdown-toggle'),
50981          $parent = isToggle ? $this.closest('.dropdown') : $this.closest(Selector.MENU),
50982          that = $parent.data('this'),
50983          $items = that.findLis(),
50984          index,
50985          isActive,
50986          liActive,
50987          activeLi,
50988          offset,
50989          updateScroll = false,
50990          downOnTab = e.which === keyCodes.TAB && !isToggle && !that.options.selectOnTab,
50991          isArrowKey = REGEXP_ARROW.test(e.which) || downOnTab,
50992          scrollTop = that.$menuInner[0].scrollTop,
50993          isVirtual = that.isVirtual(),
50994          position0 = isVirtual === true ? that.selectpicker.view.position0 : 0;
50995
50996      // do nothing if a function key is pressed
50997      if (e.which >= 112 && e.which <= 123) return;
50998
50999      isActive = that.$newElement.hasClass(classNames.SHOW);
51000
51001      if (
51002        !isActive &&
51003        (
51004          isArrowKey ||
51005          (e.which >= 48 && e.which <= 57) ||
51006          (e.which >= 96 && e.which <= 105) ||
51007          (e.which >= 65 && e.which <= 90)
51008        )
51009      ) {
51010        that.$button.trigger('click.bs.dropdown.data-api');
51011
51012        if (that.options.liveSearch) {
51013          that.$searchbox.trigger('focus');
51014          return;
51015        }
51016      }
51017
51018      if (e.which === keyCodes.ESCAPE && isActive) {
51019        e.preventDefault();
51020        that.$button.trigger('click.bs.dropdown.data-api').trigger('focus');
51021      }
51022
51023      if (isArrowKey) { // if up or down
51024        if (!$items.length) return;
51025
51026        liActive = that.selectpicker.main.elements[that.activeIndex];
51027        index = liActive ? Array.prototype.indexOf.call(liActive.parentElement.children, liActive) : -1;
51028
51029        if (index !== -1) {
51030          that.defocusItem(liActive);
51031        }
51032
51033        if (e.which === keyCodes.ARROW_UP) { // up
51034          if (index !== -1) index--;
51035          if (index + position0 < 0) index += $items.length;
51036
51037          if (!that.selectpicker.view.canHighlight[index + position0]) {
51038            index = that.selectpicker.view.canHighlight.slice(0, index + position0).lastIndexOf(true) - position0;
51039            if (index === -1) index = $items.length - 1;
51040          }
51041        } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
51042          index++;
51043          if (index + position0 >= that.selectpicker.view.canHighlight.length) index = that.selectpicker.view.firstHighlightIndex;
51044
51045          if (!that.selectpicker.view.canHighlight[index + position0]) {
51046            index = index + 1 + that.selectpicker.view.canHighlight.slice(index + position0 + 1).indexOf(true);
51047          }
51048        }
51049
51050        e.preventDefault();
51051
51052        var liActiveIndex = position0 + index;
51053
51054        if (e.which === keyCodes.ARROW_UP) { // up
51055          // scroll to bottom and highlight last option
51056          if (position0 === 0 && index === $items.length - 1) {
51057            that.$menuInner[0].scrollTop = that.$menuInner[0].scrollHeight;
51058
51059            liActiveIndex = that.selectpicker.current.elements.length - 1;
51060          } else {
51061            activeLi = that.selectpicker.current.data[liActiveIndex];
51062            offset = activeLi.position - activeLi.height;
51063
51064            updateScroll = offset < scrollTop;
51065          }
51066        } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
51067          // scroll to top and highlight first option
51068          if (index === that.selectpicker.view.firstHighlightIndex) {
51069            that.$menuInner[0].scrollTop = 0;
51070
51071            liActiveIndex = that.selectpicker.view.firstHighlightIndex;
51072          } else {
51073            activeLi = that.selectpicker.current.data[liActiveIndex];
51074            offset = activeLi.position - that.sizeInfo.menuInnerHeight;
51075
51076            updateScroll = offset > scrollTop;
51077          }
51078        }
51079
51080        liActive = that.selectpicker.current.elements[liActiveIndex];
51081
51082        that.activeIndex = that.selectpicker.current.data[liActiveIndex].index;
51083
51084        that.focusItem(liActive);
51085
51086        that.selectpicker.view.currentActive = liActive;
51087
51088        if (updateScroll) that.$menuInner[0].scrollTop = offset;
51089
51090        if (that.options.liveSearch) {
51091          that.$searchbox.trigger('focus');
51092        } else {
51093          $this.trigger('focus');
51094        }
51095      } else if (
51096        (!$this.is('input') && !REGEXP_TAB_OR_ESCAPE.test(e.which)) ||
51097        (e.which === keyCodes.SPACE && that.selectpicker.keydown.keyHistory)
51098      ) {
51099        var searchMatch,
51100            matches = [],
51101            keyHistory;
51102
51103        e.preventDefault();
51104
51105        that.selectpicker.keydown.keyHistory += keyCodeMap[e.which];
51106
51107        if (that.selectpicker.keydown.resetKeyHistory.cancel) clearTimeout(that.selectpicker.keydown.resetKeyHistory.cancel);
51108        that.selectpicker.keydown.resetKeyHistory.cancel = that.selectpicker.keydown.resetKeyHistory.start();
51109
51110        keyHistory = that.selectpicker.keydown.keyHistory;
51111
51112        // if all letters are the same, set keyHistory to just the first character when searching
51113        if (/^(.)\1+$/.test(keyHistory)) {
51114          keyHistory = keyHistory.charAt(0);
51115        }
51116
51117        // find matches
51118        for (var i = 0; i < that.selectpicker.current.data.length; i++) {
51119          var li = that.selectpicker.current.data[i],
51120              hasMatch;
51121
51122          hasMatch = stringSearch(li, keyHistory, 'startsWith', true);
51123
51124          if (hasMatch && that.selectpicker.view.canHighlight[i]) {
51125            matches.push(li.index);
51126          }
51127        }
51128
51129        if (matches.length) {
51130          var matchIndex = 0;
51131
51132          $items.removeClass('active').find('a').removeClass('active');
51133
51134          // either only one key has been pressed or they are all the same key
51135          if (keyHistory.length === 1) {
51136            matchIndex = matches.indexOf(that.activeIndex);
51137
51138            if (matchIndex === -1 || matchIndex === matches.length - 1) {
51139              matchIndex = 0;
51140            } else {
51141              matchIndex++;
51142            }
51143          }
51144
51145          searchMatch = matches[matchIndex];
51146
51147          activeLi = that.selectpicker.main.data[searchMatch];
51148
51149          if (scrollTop - activeLi.position > 0) {
51150            offset = activeLi.position - activeLi.height;
51151            updateScroll = true;
51152          } else {
51153            offset = activeLi.position - that.sizeInfo.menuInnerHeight;
51154            // if the option is already visible at the current scroll position, just keep it the same
51155            updateScroll = activeLi.position > scrollTop + that.sizeInfo.menuInnerHeight;
51156          }
51157
51158          liActive = that.selectpicker.main.elements[searchMatch];
51159
51160          that.activeIndex = matches[matchIndex];
51161
51162          that.focusItem(liActive);
51163
51164          if (liActive) liActive.firstChild.focus();
51165
51166          if (updateScroll) that.$menuInner[0].scrollTop = offset;
51167
51168          $this.trigger('focus');
51169        }
51170      }
51171
51172      // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
51173      if (
51174        isActive &&
51175        (
51176          (e.which === keyCodes.SPACE && !that.selectpicker.keydown.keyHistory) ||
51177          e.which === keyCodes.ENTER ||
51178          (e.which === keyCodes.TAB && that.options.selectOnTab)
51179        )
51180      ) {
51181        if (e.which !== keyCodes.SPACE) e.preventDefault();
51182
51183        if (!that.options.liveSearch || e.which !== keyCodes.SPACE) {
51184          that.$menuInner.find('.active a').trigger('click', true); // retain active class
51185          $this.trigger('focus');
51186
51187          if (!that.options.liveSearch) {
51188            // Prevent screen from scrolling if the user hits the spacebar
51189            e.preventDefault();
51190            // Fixes spacebar selection of dropdown items in FF & IE
51191            $(document).data('spaceSelect', true);
51192          }
51193        }
51194      }
51195    },
51196
51197    mobile: function () {
51198      // ensure mobile is set to true if mobile function is called after init
51199      this.options.mobile = true;
51200      this.$element[0].classList.add('mobile-device');
51201    },
51202
51203    refresh: function () {
51204      // update options if data attributes have been changed
51205      var config = $.extend({}, this.options, this.$element.data());
51206      this.options = config;
51207
51208      this.checkDisabled();
51209      this.buildData();
51210      this.setStyle();
51211      this.render();
51212      this.buildList();
51213      this.setWidth();
51214
51215      this.setSize(true);
51216
51217      this.$element.trigger('refreshed' + EVENT_KEY);
51218    },
51219
51220    hide: function () {
51221      this.$newElement.hide();
51222    },
51223
51224    show: function () {
51225      this.$newElement.show();
51226    },
51227
51228    remove: function () {
51229      this.$newElement.remove();
51230      this.$element.remove();
51231    },
51232
51233    destroy: function () {
51234      this.$newElement.before(this.$element).remove();
51235
51236      if (this.$bsContainer) {
51237        this.$bsContainer.remove();
51238      } else {
51239        this.$menu.remove();
51240      }
51241
51242      if (this.selectpicker.view.titleOption && this.selectpicker.view.titleOption.parentNode) {
51243        this.selectpicker.view.titleOption.parentNode.removeChild(this.selectpicker.view.titleOption);
51244      }
51245
51246      this.$element
51247        .off(EVENT_KEY)
51248        .removeData('selectpicker')
51249        .removeClass('bs-select-hidden selectpicker');
51250
51251      $(window).off(EVENT_KEY + '.' + this.selectId);
51252    }
51253  };
51254
51255  // SELECTPICKER PLUGIN DEFINITION
51256  // ==============================
51257  function Plugin (option) {
51258    // get the args of the outer function..
51259    var args = arguments;
51260    // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
51261    // to get lost/corrupted in android 2.3 and IE9 #715 #775
51262    var _option = option;
51263
51264    [].shift.apply(args);
51265
51266    // if the version was not set successfully
51267    if (!version.success) {
51268      // try to retreive it again
51269      try {
51270        version.full = ($.fn.dropdown.Constructor.VERSION || '').split(' ')[0].split('.');
51271      } catch (err) {
51272        // fall back to use BootstrapVersion if set
51273        if (Selectpicker.BootstrapVersion) {
51274          version.full = Selectpicker.BootstrapVersion.split(' ')[0].split('.');
51275        } else {
51276          version.full = [version.major, '0', '0'];
51277
51278          console.warn(
51279            'There was an issue retrieving Bootstrap\'s version. ' +
51280            'Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. ' +
51281            'If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.',
51282            err
51283          );
51284        }
51285      }
51286
51287      version.major = version.full[0];
51288      version.success = true;
51289    }
51290
51291    if (version.major === '4') {
51292      // some defaults need to be changed if using Bootstrap 4
51293      // check to see if they have already been manually changed before forcing them to update
51294      var toUpdate = [];
51295
51296      if (Selectpicker.DEFAULTS.style === classNames.BUTTONCLASS) toUpdate.push({ name: 'style', className: 'BUTTONCLASS' });
51297      if (Selectpicker.DEFAULTS.iconBase === classNames.ICONBASE) toUpdate.push({ name: 'iconBase', className: 'ICONBASE' });
51298      if (Selectpicker.DEFAULTS.tickIcon === classNames.TICKICON) toUpdate.push({ name: 'tickIcon', className: 'TICKICON' });
51299
51300      classNames.DIVIDER = 'dropdown-divider';
51301      classNames.SHOW = 'show';
51302      classNames.BUTTONCLASS = 'btn-light';
51303      classNames.POPOVERHEADER = 'popover-header';
51304      classNames.ICONBASE = '';
51305      classNames.TICKICON = 'bs-ok-default';
51306
51307      for (var i = 0; i < toUpdate.length; i++) {
51308        var option = toUpdate[i];
51309        Selectpicker.DEFAULTS[option.name] = classNames[option.className];
51310      }
51311    }
51312
51313    var value;
51314    var chain = this.each(function () {
51315      var $this = $(this);
51316      if ($this.is('select')) {
51317        var data = $this.data('selectpicker'),
51318            options = typeof _option == 'object' && _option;
51319
51320        if (!data) {
51321          var dataAttributes = $this.data();
51322
51323          for (var dataAttr in dataAttributes) {
51324            if (Object.prototype.hasOwnProperty.call(dataAttributes, dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
51325              delete dataAttributes[dataAttr];
51326            }
51327          }
51328
51329          var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, dataAttributes, options);
51330          config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), dataAttributes.template, options.template);
51331          $this.data('selectpicker', (data = new Selectpicker(this, config)));
51332        } else if (options) {
51333          for (var i in options) {
51334            if (Object.prototype.hasOwnProperty.call(options, i)) {
51335              data.options[i] = options[i];
51336            }
51337          }
51338        }
51339
51340        if (typeof _option == 'string') {
51341          if (data[_option] instanceof Function) {
51342            value = data[_option].apply(data, args);
51343          } else {
51344            value = data.options[_option];
51345          }
51346        }
51347      }
51348    });
51349
51350    if (typeof value !== 'undefined') {
51351      // noinspection JSUnusedAssignment
51352      return value;
51353    } else {
51354      return chain;
51355    }
51356  }
51357
51358  var old = $.fn.selectpicker;
51359  $.fn.selectpicker = Plugin;
51360  $.fn.selectpicker.Constructor = Selectpicker;
51361
51362  // SELECTPICKER NO CONFLICT
51363  // ========================
51364  $.fn.selectpicker.noConflict = function () {
51365    $.fn.selectpicker = old;
51366    return this;
51367  };
51368
51369  // get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3
51370  function keydownHandler () {
51371    if ($.fn.dropdown) {
51372      // wait to define until function is called in case Bootstrap isn't loaded yet
51373      var bootstrapKeydown = $.fn.dropdown.Constructor._dataApiKeydownHandler || $.fn.dropdown.Constructor.prototype.keydown;
51374      return bootstrapKeydown.apply(this, arguments);
51375    }
51376  }
51377
51378  $(document)
51379    .off('keydown.bs.dropdown.data-api')
51380    .on('keydown.bs.dropdown.data-api', ':not(.bootstrap-select) > [data-toggle="dropdown"]', keydownHandler)
51381    .on('keydown.bs.dropdown.data-api', ':not(.bootstrap-select) > .dropdown-menu', keydownHandler)
51382    .on('keydown' + EVENT_KEY, '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', Selectpicker.prototype.keydown)
51383    .on('focusin.modal', '.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', function (e) {
51384      e.stopPropagation();
51385    });
51386
51387  // SELECTPICKER DATA-API
51388  // =====================
51389  $(window).on('load' + EVENT_KEY + '.data-api', function () {
51390    $('.selectpicker').each(function () {
51391      var $selectpicker = $(this);
51392      Plugin.call($selectpicker, $selectpicker.data());
51393    })
51394  });
51395})(jQuery);
51396
51397
51398}));
51399//# sourceMappingURL=bootstrap-select.js.map
vendor: 1,304 bytes, lines 51399-51453
51399
51400;/*
51401 * bootstrap-tagsinput v0.8.0
51402 * 
51403 */
51404
51405(function ($) {
51406  "use strict";
51407
51408  var defaultOptions = {
51409    tagClass: function(item) {
51410      return 'label label-info';
51411    },
51412    focusClass: 'focus',
51413    itemValue: function(item) {
51414      return item ? item.toString() : item;
51415    },
51416    itemText: function(item) {
51417      return this.itemValue(item);
51418    },
51419    itemTitle: function(item) {
51420      return null;
51421    },
51422    freeInput: true,
51423    addOnBlur: true,
51424    maxTags: undefined,
51425    maxChars: undefined,
51426    confirmKeys: [13, 44],
51427    delimiter: ',',
51428    delimiterRegex: null,
51429    cancelConfirmKeysOnEmpty: false,
51430    onTagExists: function(item, $tag) {
51431      $tag.hide().fadeIn();
51432    },
51433    trimValue: false,
51434    allowDuplicates: false,
51435    triggerChange: true
51436  };
51437
51438  /**
51439   * Constructor function
51440   */
51441  function TagsInput(element, options) {
51442    this.isInit = true;
51443    this.itemsArray = [];
51444
51445    this.$element = $(element);
51446    this.$element.hide();
51447
51448    this.isSelect = (element.tagName === 'SELECT');
51449    this.multiple = (this.isSelect && element.hasAttribute('multiple'));
51450    this.objectItems = options && options.itemValue;
51451    this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';
51452    this.inputSize = Math.max(1, this.placeholderText.length);
51453
vendor: 4,202 bytes, lines 51454-51565
51454    this.$container = $('<div class="bootstrap-tagsinput"></div>');
51455    this.$input = $('<input type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
51456
51457    this.$element.before(this.$container);
51458
51459    this.build(options);
51460    this.isInit = false;
51461  }
51462
51463  TagsInput.prototype = {
51464    constructor: TagsInput,
51465
51466    /**
51467     * Adds the given item as a new tag. Pass true to dontPushVal to prevent
51468     * updating the elements val()
51469     */
51470    add: function(item, dontPushVal, options) {
51471      var self = this;
51472
51473      if (self.options.maxTags && self.itemsArray.length >= self.options.maxTags)
51474        return;
51475
51476      // Ignore falsey values, except false
51477      if (item !== false && !item)
51478        return;
51479
51480      // Trim value
51481      if (typeof item === "string" && self.options.trimValue) {
51482        item = $.trim(item);
51483      }
51484
51485      // Throw an error when trying to add an object while the itemValue option was not set
51486      if (typeof item === "object" && !self.objectItems)
51487        throw("Can't add objects when itemValue option is not set");
51488
51489      // Ignore strings only containg whitespace
51490      if (item.toString().match(/^\s*$/))
51491        return;
51492
51493      // If SELECT but not multiple, remove current tag
51494      if (self.isSelect && !self.multiple && self.itemsArray.length > 0)
51495        self.remove(self.itemsArray[0]);
51496
51497      if (typeof item === "string" && this.$element[0].tagName === 'INPUT') {
51498        var delimiter = (self.options.delimiterRegex) ? self.options.delimiterRegex : self.options.delimiter;
51499        var items = item.split(delimiter);
51500        if (items.length > 1) {
51501          for (var i = 0; i < items.length; i++) {
51502            this.add(items[i], true);
51503          }
51504
51505          if (!dontPushVal)
51506            self.pushVal(self.options.triggerChange);
51507          return;
51508        }
51509      }
51510
51511      var itemValue = self.options.itemValue(item),
51512          itemText = self.options.itemText(item),
51513          tagClass = self.options.tagClass(item),
51514          itemTitle = self.options.itemTitle(item);
51515
51516      // Ignore items allready added
51517      var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0];
51518      if (existing && !self.options.allowDuplicates) {
51519        // Invoke onTagExists
51520        if (self.options.onTagExists) {
51521          var $existingTag = $(".tag", self.$container).filter(function() { return $(this).data("item") === existing; });
51522          self.options.onTagExists(item, $existingTag);
51523        }
51524        return;
51525      }
51526
51527      // if length greater than limit
51528      if (self.items().toString().length + item.length + 1 > self.options.maxInputLength)
51529        return;
51530
51531      // raise beforeItemAdd arg
51532      var beforeItemAddEvent = $.Event('beforeItemAdd', { item: item, cancel: false, options: options});
51533      self.$element.trigger(beforeItemAddEvent);
51534      if (beforeItemAddEvent.cancel)
51535        return;
51536
51537      // register item in internal array and map
51538      self.itemsArray.push(item);
51539
51540      // add a tag element
51541
51542      var $tag = $('<span class="tag ' + htmlEncode(tagClass) + (itemTitle !== null ? ('" title="' + itemTitle) : '') + '">' + htmlEncode(itemText) + '<span data-role="remove"></span></span>');
51543      $tag.data('item', item);
51544      self.findInputWrapper().before($tag);
51545      $tag.after(' ');
51546
51547      if (self.isSelect) {
51548        // add <option /> if item represents a value not present in one of the <select />'s options
51549        // Check to see if the tag exists in its raw or uri-encoded form
51550        if(!(
51551            $('option[value="' + encodeURIComponent(itemValue) + '"]', self.$element).length ||
51552            $('option[value="' + htmlEncode(itemValue) + '"]', self.$element).length
51553        )){
51554          var $option = $('<option selected>' + htmlEncode(itemText) + '</option>');
51555          $option.data('item', item);
51556          $option.attr('value', itemValue);
51557          self.$element.append($option);
51558        }        
51559      }
51560
51561      if (!dontPushVal)
51562        self.pushVal(self.options.triggerChange);
51563
51564      // Add class when reached maxTags
51565      if (self.options.maxTags === self.itemsArray.length || self.items().toString().length === self.options.maxInput
vendor: 4,135 bytes, lines 51565-51692
51565Length)
51566        self.$container.addClass('bootstrap-tagsinput-max');
51567
51568      // If using typeahead, once the tag has been added, clear the typeahead value so it does not stick around in the input.
51569      if ($('.typeahead, .twitter-typeahead', self.$container).length) {
51570        self.$input.typeahead('val', '');
51571      }
51572
51573      if (this.isInit) {
51574        self.$element.trigger($.Event('itemAddedOnInit', { item: item, options: options }));
51575      } else {
51576        self.$element.trigger($.Event('itemAdded', { item: item, options: options }));
51577      }
51578    },
51579
51580    /**
51581     * Removes the given item. Pass true to dontPushVal to prevent updating the
51582     * elements val()
51583     */
51584    remove: function(item, dontPushVal, options) {
51585      var self = this;
51586
51587      if (self.objectItems) {
51588        if (typeof item === "object")
51589          item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) ==  self.options.itemValue(item); } );
51590        else
51591          item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) ==  item; } );
51592
51593        item = item[item.length-1];
51594      }
51595
51596      if (item) {
51597        var beforeItemRemoveEvent = $.Event('beforeItemRemove', { item: item, cancel: false, options: options });
51598        self.$element.trigger(beforeItemRemoveEvent);
51599        if (beforeItemRemoveEvent.cancel)
51600          return;
51601
51602        $('.tag', self.$container).filter(function() { return $(this).data('item') === item; }).remove();
51603        $('option', self.$element).filter(function() { return $(this).data('item') === item; }).remove();
51604        if($.inArray(item, self.itemsArray) !== -1)
51605          self.itemsArray.splice($.inArray(item, self.itemsArray), 1);
51606      }
51607
51608      if (!dontPushVal)
51609        self.pushVal(self.options.triggerChange);
51610
51611      // Remove class when reached maxTags
51612      if (self.options.maxTags > self.itemsArray.length)
51613        self.$container.removeClass('bootstrap-tagsinput-max');
51614
51615      self.$element.trigger($.Event('itemRemoved',  { item: item, options: options }));
51616    },
51617
51618    /**
51619     * Removes all items
51620     */
51621    removeAll: function() {
51622      var self = this;
51623
51624      $('.tag', self.$container).remove();
51625      $('option', self.$element).remove();
51626
51627      while(self.itemsArray.length > 0)
51628        self.itemsArray.pop();
51629
51630      self.pushVal(self.options.triggerChange);
51631    },
51632
51633    /**
51634     * Refreshes the tags so they match the text/value of their corresponding
51635     * item.
51636     */
51637    refresh: function() {
51638      var self = this;
51639      $('.tag', self.$container).each(function() {
51640        var $tag = $(this),
51641            item = $tag.data('item'),
51642            itemValue = self.options.itemValue(item),
51643            itemText = self.options.itemText(item),
51644            tagClass = self.options.tagClass(item);
51645
51646          // Update tag's class and inner text
51647          $tag.attr('class', null);
51648          $tag.addClass('tag ' + htmlEncode(tagClass));
51649          $tag.contents().filter(function() {
51650            return this.nodeType == 3;
51651          })[0].nodeValue = htmlEncode(itemText);
51652
51653          if (self.isSelect) {
51654            var option = $('option', self.$element).filter(function() { return $(this).data('item') === item; });
51655            option.attr('value', itemValue);
51656          }
51657      });
51658    },
51659
51660    /**
51661     * Returns the items added as tags
51662     */
51663    items: function() {
51664      return this.itemsArray;
51665    },
51666
51667    /**
51668     * Assembly value by retrieving the value of each item, and set it on the
51669     * element.
51670     */
51671    pushVal: function() {
51672      var self = this,
51673          val = $.map(self.items(), function(item) {
51674            return self.options.itemValue(item).toString();
51675          });
51676
51677      self.$element.val(val, true);
51678
51679      if (self.options.triggerChange)
51680        self.$element.trigger('change');
51681    },
51682
51683    /**
51684     * Initializes the tags input behaviour on the element
51685     */
51686    build: function(options) {
51687      var self = this;
51688
51689      self.options = $.extend({}, defaultOptions, options);
51690      // When itemValue is set, freeInput should always be false
51691      if (self.objectItems)
51692        self.options.freeInput = false;
vendor: 4,217 bytes, lines 51693-51815
51693
51694      makeOptionItemFunction(self.options, 'itemValue');
51695      makeOptionItemFunction(self.options, 'itemText');
51696      makeOptionFunction(self.options, 'tagClass');
51697
51698      // Typeahead Bootstrap version 2.3.2
51699      if (self.options.typeahead) {
51700        var typeahead = self.options.typeahead || {};
51701
51702        makeOptionFunction(typeahead, 'source');
51703
51704        self.$input.typeahead($.extend({}, typeahead, {
51705          source: function (query, process) {
51706            function processItems(items) {
51707              var texts = [];
51708
51709              for (var i = 0; i < items.length; i++) {
51710                var text = self.options.itemText(items[i]);
51711                map[text] = items[i];
51712                texts.push(text);
51713              }
51714              process(texts);
51715            }
51716
51717            this.map = {};
51718            var map = this.map,
51719                data = typeahead.source(query);
51720
51721            if ($.isFunction(data.success)) {
51722              // support for Angular callbacks
51723              data.success(processItems);
51724            } else if ($.isFunction(data.then)) {
51725              // support for Angular promises
51726              data.then(processItems);
51727            } else {
51728              // support for functions and jquery promises
51729              $.when(data)
51730               .then(processItems);
51731            }
51732          },
51733          updater: function (text) {
51734            self.add(this.map[text]);
51735            return this.map[text];
51736          },
51737          matcher: function (text) {
51738            return (text.toLowerCase().indexOf(this.query.trim().toLowerCase()) !== -1);
51739          },
51740          sorter: function (texts) {
51741            return texts.sort();
51742          },
51743          highlighter: function (text) {
51744            var regex = new RegExp( '(' + this.query + ')', 'gi' );
51745            return text.replace( regex, "<strong>$1</strong>" );
51746          }
51747        }));
51748      }
51749
51750      // typeahead.js
51751      if (self.options.typeaheadjs) {
51752          var typeaheadConfig = null;
51753          var typeaheadDatasets = {};
51754
51755          // Determine if main configurations were passed or simply a dataset
51756          var typeaheadjs = self.options.typeaheadjs;
51757          if ($.isArray(typeaheadjs)) {
51758            typeaheadConfig = typeaheadjs[0];
51759            typeaheadDatasets = typeaheadjs[1];
51760          } else {
51761            typeaheadDatasets = typeaheadjs;
51762          }
51763
51764          self.$input.typeahead(typeaheadConfig, typeaheadDatasets).on('typeahead:selected', $.proxy(function (obj, datum) {
51765            if (typeaheadDatasets.valueKey)
51766              self.add(datum[typeaheadDatasets.valueKey]);
51767            else
51768              self.add(datum);
51769            self.$input.typeahead('val', '');
51770          }, self));
51771      }
51772
51773      self.$container.on('click', $.proxy(function(event) {
51774        if (! self.$element.attr('disabled')) {
51775          self.$input.removeAttr('disabled');
51776        }
51777        self.$input.focus();
51778      }, self));
51779
51780        if (self.options.addOnBlur && self.options.freeInput) {
51781          self.$input.on('focusout', $.proxy(function(event) {
51782              // HACK: only process on focusout when no typeahead opened, to
51783              //       avoid adding the typeahead text as tag
51784              if ($('.typeahead, .twitter-typeahead', self.$container).length === 0) {
51785                self.add(self.$input.val());
51786                self.$input.val('');
51787              }
51788          }, self));
51789        }
51790
51791      // Toggle the 'focus' css class on the container when it has focus
51792      self.$container.on({
51793        focusin: function() {
51794          self.$container.addClass(self.options.focusClass);
51795        },
51796        focusout: function() {
51797          self.$container.removeClass(self.options.focusClass);
51798        },
51799      });
51800
51801      self.$container.on('keydown', 'input', $.proxy(function(event) {
51802        var $input = $(event.target),
51803            $inputWrapper = self.findInputWrapper();
51804
51805        if (self.$element.attr('disabled')) {
51806          self.$input.attr('disabled', 'disabled');
51807          return;
51808        }
51809
51810        switch (event.which) {
51811          // BACKSPACE
51812          case 8:
51813            if (doGetCaretPosition($input[0]) === 0) {
51814              var prev = $inputWrapper.prev();
51815              if (prev.length) {
vendor: 1,148 bytes, lines 51815-51854
51815
51816                self.remove(prev.data('item'));
51817              }
51818            }
51819            break;
51820
51821          // DELETE
51822          case 46:
51823            if (doGetCaretPosition($input[0]) === 0) {
51824              var next = $inputWrapper.next();
51825              if (next.length) {
51826                self.remove(next.data('item'));
51827              }
51828            }
51829            break;
51830
51831          // LEFT ARROW
51832          case 37:
51833            // Try to move the input before the previous tag
51834            var $prevTag = $inputWrapper.prev();
51835            if ($input.val().length === 0 && $prevTag[0]) {
51836              $prevTag.before($inputWrapper);
51837              $input.focus();
51838            }
51839            break;
51840          // RIGHT ARROW
51841          case 39:
51842            // Try to move the input after the next tag
51843            var $nextTag = $inputWrapper.next();
51844            if ($input.val().length === 0 && $nextTag[0]) {
51845              $nextTag.after($inputWrapper);
51846              $input.focus();
51847            }
51848            break;
51849         default:
51850             // ignore
51851         }
51852
51853        // Reset internal input's size
51854        var textLength = $input.val().length,
vendor: 7,348 bytes, lines 51855-52081
51855            wordSpace = Math.ceil(textLength / 5),
51856            size = textLength + wordSpace + 1;
51857        $input.attr('size', Math.max(this.inputSize, $input.val().length));
51858      }, self));
51859
51860      self.$container.on('keypress', 'input', $.proxy(function(event) {
51861         var $input = $(event.target);
51862
51863         if (self.$element.attr('disabled')) {
51864            self.$input.attr('disabled', 'disabled');
51865            return;
51866         }
51867
51868         var text = $input.val(),
51869         maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
51870         if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
51871            // Only attempt to add a tag if there is data in the field
51872            if (text.length !== 0) {
51873               self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
51874               $input.val('');
51875            }
51876
51877            // If the field is empty, let the event triggered fire as usual
51878            if (self.options.cancelConfirmKeysOnEmpty === false) {
51879                event.preventDefault();
51880            }
51881         }
51882
51883         // Reset internal input's size
51884         var textLength = $input.val().length,
51885            wordSpace = Math.ceil(textLength / 5),
51886            size = textLength + wordSpace + 1;
51887         $input.attr('size', Math.max(this.inputSize, $input.val().length));
51888      }, self));
51889
51890      // Remove icon clicked
51891      self.$container.on('click', '[data-role=remove]', $.proxy(function(event) {
51892        if (self.$element.attr('disabled')) {
51893          return;
51894        }
51895        self.remove($(event.target).closest('.tag').data('item'));
51896      }, self));
51897
51898      // Only add existing value as tags when using strings as tags
51899      if (self.options.itemValue === defaultOptions.itemValue) {
51900        if (self.$element[0].tagName === 'INPUT') {
51901            self.add(self.$element.val());
51902        } else {
51903          $('option', self.$element).each(function() {
51904            self.add($(this).attr('value'), true);
51905          });
51906        }
51907      }
51908    },
51909
51910    /**
51911     * Removes all tagsinput behaviour and unregsiter all event handlers
51912     */
51913    destroy: function() {
51914      var self = this;
51915
51916      // Unbind events
51917      self.$container.off('keypress', 'input');
51918      self.$container.off('click', '[role=remove]');
51919
51920      self.$container.remove();
51921      self.$element.removeData('tagsinput');
51922      self.$element.show();
51923    },
51924
51925    /**
51926     * Sets focus on the tagsinput
51927     */
51928    focus: function() {
51929      this.$input.focus();
51930    },
51931
51932    /**
51933     * Returns the internal input element
51934     */
51935    input: function() {
51936      return this.$input;
51937    },
51938
51939    /**
51940     * Returns the element which is wrapped around the internal input. This
51941     * is normally the $container, but typeahead.js moves the $input element.
51942     */
51943    findInputWrapper: function() {
51944      var elt = this.$input[0],
51945          container = this.$container[0];
51946      while(elt && elt.parentNode !== container)
51947        elt = elt.parentNode;
51948
51949      return $(elt);
51950    }
51951  };
51952
51953  /**
51954   * Register JQuery plugin
51955   */
51956  $.fn.tagsinput = function(arg1, arg2, arg3) {
51957    var results = [];
51958
51959    this.each(function() {
51960      var tagsinput = $(this).data('tagsinput');
51961      // Initialize a new tags input
51962      if (!tagsinput) {
51963          tagsinput = new TagsInput(this, arg1);
51964          $(this).data('tagsinput', tagsinput);
51965          results.push(tagsinput);
51966
51967          if (this.tagName === 'SELECT') {
51968              $('option', $(this)).attr('selected', 'selected');
51969          }
51970
51971          // Init tags from $(this).val()
51972          $(this).val($(this).val());
51973      } else if (!arg1 && !arg2) {
51974          // tagsinput already exists
51975          // no function, trying to init
51976          results.push(tagsinput);
51977      } else if(tagsinput[arg1] !== undefined) {
51978          // Invoke function on existing tags input
51979            if(tagsinput[arg1].length === 3 && arg3 !== undefined){
51980               var retVal = tagsinput[arg1](arg2, null, arg3);
51981            }else{
51982               var retVal = tagsinput[arg1](arg2);
51983            }
51984          if (retVal !== undefined)
51985              results.push(retVal);
51986      }
51987    });
51988
51989    if ( typeof arg1 == 'string') {
51990      // Return the results from the invoked function calls
51991      return results.length > 1 ? results : results[0];
51992    } else {
51993      return results;
51994    }
51995  };
51996
51997  $.fn.tagsinput.Constructor = TagsInput;
51998
51999  /**
52000   * Most options support both a string or number as well as a function as
52001   * option value. This function makes sure that the option with the given
52002   * key in the given options is wrapped in a function
52003   */
52004  function makeOptionItemFunction(options, key) {
52005    if (typeof options[key] !== 'function') {
52006      var propertyName = options[key];
52007      options[key] = function(item) { return item[propertyName]; };
52008    }
52009  }
52010  function makeOptionFunction(options, key) {
52011    if (typeof options[key] !== 'function') {
52012      var value = options[key];
52013      options[key] = function() { return value; };
52014    }
52015  }
52016  /**
52017   * HtmlEncodes the given value
52018   */
52019  var htmlEncodeContainer = $('<div />');
52020  function htmlEncode(value) {
52021    if (value) {
52022      return htmlEncodeContainer.text(value).html();
52023    } else {
52024      return '';
52025    }
52026  }
52027
52028  /**
52029   * Returns the position of the caret in the given input field
52030   * http://flightschool.acylt.com/devnotes/caret-position-woes/
52031   */
52032  function doGetCaretPosition(oField) {
52033    var iCaretPos = 0;
52034    if (document.selection) {
52035      oField.focus ();
52036      var oSel = document.selection.createRange();
52037      oSel.moveStart ('character', -oField.value.length);
52038      iCaretPos = oSel.text.length;
52039    } else if (oField.selectionStart || oField.selectionStart == '0') {
52040      iCaretPos = oField.selectionStart;
52041    }
52042    return (iCaretPos);
52043  }
52044
52045  /**
52046    * Returns boolean indicates whether user has pressed an expected key combination.
52047    * @param object keyPressEvent: JavaScript event object, refer
52048    *     http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
52049    * @param object lookupList: expected key combinations, as in:
52050    *     [13, {which: 188, shiftKey: true}]
52051    */
52052  function keyCombinationInList(keyPressEvent, lookupList) {
52053      var found = false;
52054      $.each(lookupList, function (index, keyCombination) {
52055          if (typeof (keyCombination) === 'number' && keyPressEvent.which === keyCombination) {
52056              found = true;
52057              return false;
52058          }
52059
52060          if (keyPressEvent.which === keyCombination.which) {
52061              var alt = !keyCombination.hasOwnProperty('altKey') || keyPressEvent.altKey === keyCombination.altKey,
52062                  shift = !keyCombination.hasOwnProperty('shiftKey') || keyPressEvent.shiftKey === keyCombination.shiftKey,
52063                  ctrl = !keyCombination.hasOwnProperty('ctrlKey') || keyPressEvent.ctrlKey === keyCombination.ctrlKey;
52064              if (alt && shift && ctrl) {
52065                  found = true;
52066                  return false;
52067              }
52068          }
52069      });
52070
52071      return found;
52072  }
52073
52074  /**
52075   * Initialize tagsinput behaviour on inputs and selects which have
52076   * data-role=tagsinput
52077   */
52078  $(function() {
52079    $("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput();
52080  });
52081})(window.jQuery);
52082
52083;
vendor: 16,350 bytes, lines 52083-52088
52083/*!
52084 * Jasny Bootstrap v4.0.0 (http://jasny.github.io/bootstrap)
52085 * Copyright 2012-2019 Arnold Daniels
52086 * Licensed under  ()
52087 */
52088if("undefined"==typeof jQuery)throw new Error("Jasny Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}void 0===a.support.transition&&(a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()}))}(window.jQuery),function(a){"use strict";var b=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i),c=function(b,d){if(this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.state=null,this.placement=null,this.$calcClone=null,this.calcClone(),this.options.recalc&&a(window).on("resize",a.proxy(this.recalc,this)),this.options.autohide&&!this.options.modal){navigator.userAgent.match(/(iPad|iPhone)/i);a(document).on("click touchstart",a.proxy(this.autohide,this))}a(this.$element).on("shown.bs.dropdown",a.proxy(function(b){a(this.$element).find(".dropdown .dropdown-backdrop").remove()},this)),"boolean"==typeof this.options.disablescrolling&&(this.options.disableScrolling=this.options.disablescrolling,delete this.options.disablescrolling),this.options.toggle&&this.toggle()};c.DEFAULTS={toggle:!0,placement:"auto",autohide:!0,recalc:!0,disableScrolling:!0,modal:!1,backdrop:!1,exclude:null},c.prototype.setWidth=function(){var b=this.$element.outerWidth(),c=a(window).width();c-=68,this.$element.css("width",b>c?c:b)},c.prototype.offset=function(){switch(this.placement){case"left":case"right":return this.$element.outerWidth();case"top":case"bottom":return this.$element.outerHeight()}},c.prototype.calcPlacement=function(){function b(a,b){return"auto"===e.css(b)?a:"auto"===e.css(a)?b:parseInt(e.css(a),10)>parseInt(e.css(b),10)?b:a}if("auto"!==this.options.placement)return void(this.placement=this.options.placement);this.$element.hasClass("in")||this.$element.css("visiblity","hidden !important").addClass("in");var c=a(window).width()/this.$element.outerWidth(),d=a(window).height()/this.$element.outerHeight(),e=this.$element;this.placement=c>d?b("left","right"):b("top","bottom"),"hidden !important"===this.$element.css("visibility")&&this.$element.removeClass("in").css("visiblity","")},c.prototype.opposite=function(a){switch(a){case"top":return"bottom";case"left":return"right";case"bottom":return"top";case"right":return"left"}},c.prototype.getCanvasElements=function(){var b=this.options.canvas?a(this.options.canvas):this.$element,c=b.find("*").filter(function(){return"fixed"===getComputedStyle(this).getPropertyValue("position")}).not(this.options.exclude);return b.add(c)},c.prototype.slide=function(b,c,d){if(!a.support.transition){var e={};return e[this.placement]="+="+c,e[this.opposite(this.placement)]="-="+c,b.animate(e,350,d)}var f=this.placement,g=this.opposite(f);b.each(function(){"auto"!==a(this).css(f)&&a(this).css(f,(parseInt(a(this).css(f),10)||0)+c),"auto"!==a(this).css(g)&&a(this).css(g,(parseInt(a(this).css(g),10)||0)-c)}),this.$element.one(a.support.transition.end,d).emulateTransitionEnd(350)},c.prototype.disableScrolling=function(){var c=a("body").width(),d="padding-right";if(void 0===a("body").data("offcanvas-style")&&a("body").data("offcanvas-style",a("body").attr("style")||""),a("body").css("overflow","hidden"),b&&a("body").addClass("lockIphone"),a("body").width()>c){var e=parseInt(a("body").css(d),10)+a("body").width()-c;setTimeout(function(){a("body").css(d,e)},1)}a("body").on("touchmove.bs",function(b){a(event.target).closest(".offcanvas").length||b.preventDefault()})},c.prototype.enableScrolling=function(){a("body").off("touchmove.bs"),a("body").removeClass("lockIphone")},c.prototype.show=function(){if(!this.state){var c=a.Event("show.bs.offcanvas");this.$element.trigger(c),c.isDefaultPrevented()||this.hideOthers(a.proxy(function(){this.state="slide-in",this.$element.css("width",""),this.calcPlacement(),this.setWidth();var c=this.getCanvasElements(),d=this.placement,e=this.opposite(d),f=this.offset();-1!==c.index(this.$element)&&(a(this.$element).data("offcanvas-style",a(this.$element).attr("style")||""),this.$element.css(d,-1*f),this.$element.css(d)),c.addClass("canvas-sliding").each(function(){var c=a(this);void 0===c.data("offcanvas-style")&&c.data("offcanvas-style",c.attr("style")||""),"static"!==c.css("position")||b||c.css("position","relative"),"auto"!==c.css(d)&&"0px"!==c.css(d)||"auto"!==c.css(e)&&"0px"!==c.css(e)||c.css(d,0)}),this.options.disableScrolling&&this.disableScrolling(),(this.options.modal||this.options.backdrop)&&this.toggleBackdrop();var g=function(){"slide-in"==this.state&&(this.state="slid",c.removeClass("canvas-sliding").addClass("canvas-slid"),this.$element.trigger("shown.bs.offcanvas"))};setTimeout(a.proxy(function(){this.$element.addClass("in"),this.slide(c,f,a.proxy(g,this))},this),1)},this))}},c.prototype.hideOthers=function(b){var c=!1,d=this.$element.attr("id"),e=a('.offcanvas-clone:not([data-id="'+d+'"])');if(!e.length)return b();e.each(function(d,e){var f=a(e).attr("data-id"),g=a("#"+f);(c=g.hasClass("canvas-slid"))&&(g.one("hidden.bs.offcanvas",b),g.offcanvas("hide"))}),c||b()},c.prototype.hide=function(){if("slid"===this.state){var b=a.Event("hide.bs.offcanvas");if(this.$element.trigger(b),!b.isDefaultPrevented()){this.state="slide-out";var c=a(".canvas-slid"),d=(this.placement,-1*this.offset()),e=function(){"slide-out"==this.state&&(this.state=null,this.placement=null,this.$element.removeClass("in"),c.removeClass("canvas-sliding"),c.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")}),this.$element.css("width",""),this.$element.trigger("hidden.bs.offcanvas"))};this.options.disableScrolling&&this.enableScrolling(),(this.options.modal||this.options.backdrop)&&this.toggleBackdrop(),c.removeClass("canvas-slid").addClass("canvas-sliding"),setTimeout(a.proxy(function(){this.slide(c,d,a.proxy(e,this))},this),1)}}},c.prototype.toggle=function(){"slide-in"!==this.state&&"slide-out"!==this.state&&this["slid"===this.state?"hide":"show"]()},c.prototype.toggleBackdrop=function(b){b=b||a.noop;var c=150;if("slide-in"==this.state){var d=a("body"),e=a.support.transition;this.$backdrop=a('<div class="modal-backdrop fade" />'),this.options.backdrop?(this.$backdrop.addClass("allow-navbar"),this.options.canvas&&a(this.options.canvas)[0]!==d[0]?(a(this.options.canvas).addClass("limit-backdrop"),this.$backdrop.appendTo(this.options.canvas)):this.$backdrop.insertAfter(this.$element)):this.$backdrop.insertAfter(this.$element),e&&this.$backdrop[0].offsetWidth,d.addClass("modal-open"),this.$backdrop.addClass("show").show(),this.$backdrop.on("click.bs",a.proxy(this.autohide,this)),e?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(c):b()}else if("slide-out"==this.state&&this.$backdrop){var f=this;if(this.$backdrop.hide().removeClass("show"),a("body").removeClass("modal-open").off("touchmove.bs"),a.support.transition?this.$backdrop.one(a.support.transition.end,function(){f.$backdrop.remove(),b(),f.$backdrop=null}).emulateTransitionEnd(c):(this.$backdrop.remove(),this.$backdrop=null,b()),this.options.canvas&&a(this.options.canvas)[0]!==a("body")[0]){var g=this.options.canvas;setTimeout(function(){a(g).removeClass("limit-backdrop")},c)}}else b&&b()},c.prototype.calcClone=function(){var b=this.$element.attr("id");this.$calcClone=a('.offcanvas-clone[data-id="'+b+'"]'),this.$calcClone.length||(this.$calcClone=this.$element.clone().addClass("offcanvas-clone").attr("data-id",b).removeAttr("id").appendTo(a("body")).html("")),this.$calcClone.removeClass("in")},c.prototype.recalc=function(){if("none"!==this.$calcClone.css("display")&&("slid"===this.state||"slide-in"===this.state)){this.state=null,this.placement=null;var b=this.getCanvasElements();this.$element.trigger("hide.bs.offcanvas"),this.$element.removeClass("in"),b.removeClass("canvas-slid"),b.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")}),this.$element.trigger("hidden.bs.offcanvas")}},c.prototype.autohide=function(b){var c=a(b.target);!c.hasClass("dropdown-backdrop")&&0===c.closest(this.$element).length&&this.hide()};var d=a.fn.offcanvas;a.fn.offcanvas=function(b){return this.each(function(){var d=a(this),e=d.data("bs.offcanvas"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);d.hasClass("offcanvas-clone")||(e||d.data("bs.offcanvas",e=new c(this,f)),"string"==typeof b&&e[b]())})},a.fn.offcanvas.Constructor=c,a.fn.offcanvas.noConflict=function(){return a.fn.offcanvas=d,this},a(document).on("click.bs.offcanvas.data-api","[data-toggle=offcanvas]",function(b){var c,d=a(this),e=d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.offcanvas"),h=g?"toggle":a.extend(d.data(),f.data());b.preventDefault(),b.stopPropagation(),g?g.toggle():f.offcanvas(h)})}(window.jQuery),function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.$element.on("click.bs.rowlink mouseup.bs.rowlink","td:not(.rowlink-skip)",a.proxy(this.click,this))};b.DEFAULTS={target:"a"},b.prototype.click=function(b,c){var d=a(b.currentTarget).closest("tr").find(this.options.target)[0];if(void 0!==d&&a(b.target)[0]!==d&&("mouseup"!==b.type||2===b.which))if(b.preventDefault(),!(c=c||b.ctrlKey||"mouseup"===b.type&&2===b.which)&&d.click)d.click();else if(document.createEvent){var e=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0,ctrlKey:c});d.dispatchEvent(e)}};var c=a.fn.rowlink;a.fn.rowlink=function(c){return this.each(function(){var d=a(this),e=d.data("bs.rowlink");e||d.data("bs.rowlink",e=new b(this,c))})},a.fn.rowlink.Constructor=b,a.fn.rowlink.noConflict=function(){return a.fn.rowlink=c,this},a(document).on("click.bs.rowlink.data-api mouseup.bs.rowlink.data-api",'[data-link="row"]',function(b){if(("mouseup"!==b.type||2===b.which)&&0===a(b.target).closest(".rowlink-skip").length){var c=a(this);if(!c.data("bs.rowlink")){c.rowlink(c.data());var d=b.ctrlKey||2===b.which;a(b.target).trigger("click.bs.rowlink",[d])}}})}(window.jQuery),function(a){"use strict";var b="Microsoft Internet Explorer"==window.navigator.appName,c=function(b,d){if(this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.$input=this.$element.find(":file"),0!==this.$input.length){this.name=this.$input.attr("name")||d.name,this.$hidden=this.$element.find('input[type=hidden][name="'+this.name+'"]'),0===this.$hidden.length&&(this.$hidden=a('<input type="hidden">').insertBefore(this.$input)),this.$preview=this.$element.find(".fileinput-preview");var e=this.$preview.css("height");"inline"!==this.$preview.css("display")&&"0px"!==e&&"none"!==e&&this.$preview.css("line-height",e),this.original={exists:this.$element.hasClass("fileinput-exists"),preview:this.$preview.html(),hiddenVal:this.$hidden.val()},this.listen(),this.reset()}};c.DEFAULTS={clearName:!0},c.prototype.listen=function(){this.$input.on("change.bs.fileinput",a.proxy(this.change,this)),a(this.$input[0].form).on("reset.bs.fileinput",a.proxy(this.reset,this)),this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput",a.proxy(this.trigger,this)),this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput",a.proxy(this.clear,this))},c.prototype.verifySizes=function(a){if(void 0===this.options.maxSize)return!0;var b=parseFloat(this.options.maxSize);if(b!==this.options.maxSize)return!0;for(var c=0;c<a.length;c++){var d=void 0!==a[c].size?a[c].size:null;if(null!==d&&(d=d/1e3/1e3)>b)return!1}return!0},c.prototype.change=function(b){var c=void 0===b.target.files?b.target&&b.target.value?[{name:b.target.value.replace(/^.+\\/,"")}]:[]:b.target.files;if(b.stopPropagation(),0===c.length)return this.clear(),void this.$element.trigger("clear.bs.fileinput");if(!this.verifySizes(c))return this.$element.trigger("max_size.bs.fileinput"),this.clear(),void this.$element.trigger("clear.bs.fileinput");this.$hidden.val(""),this.$hidden.attr("name",""),this.$input.attr("name",this.name);var d=c[0];if(this.$preview.length>0&&(void 0!==d.type?d.type.match(/^image\/(gif|png|jpeg|svg\+xml)$/):d.name.match(/\.(gif|png|jpe?g|svg)$/i))&&"undefined"!=typeof FileReader){var e=this,f=new FileReader,g=this.$preview,h=this.$element;f.onload=function(b){var f=a("<img>");if(f[0].src=b.target.result,c[0].result=b.target.result,h.find(".fileinput-filename").text(d.name),"none"!=g.css("max-height")){var i=parseInt(g.css("max-height"),10)||0,j=parseInt(g.css("padding-top"),10)||0,k=parseInt(g.css("padding-bottom"),10)||0,l=parseInt(g.css("border-top"),10)||0,m=parseInt(g.css("border-bottom"),10)||0;f.css("max-height",i-j-k-l-m)}g.html(f),e.options.exif&&e.setImageTransform(f,d),h.addClass("fileinput-exists").removeClass("fileinput-new"),h.trigger("change.bs.fileinput",c)},f.readAsDataURL(d)}else{var i=d.name,j=this.$element.find(".fileinput-filename");c.length>1&&(i=a.map(c,function(a){return a.name}).join(", ")),j.text(i),this.$preview.text(d.name),this.$element.addClass("fileinput-exists").removeClass("fileinput-new"),this.$element.trigger("change.bs.fileinput")}},c.prototype.setImageTransform=function(a,b){var c=this,d=new FileReader;d.onload=function(b){var e=new DataView(d.result),f=c.getImageExif(e);f&&c.resetOrientation(a,f)},d.readAsArrayBuffer(b)},c.prototype.getImageExif=function(a){if(65496!=a.getUint16(0,!1))return-2;for(var b=a.byteLength,c=2;c<b;){var d=a.getUint16(c,!1);if(c+=2,65505==d){if(1165519206!=a.getUint32(c+=2,!1))return-1;var e=18761==a.getUint16(c+=6,!1);c+=a.getUint32(c+4,e);var f=a.getUint16(c,e);c+=2;for(var g=0;g<f;g++)if(274==a.getUint16(c+12*g,e))return a.getUint16(c+12*g+8,e)}else{if(65280!=(65280&d))break;c+=a.getUint16(c,!1)}}return-1},c.prototype.resetOrientation=function(a,b){var c=new Image;c.onload=function(){var d=c.width,e=c.height,f=document.createElement("canvas"),g=f.getContext("2d");switch([5,6,7,8].indexOf(b)>-1?(f.width=e,f.height=d):(f.width=d,f.height=e),b){case 2:g.transform(-1,0,0,1,d,0);break;case 3:g.transform(-1,0,0,-1,d,e);break;case 4:g.transform(1,0,0,-1,0,e);break;case 5:g.transform(0,1,1,0,0,0);break;case 6:g.transform(0,1,-1,0,e,0);break;case 7:g.transform(0,-1,-1,0,e,d);break;case 8:g.transform(0,-1,1,0,0,d);break;default:g.transform(1,0,0,1,0,0)}g.drawImage(c,0,0),a.attr("src",f.toDataURL())},c.src=a.attr("src")},c.prototype.clear=function(a){if(a&&a.preventDefault(),this.$hidden.val(""),this.$hidden.attr("name",this.name),this.options.clearName&&this.$input.attr("name",""),b){var c=this.$input.clone(!0);this.$input.after(c),this.$input.remove(),this.$input=c}else this.$input.val("");this.$preview.html(""),this.$element.find(".fileinput-filename").text(""),this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),void 0!==a&&(this.$input.trigger("change"),this.$element.trigger("clear.bs.fileinput"))},c.prototype.reset=function(){this.clear(),this.$hidden.val(this.original.hiddenVal),this.$preview.html(this.original.preview),this.$element.find(".fileinput-filename").text(""),this.original.exists?this.$element.addClass("fileinput-exists").removeClass("fileinput-new"):this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),this.$element.trigger("reseted.bs.fileinput")},c.prototype.trigger=function(a){this.$input.trigger("click"),a.preventDefault()};var d=a.fn.fileinput;a.fn.fileinput=function(b){return this.each(function(){var d=a(this),e=d.data("bs.fileinput");e||d.data("bs.fileinput",e=new c(this,b)),"string"==typeof b&&e[b]()})},a.fn.fileinput.Constructor=c,a.fn.fileinput.noConflict=function(){return a.fn.fileinput=d,this},a(document).on("click.fileinput.data-api",'[data-provides="fileinput"]',function(b){var c=a(this);if(!c.data("bs.fileinput")){c.fileinput(c.data());var d=a(b.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');d.length>0&&(b.preventDefault(),d.trigger("click.bs.fileinput"))}})}(window.jQuery);
vendor: 2,545 bytes, lines 52088-52171
52088
52089;/*!
52090* sweetalert2 v10.3.5
52091* Released under the MIT License.
52092*/
52093(function (global, factory) {
52094  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
52095  typeof define === 'function' && define.amd ? define(factory) :
52096  (global = global || self, global.Sweetalert2 = factory());
52097}(this, function () { 'use strict';
52098
52099  function _typeof(obj) {
52100    "@babel/helpers - typeof";
52101
52102    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
52103      _typeof = function (obj) {
52104        return typeof obj;
52105      };
52106    } else {
52107      _typeof = function (obj) {
52108        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
52109      };
52110    }
52111
52112    return _typeof(obj);
52113  }
52114
52115  function _classCallCheck(instance, Constructor) {
52116    if (!(instance instanceof Constructor)) {
52117      throw new TypeError("Cannot call a class as a function");
52118    }
52119  }
52120
52121  function _defineProperties(target, props) {
52122    for (var i = 0; i < props.length; i++) {
52123      var descriptor = props[i];
52124      descriptor.enumerable = descriptor.enumerable || false;
52125      descriptor.configurable = true;
52126      if ("value" in descriptor) descriptor.writable = true;
52127      Object.defineProperty(target, descriptor.key, descriptor);
52128    }
52129  }
52130
52131  function _createClass(Constructor, protoProps, staticProps) {
52132    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
52133    if (staticProps) _defineProperties(Constructor, staticProps);
52134    return Constructor;
52135  }
52136
52137  function _extends() {
52138    _extends = Object.assign || function (target) {
52139      for (var i = 1; i < arguments.length; i++) {
52140        var source = arguments[i];
52141
52142        for (var key in source) {
52143          if (Object.prototype.hasOwnProperty.call(source, key)) {
52144            target[key] = source[key];
52145          }
52146        }
52147      }
52148
52149      return target;
52150    };
52151
52152    return _extends.apply(this, arguments);
52153  }
52154
52155  function _inherits(subClass, superClass) {
52156    if (typeof superClass !== "function" && superClass !== null) {
52157      throw new TypeError("Super expression must either be null or a function");
52158    }
52159
52160    subClass.prototype = Object.create(superClass && superClass.prototype, {
52161      constructor: {
52162        value: subClass,
52163        writable: true,
52164        configurable: true
52165      }
52166    });
52167    if (superClass) _setPrototypeOf(subClass, superClass);
52168  }
52169
52170  function _getPrototypeOf(o) {
52171    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o
52171) {
52172      return o.__proto__ || Object.getPrototypeOf(o);
52173    };
52174    return _getPrototypeOf(o);
52175  }
52176
52177  function _setPrototypeOf(o, p) {
52178    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
52179      o.__proto__ = p;
52180      return o;
52181    };
52182
52183    return _setPrototypeOf(o, p);
52184  }
52185
52186  function _isNativeReflectConstruct() {
52187    if (typeof Reflect === "undefined" || !Reflect.construct) return false;
52188    if (Reflect.construct.sham) return false;
52189    if (typeof Proxy === "function") return true;
52190
52191    try {
52192      Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
52193      return true;
52194    } catch (e) {
52195      return false;
52196    }
52197  }
52198
52199  function _construct(Parent, args, Class) {
52200    if (_isNativeReflectConstruct()) {
52201      _construct = Reflect.construct;
52202    } else {
52203      _construct = function _construct(Parent, args, Class) {
52204        var a = [null];
52205        a.push.apply(a, args);
52206        var Constructor = Function.bind.apply(Parent, a);
52207        var instance = new Constructor();
52208        if (Class) _setPrototypeOf(instance, Class.prototype);
52209        return instance;
52210      };
52211    }
52212
52213    return _construct.apply(null, arguments);
52214  }
52215
52216  function _assertThisInitialized(self) {
52217    if (self === void 0) {
52218      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
52219    }
52220
52221    return self;
52222  }
52223
52224  function _possibleConstructorReturn(self, call) {
52225    if (call && (typeof call === "object" || typeof call === "function")) {
52226      return call;
52227    }
52228
52229    return _assertThisInitialized(self);
52230  }
52231
52232  function _createSuper(Derived) {
52233    var hasNativeReflectConstruct = _isNativeReflectConstruct();
52234
52235    return function _createSuperInternal() {
52236      var Super = _getPrototypeOf(Derived),
52237          result;
52238
52239      if (hasNativeReflectConstruct) {
52240        var NewTarget = _getPrototypeOf(this).constructor;
52241
52242        result = Reflect.construct(Super, arguments, NewTarget);
52243      } else {
52244        result = Super.apply(this, arguments);
52245      }
52246
52247      return _possibleConstructorReturn(this, result);
52248    };
52249  }
52250
52251  function _superPropBase(object, property) {
52252    while (!Object.prototype.hasOwnProperty.call(object, property)) {
52253      object = _getPrototypeOf(object);
52254      if (object === null) break;
52255    }
52256
52257    return object;
52258  }
52259
52260  function _get(target, property, receiver) {
52261    if (typeof Reflect !== "undefined" && Reflect.get) {
52262      _get = Reflect.get;
52263    } else {
52264      _get = function _get(target, property, receiver) {
52265        var base = _superPropBase(target, property);
52266
52267        if (!base) return;
52268        var desc = Object.getOwnPropertyDescriptor(base, property);
52269
52270        if (desc.get) {
52271          return desc.get.call(receiver);
52272        }
52273
52274        return desc.value;
52275      };
52276    }
52277
52278    return _get(target, property, receiver || target);
52279  }
52280
52281  var consolePrefix = 'SweetAlert2:';
52282  /**
52283   * Filter the unique values into a new array
52284   * @param arr
52285   */
52286
52287  var uniqueArray = function uniqueArray(arr) {
52288    var result = [];
52289
52290    for (var i = 0; i < arr.length; i++) {
52291      if (result.indexOf(arr[i]) === -1) {
52292        result.push(arr[i]);
52293      }
52294    }
52295
52296    return result;
52297  };
52298  /**
52299   * Capitalize the first letter of a string
52300   * @param str
52301   */
52302
52303  var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
52304    return str.charAt(0).toUpperCase() + str.slice(1);
52305  };
52306  /**
52307   * Returns the array of object values (Object.values isn't supported in IE11)
52308   * @param obj
52309   */
52310
52311  var objectValues = function objectValues(obj) {
52312    return Object.keys(obj).map(function (key) {
52313      return obj[key];
52314    });
52315  };
52316  /**
52317   * Convert NodeList to Array
52318   * @param nodeList
52319   */
52320
52321  var toArray = function toArray(nodeList) {
52322    return Array.prototype.slice.call(nodeList);
52323  };
52324  /**
52325   * Standardise console warnings
52326   * @param message
52327   */
52328
52329  var warn = function warn(message) {
52330    console.warn("".concat(consolePrefix, " ").concat(message));
52331  };
52332  /**
52333   * Standardise console errors
52334   * @param message
52335   */
52336
52337  var error = function error(message) {
52338    console.error("".concat(consolePrefix, " ").concat(message));
52339  };
52340  /**
52341   * Private global state for `warnOnce`
52342   * @type {Array}
52343   * @private
52344   */
52345
52346  var previousWarnOnceMessages = [];
52347  /**
52348   * Show a console warning, but only if it hasn't already been shown
52349   * @param message
52350   */
52351
52352  var warnOnce = function warnOnce(message) {
52353    if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
52354      previousWarnOnceMessages.push(message);
52355      warn(message);
52356    }
52357  };
52358  /**
52359   * Show a one-time console warning about deprecated params/methods
52360   */
52361
52362  var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam, useInstead) {
52363    warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
52364  };
52365  /**
52366   * If `arg` is a function, call it (with no arguments or context) and return the result.
52367   * Otherwise, just pass the value through
52368   * @param arg
52369   */
52370
52371  var callIfFunction = function callIfFunction(arg) {
52372    return typeof arg === 'function' ? arg() : arg;
52373  };
52374  var hasToPromiseFn = function hasToPromiseFn(arg) {
52375    return arg && typeof arg.toPromise === 'function';
52376  };
52377  var asPromise = function asPromise(arg) {
52378    return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
52379  };
52380  var isPromise = function isPromise(arg) {
52381    return arg && Promise.resolve(arg) === arg;
52382  };
52383
52384  var DismissReason = Object.freeze({
52385    cancel: 'cancel',
52386    backdrop: 'backdrop',
52387    close: 'close',
52388    esc: 'esc',
52389    timer: 'timer'
52390  });
52391
52392  var isJqueryElement = function isJqueryElement(elem) {
52393    return _typeof(elem) === 'object' && elem.jquery;
52394  };
52395
52396  var isElement = function isElement(elem) {
52397    return elem instanceof Element || isJqueryElement(elem);
52398  };
52399
52400  var argsToParams = function argsToParams(args) {
52401    var params = {};
52402
52403    if (_typeof(args[0]) === 'object' && !isElement(args[0])) {
52404      _extends(params, args[0]);
52405    } else {
52406      ['title', 'html', 'icon'].forEach(function (name, index) {
52407        var arg = args[index];
52408
52409        if (typeof arg === 'string' || isElement(arg)) {
52410          params[name] = arg;
52411        } else if (arg !== undefined) {
52412          error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg)));
52413        }
52414      });
52415    }
52416
52417    return params;
52418  };
52419
52420  var swalPrefix = 'swal2-';
52421  var prefix = function prefix(items) {
52422    var result = {};
52423
52424    for (var i in items) {
52425      result[items[i]] = swalPrefix + items[i];
52426    }
52427
52428    return result;
52429  };
52430  var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'toast-column', 'show', 'hide', 'close', 'title', 'header', 'content', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']);
52431  var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
52432
52433  var getContainer = function getContainer() {
52434    return document.body.querySelector(".".concat(swalClasses.container));
52435  };
52436  var elementBySelector = function elementBySelector(selectorString) {
52437    var container = getContainer();
52438    return container ? container.querySelector(selectorString) : null;
52439  };
52440
52441  var elementByClass = function elementByClass(className) {
52442    return elementBySelector(".".concat(className));
52443  };
52444
52445  var getPopup = function getPopup() {
52446    return elementByClass(swalClasses.popup);
52447  };
52448  var getIcons = function getIcons() {
52449    var popup = getPopup();
52450    return toArray(popup.querySelectorAll(".".concat(swalClasses.icon)));
52451  };
52452  var getIcon = function getIcon() {
52453    var visibleIcon = getIcons().filter(function (icon) {
52454      return isVisible(icon);
52455    });
52456    return visibleIcon.length ? visibleIcon[0] : null;
52457  };
52458  var getTitle = function getTitle() {
52459    return elementByClass(swalClasses.title);
52460  };
52461  var getContent = function getContent() {
52462    return elementByClass(swalClasses.content);
52463  };
52464  var getHtmlContainer = function getHtmlContainer() {
52465    return elementByClass(swalClasses['html-container']);
52466  };
52467  var getImage = function getImage() {
52468    return elementByClass(swalClasses.image);
52469  };
52470  var getProgressSteps = function getProgressSteps() {
52471    return elementByClass(swalClasses['progress-steps']);
52472  };
52473  var getValidationMessage = function getValidationMessage() {
52474    return elementByClass(swalClasses['validation-message']);
52475  };
52476  var getConfirmButton = function getConfirmButton() {
52477    return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm));
52478  };
52479  var getDenyButton = function getDenyButton() {
52480    return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny));
52481  };
52482  var getLoader = function getLoader() {
52483    return elementBySelector(".".concat(swalClasses.loader));
52484  };
52485  var getCancelButton = function getCancelButton() {
52486    return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel));
52487  };
52488  var getActions = function getActions() {
52489    return elementByClass(swalClasses.actions);
52490  };
52491  var getHeader = function getHeader() {
52492    return elementByClass(swalClasses.header);
52493  };
52494  var getFooter = function getFooter() {
52495    return elementByClass(swalClasses.footer);
52496  };
52497  var getTimerProgressBar = function getTimerProgressBar() {
52498    return elementByClass(swalClasses['timer-progress-bar']);
52499  };
52500  var getCloseButton = function getCloseButton() {
52501    return elementByClass(swalClasses.close);
52502  }; // https://github.com/jkup/focusable/blob/master/index.js
52503
52504  var focusable = "\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex=\"0\"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n";
52505  var getFocusableElements = function getFocusableElements() {
52506    var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not
52506([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
52507    .sort(function (a, b) {
52508      a = parseInt(a.getAttribute('tabindex'));
52509      b = parseInt(b.getAttribute('tabindex'));
52510
52511      if (a > b) {
52512        return 1;
52513      } else if (a < b) {
52514        return -1;
52515      }
52516
52517      return 0;
52518    });
52519    var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {
52520      return el.getAttribute('tabindex') !== '-1';
52521    });
52522    return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
52523      return isVisible(el);
52524    });
52525  };
52526  var isModal = function isModal() {
52527    return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
52528  };
52529  var isToast = function isToast() {
52530    return document.body.classList.contains(swalClasses['toast-shown']);
52531  };
52532  var isLoading = function isLoading() {
52533    return getPopup().hasAttribute('data-loading');
52534  };
52535
52536  var states = {
52537    previousBodyPadding: null
52538  };
52539  var setInnerHtml = function setInnerHtml(elem, html) {
52540    // #1926
52541    elem.textContent = '';
52542
52543    if (html) {
52544      var parser = new DOMParser();
52545      var parsed = parser.parseFromString(html, "text/html");
52546      toArray(parsed.querySelector('head').childNodes).forEach(function (child) {
52547        elem.appendChild(child);
52548      });
52549      toArray(parsed.querySelector('body').childNodes).forEach(function (child) {
52550        elem.appendChild(child);
52551      });
52552    }
52553  };
52554  var hasClass = function hasClass(elem, className) {
52555    if (!className) {
52556      return false;
52557    }
52558
52559    var classList = className.split(/\s+/);
52560
52561    for (var i = 0; i < classList.length; i++) {
52562      if (!elem.classList.contains(classList[i])) {
52563        return false;
52564      }
52565    }
52566
52567    return true;
52568  };
52569
52570  var removeCustomClasses = function removeCustomClasses(elem, params) {
52571    toArray(elem.classList).forEach(function (className) {
52572      if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {
52573        elem.classList.remove(className);
52574      }
52575    });
52576  };
52577
52578  var applyCustomClass = function applyCustomClass(elem, params, className) {
52579    removeCustomClasses(elem, params);
52580
52581    if (params.customClass && params.customClass[className]) {
52582      if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {
52583        return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\""));
52584      }
52585
52586      addClass(elem, params.customClass[className]);
52587    }
52588  };
52589  function getInput(content, inputType) {
52590    if (!inputType) {
52591      return null;
52592    }
52593
52594    switch (inputType) {
52595      case 'select':
52596      case 'textarea':
52597      case 'file':
52598        return getChildByClass(content, swalClasses[inputType]);
52599
52600      case 'checkbox':
52601        return content.querySelector(".".concat(swalClasses.checkbox, " input"));
52602
52603      case 'radio':
52604        return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
52605
52606      case 'range':
52607        return content.querySelector(".".concat(swalClasses.range, " input"));
52608
52609      default:
52610        return getChildByClass(content, swalClasses.input);
52611    }
52612  }
52613  var focusInput = function focusInput(input) {
52614    input.focus(); // place cursor at end of text in text input
52615
52616    if (input.type !== 'file') {
52617      // http://stackoverflow.com/a/2345915
52618      var val = input.value;
52619      input.value = '';
52620      input.value = val;
52621    }
52622  };
52623  var toggleClass = function toggleClass(target, classList, condition) {
52624    if (!target || !classList) {
52625      return;
52626    }
52627
52628    if (typeof classList === 'string') {
52629      classList = classList.split(/\s+/).filter(Boolean);
52630    }
52631
52632    classList.forEach(function (className) {
52633      if (target.forEach) {
52634        target.forEach(function (elem) {
52635          condition ? elem.classList.add(className) : elem.classList.remove(className);
52636        });
52637      } else {
52638        condition ? target.classList.add(className) : target.classList.remove(className);
52639      }
52640    });
52641  };
52642  var addClass = function addClass(target, classList) {
52643    toggleClass(target, classList, true);
52644  };
52645  var removeClass = function removeClass(target, classList) {
52646    toggleClass(target, classList, false);
52647  };
52648  var getChildByClass = function getChildByClass(elem, className) {
52649    for (var i = 0; i < elem.childNodes.length; i++) {
52650      if (hasClass(elem.childNodes[i], className)) {
52651        return elem.childNodes[i];
52652      }
52653    }
52654  };
52655  var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
52656    if (value || parseInt(value) === 0) {
52657      elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value;
52658    } else {
52659      elem.style.removeProperty(property);
52660    }
52661  };
52662  var show = function show(elem) {
52663    var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
52664    elem.style.display = display;
52665  };
52666  var hide = function hide(elem) {
52667    elem.style.display = 'none';
52668  };
52669  var setStyle = function setStyle(parent, selector, property, value) {
52670    var el = parent.querySelector(selector);
52671
52672    if (el) {
52673      el.style[property] = value;
52674    }
52675  };
52676  var toggle = function toggle(elem, condition, display) {
52677    condition ? show(elem, display) : hide(elem);
52678  }; // borrowed from jquery $(elem).is(':visible') implementation
52679
52680  var isVisible = function isVisible(elem) {
52681    return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
52682  };
52683  /* istanbul ignore next */
52684
52685  var isScrollable = function isScrollable(elem) {
52686    return !!(elem.scrollHeight > elem.clientHeight);
52687  }; // borrowed from https://stackoverflow.com/a/46352119
52688
52689  var hasCssAnimation = function hasCssAnimation(elem) {
52690    var style = window.getComputedStyle(elem);
52691    var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
52692    var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
52693    return animDuration > 0 || transDuration > 0;
52694  };
52695  var contains = function contains(haystack, needle) {
52696    if (typeof haystack.contains === 'function') {
52697      return haystack.contains(needle);
52698    }
52699  };
52700  var animateTimerProgressBar = function animateTimerProgressBar(timer) {
52701    var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
52702    var timerProgressBar = getTimerProgressBar();
52703
52704    if (isVisible(timerProgressBar)) {
52705      if (reset) {
52706        timerProgressBar.style.transition = 'none';
52707        timerProgressBar.style.width = '100%';
52708      }
52709
52710      setTimeout(function () {
52711        timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear");
52712        timerProgressBar.style.width = '0%';
52713      }, 10);
52714    }
52715  };
52716  var stopTimerProgressBar = function stopTimerProgressBar() {
52717    var timerProgressBar = getTimerProgressBar();
52718    var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
52719    timerProgressBar.style.removeProperty('transition');
52720    timerProgressBar.style.width = '100%';
52721    var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
52722    var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);
52723    timerProgressBar.style.removeProperty('transition');
52724    timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%");
52725  };
52726
52727  // Detect Node env
52728  var isNodeEnv = function isNodeEnv() {
52729    return typeof window === 'undefined' || typeof document === 'undefined';
52730  };
52731
52732  var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n   <div class=\"").concat(swalClasses.header, "\">\n     <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n     <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\"></div>\n     <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n     <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n     <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n     <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\"></div>\n     <img class=\"").concat(swalClasses.image, "\" />\n     <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n     <button type=\"button\" class=\"").concat(swalClasses.close, "\"></button>\n   </div>\n   <div class=\"").concat(swalClasses.content, "\">\n     <div id=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses['html-container'], "\"></div>\n     <input class=\"").concat(swalClasses.input, "\" />\n     <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n     <div class=\"").concat(swalClasses.range, "\">\n       <input type=\"range\" />\n       <output></output>\n     </div>\n     <select class=\"").concat(swalClasses.select, "\"></select>\n     <div class=\"").concat(swalClasses.radio, "\"></div>\n     <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n       <input type=\"checkbox\" />\n       <span class=\"").concat(swalClasses.label, "\"></span>\n     </label>\n     <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n     <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n   </div>\n   <div class=\"").concat(swalClasses.actions, "\">\n     <div class=\"").concat(swalClasses.loader, "\"></div>\n     <button type=\"button\" class=\"").concat(swalClasses.confirm, "\"></button>\n     <button type=\"button\" class=\"").concat(swalClasses.deny, "\"></button>\n     <button type=\"button\" class=\"").concat(swalClasses.cancel, "\"></button>\n   </div>\n   <div class=\"").concat(swalClasses.footer, "\"></div>\n   <div class=\"").concat(swalClasses['timer-progress-bar-container'], "\">\n     <div class=\"").concat(swalClasses['timer-progress-bar'], "\"></div>\n   </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
52733
52734  var resetOldContainer = function resetOldContainer() {
52735    var oldContainer = getContainer();
52736
52737    if (!oldContainer) {
52738      return false;
52739    }
52740
52741    oldContainer.parentNode.removeChild(oldContainer);
52742    removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
52743    return true;
52744  };
52745
52746  var oldInputVal; // IE11 workaround, see #1109 for details
52747
52748  var resetValidationMessage = function resetValidationMessage(e) {
52749    if (Swal.isVisible() && oldInputVal !== e.target.value) {
52750      Swal.resetValidationMessage();
52751    }
52752
52753    oldInputVal = e.target.value;
52754  };
52755
52756  var addInputChangeListeners = function addInputChangeListeners() {
52757    var content = getContent();
52758    var input = getChildByClass(content, swalClasses.input);
52759    var file = getChildByClass(content, swalClasses.file);
52760    var range = content.querySelector(".".concat(swalClasses.range, " input"));
52761    var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
52762    var select = getChildByClass(content, swalClasses.select);
52763    var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
52764    var textarea = getChildByClass(content, swalClasses.textarea);
52765    input.oninput = resetValidationMessage;
52766    file.onchange = resetValidationMessage;
52767    select.onchange = resetValidationMessage;
52768    checkbox.onchange = resetValidationMessage;
52769    textarea.oninput = resetValidationMessage;
52770
52771    range.oninput = function (e) {
52772      resetValidationMessage(e);
52773      rangeOutput.value = range.value;
52774    };
52775
52776    range.onchange = function (e) {
52777      resetValidationMessage(e);
52778      range.nextSibling.value = range.value;
52779    };
52780  };
52781
52782  var getTarget = function getTarget(target) {
52783    return typeof target === 'string' ? document.querySelector(target) : target;
52784  };
52785
52786  var setupAccessibility = function setupAccessibility(params) {
52787    var popup = getPopup();
52788    popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
52789    popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
52790
52791    if (!params.toast) {
52792      popup.setAttribute('aria-modal', 'true');
52793    }
52794  };
52795
52796  var setupRTL = function setupRTL(targetElement) {
52797    if (window.getComputedStyle(targetElement).direction === 'rtl') {
52798      addClass(getContainer(), swalClasses.rtl);
52799    }
52800  };
52801  /*
52802   * Add modal + backdrop to DOM
52803   */
52804
52805
52806  var init = function init(params) {
52807    // Clean up the old popup container if it exists
52808    var oldContainerExisted = resetOldContainer();
52809    /* istanbul ignore if */
52810
52811    if (isNodeEnv()) {
52812      error('SweetAlert2 requires document to initialize');
52813      return;
52814    }
52815
52816    var container = document.createElement('div');
52817    container.className = swalClasses.container;
52818
52819    if (oldContainerExisted) {
52820      addClass(container, swalClasses['no-transition']);
52821    }
52822
52823    setInnerHtml(container, sweetHTML);
52824    var targetElement = getTarget(params.target);
52825    targetElement.appendChild(container);
52826    setupAccessibility(params);
52827    setupRTL(targetElement);
52828    addInputChangeListeners();
52829  };
52830
52831  var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
52832    // DOM element
52833    if (param instanceof HTMLElement) {
52834      target.appendChild(param); // Object
52835    } else if (_typeof(param) === 'object') {
52836      handleObject(param, target); // Plain string
52837    } else if (param) {
52838      setInnerHtml(target, param);
52839    }
52840  };
52841
52842  var handleObject = function handleObject(param, target) {
52843    // JQuery element(s)
52844    if (param.jquery) {
52845      handleJqueryElem(target, param); // For other objects use their string representation
52846    } else {
52847      setInnerHtml(target, param.toString());
52848    }
52849  };
52850
52851  var handleJqueryElem = function handleJqueryElem(target, elem) {
52852    target.textContent = '';
52853
52854    if (0 in elem) {
52855      for (var i = 0; (i in elem); i++) {
52856        target.appendChild(elem[i].cloneNode(true));
52857      }
52858    } else {
52859      target.appendChild(elem.cloneNode(true));
52860    }
52861  };
52862
52863  var animationEndEvent = function () {
52864    // Prevent run in Node env
52865
52866    /* istanbul ignore if */
52867    if (isNodeEnv()) {
52868      return false;
52869    }
52870
52871    var testEl = document.createElement('div');
52872    var transEndEventNames = {
52873      WebkitAnimation: 'webkitAnimationEnd',
52874      OAnimation: 'oAnimationEnd oanimationend',
52875      animation: 'animationend'
52876    };
52877
52878    for (var i in transEndEventNames) {
52879      if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {
52880        return transEndEventNames[i];
52881      }
52882    }
52883
52884    return false;
52885  }();
52886
52887  // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js
52888
52889  var measureScrollbar = function measureScrollbar() {
52890    var scrollDiv = document.createElement('div');
52891    scrollDiv.className = swalClasses['scrollbar-measure'];
52892    document.body.appendChild(scrollDiv);
52893    var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
52894    document.body.removeChild(scrollDiv);
52895    return scrollbarWidth;
52896  };
52897
52898  var renderActions = function renderActions(instance, params) {
52899    var actions = getActions();
52900    var loader = getLoader();
52901    var confirmButton = getConfirmButton();
52902    var denyButton = getDenyButton();
52903    var cancelButton = getCancelButton(); // Actions (buttons) wrapper
52904
52905    if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {
52906      hide(actions);
52907    } // Custom class
52908
52909
52910    applyCustomClass(actions, params, 'actions'); // Render buttons
52911
52912    renderButton(confirmButton, 'confirm', params);
52913    renderButton(denyButton, 'deny', params);
52914    renderButton(cancelButton, 'cancel', params); // Loader
52915
52916    loader.innerHTML = params.loaderHtml;
52917
52918    if (params.buttonsStyling) {
52919      handleButtonsStyling(confirmButton, denyButton, cancelButton, params);
52920    } else {
52921      removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);
52922    }
52923
52924    if (params.reverseButtons) {
52925      actions.insertBefore(cancelButton, loader);
52926      actions.insertBefore(denyButton, loader);
52927      actions.insertBefore(confirmButton, loader);
52928    }
52929  };
52930
52931  function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {
52932    addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors
52933
52934    if (params.confirmButtonColor) {
52935      confirmButton.style.backgroundColor = params.confirmButtonColor;
52936    }
52937
52938    if (params.denyButtonColor) {
52939      denyButton.style.backgroundColor = params.denyButtonColor;
52940    }
52941
52942    if (params.cancelButtonColor) {
52943      cancelButton.style.backgroundColor = params.cancelButtonColor;
52944    } // Loading state
52945
52946
52947    if (!isLoading()) {
52948      var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
52949      confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
52950      confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
52951    }
52952  }
52953
52954  function renderButton(button, buttonType, params) {
52955    toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block');
52956    setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text
52957
52958    button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label
52959    // Add buttons custom classes
52960
52961    button.className = swalClasses[buttonType];
52962    applyCustomClass(button, params, "".concat(buttonType, "Button"));
52963    addClass(button, params["".concat(buttonType, "ButtonClass")]);
52964  }
52965
52966  function handleBackdropParam(container, backdrop) {
52967    if (typeof backdrop === 'string') {
52968      container.style.background = backdrop;
52969    } else if (!backdrop) {
52970      addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
52971    }
52972  }
52973
52974  function handlePositionParam(container, position) {
52975    if (position in swalClasses) {
52976      addClass(container, swalClasses[position]);
52977    } else {
52978      warn('The "position" parameter is not valid, defaulting to "center"');
52979      addClass(container, swalClasses.center);
52980    }
52981  }
52982
52983  function handleGrowParam(container, grow) {
52984    if (grow && typeof grow === 'string') {
52985      var growClass = "grow-".concat(grow);
52986
52987      if (growClass in swalClasses) {
52988        addClass(container, swalClasses[growClass]);
52989      }
52990    }
52991  }
52992
52993  var renderContainer = function renderContainer(instance, params) {
52994    var container = getContainer();
52995
52996    if (!container) {
52997      return;
52998    }
52999
53000    handleBackdropParam(container, params.backdrop);
53001
53002    if (!params.backdrop && params.allowOutsideClick) {
53003      warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
53004    }
53005
53006    handlePositionParam(container, params.position);
53007    handleGrowParam(container, params.grow); // Custom class
53008
53009    applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method
53010
53011    var queueStep = document.body.getAttribute('data-swal2-queue-step');
53012
53013    if (queueStep) {
53014      container.setAttribute('data-queue-step', queueStep);
53015      document.body.removeAttribute('data-swal2-queue-step');
53016    }
53017  };
53018
53019  /**
53020   * This module containts `WeakMap`s for each effectively-"private  property" that a `Swal` has.
53021   * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
53022   * This is the approach that Babel will probably take to implement private methods/fields
53023   *   https://github.com/tc39/proposal-private-methods
53024   *   https://github.com/babel/babel/pull/7555
53025   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
53026   *   then we can use that language feature.
53027   */
53028  var privateProps = {
53029    promise: new WeakMap(),
53030    innerParams: new WeakMap(),
53031    domCache: new WeakMap()
53032  };
53033
53034  var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
53035  var renderInput = function renderInput(instance, params) {
53036    var content = getContent();
53037    var innerParams = privateProps.innerParams.get(instance);
53038    var rerender = !innerParams || params.input !== innerParams.input;
53039    inputTypes.forEach(function (inputType) {
53040      var inputClass = swalClasses[inputType];
53041      var inputContainer = getChildByClass(content, inputClass); // set attributes
53042
53043      setAttributes(inputType, params.inputAttributes); // set class
53044
53045      inputContainer.className = inputClass;
53046
53047      if (rerender) {
53048        hide(inputContainer);
53049      }
53050    });
53051
53052    if (params.input) {
53053      if (rerender) {
53054        showInput(params);
53055      } // set custom class
53056
53057
53058      setCustomClass(params);
53059    }
53060  };
53061
53062  var showInput = function showInput(params) {
53063    if (!renderInputType[params.input]) {
53064      return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
53065    }
53066
53067    var inputContainer = getInputContainer(params.input);
53068    var input = renderInputType[params.input](inputContainer, params);
53069    show(input); // input autofocus
53070
53071    setTimeout(function () {
53072      focusInput(input);
53073    });
53074  };
53075
53076  var removeAttributes = function removeAttributes(input) {
53077    for (var i = 0; i < input.attributes.length; i++) {
53078      var attrName = input.attributes[i].name;
53079
53080      if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
53081        input.removeAttribute(attrName);
53082      }
53083    }
53084  };
53085
53086  var setAttributes = function setAttributes(inputType, inputAttributes) {
53087    var input = getInput(getContent(), inputType);
53088
53089    if (!input) {
53090      return;
53091    }
53092
53093    removeAttributes(input);
53094
53095    for (var attr in inputAttributes) {
53096      // Do not set a placeholder for <input type="range">
53097      // it'll crash Edge, #1298
53098      if (inputType === 'range' && attr === 'placeholder') {
53099        continue;
53100      }
53101
53102      input.setAttribute(attr, inputAttributes[attr]);
53103    }
53104  };
53105
53106  var setCustomClass = function setCustomClass(params) {
53107    var inputContainer = getInputContainer(params.input);
53108
53109    if (params.customClass) {
53110      addClass(inputContainer, params.customClass.input);
53111    }
53112  };
53113
53114  var setInputPlaceholder = function setInputPlaceholder(input, params) {
53115    if (!input.placeholder || params.inputPlaceholder) {
53116      input.placeholder = params.inputPlaceholder;
53117    }
53118  };
53119
53120  var getInputContainer = function getInputContainer(inputType) {
53121    var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;
53122    return getChildByClass(getContent(), inputClass);
53123  };
53124
53125  var renderInputType = {};
53126
53127  renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {
53128    if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
53129      input.value = params.inputValue;
53130    } else if (!isPromise(params.inputValue)) {
53131      warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
53132    }
53133
53134    setInputPlaceholder(input, params);
53135    input.type = params.input;
53136    return input;
53137  };
53138
53139  renderInputType.file = function (input, params) {
53140    setInputPlaceholder(input, params);
53141    return input;
53142  };
53143
53144  renderInputType.range = function (range, params) {
53145    var rangeInput = range.querySelector('input');
53146    var rangeOutput = range.querySelector('output');
53147    rangeInput.value = params.inputValue;
53148    rangeInput.type = params.input;
53149    rangeOutput.value = params.inputValue;
53150    return range;
53151  };
53152
53153  renderInputType.select = function (select, params) {
53154    select.textContent = '';
53155
53156    if (params.inputPlaceholder) {
53157      var placeholder = document.createElement('option');
53158      setInnerHtml(placeholder, params.inputPlaceholder);
53159      placeholder.value = '';
53160      placeholder.disabled = true;
53161      placeholder.selected = true;
53162      select.appendChild(placeholder);
53163    }
53164
53165    return select;
53166  };
53167
53168  renderInputType.radio = function (radio) {
53169    radio.textContent = '';
53170    return radio;
53171  };
53172
53173  renderInputType.checkbox = function (checkboxContainer, params) {
53174    var checkbox = getInput(getContent(), 'checkbox');
53175    checkbox.value = 1;
53176    checkbox.id = swalClasses.checkbox;
53177    checkbox.checked = Boolean(params.inputValue);
53178    var label = checkboxContainer.querySelector('span');
53179    setInnerHtml(label, params.inputPlaceholder);
53180    return checkboxContainer;
53181  };
53182
53183  renderInputType.textarea = function (textarea, params) {
53184    textarea.value = params.inputValue;
53185    setInputPlaceholder(textarea, params);
53186
53187    if ('MutationObserver' in window) {
53188      // #1699
53189      var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);
53190      var popupPadding = parseInt(window.getComputedStyle(getPopup()).paddingLeft) + parseInt(window.getComputedStyle(getPopup()).paddingRight);
53191
53192      var outputsize = function outputsize() {
53193        var contentWidth = textarea.offsetWidth + popupPadding;
53194
53195        if (contentWidth > initialPopupWidth) {
53196          getPopup().style.width = "".concat(contentWidth, "px");
53197        } else {
53198          getPopup().style.width = null;
53199        }
53200      };
53201
53202      new MutationObserver(outputsize).observe(textarea, {
53203        attributes: true,
53204        attributeFilter: ['style']
53205      });
53206    }
53207
53208    return textarea;
53209  };
53210
53211  var renderContent = function renderContent(instance, params) {
53212    var content = getContent().querySelector("#".concat(swalClasses.content)); // Content as HTML
53213
53214    if (params.html) {
53215      parseHtmlToContainer(params.html, content);
53216      show(content, 'block'); // Content as plain text
53217    } else if (params.text) {
53218      content.textContent = params.text;
53219      show(content, 'block'); // No content
53220    } else {
53221      hide(content);
53222    }
53223
53224    renderInput(instance, params); // Custom class
53225
53226    applyCustomClass(getContent(), params, 'content');
53227  };
53228
53229  var renderFooter = function renderFooter(instance, params) {
53230    var footer = getFooter();
53231    toggle(footer, params.footer);
53232
53233    if (params.footer) {
53234      parseHtmlToContainer(params.footer, footer);
53235    } // Custom class
53236
53237
53238    applyCustomClass(footer, params, 'footer');
53239  };
53240
53241  var renderCloseButton = function renderCloseButton(instance, params) {
53242    var closeButton = getCloseButton();
53243    setInnerHtml(closeButton, params.closeButtonHtml); // Custom class
53244
53245    applyCustomClass(closeButton, params, 'closeButton');
53246    toggle(closeButton, params.showCloseButton);
53247    closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
53248  };
53249
53250  var renderIcon = function renderIcon(instance, params) {
53251    var innerParams = privateProps.innerParams.get(instance); // if the given icon already rendered, apply the styling without re-rendering the icon
53252
53253    if (innerParams && params.icon === innerParams.icon && getIcon()) {
53254      applyStyles(getIcon(), params);
53255      return;
53256    }
53257
53258    hideAllIcons();
53259
53260    if (!params.icon) {
53261      return;
53262    }
53263
53264    if (Object.keys(iconTypes).indexOf(params.icon) !== -1) {
53265      var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.icon]));
53266      show(icon); // Custom or default content
53267
53268      setContent(icon, params);
53269      applyStyles(icon, params); // Animate icon
53270
53271      addClass(icon, params.showClass.icon);
53272    } else {
53273      error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\""));
53274    }
53275  };
53276
53277  var hideAllIcons = function hideAllIcons() {
53278    var icons = getIcons();
53279
53280    for (var i = 0; i < icons.length; i++) {
53281      hide(icons[i]);
53282    }
53283  };
53284
53285  var applyStyles = function applyStyles(icon, params) {
53286    // Icon color
53287    setColor(icon, params); // Success icon background color
53288
53289    adjustSuccessIconBackgoundColor(); // Custom class
53290
53291    applyCustomClass(icon, params, 'icon');
53292  }; // Adjust success icon background color to match the popup background color
53293
53294
53295  var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
53296    var popup = getPopup();
53297    var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
53298    var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
53299
53300    for (var i = 0; i < successIconParts.length; i++) {
53301      successIconParts[i].style.backgroundColor = popupBackgroundColor;
53302    }
53303  };
53304
53305  var setContent = function setContent(icon, params) {
53306    icon.textContent = '';
53307
53308    if (params.iconHtml) {
53309      setInnerHtml(icon, iconContent(params.iconHtml));
53310    } else if (params.icon === 'success') {
53311      setInnerHtml(icon, "\n      <div class=\"swal2-success-circular-line-left\"></div>\n      <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n      <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n      <div class=\"swal2-success-circular-line-right\"></div>\n    ");
53312    } else if (params.icon === 'error') {
53313      setInnerHtml(icon, "\n      <span class=\"swal2-x-mark\">\n        <span class=\"swal2-x-mark-line-left\"></span>\n        <span class=\"swal2-x-mark-line-right\"></span>\n      </span>\n    ");
53314    } else {
53315      var defaultIconHtml = {
53316        question: '?',
53317        warning: '!',
53318        info: 'i'
53319      };
53320      setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));
53321    }
53322  };
53323
53324  var setColor = function setColor(icon, params) {
53325    if (!params.iconColor) {
53326      return;
53327    }
53328
53329    icon.style.color = params.iconColor;
53330    icon.style.borderColor = params.iconColor;
53331
53332    for (var _i = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i < _arr.length; _i++) {
53333      var sel = _arr[_i];
53334      setStyle(icon, sel, 'backgroundColor', params.iconColor);
53335    }
53336
53337    setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);
53338  };
53339
53340  var iconContent = function iconContent(content) {
53341    return "<div class=\"".concat(swalClasses['icon-content'], "\">").concat(content, "</div>");
53342  };
53343
53344  var renderImage = function renderImage(instance, params) {
53345    var image = getImage();
53346
53347    if (!params.imageUrl) {
53348      return hide(image);
53349    }
53350
53351    show(image, ''); // Src, alt
53352
53353    image.setAttribute('src', params.imageUrl);
53354    image.setAttribute('alt', params.imageAlt); // Width, height
53355
53356    applyNumericalStyle(image, 'width', params.imageWidth);
53357    applyNumericalStyle(image, 'height', params.imageHeight); // Class
53358
53359    image.className = swalClasses.image;
53360    applyCustomClass(image, params, 'image');
53361  };
53362
53363  var currentSteps = [];
53364  /*
53365   * Global function for chaining sweetAlert popups
53366   */
53367
53368  var queue = function queue(steps) {
53369    var Swal = this;
53370    currentSteps = steps;
53371
53372    var resetAndResolve = function resetAndResolve(resolve, value) {
53373      currentSteps = [];
53374      resolve(value);
53375    };
53376
53377    var queueResult = [];
53378    return new Promise(function (resolve) {
53379      (function step(i, callback) {
53380        if (i < currentSteps.length) {
53381          document.body.setAttribute('data-swal2-queue-step', i);
53382          Swal.fire(currentSteps[i]).then(function (result) {
53383            if (typeof result.value !== 'undefined') {
53384              queueResult.push(result.value);
53385              step(i + 1, callback);
53386            } else {
53387              resetAndResolve(resolve, {
53388                dismiss: result.dismiss
53389              });
53390            }
53391          });
53392        } else {
53393          resetAndResolve(resolve, {
53394            value: queueResult
53395          });
53396        }
53397      })(0);
53398    });
53399  };
53400  /*
53401   * Global function for getting the index of current popup in queue
53402   */
53403
53404  var getQueueStep = function getQueueStep() {
53405    return getContainer() && getContainer().getAttribute('data-queue-step');
53406  };
53407  /*
53408   * Global function for inserting a popup to the queue
53409   */
53410
53411  var insertQueueStep = function insertQueueStep(step, index) {
53412    if (index && index < currentSteps.length) {
53413      return currentSteps.splice(index, 0, step);
53414    }
53415
53416    return currentSteps.push(step);
53417  };
53418  /*
53419   * Global function for deleting a popup from the queue
53420   */
53421
53422  var deleteQueueStep = function deleteQueueStep(index) {
53423    if (typeof currentSteps[index] !== 'undefined') {
53424      currentSteps.splice(index, 1);
53425    }
53426  };
53427
53428  var createStepElement = function createStepElement(step) {
53429    var stepEl = document.createElement('li');
53430    addClass(stepEl, swalClasses['progress-step']);
53431    setInnerHtml(stepEl, step);
53432    return stepEl;
53433  };
53434
53435  var createLineElement = function createLineElement(params) {
53436    var lineEl = document.createElement('li');
53437    addClass(lineEl, swalClasses['progress-step-line']);
53438
53439    if (params.progressStepsDistance) {
53440      lineEl.style.width = params.progressStepsDistance;
53441    }
53442
53443    return lineEl;
53444  };
53445
53446  var renderProgressSteps = function renderProgressSteps(instance, params) {
53447    var progressStepsContainer = getProgressSteps();
53448
53449    if (!params.progressSteps || params.progressSteps.length === 0) {
53450      return hide(progressStepsContainer);
53451    }
53452
53453    show(progressStepsContainer);
53454    progressStepsContainer.textContent = '';
53455    var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);
53456
53457    if (currentProgressStep >= params.progressSteps.length) {
53458      warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
53459    }
53460
53461    params.progressSteps.forEach(function (step, index) {
53462      var stepEl = createStepElement(step);
53463      progressStepsContainer.appendChild(stepEl);
53464
53465      if (index === currentProgressStep) {
53466        addClass(stepEl, swalClasses['active-progress-step']);
53467      }
53468
53469      if (index !== params.progressSteps.length - 1) {
53470        var lineEl = createLineElement(params);
53471        progressStepsContainer.appendChild(lineEl);
53472      }
53473    });
53474  };
53475
53476  var renderTitle = function renderTitle(instance, params) {
53477    var title = getTitle();
53478    toggle(title, params.title || params.titleText);
53479
53480    if (params.title) {
53481      parseHtmlToContainer(params.title, title);
53482    }
53483
53484    if (params.titleText) {
53485      title.innerText = params.titleText;
53486    } // Custom class
53487
53488
53489    applyCustomClass(title, params, 'title');
53490  };
53491
53492  var renderHeader = function renderHeader(instance, params) {
53493    var header = getHeader(); // Custom class
53494
53495    applyCustomClass(header, params, 'header'); // Progress steps
53496
53497    renderProgressSteps(instance, params); // Icon
53498
53499    renderIcon(instance, params); // Image
53500
53501    renderImage(instance, params); // Title
53502
53503    renderTitle(instance, params); // Close button
53504
53505    renderCloseButton(instance, params);
53506  };
53507
53508  var renderPopup = function renderPopup(instance, params) {
53509    var popup = getPopup(); // Width
53510
53511    applyNumericalStyle(popup, 'width', params.width); // Padding
53512
53513    applyNumericalStyle(popup, 'padding', params.padding);
53513 // Background
53514
53515    if (params.background) {
53516      popup.style.background = params.background;
53517    } // Classes
53518
53519
53520    addClasses(popup, params);
53521  };
53522
53523  var addClasses = function addClasses(popup, params) {
53524    // Default Class + showClass when updating Swal.update({})
53525    popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : '');
53526
53527    if (params.toast) {
53528      addClass([document.documentElement, document.body], swalClasses['toast-shown']);
53529      addClass(popup, swalClasses.toast);
53530    } else {
53531      addClass(popup, swalClasses.modal);
53532    } // Custom class
53533
53534
53535    applyCustomClass(popup, params, 'popup');
53536
53537    if (typeof params.customClass === 'string') {
53538      addClass(popup, params.customClass);
53539    } // Icon class (#1842)
53540
53541
53542    if (params.icon) {
53543      addClass(popup, swalClasses["icon-".concat(params.icon)]);
53544    }
53545  };
53546
53547  var render = function render(instance, params) {
53548    renderPopup(instance, params);
53549    renderContainer(instance, params);
53550    renderHeader(instance, params);
53551    renderContent(instance, params);
53552    renderActions(instance, params);
53553    renderFooter(instance, params);
53554
53555    if (typeof params.didRender === 'function') {
53556      params.didRender(getPopup());
53557    } else if (typeof params.onRender === 'function') {
53558      params.onRender(getPopup()); // @deprecated
53559    }
53560  };
53561
53562  /*
53563   * Global function to determine if SweetAlert2 popup is shown
53564   */
53565
53566  var isVisible$1 = function isVisible$$1() {
53567    return isVisible(getPopup());
53568  };
53569  /*
53570   * Global function to click 'Confirm' button
53571   */
53572
53573  var clickConfirm = function clickConfirm() {
53574    return getConfirmButton() && getConfirmButton().click();
53575  };
53576  /*
53577   * Global function to click 'Deny' button
53578   */
53579
53580  var clickDeny = function clickDeny() {
53581    return getDenyButton() && getDenyButton().click();
53582  };
53583  /*
53584   * Global function to click 'Cancel' button
53585   */
53586
53587  var clickCancel = function clickCancel() {
53588    return getCancelButton() && getCancelButton().click();
53589  };
53590
53591  function fire() {
53592    var Swal = this;
53593
53594    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
53595      args[_key] = arguments[_key];
53596    }
53597
53598    return _construct(Swal, args);
53599  }
53600
53601  /**
53602   * Returns an extended version of `Swal` containing `params` as defaults.
53603   * Useful for reusing Swal configuration.
53604   *
53605   * For example:
53606   *
53607   * Before:
53608   * const textPromptOptions = { input: 'text', showCancelButton: true }
53609   * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
53610   * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
53611   *
53612   * After:
53613   * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
53614   * const {value: firstName} = await TextPrompt('What is your first name?')
53615   * const {value: lastName} = await TextPrompt('What is your last name?')
53616   *
53617   * @param mixinParams
53618   */
53619  function mixin(mixinParams) {
53620    var MixinSwal = /*#__PURE__*/function (_this) {
53621      _inherits(MixinSwal, _this);
53622
53623      var _super = _createSuper(MixinSwal);
53624
53625      function MixinSwal() {
53626        _classCallCheck(this, MixinSwal);
53627
53628        return _super.apply(this, arguments);
53629      }
53630
53631      _createClass(MixinSwal, [{
53632        key: "_main",
53633        value: function _main(params) {
53634          return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
53635        }
53636      }]);
53637
53638      return MixinSwal;
53639    }(this);
53640
53641    return MixinSwal;
53642  }
53643
53644  /**
53645   * Show spinner instead of Confirm button
53646   */
53647
53648  var showLoading = function showLoading() {
53649    var popup = getPopup();
53650
53651    if (!popup) {
53652      Swal.fire();
53653    }
53654
53655    popup = getPopup();
53656    var actions = getActions();
53657    var confirmButton = getConfirmButton();
53658    var loader = getLoader();
53659    show(actions);
53660    hide(confirmButton);
53661    addClass([popup, actions], swalClasses.loading);
53662    show(loader);
53663    popup.setAttribute('data-loading', true);
53664    popup.setAttribute('aria-busy', true);
53665    popup.focus();
53666  };
53667
53668  var RESTORE_FOCUS_TIMEOUT = 100;
53669
53670  var globalState = {};
53671
53672  var focusPreviousActiveElement = function focusPreviousActiveElement() {
53673    if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
53674      globalState.previousActiveElement.focus();
53675      globalState.previousActiveElement = null;
53676    } else if (document.body) {
53677      document.body.focus();
53678    }
53679  }; // Restore previous active (focused) element
53680
53681
53682  var restoreActiveElement = function restoreActiveElement() {
53683    return new Promise(function (resolve) {
53684      var x = window.scrollX;
53685      var y = window.scrollY;
53686      globalState.restoreFocusTimeout = setTimeout(function () {
53687        focusPreviousActiveElement();
53688        resolve();
53689      }, RESTORE_FOCUS_TIMEOUT); // issues/900
53690
53691      /* istanbul ignore if */
53692
53693      if (typeof x !== 'undefined' && typeof y !== 'undefined') {
53694        // IE doesn't have scrollX/scrollY support
53695        window.scrollTo(x, y);
53696      }
53697    });
53698  };
53699
53700  /**
53701   * If `timer` parameter is set, returns number of milliseconds of timer remained.
53702   * Otherwise, returns undefined.
53703   */
53704
53705  var getTimerLeft = function getTimerLeft() {
53706    return globalState.timeout && globalState.timeout.getTimerLeft();
53707  };
53708  /**
53709   * Stop timer. Returns number of milliseconds of timer remained.
53710   * If `timer` parameter isn't set, returns undefined.
53711   */
53712
53713  var stopTimer = function stopTimer() {
53714    if (globalState.timeout) {
53715      stopTimerProgressBar();
53716      return globalState.timeout.stop();
53717    }
53718  };
53719  /**
53720   * Resume timer. Returns number of milliseconds of timer remained.
53721   * If `timer` parameter isn't set, returns undefined.
53722   */
53723
53724  var resumeTimer = function resumeTimer() {
53725    if (globalState.timeout) {
53726      var remaining = globalState.timeout.start();
53727      animateTimerProgressBar(remaining);
53728      return remaining;
53729    }
53730  };
53731  /**
53732   * Resume timer. Returns number of milliseconds of timer remained.
53733   * If `timer` parameter isn't set, returns undefined.
53734   */
53735
53736  var toggleTimer = function toggleTimer() {
53737    var timer = globalState.timeout;
53738    return timer && (timer.running ? stopTimer() : resumeTimer());
53739  };
53740  /**
53741   * Increase timer. Returns number of milliseconds of an updated timer.
53742   * If `timer` parameter isn't set, returns undefined.
53743   */
53744
53745  var increaseTimer = function increaseTimer(n) {
53746    if (globalState.timeout) {
53747      var remaining = globalState.timeout.increase(n);
53748      animateTimerProgressBar(remaining, true);
53749      return remaining;
53750    }
53751  };
53752  /**
53753   * Check if timer is running. Returns true if timer is running
53754   * or false if timer is paused or stopped.
53755   * If `timer` parameter isn't set, returns undefined
53756   */
53757
53758  var isTimerRunning = function isTimerRunning() {
53759    return globalState.timeout && globalState.timeout.isRunning();
53760  };
53761
53762  var defaultParams = {
53763    title: '',
53764    titleText: '',
53765    text: '',
53766    html: '',
53767    footer: '',
53768    icon: undefined,
53769    iconColor: undefined,
53770    iconHtml: undefined,
53771    toast: false,
53772    animation: true,
53773    showClass: {
53774      popup: 'swal2-show',
53775      backdrop: 'swal2-backdrop-show',
53776      icon: 'swal2-icon-show'
53777    },
53778    hideClass: {
53779      popup: 'swal2-hide',
53780      backdrop: 'swal2-backdrop-hide',
53781      icon: 'swal2-icon-hide'
53782    },
53783    customClass: undefined,
53784    target: 'body',
53785    backdrop: true,
53786    heightAuto: true,
53787    allowOutsideClick: true,
53788    allowEscapeKey: true,
53789    allowEnterKey: true,
53790    stopKeydownPropagation: true,
53791    keydownListenerCapture: false,
53792    showConfirmButton: true,
53793    showDenyButton: false,
53794    showCancelButton: false,
53795    preConfirm: undefined,
53796    confirmButtonText: 'OK',
53797    confirmButtonAriaLabel: '',
53798    confirmButtonColor: undefined,
53799    denyButtonText: 'No',
53800    denyButtonAriaLabel: '',
53801    denyButtonColor: undefined,
53802    cancelButtonText: 'Cancel',
53803    cancelButtonAriaLabel: '',
53804    cancelButtonColor: undefined,
53805    buttonsStyling: true,
53806    reverseButtons: false,
53807    focusConfirm: true,
53808    focusDeny: false,
53809    focusCancel: false,
53810    showCloseButton: false,
53811    closeButtonHtml: '&times;',
53812    closeButtonAriaLabel: 'Close this dialog',
53813    loaderHtml: '',
53814    showLoaderOnConfirm: false,
53815    imageUrl: undefined,
53816    imageWidth: undefined,
53817    imageHeight: undefined,
53818    imageAlt: '',
53819    timer: undefined,
53820    timerProgressBar: false,
53821    width: undefined,
53822    padding: undefined,
53823    background: undefined,
53824    input: undefined,
53825    inputPlaceholder: '',
53826    inputValue: '',
53827    inputOptions: {},
53828    inputAutoTrim: true,
53829    inputAttributes: {},
53830    inputValidator: undefined,
53831    validationMessage: undefined,
53832    grow: false,
53833    position: 'center',
53834    progressSteps: [],
53835    currentProgressStep: undefined,
53836    progressStepsDistance: undefined,
53837    onBeforeOpen: undefined,
53838    onOpen: undefined,
53839    willOpen: undefined,
53840    didOpen: undefined,
53841    onRender: undefined,
53842    didRender: undefined,
53843    onClose: undefined,
53844    onAfterClose: undefined,
53845    willClose: undefined,
53846    didClose: undefined,
53847    onDestroy: undefined,
53848    didDestroy: undefined,
53849    scrollbarPadding: true
53850  };
53851  var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'onAfterClose', 'onClose', 'onDestroy', 'progressSteps', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];
53852  var deprecatedParams = {
53853    animation: 'showClass" and "hideClass',
53854    onBeforeOpen: 'willOpen',
53855    onOpen: 'didOpen',
53856    onRender: 'didRender',
53857    onClose: 'willClose',
53858    onAfterClose: 'didClose',
53859    onDestroy: 'didDestroy'
53860  };
53861  var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'he
53861ightAuto', 'keydownListenerCapture'];
53862  /**
53863   * Is valid parameter
53864   * @param {String} paramName
53865   */
53866
53867  var isValidParameter = function isValidParameter(paramName) {
53868    return Object.prototype.hasOwnProperty.call(defaultParams, paramName);
53869  };
53870  /**
53871   * Is valid parameter for Swal.update() method
53872   * @param {String} paramName
53873   */
53874
53875  var isUpdatableParameter = function isUpdatableParameter(paramName) {
53876    return updatableParams.indexOf(paramName) !== -1;
53877  };
53878  /**
53879   * Is deprecated parameter
53880   * @param {String} paramName
53881   */
53882
53883  var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
53884    return deprecatedParams[paramName];
53885  };
53886
53887  var checkIfParamIsValid = function checkIfParamIsValid(param) {
53888    if (!isValidParameter(param)) {
53889      warn("Unknown parameter \"".concat(param, "\""));
53890    }
53891  };
53892
53893  var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
53894    if (toastIncompatibleParams.indexOf(param) !== -1) {
53895      warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
53896    }
53897  };
53898
53899  var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
53900    if (isDeprecatedParameter(param)) {
53901      warnAboutDeprecation(param, isDeprecatedParameter(param));
53902    }
53903  };
53904  /**
53905   * Show relevant warnings for given params
53906   *
53907   * @param params
53908   */
53909
53910
53911  var showWarningsForParams = function showWarningsForParams(params) {
53912    for (var param in params) {
53913      checkIfParamIsValid(param);
53914
53915      if (params.toast) {
53916        checkIfToastParamIsValid(param);
53917      }
53918
53919      checkIfParamIsDeprecated(param);
53920    }
53921  };
53922
53923
53924
53925  var staticMethods = /*#__PURE__*/Object.freeze({
53926    isValidParameter: isValidParameter,
53927    isUpdatableParameter: isUpdatableParameter,
53928    isDeprecatedParameter: isDeprecatedParameter,
53929    argsToParams: argsToParams,
53930    isVisible: isVisible$1,
53931    clickConfirm: clickConfirm,
53932    clickDeny: clickDeny,
53933    clickCancel: clickCancel,
53934    getContainer: getContainer,
53935    getPopup: getPopup,
53936    getTitle: getTitle,
53937    getContent: getContent,
53938    getHtmlContainer: getHtmlContainer,
53939    getImage: getImage,
53940    getIcon: getIcon,
53941    getIcons: getIcons,
53942    getCloseButton: getCloseButton,
53943    getActions: getActions,
53944    getConfirmButton: getConfirmButton,
53945    getDenyButton: getDenyButton,
53946    getCancelButton: getCancelButton,
53947    getHeader: getHeader,
53948    getFooter: getFooter,
53949    getTimerProgressBar: getTimerProgressBar,
53950    getFocusableElements: getFocusableElements,
53951    getValidationMessage: getValidationMessage,
53952    isLoading: isLoading,
53953    fire: fire,
53954    mixin: mixin,
53955    queue: queue,
53956    getQueueStep: getQueueStep,
53957    insertQueueStep: insertQueueStep,
53958    deleteQueueStep: deleteQueueStep,
53959    showLoading: showLoading,
53960    enableLoading: showLoading,
53961    getTimerLeft: getTimerLeft,
53962    stopTimer: stopTimer,
53963    resumeTimer: resumeTimer,
53964    toggleTimer: toggleTimer,
53965    increaseTimer: increaseTimer,
53966    isTimerRunning: isTimerRunning
53967  });
53968
53969  /**
53970   * Enables buttons and hide loader.
53971   */
53972
53973  function hideLoading() {
53974    // do nothing if popup is closed
53975    var innerParams = privateProps.innerParams.get(this);
53976
53977    if (!innerParams) {
53978      return;
53979    }
53980
53981    var domCache = privateProps.domCache.get(this);
53982    hide(domCache.loader);
53983
53984    if (innerParams.showConfirmButton) {
53985      show(domCache.confirmButton);
53986    } else if (!innerParams.showConfirmButton && !innerParams.showCancelButton) {
53987      hide(domCache.actions);
53988    }
53989
53990    removeClass([domCache.popup, domCache.actions], swalClasses.loading);
53991    domCache.popup.removeAttribute('aria-busy');
53992    domCache.popup.removeAttribute('data-loading');
53993    domCache.confirmButton.disabled = false;
53994    domCache.denyButton.disabled = false;
53995    domCache.cancelButton.disabled = false;
53996  }
53997
53998  function getInput$1(instance) {
53999    var innerParams = privateProps.innerParams.get(instance || this);
54000    var domCache = privateProps.domCache.get(instance || this);
54001
54002    if (!domCache) {
54003      return null;
54004    }
54005
54006    return getInput(domCache.content, innerParams.input);
54007  }
54008
54009  var fixScrollbar = function fixScrollbar() {
54010    // for queues, do not do this more than once
54011    if (states.previousBodyPadding !== null) {
54012      return;
54013    } // if the body has overflow
54014
54015
54016    if (document.body.scrollHeight > window.innerHeight) {
54017      // add padding so the content doesn't shift after removal of scrollbar
54018      states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
54019      document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px");
54020    }
54021  };
54022  var undoScrollbar = function undoScrollbar() {
54023    if (states.previousBodyPadding !== null) {
54024      document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px");
54025      states.previousBodyPadding = null;
54026    }
54027  };
54028
54029  /* istanbul ignore file */
54030
54031  var iOSfix = function iOSfix() {
54032    var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
54033
54034    if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
54035      var offset = document.body.scrollTop;
54036      document.body.style.top = "".concat(offset * -1, "px");
54037      addClass(document.body, swalClasses.iosfix);
54038      lockBodyScroll();
54039      addBottomPaddingForTallPopups(); // #1948
54040    }
54041  };
54042
54043  var addBottomPaddingForTallPopups = function addBottomPaddingForTallPopups() {
54044    var safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);
54045
54046    if (safari) {
54047      var bottomPanelHeight = 44;
54048
54049      if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {
54050        getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px");
54051      }
54052    }
54053  };
54054
54055  var lockBodyScroll = function lockBodyScroll() {
54056    // #1246
54057    var container = getContainer();
54058    var preventTouchMove;
54059
54060    container.ontouchstart = function (e) {
54061      preventTouchMove = shouldPreventTouchMove(e.target);
54062    };
54063
54064    container.ontouchmove = function (e) {
54065      if (preventTouchMove) {
54066        e.preventDefault();
54067        e.stopPropagation();
54068      }
54069    };
54070  };
54071
54072  var shouldPreventTouchMove = function shouldPreventTouchMove(target) {
54073    var container = getContainer();
54074
54075    if (target === container) {
54076      return true;
54077    }
54078
54079    if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603
54080    !(isScrollable(getContent()) && // #1944
54081    getContent().contains(target))) {
54082      return true;
54083    }
54084
54085    return false;
54086  };
54087
54088  var undoIOSfix = function undoIOSfix() {
54089    if (hasClass(document.body, swalClasses.iosfix)) {
54090      var offset = parseInt(document.body.style.top, 10);
54091      removeClass(document.body, swalClasses.iosfix);
54092      document.body.style.top = '';
54093      document.body.scrollTop = offset * -1;
54094    }
54095  };
54096
54097  /* istanbul ignore file */
54098
54099  var isIE11 = function isIE11() {
54100    return !!window.MSInputMethodContext && !!document.documentMode;
54101  }; // Fix IE11 centering sweetalert2/issues/933
54102
54103
54104  var fixVerticalPositionIE = function fixVerticalPositionIE() {
54105    var container = getContainer();
54106    var popup = getPopup();
54107    container.style.removeProperty('align-items');
54108
54109    if (popup.offsetTop < 0) {
54110      container.style.alignItems = 'flex-start';
54111    }
54112  };
54113
54114  var IEfix = function IEfix() {
54115    if (typeof window !== 'undefined' && isIE11()) {
54116      fixVerticalPositionIE();
54117      window.addEventListener('resize', fixVerticalPositionIE);
54118    }
54119  };
54120  var undoIEfix = function undoIEfix() {
54121    if (typeof window !== 'undefined' && isIE11()) {
54122      window.removeEventListener('resize', fixVerticalPositionIE);
54123    }
54124  };
54125
54126  // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
54127  // elements not within the active modal dialog will not be surfaced if a user opens a screen
54128  // reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
54129
54130  var setAriaHidden = function setAriaHidden() {
54131    var bodyChildren = toArray(document.body.children);
54132    bodyChildren.forEach(function (el) {
54133      if (el === getContainer() || contains(el, getContainer())) {
54134        return;
54135      }
54136
54137      if (el.hasAttribute('aria-hidden')) {
54138        el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
54139      }
54140
54141      el.setAttribute('aria-hidden', 'true');
54142    });
54143  };
54144  var unsetAriaHidden = function unsetAriaHidden() {
54145    var bodyChildren = toArray(document.body.children);
54146    bodyChildren.forEach(function (el) {
54147      if (el.hasAttribute('data-previous-aria-hidden')) {
54148        el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
54149        el.removeAttribute('data-previous-aria-hidden');
54150      } else {
54151        el.removeAttribute('aria-hidden');
54152      }
54153    });
54154  };
54155
54156  /**
54157   * This module containts `WeakMap`s for each effectively-"private  property" that a `Swal` has.
54158   * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
54159   * This is the approach that Babel will probably take to implement private methods/fields
54160   *   https://github.com/tc39/proposal-private-methods
54161   *   https://github.com/babel/babel/pull/7555
54162   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
54163   *   then we can use that language feature.
54164   */
54165  var privateMethods = {
54166    swalPromiseResolve: new WeakMap()
54167  };
54168
54169  /*
54170   * Instance method to close sweetAlert
54171   */
54172
54173  function removePopupAndResetState(instance, container, isToast$$1, didClose) {
54174    if (isToast$$1) {
54175      triggerDidCloseAndDispose(instance, didClose);
54176    } else {
54177      restoreActiveElement().then(function () {
54178        return triggerDidCloseAndDispose(instance, didClose);
54179      });
54180      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
54181        capture: globalState.keydownListenerCapture
54182      });
54183      globalState.keydownHandlerAdded = false;
54184    }
54185
54186    if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {
54187      container.parentNode.removeChild(container);
54188    }
54189
54190    if (isModal()) {
54191      undoScrollbar();
54192      undoIOSfix();
54193      undoIEfix();
54194      unsetAriaHidden();
54195    }
54196
54197    removeBodyClasses();
54198  }
54199
54200  function removeBodyClasses() {
54201    removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
54202  }
54203
54204  function close(resolveValue) {
54205    var popup = getPopup();
54206
54207    if (!popup) {
54208      return;
54209    }
54210
54211    resolveValue = prepareResolveValue(resolveValue);
54212    var innerParams = privateProps.innerParams.get(this);
54213
54214    if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {
54215      return;
54216    }
54217
54218    var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
54219    removeClass(popup, innerParams.showClass.popup);
54220    addClass(popup, innerParams.hideClass.popup);
54221    var backdrop = getContainer();
54222    removeClass(backdrop, innerParams.showClass.backdrop);
54223    addClass(backdrop, innerParams.hideClass.backdrop);
54224    handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise
54225
54226    swalPromiseResolve(resolveValue);
54227  }
54228
54229  var prepareResolveValue = function prepareResolveValue(resolveValue) {
54230    // When user calls Swal.close()
54231    if (typeof resolveValue === 'undefined') {
54232      return {
54233        isConfirmed: false,
54234        isDenied: false,
54235        isDismissed: true
54236      };
54237    }
54238
54239    return _extends({
54240      isConfirmed: false,
54241      isDenied: false,
54242      isDismissed: false
54243    }, resolveValue);
54244  };
54245
54246  var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {
54247    var container = getContainer(); // If animation is supported, animate
54248
54249    var animationIsSupported = animationEndEvent && hasCssAnimation(popup);
54250    var onClose = innerParams.onClose,
54251        onAfterClose = innerParams.onAfterClose,
54252        willClose = innerParams.willClose,
54253        didClose = innerParams.didClose;
54254    runDidClose(popup, willClose, onClose);
54255
54256    if (animationIsSupported) {
54257      animatePopup(instance, popup, container, didClose || onAfterClose);
54258    } else {
54259      // Otherwise, remove immediately
54260      removePopupAndResetState(instance, container, isToast(), didClose || onAfterClose);
54261    }
54262  };
54263
54264  var runDidClose = function runDidClose(popup, willClose, onClose) {
54265    if (willClose !== null && typeof willClose === 'function') {
54266      willClose(popup);
54267    } else if (onClose !== null && typeof onClose === 'function') {
54268      onClose(popup); // @deprecated
54269    }
54270  };
54271
54272  var animatePopup = function animatePopup(instance, popup, container, didClose) {
54273    globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, isToast(), didClose);
54274    popup.addEventListener(animationEndEvent, function (e) {
54275      if (e.target === popup) {
54276        globalState.swalCloseEventFinishedCallback();
54277        delete globalState.swalCloseEventFinishedCallback;
54278      }
54279    });
54280  };
54281
54282  var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) {
54283    setTimeout(function () {
54284      if (typeof didClose === 'function') {
54285        didClose();
54286      }
54287
54288      instance._destroy();
54289    });
54290  };
54291
54292  function setButtonsDisabled(instance, buttons, disabled) {
54293    var domCache = privateProps.domCache.get(instance);
54294    buttons.forEach(function (button) {
54295      domCache[button].disabled = disabled;
54296    });
54297  }
54298
54299  function setInputDisabled(input, disabled) {
54300    if (!input) {
54301      return false;
54302    }
54303
54304    if (input.type === 'radio') {
54305      var radiosContainer = input.parentNode.parentNode;
54306      var radios = radiosContainer.querySelectorAll('input');
54307
54308      for (var i = 0; i < radios.length; i++) {
54309        radios[i].disabled = disabled;
54310      }
54311    } else {
54312      input.disabled = disabled;
54313    }
54314  }
54315
54316  function enableButtons() {
54317    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);
54318  }
54319  function disableButtons() {
54320    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);
54321  }
54322  function enableInput() {
54323    return setInputDisabled(this.getInput(), false);
54324  }
54325  function disableInput() {
54326    return setInputDisabled(this.getInput(), true);
54327  }
54328
54329  function showValidationMessage(error) {
54330    var domCache = privateProps.domCache.get(this);
54331    setInnerHtml(domCache.validationMessage, error);
54332    var popupComputedStyle = window.getComputedStyle(domCache.popup);
54333    domCache.validationMessage.style.marginLeft = "-".concat(popupComputedStyle.getPropertyValue('padding-left'));
54334    domCache.validationMessage.style.marginRight = "-".concat(popupComputedStyle.getPropertyValue('padding-right'));
54335    show(domCache.validationMessage);
54336    var input = this.getInput();
54337
54338    if (input) {
54339      input.setAttribute('aria-invalid', true);
54340      input.setAttribute('aria-describedBy', swalClasses['validation-message']);
54341      focusInput(input);
54342      addClass(input, swalClasses.inputerror);
54343    }
54344  } // Hide block with validation message
54345
54346  function resetValidationMessage$1() {
54347    var domCache = privateProps.domCache.get(this);
54348
54349    if (domCache.validationMessage) {
54350      hide(domCache.validationMessage);
54351    }
54352
54353    var input = this.getInput();
54354
54355    if (input) {
54356      input.removeAttribute('aria-invalid');
54357      input.removeAttribute('aria-describedBy');
54358      removeClass(input, swalClasses.inputerror);
54359    }
54360  }
54361
54362  function getProgressSteps$1() {
54363    var domCache = privateProps.domCache.get(this);
54364    return domCache.progressSteps;
54365  }
54366
54367  var Timer = /*#__PURE__*/function () {
54368    function Timer(callback, delay) {
54369      _classCallCheck(this, Timer);
54370
54371      this.callback = callback;
54372      this.remaining = delay;
54373      this.running = false;
54374      this.start();
54375    }
54376
54377    _createClass(Timer, [{
54378      key: "start",
54379      value: function start() {
54380        if (!this.running) {
54381          this.running = true;
54382          this.started = new Date();
54383          this.id = setTimeout(this.callback, this.remaining);
54384        }
54385
54386        return this.remaining;
54387      }
54388    }, {
54389      key: "stop",
54390      value: function stop() {
54391        if (this.running) {
54392          this.running = false;
54393          clearTimeout(this.id);
54394          this.remaining -= new Date() - this.started;
54395        }
54396
54397        return this.remaining;
54398      }
54399    }, {
54400      key: "increase",
54401      value: function increase(n) {
54402        var running = this.running;
54403
54404        if (running) {
54405          this.stop();
54406        }
54407
54408        this.remaining += n;
54409
54410        if (running) {
54411          this.start();
54412        }
54413
54414        return this.remaining;
54415      }
54416    }, {
54417      key: "getTimerLeft",
54418      value: function getTimerLeft() {
54419        if (this.running) {
54420          this.stop();
54421          this.start();
54422        }
54423
54424        return this.remaining;
54425      }
54426    }, {
54427      key: "isRunning",
54428      value: function isRunning() {
54429        return this.running;
54430      }
54431    }]);
54432
54433    return Timer;
54434  }();
54435
54436  var defaultInputValidators = {
54437    email: function email(string, validationMessage) {
54438      return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');
54439    },
54440    url: function url(string, validationMessage) {
54441      // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013
54442      return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');
54443    }
54444  };
54445
54446  function setDefaultInputValidators(params) {
54447    // Use default `inputValidator` for supported input types if not provided
54448    if (!params.inputValidator) {
54449      Object.keys(defaultInputValidators).forEach(function (key) {
54450        if (params.input === key) {
54451          params.inputValidator = defaultInputValidators[key];
54452        }
54453      });
54454    }
54455  }
54456
54457  function validateCustomTargetElement(params) {
54458    // Determine if the custom target element is valid
54459    if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
54460      warn('Target parameter is not valid, defaulting to "body"');
54461      params.target = 'body';
54462    }
54463  }
54464  /**
54465   * Set type, text and actions on popup
54466   *
54467   * @param params
54468   * @returns {boolean}
54469   */
54470
54471
54472  function setParameters(params) {
54473    setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm
54474
54475    if (params.showLoaderOnConfirm && !params.preConfirm) {
54476      warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
54477    } // params.animation will be actually used in renderPopup.js
54478    // but in case when params.animation is a function, we need to call that function
54479    // before popup (re)initialization, so it'll be possible to check Swal.isVisible()
54480    // inside the params.animation function
54481
54482
54483    params.animation = callIfFunction(params.animation);
54484    validateCustomTargetElement(params); // Replace newlines with <br> in title
54485
54486    if (typeof params.title === 'string') {
54487      params.title = params.title.split('\n').join('<br />');
54488    }
54489
54490    init(params);
54491  }
54492
54493  var SHOW_CLASS_TIMEOUT = 10;
54494  /**
54495   * Open popup, add necessary classes and styles, fix scrollbar
54496   *
54497   * @param params
54498   */
54499
54500  var openPopup = function openPopup(params) {
54501    var container = getContainer();
54502    var popup = getPopup();
54503
54504    if (typeof params.willOpen === 'function') {
54505      params.willOpen(popup);
54506    } else if (typeof params.onBeforeOpen === 'function') {
54507      params.onBeforeOpen(popup); // @deprecated
54508    }
54509
54510    var bodyStyles = window.getComputedStyle(document.body);
54511    var initialBodyOverflow = bodyStyles.overflowY;
54512    addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'
54513
54514    setTimeout(function () {
54515      setScrollingVisibility(container, popup);
54516    }, SHOW_CLASS_TIMEOUT);
54517
54518    if (isModal()) {
54519      fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);
54520      setAriaHidden();
54521    }
54522
54523    if (!isToast() && !globalState.previousActiveElement) {
54524      globalState.previousActiveElement = document.activeElement;
54525    }
54526
54527    runDidOpen(popup, params);
54528    removeClass(container, swalClasses['no-transition']);
54529  };
54530
54531  var runDidOpen = function runDidOpen(popup, params) {
54532    if (typeof params.didOpen === 'function') {
54533      setTimeout(function () {
54534        return params.didOpen(popup);
54535      });
54536    } else if (typeof params.onOpen === 'function') {
54537      setTimeout(function () {
54538        return params.onOpen(popup);
54539      }); // @deprecated
54540    }
54541  };
54542
54543  var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) {
54544    var popup = getPopup();
54545
54546    if (event.target !== popup) {
54547      return;
54548    }
54549
54550    var container = getContainer();
54551    popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
54552    container.style.overflowY = 'auto';
54553  };
54554
54555  var setScrollingVisibility = function setScrollingVisibility(container, popup) {
54556    if (animationEndEvent && hasCssAnimation(popup)) {
54557      container.style.overflowY = 'hidden';
54558      popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);
54559    } else {
54560      container.style.overflowY = 'auto';
54561    }
54562  };
54563
54564  var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) {
54565    iOSfix();
54566    IEfix();
54567
54568    if (scrollbarPadding && initialBodyOverflow !== 'hidden') {
54569      fixScrollbar();
54570    } // sweetalert2/issues/1247
54571
54572
54573    setTimeout(function () {
54574      container.scrollTop = 0;
54575    });
54576  };
54577
54578  var addClasses$1 = function addClasses(container, popup, params) {
54579    addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059
54580
54581    popup.style.setProperty('opacity', '0', 'important');
54582    show(popup);
54583    setTimeout(function () {
54584      // Animate popup right after showing it
54585      addClass(popup, params.showClass.popup); // and remove the opacity workaround
54586
54587      popup.style.removeProperty('opacity');
54588    }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062
54589
54590    addClass([document.documentElement, document.body], swalClasses.shown);
54591
54592    if (params.heightAuto && params.backdrop && !params.toast) {
54593      addClass([document.documentElement, document.body], swalClasses['he
54593ight-auto']);
54594    }
54595  };
54596
54597  var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {
54598    if (params.input === 'select' || params.input === 'radio') {
54599      handleInputOptions(instance, params);
54600    } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
54601      handleInputValue(instance, params);
54602    }
54603  };
54604  var getInputValue = function getInputValue(instance, innerParams) {
54605    var input = instance.getInput();
54606
54607    if (!input) {
54608      return null;
54609    }
54610
54611    switch (innerParams.input) {
54612      case 'checkbox':
54613        return getCheckboxValue(input);
54614
54615      case 'radio':
54616        return getRadioValue(input);
54617
54618      case 'file':
54619        return getFileValue(input);
54620
54621      default:
54622        return innerParams.inputAutoTrim ? input.value.trim() : input.value;
54623    }
54624  };
54625
54626  var getCheckboxValue = function getCheckboxValue(input) {
54627    return input.checked ? 1 : 0;
54628  };
54629
54630  var getRadioValue = function getRadioValue(input) {
54631    return input.checked ? input.value : null;
54632  };
54633
54634  var getFileValue = function getFileValue(input) {
54635    return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;
54636  };
54637
54638  var handleInputOptions = function handleInputOptions(instance, params) {
54639    var content = getContent();
54640
54641    var processInputOptions = function processInputOptions(inputOptions) {
54642      return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
54643    };
54644
54645    if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
54646      showLoading();
54647      asPromise(params.inputOptions).then(function (inputOptions) {
54648        instance.hideLoading();
54649        processInputOptions(inputOptions);
54650      });
54651    } else if (_typeof(params.inputOptions) === 'object') {
54652      processInputOptions(params.inputOptions);
54653    } else {
54654      error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
54655    }
54656  };
54657
54658  var handleInputValue = function handleInputValue(instance, params) {
54659    var input = instance.getInput();
54660    hide(input);
54661    asPromise(params.inputValue).then(function (inputValue) {
54662      input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue);
54663      show(input);
54664      input.focus();
54665      instance.hideLoading();
54666    })["catch"](function (err) {
54667      error("Error in inputValue promise: ".concat(err));
54668      input.value = '';
54669      show(input);
54670      input.focus();
54671      instance.hideLoading();
54672    });
54673  };
54674
54675  var populateInputOptions = {
54676    select: function select(content, inputOptions, params) {
54677      var select = getChildByClass(content, swalClasses.select);
54678
54679      var renderOption = function renderOption(parent, optionLabel, optionValue) {
54680        var option = document.createElement('option');
54681        option.value = optionValue;
54682        setInnerHtml(option, optionLabel);
54683
54684        if (params.inputValue.toString() === optionValue.toString()) {
54685          option.selected = true;
54686        }
54687
54688        parent.appendChild(option);
54689      };
54690
54691      inputOptions.forEach(function (inputOption) {
54692        var optionValue = inputOption[0];
54693        var optionLabel = inputOption[1]; // <optgroup> spec:
54694        // https://www.w3.org/TR/html401/interact/forms.html#h-17.6
54695        // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..."
54696        // check whether this is a <optgroup>
54697
54698        if (Array.isArray(optionLabel)) {
54699          // if it is an array, then it is an <optgroup>
54700          var optgroup = document.createElement('optgroup');
54701          optgroup.label = optionValue;
54702          optgroup.disabled = false; // not configurable for now
54703
54704          select.appendChild(optgroup);
54705          optionLabel.forEach(function (o) {
54706            return renderOption(optgroup, o[1], o[0]);
54707          });
54708        } else {
54709          // case of <option>
54710          renderOption(select, optionLabel, optionValue);
54711        }
54712      });
54713      select.focus();
54714    },
54715    radio: function radio(content, inputOptions, params) {
54716      var radio = getChildByClass(content, swalClasses.radio);
54717      inputOptions.forEach(function (inputOption) {
54718        var radioValue = inputOption[0];
54719        var radioLabel = inputOption[1];
54720        var radioInput = document.createElement('input');
54721        var radioLabelElement = document.createElement('label');
54722        radioInput.type = 'radio';
54723        radioInput.name = swalClasses.radio;
54724        radioInput.value = radioValue;
54725
54726        if (params.inputValue.toString() === radioValue.toString()) {
54727          radioInput.checked = true;
54728        }
54729
54730        var label = document.createElement('span');
54731        setInnerHtml(label, radioLabel);
54732        label.className = swalClasses.label;
54733        radioLabelElement.appendChild(radioInput);
54734        radioLabelElement.appendChild(label);
54735        radio.appendChild(radioLabelElement);
54736      });
54737      var radios = radio.querySelectorAll('input');
54738
54739      if (radios.length) {
54740        radios[0].focus();
54741      }
54742    }
54743  };
54744  /**
54745   * Converts `inputOptions` into an array of `[value, label]`s
54746   * @param inputOptions
54747   */
54748
54749  var formatInputOptions = function formatInputOptions(inputOptions) {
54750    var result = [];
54751
54752    if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
54753      inputOptions.forEach(function (value, key) {
54754        var valueFormatted = value;
54755
54756        if (_typeof(valueFormatted) === 'object') {
54757          // case of <optgroup>
54758          valueFormatted = formatInputOptions(valueFormatted);
54759        }
54760
54761        result.push([key, valueFormatted]);
54762      });
54763    } else {
54764      Object.keys(inputOptions).forEach(function (key) {
54765        var valueFormatted = inputOptions[key];
54766
54767        if (_typeof(valueFormatted) === 'object') {
54768          // case of <optgroup>
54769          valueFormatted = formatInputOptions(valueFormatted);
54770        }
54771
54772        result.push([key, valueFormatted]);
54773      });
54774    }
54775
54776    return result;
54777  };
54778
54779  var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {
54780    instance.disableButtons();
54781
54782    if (innerParams.input) {
54783      handleConfirmWithInput(instance, innerParams);
54784    } else {
54785      confirm(instance, innerParams, true);
54786    }
54787  };
54788  var handleDenyButtonClick = function handleDenyButtonClick(instance) {
54789    instance.disableButtons(); // here we could add preDeny in future, if needed
54790
54791    deny(instance);
54792  };
54793  var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {
54794    instance.disableButtons();
54795    dismissWith(DismissReason.cancel);
54796  };
54797
54798  var handleConfirmWithInput = function handleConfirmWithInput(instance, innerParams) {
54799    var inputValue = getInputValue(instance, innerParams);
54800
54801    if (innerParams.inputValidator) {
54802      instance.disableInput();
54803      var validationPromise = Promise.resolve().then(function () {
54804        return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage));
54805      });
54806      validationPromise.then(function (validationMessage) {
54807        instance.enableButtons();
54808        instance.enableInput();
54809
54810        if (validationMessage) {
54811          instance.showValidationMessage(validationMessage);
54812        } else {
54813          confirm(instance, innerParams, inputValue);
54814        }
54815      });
54816    } else if (!instance.getInput().checkValidity()) {
54817      instance.enableButtons();
54818      instance.showValidationMessage(innerParams.validationMessage);
54819    } else {
54820      confirm(instance, innerParams, inputValue);
54821    }
54822  };
54823
54824  var deny = function deny(instance) {
54825    instance.closePopup({
54826      isDenied: true,
54827      value: false
54828    });
54829  };
54830
54831  var succeedWith = function succeedWith(instance, value) {
54832    instance.closePopup({
54833      isConfirmed: true,
54834      value: value
54835    });
54836  };
54837
54838  var confirm = function confirm(instance, innerParams, value) {
54839    if (innerParams.showLoaderOnConfirm) {
54840      showLoading(); // TODO: make showLoading an *instance* method
54841    }
54842
54843    if (innerParams.preConfirm) {
54844      instance.resetValidationMessage();
54845      var preConfirmPromise = Promise.resolve().then(function () {
54846        return asPromise(innerParams.preConfirm(value, innerParams.validationMessage));
54847      });
54848      preConfirmPromise.then(function (preConfirmValue) {
54849        if (isVisible(getValidationMessage()) || preConfirmValue === false) {
54850          instance.hideLoading();
54851        } else {
54852          succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
54853        }
54854      });
54855    } else {
54856      succeedWith(instance, value);
54857    }
54858  };
54859
54860  var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {
54861    if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
54862      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
54863        capture: globalState.keydownListenerCapture
54864      });
54865      globalState.keydownHandlerAdded = false;
54866    }
54867
54868    if (!innerParams.toast) {
54869      globalState.keydownHandler = function (e) {
54870        return keydownHandler(instance, e, dismissWith);
54871      };
54872
54873      globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();
54874      globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
54875      globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
54876        capture: globalState.keydownListenerCapture
54877      });
54878      globalState.keydownHandlerAdded = true;
54879    }
54880  }; // Focus handling
54881
54882  var setFocus = function setFocus(innerParams, index, increment) {
54883    var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match
54884
54885    for (var i = 0; i < focusableElements.length; i++) {
54886      index = index + increment; // rollover to first item
54887
54888      if (index === focusableElements.length) {
54889        index = 0; // go to last item
54890      } else if (index === -1) {
54891        index = focusableElements.length - 1;
54892      }
54893
54894      return focusableElements[index].focus();
54895    } // no visible focusable elements, focus the popup
54896
54897
54898    getPopup().focus();
54899  };
54900  var arrowKeysNextButton = ['ArrowRight', 'ArrowDown', 'Right', 'Down' // IE11
54901  ];
54902  var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp', 'Left', 'Up' // IE11
54903  ];
54904  var escKeys = ['Escape', 'Esc' // IE11
54905  ];
54906
54907  var keydownHandler = function keydownHandler(instance, e, dismissWith) {
54908    var innerParams = privateProps.innerParams.get(instance);
54909
54910    if (innerParams.stopKeydownPropagation) {
54911      e.stopPropagation();
54912    } // ENTER
54913
54914
54915    if (e.key === 'Enter') {
54916      handleEnter(instance, e, innerParams); // TAB
54917    } else if (e.key === 'Tab') {
54918      handleTab(e, innerParams); // ARROWS - switch focus between buttons
54919    } else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).indexOf(e.key) !== -1) {
54920      handleArrows(e.key); // ESC
54921    } else if (escKeys.indexOf(e.key) !== -1) {
54922      handleEsc(e, innerParams, dismissWith);
54923    }
54924  };
54925
54926  var handleEnter = function handleEnter(instance, e, innerParams) {
54927    // #720 #721
54928    if (e.isComposing) {
54929      return;
54930    }
54931
54932    if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {
54933      if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
54934        return; // do not submit
54935      }
54936
54937      clickConfirm();
54938      e.preventDefault();
54939    }
54940  };
54941
54942  var handleTab = function handleTab(e, innerParams) {
54943    var targetElement = e.target;
54944    var focusableElements = getFocusableElements();
54945    var btnIndex = -1;
54946
54947    for (var i = 0; i < focusableElements.length; i++) {
54948      if (targetElement === focusableElements[i]) {
54949        btnIndex = i;
54950        break;
54951      }
54952    }
54953
54954    if (!e.shiftKey) {
54955      // Cycle to the next button
54956      setFocus(innerParams, btnIndex, 1);
54957    } else {
54958      // Cycle to the prev button
54959      setFocus(innerParams, btnIndex, -1);
54960    }
54961
54962    e.stopPropagation();
54963    e.preventDefault();
54964  };
54965
54966  var handleArrows = function handleArrows(key) {
54967    var confirmButton = getConfirmButton();
54968    var denyButton = getDenyButton();
54969    var cancelButton = getCancelButton();
54970
54971    if (!([confirmButton, denyButton, cancelButton].indexOf(document.activeElement) !== -1)) {
54972      return;
54973    }
54974
54975    var sibling = arrowKeysNextButton.indexOf(key) !== -1 ? 'nextElementSibling' : 'previousElementSibling';
54976    var buttonToFocus = document.activeElement[sibling];
54977
54978    if (buttonToFocus) {
54979      buttonToFocus.focus();
54980    }
54981  };
54982
54983  var handleEsc = function handleEsc(e, innerParams, dismissWith) {
54984    if (callIfFunction(innerParams.allowEscapeKey)) {
54985      e.preventDefault();
54986      dismissWith(DismissReason.esc);
54987    }
54988  };
54989
54990  var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {
54991    var innerParams = privateProps.innerParams.get(instance);
54992
54993    if (innerParams.toast) {
54994      handleToastClick(instance, domCache, dismissWith);
54995    } else {
54996      // Ignore click events that had mousedown on the popup but mouseup on the container
54997      // This can happen when the user drags a slider
54998      handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup
54999
55000      handleContainerMousedown(domCache);
55001      handleModalClick(instance, domCache, dismissWith);
55002    }
55003  };
55004
55005  var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {
55006    // Closing toast by internal click
55007    domCache.popup.onclick = function () {
55008      var innerParams = privateProps.innerParams.get(instance);
55009
55010      if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
55011        return;
55012      }
55013
55014      dismissWith(DismissReason.close);
55015    };
55016  };
55017
55018  var ignoreOutsideClick = false;
55019
55020  var handleModalMousedown = function handleModalMousedown(domCache) {
55021    domCache.popup.onmousedown = function () {
55022      domCache.container.onmouseup = function (e) {
55023        domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
55024        // have any other direct children aside of the popup
55025
55026        if (e.target === domCache.container) {
55027          ignoreOutsideClick = true;
55028        }
55029      };
55030    };
55031  };
55032
55033  var handleContainerMousedown = function handleContainerMousedown(domCache) {
55034    domCache.container.onmousedown = function () {
55035      domCache.popup.onmouseup = function (e) {
55036        domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
55037
55038        if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
55039          ignoreOutsideClick = true;
55040        }
55041      };
55042    };
55043  };
55044
55045  var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {
55046    domCache.container.onclick = function (e) {
55047      var innerParams = privateProps.innerParams.get(instance);
55048
55049      if (ignoreOutsideClick) {
55050        ignoreOutsideClick = false;
55051        return;
55052      }
55053
55054      if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {
55055        dismissWith(DismissReason.backdrop);
55056      }
55057    };
55058  };
55059
55060  function _main(userParams) {
55061    showWarningsForParams(userParams);
55062
55063    if (globalState.currentInstance) {
55064      globalState.currentInstance._destroy();
55065    }
55066
55067    globalState.currentInstance = this;
55068    var innerParams = prepareParams(userParams);
55069    setParameters(innerParams);
55070    Object.freeze(innerParams); // clear the previous timer
55071
55072    if (globalState.timeout) {
55073      globalState.timeout.stop();
55074      delete globalState.timeout;
55075    } // clear the restore focus timeout
55076
55077
55078    clearTimeout(globalState.restoreFocusTimeout);
55079    var domCache = populateDomCache(this);
55080    render(this, innerParams);
55081    privateProps.innerParams.set(this, innerParams);
55082    return swalPromise(this, domCache, innerParams);
55083  }
55084
55085  var prepareParams = function prepareParams(userParams) {
55086    var showClass = _extends({}, defaultParams.showClass, userParams.showClass);
55087
55088    var hideClass = _extends({}, defaultParams.hideClass, userParams.hideClass);
55089
55090    var params = _extends({}, defaultParams, userParams);
55091
55092    params.showClass = showClass;
55093    params.hideClass = hideClass; // @deprecated
55094
55095    if (userParams.animation === false) {
55096      params.showClass = {
55097        popup: 'swal2-noanimation',
55098        backdrop: 'swal2-noanimation'
55099      };
55100      params.hideClass = {};
55101    }
55102
55103    return params;
55104  };
55105
55106  var swalPromise = function swalPromise(instance, domCache, innerParams) {
55107    return new Promise(function (resolve) {
55108      // functions to handle all closings/dismissals
55109      var dismissWith = function dismissWith(dismiss) {
55110        instance.closePopup({
55111          isDismissed: true,
55112          dismiss: dismiss
55113        });
55114      };
55115
55116      privateMethods.swalPromiseResolve.set(instance, resolve);
55117
55118      domCache.confirmButton.onclick = function () {
55119        return handleConfirmButtonClick(instance, innerParams);
55120      };
55121
55122      domCache.denyButton.onclick = function () {
55123        return handleDenyButtonClick(instance);
55124      };
55125
55126      domCache.cancelButton.onclick = function () {
55127        return handleCancelButtonClick(instance, dismissWith);
55128      };
55129
55130      domCache.closeButton.onclick = function () {
55131        return dismissWith(DismissReason.close);
55132      };
55133
55134      handlePopupClick(instance, domCache, dismissWith);
55135      addKeydownHandler(instance, globalState, innerParams, dismissWith);
55136
55137      if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
55138        addClass(document.body, swalClasses['toast-column']);
55139      } else {
55140        removeClass(document.body, swalClasses['toast-column']);
55141      }
55142
55143      handleInputOptionsAndValue(instance, innerParams);
55144      openPopup(innerParams);
55145      setupTimer(globalState, innerParams, dismissWith);
55146      initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)
55147
55148      setTimeout(function () {
55149        domCache.container.scrollTop = 0;
55150      });
55151    });
55152  };
55153
55154  var populateDomCache = function populateDomCache(instance) {
55155    var domCache = {
55156      popup: getPopup(),
55157      container: getContainer(),
55158      content: getContent(),
55159      actions: getActions(),
55160      confirmButton: getConfirmButton(),
55161      denyButton: getDenyButton(),
55162      cancelButton: getCancelButton(),
55163      loader: getLoader(),
55164      closeButton: getCloseButton(),
55165      validationMessage: getValidationMessage(),
55166      progressSteps: getProgressSteps()
55167    };
55168    privateProps.domCache.set(instance, domCache);
55169    return domCache;
55170  };
55171
55172  var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {
55173    var timerProgressBar = getTimerProgressBar();
55174    hide(timerProgressBar);
55175
55176    if (innerParams.timer) {
55177      globalState$$1.timeout = new Timer(function () {
55178        dismissWith('timer');
55179        delete globalState$$1.timeout;
55180      }, innerParams.timer);
55181
55182      if (innerParams.timerProgressBar) {
55183        show(timerProgressBar);
55184        setTimeout(function () {
55185          if (globalState$$1.timeout.running) {
55186            // timer can be already stopped at this point
55187            animateTimerProgressBar(innerParams.timer);
55188          }
55189        });
55190      }
55191    }
55192  };
55193
55194  var initFocus = function initFocus(domCache, innerParams) {
55195    if (innerParams.toast) {
55196      return;
55197    }
55198
55199    if (!callIfFunction(innerParams.allowEnterKey)) {
55200      return blurActiveElement();
55201    }
55202
55203    if (!focusButton(domCache, innerParams)) {
55204      setFocus(innerParams, -1, 1);
55205    }
55206  };
55207
55208  var focusButton = function focusButton(domCache, innerParams) {
55209    if (innerParams.focusDeny && isVisible(domCache.denyButton)) {
55210      domCache.denyButton.focus();
55211      return true;
55212    }
55213
55214    if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
55215      domCache.cancelButton.focus();
55216      return true;
55217    }
55218
55219    if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
55220      domCache.confirmButton.focus();
55221      return true;
55222    }
55223
55224    return false;
55225  };
55226
55227  var blurActiveElement = function blurActiveElement() {
55228    if (document.activeElement && typeof document.activeElement.blur === 'function') {
55229      document.activeElement.blur();
55230    }
55231  };
55232
55233  /**
55234   * Updates popup parameters.
55235   */
55236
55237  function update(params) {
55238    var popup = getPopup();
55239    var innerParams = privateProps.innerParams.get(this);
55240
55241    if (!popup || hasClass(popup, innerParams.hideClass.popup)) {
55242      return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
55243    }
55244
55245    var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
55246
55247    Object.keys(params).forEach(function (param) {
55248      if (Swal.isUpdatableParameter(param)) {
55249        validUpdatableParams[param] = params[param];
55250      } else {
55251        warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md"));
55252      }
55253    });
55254
55255    var updatedParams = _extends({}, innerParams, validUpdatableParams);
55256
55257    render(this, updatedParams);
55258    privateProps.innerParams.set(this, updatedParams);
55259    Object.defineProperties(this, {
55260      params: {
55261        value: _extends({}, this.params, params),
55262        writable: false,
55263        enumerable: true
55264      }
55265    });
55266  }
55267
55268  function _destroy() {
55269    var domCache = privateProps.domCache.get(this);
55270    var innerParams = privateProps.innerParams.get(this);
55271
55272    if (!innerParams) {
55273      return; // This instance has already been destroyed
55274    } // Check if there is another Swal closing
55275
55276
55277    if (domCache.popup && globalState.swalCloseEventFinishedCallback) {
55278      globalState.swalCloseEventFinishedCallback();
55279      delete globalState.swalCloseEventFinishedCallback;
55280    } // Check if there is a swal disposal defer timer
55281
55282
55283    if (globalState.deferDisposalTimer) {
55284      clearTimeout(globalState.deferDisposalTimer);
55285      delete globalState.deferDisposalTimer;
55286    }
55287
55288    runDidDestroy(innerParams);
55289    disposeSwal(this);
55290  }
55291
55292  var runDidDestroy = function runDidDestroy(innerParams) {
55293    if (typeof innerParams.didDestroy === 'function') {
55294      innerParams.didDestroy();
55295    } else if (typeof innerParams.onDestroy === 'function') {
55296      innerParams.onDestroy(); // @deprecated
55297    }
55298  };
55299
55300  var disposeSwal = function disposeSwal(instance) {
55301    // Unset this.params so GC will dispose it (#1569)
55302    delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)
55303
55304    delete globalState.keydownHandler;
55305    delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)
55306
55307    unsetWeakMaps(privateProps);
55308    unsetWeakMaps(privateMethods);
55309  };
55310
55311  var unsetWeakMaps = function unsetWeakMaps(obj) {
55312    for (var i in obj) {
55313      obj[i] = new WeakMap();
55314    }
55315  };
55316
55317
55318
55319  var instanceMethods = /*#__PURE__*/Object.freeze({
55320    hideLoading: hideLoading,
55321    disableLoading: hideLoading,
55322    getInput: getInput$1,
55323    close: close,
55324    closePopup: close,
55325    closeModal: close,
55326    closeToast: close,
55327    enableButtons: enableButtons,
55328    disableButtons: disableButtons,
55329    enableInput: enableInput,
55330    disableInput: disableInput,
55331    showValidationMessage: showValidationMessage,
55332    resetValidationMessage: resetValidationMessage$1,
55333    getProgressSteps: getProgressSteps$1,
55334    _main: _main,
55335    update: update,
55336    _destroy: _destroy
55337  });
55338
55339  var currentInstance;
55340
55341  var SweetAlert = /*#__PURE__*/function () {
55342    function SweetAlert() {
55343      _classCallCheck(this, SweetAlert);
55344
55345      // Prevent run in Node env
55346      if (typeof window === 'undefined') {
55347        return;
55348      } // Check for the existence of Promise
55349
55350
55351      if (typeof Promise === 'undefined') {
55352        error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');
55353      }
55354
55355      currentInstance = this;
55356
55357      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55358        args[_key] = arguments[_key];
55359      }
55360
55361      var outerParams = Object.freeze(this.constructor.argsToParams(args));
55362      Object.defineProperties(this, {
55363        params: {
55364          value: outerParams,
55365          writable: false,
55366          enumerable: true,
55367          configurable: true
55368        }
55369      });
55370
55371      var promise = this._main(this.params);
55372
55373      privateProps.promise.set(this, promise);
55374    } // `catch` cannot be the name of a module export, so we define our thenable methods here instead
55375
55376
55377    _createClass(SweetAlert, [{
55378      key: "then",
55379      value: function then(onFulfilled) {
55380        var promise = privateProps.promise.get(this);
55381        return promise.then(onFulfilled);
55382      }
55383    }, {
55384      key: "finally",
55385      value: function _finally(onFinally) {
55386        var promise = privateProps.promise.get(this);
55387        return promise["finally"](onFinally);
55388      }
55389    }]);
55390
55391    return SweetAlert;
55392  }(); // Assign instance methods from src/instanceMethods/*.js to prototype
55393
55394
55395  _extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
55396
55397
55398  _extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
55399
55400
55401  Object.keys(instanceMethods).forEach(function (key) {
55402    SweetAlert[key] = function () {
55403      if (currentInstance) {
55404        var _currentInstance;
55405
55406        return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
55407      }
55408    };
55409  });
55410  SweetAlert.DismissReason = DismissReason;
55411  SweetAlert.version = '10.3.5';
55412
55413  var Swal = SweetAlert;
55414  Swal["default"] = Swal;
55415
55416  return Swal;
55417
55418}));
55419if (typeof this !== 'undefined' && this.Sweetalert2){  this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}
55420
55421;/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
55422 * http://jqueryvalidation.org/
55423 * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
55424!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.val
55424idClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)}
55424,hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");
55424g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 4,710 bytes, line 55424
55424return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;
55424if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
55425;
vendor: 20,693 bytes, line 55425
55425!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()},setCookie:function(e,t,i,n,o,s){var r=new Date;r.setHours(r.getHours()+24*(i||365));var a=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t<i;++t)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){return e=this.normaliseHex(e),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"https://www.cookiesandyou.com",close:"&#x274c;",target:"_blank",policy:"Cookie Policy"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}">\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e</div>',revokeBtn:'<div class="cc-revoke {{classes}}">{{policy}}</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(n){var o=this.options,s=document.createElement("div"),r=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a)),a}function l(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}return o.prototype.initialise=function(i){this.options&&this.destroy(),t.deepExtend(this.options={},n),t.isPlainObject(i)&&t.deepExtend(this.options,i),function(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options,n="top"==i.position||"bottom"==i.position?"banner":"floating";t.isMobile()&&(n="floating");var o=["cc-"+n,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&o.push("cc-static");o.push.apply(o,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||l(a.background))]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var h=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++h)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&o.push(this.customStyleSelector);return o}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info);e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];o||(o=i.layouts.basic);return t.interpolateString(o,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var r=c.call(this,'<div class="cc-grower">'+o+"</div>");r.style.display="",this.element=r.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=c.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var r=function(t){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",r),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=r,window.addEventListener("scroll",r))}var a=this.options.dismissOnWindowClick,c=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,r=o.path.length,a=c.length,u=0;u<r;u++)if(!s)for(var h=0;h<a;h++)s||(s=t.hasClass(o.path[u],c[h]));s||(i(e.status.dismiss),n(!0),window.removeEventListener("click",l),window.removeEventListener("touchend",l),this.onWindowClick=null)}.bind(this);this.options.enabled&&(this.onWindowClick=l,window.addEventListener("click",l),window.addEventListener("touchend",l))}}).call(this),function(){"info"!=this.options.type&&(this.options.revokable=!0);t.isMobile()&&(this.options.animateRevokable=!1);if(this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" ")).replace("{{policy}}",this.options.content.policy);this.revokeBtn=c.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<20&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>o&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen()},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&r.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex<this.options.services.length&&!e);return e},i.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},i.prototype.locate=function(e,t){var i=this.getNextService();i?(this.callbackComplete=e,this.callbackError=t,this.runService(i,this.runNextServiceOnError.bind(this))):t(new Error("No services to run"))},i.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},i.prototype.runService=function(e,t){var i=this;e&&e.url&&e.callback&&(e.isScript?n:o)(this.setupUrl(e),function(n){var o=n?n.responseText:"";e.__JSONP_DATA&&(o=e.__JSONP_DATA,delete e.__JSONP_DATA),i.runServiceCallback.call(i,t,e,o)},this.options.timeout,e.data,e.headers)},i.prototype.runServiceCallback=function(e,t,i){var n=this,o=t.callback(function(t){o||n.onServiceResult.call(n,e,t)},i);o&&this.onServiceResult.call(this,e,o)},i.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},i.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},i.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}:"function"==typeof e?e():t.isPlainObject(e)?e:{}},i.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},i.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.warn("The service["+t+"] ("+i.url+") responded with the following error",e)},i}(),e.Law=function(){var e={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","ES","SE","GB","UK","GR","EU"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};function i(e){this.initialise.apply(this,arguments)}return i.prototype.initialise=function(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i)},i.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);n||(n=function(){}),o||(o=function(){});var r=Object.keys(e.status),a=t.getCookie("cookieconsent_status");r.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});
55425
55426;
55427//# sourceMappingURL=scripts.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.